Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'django1.5'

  • Loading branch information...
commit 3308be4943bbebdb8b9749453c9912779e282888 2 parents 60ca323 + 2cb7c22
Dan Fairs authored
View
5 lazysignup/templates/lazysignup/convert.html
@@ -1,11 +1,12 @@
{% load i18n %}
+{% load url from future %}
<html>
<head>Convert</head>
<body>
- <form method="post" action="{% url lazysignup_convert %}">
+ <form method="post" action="{% url 'lazysignup_convert' %}">
{{ form.as_p }}
<input type="hidden" name="redirect_to" value="{{ redirect_to }}">
<input type="submit" value="{% trans "Submit" %}" />
</form>
</body>
-</html>
+</html>
View
14 lazysignup/urls.py
@@ -1,11 +1,15 @@
-from django.conf.urls.defaults import patterns, url
-from django.views.generic.simple import direct_to_template
+try:
+ from django.conf.urls import patterns, url
+except ImportError:
+ from django.conf.urls.defaults import patterns, url
+
+from django.views.generic import TemplateView
# URL patterns for lazysignup
urlpatterns = patterns('lazysignup.views',
url(r'^$', 'convert', name='lazysignup_convert'),
- url(r'^done/$', direct_to_template, {
- 'template': 'lazysignup/done.html',
- }, name='lazysignup_convert_done'),
+ url(r'^done/$',
+ TemplateView.as_view(template_name='lazysignup/done.html'),
+ name='lazysignup_convert_done'),
)
View
2  testproject/settings.py
@@ -33,4 +33,6 @@
ROOT_URLCONF = 'testproject.urls'
+SECRET_KEY = '12345'
+
LAZYSIGNUP_USER_MODEL = 'lazysignup.CustomUser'
View
5 testproject/urls.py
@@ -1,4 +1,7 @@
-from django.conf.urls.defaults import patterns, url, include
+try:
+ from django.conf.urls import patterns, url, include
+except ImportError:
+ from django.conf.urls.defaults import patterns, url, include
from django.contrib.auth.forms import UserCreationForm
from lazysignup.tests import GoodUserCreationForm
Please sign in to comment.
Something went wrong with that request. Please try again.