Being new to Django I have a problem which I am not able to resolve.
I have a model which has the following fields:
expiry_date = models.DateField(null=True, blank=True,)
has_expired = models.BooleanField(verbose_name='Has Expired',
default=True, )
I need to keep expired items in the database for reporting purposes.
My question is how do I show only the non-expired items in my views.?
Would the solution be via a model manager?
Any help would be appreciated
-- I have a model which has the following fields:
expiry_date = models.DateField(null=True, blank=True,)
has_expired = models.BooleanField(verbose_name='Has Expired',
default=True, )
I need to keep expired items in the database for reporting purposes.
My question is how do I show only the non-expired items in my views.?
Would the solution be via a model manager?
Any help would be appreciated
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fde03894-1d20-4977-906b-6cc1fcc02745%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment