|Reported by:||wdoekes||Owned by:||Alex|
|Severity:||Normal||Keywords:||unique_for_date unique_for_month unique_for_year|
|Cc:||zerok@…, flosch@…, monuszko||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:1 Changed 6 years ago by kmtracey
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
comment:3 Changed 6 years ago by jacob
- milestone set to 1.1
- Triage Stage changed from Unreviewed to Accepted
comment:11 Changed 6 years ago by russellm
- Resolution set to fixed
- Status changed from new to closed
comment:16 Changed 2 years ago by monuszko
- Cc monuszko added
- Easy pickings unset
- Patch needs improvement set
- Resolution fixed deleted
- Severity set to Normal
- Status changed from closed to new
- Type set to Uncategorized
- UI/UX unset
- Version changed from master to 1.4