#15 Merged
Repository
glic3rinu/django-admin-tools-fixes django-admin-tools-fixes
Branch
default
Repository
izi/django-admin-tools django-admin-tools
Branch
default

Fixes compatibility with Django 1.5

Author
  1. glic3rinu avatarglic3rinu
Reviewers
Description

1. Adds compatibility with swappable User model ##

New Django 1.5 feature that allows to configure a custom User model for contrib.auth application.

See release notes https://docs.djangoproject.com/en/dev/releases/1.5/#configurable-user-model

2. Fixes url template tags

admin-tools breaks in Django 1.5 because it requires view names in url template tags to be strings (syntax available since 1.4) Additional info from django 1.5 release notes:

One deprecated feature worth noting is the shift to “new-style” url tag. Prior to Django 1.3, syntax like {% url myview %} was interpreted incorrectly (Django considered "myview" to be a literal name of a view, not a template variable named myview). Django 1.3 and above introduced the {% load url from future %} syntax to bring in the corrected behavior where myview was seen as a variable.

The upshot of this is that if you are not using {% load url from future %} in your templates, you’ll need to change tags like {% url myview %} to {% url "myview" %}. If you were using {% load url from future %} you can simply remove that line under Django 1.5

This patch maintains backward compatibility with previous versions of Django.

Comments (6)

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.