From 82c632ca2d9bc9a5892870759f0a78fa6758692c Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Tue, 7 Jun 2016 09:56:03 +1200 Subject: Upgrade to Django 1.6+ I'd like to be upgrading to 1.8 but that causes problems with South, and we're not quite ready to dispense with our existing migrations yet. Part of the implementation for [YOCTO #9620]. Signed-off-by: Paul Eggleton --- README | 18 +++++----- layerindex/forms.py | 13 ++++---- layerindex/restviews.py | 4 +-- layerindex/urls.py | 16 ++++----- layerindex/urls_branch.py | 3 +- layerindex/utils.py | 6 ---- manage.py | 20 ++++-------- requirements.txt | 38 +++++++++++----------- settings.py | 2 +- templates/404.html | 2 +- templates/base.html | 22 ++++++------- templates/base_toplevel.html | 3 +- templates/layerindex/about.html | 2 +- templates/layerindex/bulkchange.html | 2 +- templates/layerindex/bulkchangereview.html | 8 ++--- templates/layerindex/bulkchangesearch.html | 8 ++--- templates/layerindex/classic_base.html | 10 +++--- templates/layerindex/classicrecipedetail.html | 2 +- templates/layerindex/classicrecipes.html | 10 +++--- templates/layerindex/classicstats.html | 4 +-- templates/layerindex/detail.html | 14 ++++---- templates/layerindex/duplicates.html | 1 - templates/layerindex/editlayernote.html | 2 +- templates/layerindex/layers.html | 8 ++--- templates/layerindex/machines.html | 10 +++--- templates/layerindex/profile.html | 2 +- templates/layerindex/recipedetail.html | 12 +++---- templates/layerindex/recipes.html | 12 +++---- templates/layerindex/reviewdetail.html | 14 ++++---- templates/layerindex/reviewlist.html | 2 +- templates/registration/activate.html | 2 +- templates/registration/activation_email.txt | 2 +- templates/registration/login.html | 4 +-- .../registration/password_reset_complete.html | 2 +- templates/registration/password_reset_email.html | 2 +- urls.py | 6 ++-- 36 files changed, 136 insertions(+), 152 deletions(-) diff --git a/README b/README index ff0a7a5a63..db788dfacc 100644 --- a/README +++ b/README @@ -11,22 +11,22 @@ Setup In order to make use of this application you will need: -* Django 1.4.x - tested with 1.4.1-1.4.10; newer versions may work, but - the application has not been tested with 1.5 or newer. +* Django 1.6.x - tested with 1.6.10; newer versions may work, but + the application has not been tested with 1.7 or newer. * For production usage, a web server set up to host Django applications (not needed for local-only testing) * A database supported by Django (SQLite, MySQL, etc.). Django takes care of creating the database itself, you just need to ensure that the database server (if not using SQLite) is configured and running. * The following third-party Django modules (tested versions listed): - * django-south (0.8.4) + * django-south (1.0.2) * django-registration (1.0) - * django-reversion (1.7.1) - * django-reversion-compare (0.3.5) - * django-simple-captcha (0.4.1) - * django-nvd3 (0.6.0) - * djangorestframework (2.3.14) - * django-cors-headers (0.12) + * django-reversion (1.8.7) + * django-reversion-compare (0.4.0) + * django-simple-captcha (0.4.6) + * django-nvd3 (0.9.7) + * djangorestframework (3.2.5) + * django-cors-headers (1.1.0) * On the machine that will run the backend update script (which does not have to be the same machine as the web server, however it does still have to have Django installed, have the same or similar configuration diff --git a/layerindex/forms.py b/layerindex/forms.py index 60653cf2b4..e15dbeb433 100644 --- a/layerindex/forms.py +++ b/layerindex/forms.py @@ -6,7 +6,7 @@ from layerindex.models import LayerItem, LayerBranch, LayerMaintainer, LayerNote, RecipeChangeset, RecipeChange, ClassicRecipe from django import forms -from django.core.validators import URLValidator, RegexValidator, email_re +from django.core.validators import URLValidator, RegexValidator, EmailValidator from django.forms.models import inlineformset_factory, modelformset_factory from captcha.fields import CaptchaField from django.contrib.auth.models import User @@ -29,9 +29,8 @@ class LayerMaintainerForm(forms.ModelForm): if email: if len(email) < 7: raise forms.ValidationError('%s is not a valid email address' % email) - reg = re.compile(email_re) - if not reg.match(email): - raise forms.ValidationError('%s is not a valid email address' % email) + val = EmailValidator() + val(email) return email @@ -115,21 +114,21 @@ class EditLayerForm(forms.ModelForm): def clean_vcs_web_tree_base_url(self): url = self.cleaned_data['vcs_web_tree_base_url'].strip() if url: - val = URLValidator(verify_exists=False) + val = URLValidator() val(url) return url def clean_vcs_web_file_base_url(self): url = self.cleaned_data['vcs_web_file_base_url'].strip() if url: - val = URLValidator(verify_exists=False) + val = URLValidator() val(url) return url def clean_usage_url(self): usage = self.cleaned_data['usage_url'].strip() if usage.startswith('http'): - val = URLValidator(verify_exists=False) + val = URLValidator() val(usage) return usage diff --git a/layerindex/restviews.py b/layerindex/restviews.py index 61698a9918..b33d3d19d7 100644 --- a/layerindex/restviews.py +++ b/layerindex/restviews.py @@ -1,6 +1,6 @@ -from models import Branch, LayerItem, LayerNote, LayerBranch, LayerDependency, Recipe, Machine +from layerindex.models import Branch, LayerItem, LayerNote, LayerBranch, LayerDependency, Recipe, Machine from rest_framework import viewsets, serializers -from querysethelper import params_to_queryset, get_search_tuple +from layerindex.querysethelper import params_to_queryset, get_search_tuple class ParametricSearchableModelViewSet(viewsets.ModelViewSet): def get_queryset(self): diff --git a/layerindex/urls.py b/layerindex/urls.py index 1bd4f0b5b1..e7808e6683 100644 --- a/layerindex/urls.py +++ b/layerindex/urls.py @@ -4,9 +4,8 @@ # # Licensed under the MIT license, see COPYING.MIT for details -from django.conf.urls.defaults import * -from django.views.generic import TemplateView, DetailView, ListView -from django.views.generic.simple import redirect_to +from django.conf.urls import * +from django.views.generic import TemplateView, DetailView, ListView, RedirectView from django.views.defaults import page_not_found from django.core.urlresolvers import reverse_lazy from layerindex.views import LayerListView, LayerReviewListView, LayerReviewDetailView, RecipeSearchView, MachineSearchView, PlainTextListView, LayerDetailView, edit_layer_view, delete_layer_view, edit_layernote_view, delete_layernote_view, HistoryListView, EditProfileFormView, AdvancedRecipeSearchView, BulkChangeView, BulkChangeSearchView, bulk_change_edit_view, bulk_change_patch_view, BulkChangeDeleteView, RecipeDetailView, RedirectParamsView, ClassicRecipeSearchView, ClassicRecipeDetailView, ClassicRecipeStatsView @@ -24,19 +23,20 @@ router.register(r'recipes', restviews.RecipeViewSet) router.register(r'machines', restviews.MachineViewSet) urlpatterns = patterns('', - url(r'^$', redirect_to, {'url' : reverse_lazy('layer_list', args=('master',))}, + url(r'^$', + RedirectView.as_view(url=reverse_lazy('layer_list', args=('master',))), name='frontpage'), url(r'^api/', include(router.urls)), url(r'^layers/$', - redirect_to, {'url' : reverse_lazy('layer_list', args=('master',))}), + RedirectView.as_view(url=reverse_lazy('layer_list', args=('master',)))), url(r'^layer/(?P[-\w]+)/$', RedirectParamsView.as_view(), {'redirect_name': 'layer_item', 'branch':'master'}), url(r'^recipes/$', - redirect_to, {'url' : reverse_lazy('recipe_search', args=('master',))}), + RedirectView.as_view(url=reverse_lazy('recipe_search', args=('master',)))), url(r'^machines/$', - redirect_to, {'url' : reverse_lazy('machine_search', args=('master',))}), + RedirectView.as_view(url=reverse_lazy('machine_search', args=('master',)))), url(r'^submit/$', edit_layer_view, {'template_name': 'layerindex/submitlayer.html'}, name="submit_layer"), url(r'^submit/thanks$', @@ -107,7 +107,7 @@ urlpatterns = patterns('', template_name='layerindex/about.html'), name="about"), url(r'^oe-classic/$', - redirect_to, {'url' : reverse_lazy('classic_recipe_search')}, + RedirectView.as_view(url=reverse_lazy('classic_recipe_search')), name='classic'), url(r'^oe-classic/recipes/$', ClassicRecipeSearchView.as_view( diff --git a/layerindex/urls_branch.py b/layerindex/urls_branch.py index b0f577cf0e..ab5e2d55f1 100644 --- a/layerindex/urls_branch.py +++ b/layerindex/urls_branch.py @@ -4,8 +4,7 @@ # # Licensed under the MIT license, see COPYING.MIT for details -from django.conf.urls.defaults import * -from django.views.generic.simple import redirect_to +from django.conf.urls import * from django.views.defaults import page_not_found from django.core.urlresolvers import reverse_lazy from layerindex.views import LayerListView, RecipeSearchView, MachineSearchView, PlainTextListView, LayerDetailView, edit_layer_view, delete_layer_view, edit_layernote_view, delete_layernote_view, RedirectParamsView, DuplicatesView diff --git a/layerindex/utils.py b/layerindex/utils.py index 440cc88835..ebb89d31ef 100644 --- a/layerindex/utils.py +++ b/layerindex/utils.py @@ -57,12 +57,6 @@ def setup_django(): sys.path.append(newpath) os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' - from django.core.management import setup_environ - from django.conf import settings - import settings - - setup_environ(settings) - def logger_create(name): logger = logging.getLogger(name) loggerhandler = logging.StreamHandler() diff --git a/manage.py b/manage.py index 0b219fba5a..0a64562f9f 100644 --- a/manage.py +++ b/manage.py @@ -6,20 +6,14 @@ # # Copyright (c) Django Software Foundation and individual contributors. # All rights reserved. - +#!/usr/bin/env python import os - -from django.core.management import execute_manager -import imp -try: - imp.find_module('settings') # Assumed to be in the same directory. -except ImportError: - import sys - sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__) - sys.exit(1) - -import settings +import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") - execute_manager(settings) + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) + diff --git a/requirements.txt b/requirements.txt index cde88a0d1a..ea5beeebaf 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,20 +1,20 @@ -Django>=1.4,<1.5 -GitPython>=0.3.7 -Jinja2==2.7.3 +Django==1.6.11 +django-cors-headers==1.1.0 +django-nvd3==0.9.7 +django-registration==1.0 +django-reversion==1.8.7 +django-reversion-compare==0.4.0 +django-simple-captcha==0.4.6 +djangorestframework==3.2.5 +gitdb==0.6.4 +GitPython==2.0.5 +Jinja2==2.8 MarkupSafe==0.23 -Pillow>=2.4.0 -South==0.8.4 -Unidecode==0.04.16 -argparse==1.2.1 -awesome-slugify==1.5 -django-cors-headers==0.12 -django-nvd3==0.7.4 -django-registration==0.8 -django-reversion==1.6.6 -django-reversion-compare==0.3.5 -django-simple-captcha==0.4.2 -djangorestframework==2.3.14 -python-nvd3==0.12.2 -regex==2014.06.28 -six==1.7.3 -wsgiref==0.1.2 +mysqlclient==1.3.7 +Pillow==3.2.0 +python-nvd3==0.14.2 +python-slugify==1.1.4 +six==1.10.0 +smmap==0.9.0 +South==1.0.2 +Unidecode==0.4.19 diff --git a/settings.py b/settings.py index b21a5b43d0..b731a6b414 100644 --- a/settings.py +++ b/settings.py @@ -131,7 +131,7 @@ TEMPLATE_DIRS = ( # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Always use forward slashes, even on Windows. # Don't forget to use absolute paths, not relative paths. - BASE_DIR + "/templates" + BASE_DIR + "/templates", ) INSTALLED_APPS = ( diff --git a/templates/404.html b/templates/404.html index 843d5bc42e..5bd5f750ac 100644 --- a/templates/404.html +++ b/templates/404.html @@ -22,7 +22,7 @@

The page you requested was not found.

-

Return to the front page

+

Return to the front page

{% endautoescape %} {% endblock %} diff --git a/templates/base.html b/templates/base.html index c872383ccd..fedcfe2151 100644 --- a/templates/base.html +++ b/templates/base.html @@ -28,13 +28,13 @@ {% endif %} diff --git a/templates/layerindex/classic_base.html b/templates/layerindex/classic_base.html index eab56f2645..7ba63f51ee 100644 --- a/templates/layerindex/classic_base.html +++ b/templates/layerindex/classic_base.html @@ -24,7 +24,7 @@ {% endautoescape %} @@ -48,9 +48,9 @@

OpenEmbedded-Classic (OE-Classic) is the name for the old monolithic version of OpenEmbedded. It contained a number of recipes some of which have not yet been migrated on top of OE-Core. To help people to find and migrate these recipes we provide an index here as well as some statistics to get an idea of the migration.

- Recipes - Unmigrated Recipes - Stats + Recipes + Unmigrated Recipes + Stats diff --git a/templates/layerindex/classicrecipedetail.html b/templates/layerindex/classicrecipedetail.html index 9df9a844e8..45d845f394 100644 --- a/templates/layerindex/classicrecipedetail.html +++ b/templates/layerindex/classicrecipedetail.html @@ -21,7 +21,7 @@ {% autoescape on %} diff --git a/templates/layerindex/classicrecipes.html b/templates/layerindex/classicrecipes.html index 7fb62be6cf..799dbb41eb 100644 --- a/templates/layerindex/classicrecipes.html +++ b/templates/layerindex/classicrecipes.html @@ -17,8 +17,8 @@ {% block navs %} {% autoescape on %} -
  • Recipes
  • -
  • Stats
  • +
  • Recipes
  • +
  • Stats
  • {% endautoescape %} {% endblock %} @@ -31,7 +31,7 @@

    OE-Classic recipes

    - NOTE: This is the recipe search for OE-Classic, the older monolithic version of OpenEmbedded which is no longer actively developed. Click here to search current recipes. + NOTE: This is the recipe search for OE-Classic, the older monolithic version of OpenEmbedded which is no longer actively developed. Click here to search current recipes.
    @@ -72,13 +72,13 @@ {% for recipe in recipe_list %} 0 %}class="muted"{% endif %}> - {{ recipe.name }} + {{ recipe.name }} {{ recipe.pv }} {{ recipe.short_desc }} {{ recipe.get_cover_desc }} {{ recipe.classic_category }} {% if multi_classic_layers %} - {{ recipe.layerbranch.layer.name }} + {{ recipe.layerbranch.layer.name }} {% endif %} {% endfor %} diff --git a/templates/layerindex/classicstats.html b/templates/layerindex/classicstats.html index 2fde01b973..63d0b43288 100644 --- a/templates/layerindex/classicstats.html +++ b/templates/layerindex/classicstats.html @@ -19,8 +19,8 @@ {% block navs %} {% autoescape on %} -
  • Recipes
  • -
  • Stats
  • +
  • Recipes
  • +
  • Stats
  • {% endautoescape %} {% endblock %} diff --git a/templates/layerindex/detail.html b/templates/layerindex/detail.html index feb2c6c2c5..d0d11c05b0 100644 --- a/templates/layerindex/detail.html +++ b/templates/layerindex/detail.html @@ -22,7 +22,7 @@ {% autoescape on %} @@ -36,9 +36,9 @@ {% if user.is_authenticated %} {% if perms.layerindex.publish_layer or useredit %} - Edit layer + Edit layer {% if layeritem.layernote_set.count = 0 %} - Add note + Add note {% endif %} {% endif %} @@ -63,8 +63,8 @@ {% if perms.layerindex.publish_layer or useredit %}

    - Edit note - Delete note + Edit note + Delete note

    {% endif %}
    @@ -144,7 +144,7 @@

    The {{ layeritem.name }} layer depends upon:

    @@ -198,7 +198,7 @@ {% for recipe in layerbranch.sorted_recipes %} - {{ recipe.name }}{% if 'image' in recipe.inherits.split %}{% endif %}{% if recipe.blacklisted %}blacklisted{% endif %} + {{ recipe.name }}{% if 'image' in recipe.inherits.split %}{% endif %}{% if recipe.blacklisted %}blacklisted{% endif %} {{ recipe.pv }} {{ recipe.short_desc }} diff --git a/templates/layerindex/duplicates.html b/templates/layerindex/duplicates.html index 116aab9df6..0ebfe1185a 100644 --- a/templates/layerindex/duplicates.html +++ b/templates/layerindex/duplicates.html @@ -1,6 +1,5 @@ {% extends "base_toplevel.html" %} {% load i18n %} -{% load url from future %} {% comment %} diff --git a/templates/layerindex/editlayernote.html b/templates/layerindex/editlayernote.html index 1c7693c6bb..abf82993c3 100644 --- a/templates/layerindex/editlayernote.html +++ b/templates/layerindex/editlayernote.html @@ -25,7 +25,7 @@ {% csrf_token %} {{ form.as_p }} -Cancel +Cancel {% endautoescape %} diff --git a/templates/layerindex/layers.html b/templates/layerindex/layers.html index 4ca43fc836..cfc4ebd078 100644 --- a/templates/layerindex/layers.html +++ b/templates/layerindex/layers.html @@ -18,9 +18,9 @@ {% block navs %} {% autoescape on %} -
  • Layers
  • -
  • Recipes
  • -
  • Machines
  • +
  • Layers
  • +
  • Recipes
  • +
  • Machines
  • {% endautoescape %} {% endblock %} @@ -71,7 +71,7 @@ {% for layerbranch in layerbranch_list %} - {{ layerbranch.layer.name }} + {{ layerbranch.layer.name }} {{ layerbranch.layer.summary }} {{ layerbranch.layer.get_layer_type_display }} diff --git a/templates/layerindex/machines.html b/templates/layerindex/machines.html index 1851937d17..e31433c0a6 100644 --- a/templates/layerindex/machines.html +++ b/templates/layerindex/machines.html @@ -17,9 +17,9 @@ {% block navs %} {% autoescape on %} -
  • Layers
  • -
  • Recipes
  • -
  • Machines
  • +
  • Layers
  • +
  • Recipes
  • +
  • Machines
  • {% endautoescape %} {% endblock %} @@ -30,7 +30,7 @@
    -
    +
    @@ -52,7 +52,7 @@ {{ machine.name }} {{ machine.description }} - {{ machine.layerbranch.layer.name }} + {{ machine.layerbranch.layer.name }} {% endfor %} diff --git a/templates/layerindex/profile.html b/templates/layerindex/profile.html index 8edc451257..d6d25cec8e 100644 --- a/templates/layerindex/profile.html +++ b/templates/layerindex/profile.html @@ -42,7 +42,7 @@ {% endfor %} - {% trans 'Cancel' %} + {% trans 'Cancel' %} {% csrf_token %} diff --git a/templates/layerindex/recipedetail.html b/templates/layerindex/recipedetail.html index 7dbb362d40..c0199a1530 100644 --- a/templates/layerindex/recipedetail.html +++ b/templates/layerindex/recipedetail.html @@ -21,8 +21,8 @@ {% autoescape on %} @@ -36,7 +36,7 @@ {% if recipe.blacklisted %}
    -

    This recipe is blacklisted by the {{ recipe.layerbranch.layer.name }} layer. The reason provided is:

    +

    This recipe is blacklisted by the {{ recipe.layerbranch.layer.name }} layer. The reason provided is:

    {{ recipe.blacklisted }}

    @@ -92,7 +92,7 @@ Layer - {{ recipe.layerbranch.layer.name }} ({{ recipe.layerbranch.branch.name}} branch) + {{ recipe.layerbranch.layer.name }} ({{ recipe.layerbranch.branch.name}} branch) Inherits @@ -116,7 +116,7 @@ {% for append in verappends %} - {{ append.layerbranch.layer.name }} + {{ append.layerbranch.layer.name }} {{ append.filename }} @@ -127,7 +127,7 @@ {% if not append in verappends %} - {{ append.layerbranch.layer.name }} + {{ append.layerbranch.layer.name }} {{ append.filename }} diff --git a/templates/layerindex/recipes.html b/templates/layerindex/recipes.html index c2141a4073..74f3bb431e 100644 --- a/templates/layerindex/recipes.html +++ b/templates/layerindex/recipes.html @@ -17,9 +17,9 @@ {% block navs %} {% autoescape on %} -
  • Layers
  • -
  • Recipes
  • -
  • Machines
  • +
  • Layers
  • +
  • Recipes
  • +
  • Machines
  • {% endautoescape %} {% endblock %} @@ -31,7 +31,7 @@
    -
    +
    @@ -52,10 +52,10 @@ {% for recipe in recipe_list %} 0 %}class="muted"{% endif %}> - {{ recipe.name }}{% if 'image' in recipe.inherits.split %}{% endif %}{% if recipe.blacklisted %}blacklisted{% endif %} + {{ recipe.name }}{% if 'image' in recipe.inherits.split %}{% endif %}{% if recipe.blacklisted %}blacklisted{% endif %} {{ recipe.pv }} {{ recipe.short_desc }} - {{ recipe.layerbranch.layer.name }} + {{ recipe.layerbranch.layer.name }} {% endfor %} diff --git a/templates/layerindex/reviewdetail.html b/templates/layerindex/reviewdetail.html index 5840e25f4c..cff1731552 100644 --- a/templates/layerindex/reviewdetail.html +++ b/templates/layerindex/reviewdetail.html @@ -35,14 +35,14 @@ {% if user.is_authenticated %} {% if perms.layerindex.publish_layer or useredit %} - Edit layer + Edit layer {% if layeritem.layernote_set.count = 0 %} - Add note + Add note {% endif %} {% endif %} {% if layeritem.status = "N" and perms.layerindex.publish_layer %} - Delete layer - Publish layer + Delete layer + Publish layer {% endif %} {% endif %} @@ -58,8 +58,8 @@

    {{ note.text }}

    {% if perms.layerindex.publish_layer or useredit %}

    - Edit note - Delete note + Edit note + Delete note

    {% endif %}
    @@ -163,7 +163,7 @@ diff --git a/templates/layerindex/reviewlist.html b/templates/layerindex/reviewlist.html index d20001aa0e..eaa24e4e64 100644 --- a/templates/layerindex/reviewlist.html +++ b/templates/layerindex/reviewlist.html @@ -36,7 +36,7 @@ {% for layerbranch in layerbranch_list %} - {{ layerbranch.layer.name }} + {{ layerbranch.layer.name }} {{ layerbranch.layer.summary }} {{ layerbranch.layer.get_layer_type_display }} diff --git a/templates/registration/activate.html b/templates/registration/activate.html index e85121e054..6e248906ad 100644 --- a/templates/registration/activate.html +++ b/templates/registration/activate.html @@ -7,7 +7,7 @@

    {% trans "Account successfully activated" %}

    -

    {% trans "Log in" %}

    +

    {% trans "Log in" %}

    {% else %} diff --git a/templates/registration/activation_email.txt b/templates/registration/activation_email.txt index 0820fcede4..736ea8afa3 100644 --- a/templates/registration/activation_email.txt +++ b/templates/registration/activation_email.txt @@ -7,7 +7,7 @@ link is valid for {{ expiration_days }} days. {% endblocktrans %} -http://{{ site.domain }}{% url registration_activate activation_key %} +http://{{ site.domain }}{% url "registration_activate" activation_key %} {% blocktrans %} If you did not make this request, please ignore this message. diff --git a/templates/registration/login.html b/templates/registration/login.html index 7e3d615238..7f8a15327f 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -10,8 +10,8 @@ {% csrf_token %} -

    {% trans "Forgot password" %}? {% trans "Reset it" %}!

    -

    {% trans "Don't have an account" %}? {% trans "Create one now" %}!

    +

    {% trans "Forgot password" %}? {% trans "Reset it" %}!

    +

    {% trans "Don't have an account" %}? {% trans "Create one now" %}!

    {% endblock %} diff --git a/templates/registration/password_reset_complete.html b/templates/registration/password_reset_complete.html index ef3637c709..d9f3879c6b 100644 --- a/templates/registration/password_reset_complete.html +++ b/templates/registration/password_reset_complete.html @@ -5,6 +5,6 @@

    {% trans "Password reset successfully" %}

    -

    {% trans "Log in" %}

    +

    {% trans "Log in" %}

    {% endblock %} diff --git a/templates/registration/password_reset_email.html b/templates/registration/password_reset_email.html index a55c86958b..f219c683e1 100644 --- a/templates/registration/password_reset_email.html +++ b/templates/registration/password_reset_email.html @@ -1,5 +1,5 @@ {% load i18n %} {% blocktrans %}Reset password at {{ site_name }}{% endblocktrans %}: {% block reset_link %} -{{ protocol }}://{{ domain }}{% url auth_password_reset_confirm uidb36=uid, token=token %} +{{ protocol }}://{{ domain }}{% url "auth_password_reset_confirm" uidb36=uid, token=token %} {% endblock %} diff --git a/urls.py b/urls.py index aa4f8c5d21..98fc734814 100644 --- a/urls.py +++ b/urls.py @@ -5,8 +5,8 @@ # Copyright (c) Django Software Foundation and individual contributors. # All rights reserved. -from django.conf.urls.defaults import patterns, include, url -from django.views.generic.simple import redirect_to +from django.conf.urls import patterns, include, url +from django.views.generic import RedirectView from django.contrib import admin admin.autodiscover() @@ -16,6 +16,6 @@ urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^accounts/', include('registration.backends.default.urls')), url(r'^captcha/', include('captcha.urls')), - url(r'.*', redirect_to, {'url' : '/layerindex/'}) + url(r'.*', RedirectView.as_view(url='/layerindex/')), ) -- cgit 1.2.3-korg