Being new to Django I wonder if someone could point me in the right 
direction and I apologise in advance if this is an obvious question.

I have a model with a field that sets an expiry date.

In my ListView I have the following:
queryset = 
Article.objects.filter(expiry_date__gt=datetime.now()).order_by('expiry_date')
Every thing works fine at this point.

Would it be better to include this in a custom manager instead and if so 
how is this handled in the view or is it done just by including:
model = Article

A second point is, if I do this will the expired articles still be 
accessible via the admin?

Many 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/52343343-f363-4f73-8a5b-a897a936a08a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to