#1367 closed defect (fixed)
[magic-removal] Patch to fix unique_together validator
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Metasystem | Version: | magic-removal |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
... which still uses the magical get_model_module()
stuff.
I'll attach a patch, however it should be noted that:
- The
manipulators.py
module contains other references to the “old API”, such asget_object()
, which I haven't looked into. - I've not added any unit tests, or even run the existing suite, since I couldn't yet figure out how they should be run (why do they need a
DJANGO_SETTINGS_MODULE
? Why can'truntests.py
set that up for me? And why can't I just runsetup.py test
, seeing that Django is already using setuptools?)
Attachments (1)
Change History (3)
by , 19 years ago
Attachment: | unique_together.diff added |
---|
comment:1 by , 19 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 19 years ago
Thanks for the patch! Regarding your questions about the unit tests -- they require a DJANGO_SETTINGS_MODULE for the basic connection information (username, password and database driver). I agree that's quite lame, and those should be specified as command-line params instead. Patches are welcome. :)
Note:
See TracTickets
for help on using tickets.
Patch for unique_together (against r2314)