Opened 8 years ago

Closed 8 years ago

#4517 closed (fixed)

[patch] Incorrect URL_VALIDATOR_USER_AGENT due to DRY violation

Reported by: James Wheare <django@…> Owned by: adrian
Component: Metasystem Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: UI/UX:


Patch for that keeps the URL_VALIDATOR_USER_AGENT setting string in line with the Django version number.

Attachments (2)

global_settings.diff (576 bytes) - added by James Wheare <django@…> 8 years ago.
version.diff (2.9 KB) - added by James Wheare <django@…> 8 years ago.
Moves get_version to django/

Download all attachments as: .zip

Change History (7)

Changed 8 years ago by James Wheare <django@…>

comment:1 Changed 8 years ago by mtredinnick

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement set
  • Triage Stage changed from Unreviewed to Accepted

Having the settings file import anything even slightly complex (like is probably a bit risky, since if any other module is imported indirectly that uses settings, they can't be changed any longer.

So the idea is correct, but we should do the version compositing some other way. Pushing get_version into django/ might be better.

Changed 8 years ago by James Wheare <django@…>

Moves get_version to django/

comment:2 Changed 8 years ago by James Wheare <django@…>

Trac seems to munge the diff a bit (take a look at the original format), and I'm not sure if it's better to import django then call django.get_version() or import the method directly, but here's a stab.

comment:3 Changed 8 years ago by mtredinnick

  • Triage Stage changed from Accepted to Ready for checkin

Looks good, James. Thanks. I'll commit this in the morning (when I'm more awake and can read it again).

comment:4 Changed 8 years ago by mtredinnick

Hmmm... note to self: we should import get_version into the namespace of so that any existing code doing from management import get_version will continue to work. I'll fix that when I commit.

comment:5 Changed 8 years ago by mtredinnick

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

(In [5451]) Fixed #4517 -- Made sure that URL_VALIDATOR_USER_AGENT includes the up-to-date
Django version number. Thanks, James Wheare.

Note: See TracTickets for help on using tickets.
Back to Top