Code

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#1367 closed defect (fixed)

[magic-removal] Patch to fix unique_together validator

Reported by: Christopher Lenz <cmlenz@…> Owned by: adrian
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:

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@…> 8 years ago.
Patch for unique_together (against r2314)

Download all attachments as: .zip

Change History (3)

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

Patch for unique_together (against r2314)

comment:1 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:2 Changed 8 years ago by adrian

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. :)

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.