from django.conf.urls.defaults import *

from registration.views import register
from registration.backends.default import DefaultBackend
import pytask.profile.regbackend

from pytask.profile.forms import CustomRegistrationForm
from pytask.views import home_page

from django.shortcuts import redirect

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Example:
    # (r'^pytask/', include('pytask.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    (r'^admin/', include(admin.site.urls)),

    (r'^static/(?P<path>.*)$', 'django.views.static.serve',
            {'document_root': './pytask/static/'}),

    url(r'^accounts/register/$', register,
        {'form_class': CustomRegistrationForm,   
         'backend': 'registration.backends.default.DefaultBackend'},
        name='registration_register'),

    (r'^accounts/', include('registration.urls')),
    (r'^profile/', include('pytask.profile.urls')),
    (r'^task/', include('pytask.taskapp.urls')),
    (r'^$', home_page),
)

@@ -1,20 +1,53 @@
+from django.conf import settings%0A
 from django.conf.url
@@ -110,98 +110,8 @@
 ster
-%0Afrom registration.backends.default import DefaultBackend%0Aimport pytask.profile.regbackend
 %0A%0Afr
@@ -204,98 +204,8 @@
 ge%0A%0A
-from django.shortcuts import redirect%0A%0A# Uncomment the next two lines to enable the admin:
 %0Afro
@@ -1076,8 +1076,362 @@
 age),%0A)%0A
+%0A# Serve static files in DEVELOPMENT = True mode%0Aif settings.DEVELOPMENT:%0A    urlpatterns += patterns('',%0A        (r'%5Epytask/media/(?P%3Cpath%3E.*)$', 'django.views.static.serve',%0A         %7B'document_root': settings.MEDIA_ROOT%7D),%0A        (r'%5Epytask/static/(?P%3Cpath%3E.*)$', 'django.views.static.serve',%0A         %7B'document_root': settings.STATIC_ROOT%7D),%0A    )%0A

Add a DEVELOPMENT settings for URL mapping for static and media files.