X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Furls.py;h=a8bd68c25ba9f1559bd457b683f4fd1114448841;hb=0a502d0cf5b0daced5869130b1003d2002d547ab;hp=14f05451cefdf893d7ed5f141555abd84c8f239f;hpb=e653db155cdb671d6ab1c52492fd37b9f80cb805;p=patchwork diff --git a/apps/urls.py b/apps/urls.py index 14f0545..a8bd68c 100644 --- a/apps/urls.py +++ b/apps/urls.py @@ -17,32 +17,28 @@ # along with Patchwork; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -from django.conf.urls.defaults import * +import os + +from django.conf.urls import patterns, include from django.conf import settings -from patchwork.admin import admin_site +from django.contrib import admin + +admin.autodiscover() -from registration.views import register -from patchwork.forms import RegistrationForm +htdocs = os.path.join(settings.ROOT_DIR, 'htdocs') urlpatterns = patterns('', # Example: (r'^', include('patchwork.urls')), - # override the default registration form - url(r'^accounts/register/$', - register, {'form_class': RegistrationForm}, - name='registration_register'), - - (r'^accounts/', include('registration.urls')), - # Uncomment this for admin: - (r'^admin/(.*)', admin_site.root), + (r'^admin/', include(admin.site.urls)), (r'^css/(?P.*)$', 'django.views.static.serve', - {'document_root': '/srv/patchwork/htdocs/css'}), + {'document_root': os.path.join(htdocs, 'css')}), (r'^js/(?P.*)$', 'django.views.static.serve', - {'document_root': '/srv/patchwork/htdocs/js'}), + {'document_root': os.path.join(htdocs, 'js')}), (r'^images/(?P.*)$', 'django.views.static.serve', - {'document_root': '/srv/patchwork/htdocs/images'}), + {'document_root': os.path.join(htdocs, 'images')}), )