Thursday, July 23, 2015

Limit initial admin queryset

I have a model - Registrations. 97% of the time a user wants to see 'todays' registrations when viewing this model in admin. Is there a way to set the initial display of records, but allow full access thereafter?

The example in admin.get_queryset assumes I want to manage each query. In my case, I only want to manage those the user doesn't initiate.

--
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BePoMwrwAyprMorYOxBd8Lhb%2BA9vt3_XaygFD0MhkEFN4XwhA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment