Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1367 closed defect (fixed)

[magic-removal] Patch to fix unique_together validator

Reported by: Christopher Lenz <cmlenz@…> 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: UI/UX:


... which still uses the magical get_model_module() stuff.

I'll attach a patch, however it should be noted that:

  • The module contains other references to the “old API”, such as get_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't set that up for me? And why can't I just run test, seeing that Django is already using setuptools?)

Attachments (1)

unique_together.diff (900 bytes) - added by Christopher Lenz <cmlenz@…> 12 years ago.
Patch for unique_together (against r2314)

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by Christopher Lenz <cmlenz@…>

Attachment: unique_together.diff added

Patch for unique_together (against r2314)

comment:1 Changed 12 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [2315]) magic-removal: Fixed #1367 -- Got unique_together validator working. Thanks, Christopher Lenz

comment:2 Changed 12 years ago by Adrian Holovaty

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.
Back to Top