# 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<path>.*)$', 'django.views.static.serve',
- {'document_root': '/srv/patchwork/htdocs/css'}),
+ {'document_root': os.path.join(htdocs, 'css')}),
(r'^js/(?P<path>.*)$', 'django.views.static.serve',
- {'document_root': '/srv/patchwork/htdocs/js'}),
+ {'document_root': os.path.join(htdocs, 'js')}),
(r'^images/(?P<path>.*)$', 'django.views.static.serve',
- {'document_root': '/srv/patchwork/htdocs/images'}),
+ {'document_root': os.path.join(htdocs, 'images')}),
)
+