From f1e089f7736ac8f7b9af784461350c4c169211ad Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Fri, 22 Aug 2008 10:41:25 +0800 Subject: Use django-registration infrastructure Signed-off-by: Jeremy Kerr --- apps/urls.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'apps/urls.py') diff --git a/apps/urls.py b/apps/urls.py index ac22547..1a6f94b 100644 --- a/apps/urls.py +++ b/apps/urls.py @@ -20,17 +20,30 @@ from django.conf.urls.defaults import * from patchwork.admin import admin_site +from registration.views import register +from patchwork.forms import RegistrationForm +from patchwork.utils import userprofile_register_callback + urlpatterns = patterns('', # Example: (r'^', include('patchwork.urls')), + # override the default registration form + url(r'^accounts/register/$', + register, + {'form_class': RegistrationForm, + 'profile_callback': userprofile_register_callback}, + name='registration_register'), + + (r'^accounts/', include('registration.urls')), + # Uncomment this for admin: (r'^admin/(.*)', admin_site.root), (r'^css/(?P.*)$', 'django.views.static.serve', - {'document_root': '/home/jk/devel/patchwork/pwsite/htdocs/css'}), + {'document_root': '/srv/patchwork/htdocs/css'}), (r'^js/(?P.*)$', 'django.views.static.serve', - {'document_root': '/home/jk/devel/patchwork/pwsite/htdocs/js'}), + {'document_root': '/srv/patchwork/htdocs/js'}), (r'^images/(?P.*)$', 'django.views.static.serve', - {'document_root': '/home/jk/devel/patchwork/pwsite/htdocs/images'}), + {'document_root': '/srv/patchwork/htdocs/images'}), ) -- cgit v1.2.3