Re: Creating a custom view in Django admin,
On May 26, 7:02 pm, Dexter <a.essel...@gmail.com> wrote:
> Another thing:
>
> At the event model, it is unnecessary to display all the events in the
> admin. How can I make sure only the events coming (ie
> date__gte=datetime.now()) are displayed in the admin?
i think a proxy model[1] might work where you set the default manager
to only filter for all objects greater than now(). then, instead of
(or in addition to) the actual event model you register the proxymodel
with the admin.
[1] http://docs.djangoproject.com/en/dev/topics/db/models/#proxy-model-managers
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home