Saturday, October 10, 2020

Changing ordering of model in the admin views

Django users,

I have a User model, in which I defined class Meta with ordering. It's defined like this:

class Meta:
verbose_name = _('user')
verbose_name_plural = _('users')
ordering = ('-speedy_net_site_profile__last_visit',)
swappable = 'AUTH_USER_MODEL'

But, I have two apps - Speedy Net and Speedy Match, and in Speedy Match I want a different order (
      ordering = ('-speedy_match_site_profile__last_visit',)
). How can I do this?

Thanks,

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABD5YeEgKXis7GiwL%2BHtmAt8gSwwqaDOVpzOS-M8-NiL%3D5cPWg%40mail.gmail.com.

No comments:

Post a Comment