Allow app_label and class to be specified in the name argument for indexes and constraints.
Allow %(app_label)s
and %(class)s
to be specified in name
argument for BaseConstraint
(CheckConstraint
, UniqueConstraint
) and Index
:
%(class)s
should be replaced by the lowercased name of the child class that the field is used in,
'%(app_label)s
should be replaced by the lowercased name of the app the child class is contained within.
This should allow for specifying check constraints and partial indexes (which name
's are mandatory) in abstract models.
Based on discussion in #30362.
Change History
(13)
Has patch: |
set
|
Owner: |
changed from nobody to Can Sarıgöl
|
Status: |
new → assigned
|
Needs tests: |
set
|
Patch needs improvement: |
set
|
Needs tests: |
unset
|
Patch needs improvement: |
unset
|
Needs tests: |
set
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Patch needs improvement: |
set
|
Patch needs improvement: |
unset
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
PR