|Reported by:||Walter Doekes||Owned by:||Alex Gaynor|
|Severity:||Normal||Keywords:||unique_for_date unique_for_month unique_for_year|
|Cc:||zerok@…, flosch@…, Marek Onuszko||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
I was looking for the unique_for_date (et al.) implementation to re-use some of it for my own purposes, but I can't seem to find it.
On these pages, I read that one can do the following:
class Test(models.Model): unique_for_date = models.CharField(max_length=128, unique_for_date='date') date = models.DateField()
If I read it correctly, it means that when using the admin form (admin.site.register(Test)), I shouldn't be able to enter the same value for
unique_for_date for the same date. But instead, the admin form does no uniqueness checking at all.
In  I see that a lot of code that touches the unique_for_* is removed, but I don't see it get added in another place.
Am I missing something?
Change History (21)
comment:16 Changed 4 years ago by
|Cc:||Marek Onuszko added|
|Patch needs improvement:||set|
|Status:||closed → new|
|Version:||master → 1.4|