cciw-website / cciw / urls.py

The branch 'prefetch_related' does not exist.
Luke Plant 72c8994 
luke 2e2eef8 
Luke Plant d178802 
Luke Plant b514c47 
Luke Plant 72c8994 
Luke Plant 8833213 
Luke Plant 72c8994 
Luke Plant 9775b05 
Luke Plant 1e8e03e 
luke 2e2eef8 


Luke Plant 97ccf87 
Luke Plant 72c8994 


Luke Plant 841b709 
Luke Plant 72c8994 

Luke Plant 13f8618 
Luke Plant 9775b05 
Luke Plant 72c8994 

Luke Plant 1e8e03e 








luke 2e2eef8 
Luke Plant 0e41d0c 
Luke Plant e93c5c6 




luke 2e2eef8 
Luke Plant 6de3c35 
Luke Plant 72c8994 

Luke Plant 62eb730 
Luke Plant 051f699 
luke 2e2eef8 
Luke Plant d178802 
Luke Plant ec9a184 

Luke Plant 3b3b976 
Luke Plant 8942705 
Luke Plant 0eea92c 
Luke Plant 34f4f5a 
Luke Plant 3b3b976 
Luke Plant fdea6fa 
Luke Plant e2a3486 
Luke Plant d178802 

Luke Plant 17c3010 

Luke Plant d178802 

from autocomplete.views import autocomplete
from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
from django.contrib.auth.models import User
from django.views.generic.base import RedirectView

import cciw.auth
from cciw.bookings.models import BookingAccount

handler404 = 'cciw.cciwmain.views.handler404'

admin.autodiscover()

autocomplete.register(
    id='user',
    queryset=User.objects.all().order_by('first_name', 'last_name', 'email'),
    fields=('first_name__istartswith', 'last_name__istartswith'),
    limit=10,
    label=lambda user: u"%s %s <%s>" % (user.first_name, user.last_name, user.email),
    auth=lambda request: request.user.is_authenticated() and cciw.auth.is_camp_admin(request.user)
    )

autocomplete.register(
    id='account',
    queryset=BookingAccount.objects.all().order_by('name', 'post_code'),
    fields=('name__icontains',),
    limit=20,
    label=lambda acc: unicode(acc),
    auth=lambda request: request.user.is_authenticated and cciw.auth.is_booking_secretary(request.user)
    )

urlpatterns = patterns('',
    (r'^booking/', include('cciw.bookings.urls')),
    # Plug in the password reset views
    (r'^admin/password_reset/$', 'django.contrib.auth.views.password_reset'),
    (r'^admin/password_reset/done/$', 'django.contrib.auth.views.password_reset_done'),
    (r'^reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$', 'django.contrib.auth.views.password_reset_confirm'),
    (r'^reset/done/$', 'django.contrib.auth.views.password_reset_complete'),
    # Normal views
    (r'^admin/', include(admin.site.urls)),
    (r'^officers/', include('cciw.officers.urls')),
    url('^autocomplete/(\w+)/$', autocomplete, name='autocomplete'),
    (r'^wiki/', include('djiki.urls')),
    (r'^paypal/ipn/', include('paypal.standard.ipn.urls')),
)

if settings.DEVBOX:
    from django.contrib.staticfiles.urls import staticfiles_urlpatterns
    urlpatterns += patterns('',
                            (r'^validator/', include('output_validator.urls')),
                            (r'^admin_doc/', include('django.contrib.admindocs.urls')),
                            (r'^usermedia/(?P<path>.*)$', 'django.views.static.serve',
                             {'document_root': settings.MEDIA_ROOT}),
                            (r'^file/(?P<path>.*)$', 'django.contrib.staticfiles.views.serve',
                             {'document_root': settings.SECUREDOWNLOAD_SERVE_ROOT}),
    )

    urlpatterns += staticfiles_urlpatterns()

urlpatterns = urlpatterns + patterns('',
    (r'', include('cciw.cciwmain.urls'))
)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.