]> git.ozlabs.org Git - patchwork/blobdiff - apps/urls.py
models: Update Person & UserProfile object whenever User is saved
[patchwork] / apps / urls.py
index e11cbd976d67a45460ef7333ed57158707eeb5bd..4ddef9e15532e864a7cc2a963d60113fea10b45b 100644 (file)
 # 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 django.contrib import admin
+
+admin.autodiscover()
+
+htdocs = os.path.join(settings.ROOT_DIR, 'htdocs')
 
 urlpatterns = patterns('',
     # Example:
     (r'^', include('patchwork.urls')),
 
     # Uncomment this for admin:
-     (r'^admin/', include('django.contrib.admin.urls')),
+     (r'^admin/', include(admin.site.urls)),
 
      (r'^css/(?P<path>.*)$', 'django.views.static.serve',
-       {'document_root': '/home/jk/devel/patchwork/pwsite/htdocs/css'}),
+        {'document_root': os.path.join(htdocs, 'css')}),
      (r'^js/(?P<path>.*)$', 'django.views.static.serve',
-       {'document_root': '/home/jk/devel/patchwork/pwsite/htdocs/js'}),
+        {'document_root': os.path.join(htdocs, 'js')}),
      (r'^images/(?P<path>.*)$', 'django.views.static.serve',
-       {'document_root': '/home/jk/devel/patchwork/pwsite/htdocs/images'}),
+        {'document_root': os.path.join(htdocs, 'images')}),
 )
+