Hello
I was wondering if unique_for_date is not working or if I am not
understanding how it is meant to be used.
My model:
class Entry(models.Model):
title = models.CharField(max_length=255)
content = models.TextField()
pubDate = models.DateTimeField(auto_now=False,auto_now_add=True)
editDate = models.DateTimeField(auto_now=True)
published = models.BooleanField()
slug = models.SlugField(unique_for_date='pubDate')
blog = models.ForeignKey(Blog)
def __unicode__(self):
return self.title
When I am in django admin I am able to make multiple entries with the
same slug. I've tried changing the uniqueness to title and both and it
still allowed me to create multiple entries.
Thank you
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---