X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=apps%2Furls.py;h=4ddef9e15532e864a7cc2a963d60113fea10b45b;hb=8fd9086f337a09125ddcfaa616e762a4d85c6000;hp=6e7f34ef6ffbecbaceede041278341f8aca791d1;hpb=05d26756d7e7f254d5631a0649aeac5fd3a58ca8;p=patchwork diff --git a/apps/urls.py b/apps/urls.py index 6e7f34e..4ddef9e 100644 --- a/apps/urls.py +++ b/apps/urls.py @@ -17,33 +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 patchwork.admin import admin_site +from django.conf import settings +from django.contrib import admin + +admin.autodiscover() -from registration.views import register -from patchwork.forms import RegistrationForm -from patchwork.utils import userprofile_register_callback +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, - 'profile_callback': userprofile_register_callback}, - 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')}), ) +