X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Furls.py;h=4ddef9e15532e864a7cc2a963d60113fea10b45b;hb=c2c6a408c7764fa29389ce160f52776c9308d50a;hp=14f05451cefdf893d7ed5f141555abd84c8f239f;hpb=e653db155cdb671d6ab1c52492fd37b9f80cb805;p=patchwork diff --git a/apps/urls.py b/apps/urls.py index 14f0545..4ddef9e 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 +import os + from django.conf.urls.defaults import * 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')}), )