Opened 19 years ago

Closed 19 years ago

Last modified 18 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: 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 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 runtests.py set that up for me? And why can't I just run setup.py test, seeing that Django is already using setuptools?)

Attachments (1)

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

Download all attachments as: .zip

Change History (3)

by Christopher Lenz <cmlenz@…>, 19 years ago

Attachment: unique_together.diff added

Patch for unique_together (against r2314)

comment:1 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

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

comment:2 by Adrian Holovaty, 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.
Back to Top