#32977: conditionalize Class Meta. I want to achieve something like this. How
can i
do it?
--------------------------------------------+------------------------
Reporter: hellorahulnarang | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 3.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
--------------------------------------------+------------------------
if self.name_format == "First name Last name":
class Meta:
ordering = ['first_name', 'last_name']
elif self.name_format == "Last name First name":
class Meta:
ordering = ["last_name","first_name"]
elif self.name_format == "Last name, First name":
class Meta:
ordering = ["last_name","first_name"]
else:
class Meta:
ordering = ["first_name","last_name"]
--
Ticket URL: <https://code.djangoproject.com/ticket/32977>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/059.fb22551e7e77774ae230471dfb9390f0%40djangoproject.com.