Source

brainstill / bsproj / urls.py

# coding: utf-8
from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin
from django.views.generic import list_detail

from brainstill.models import Idea


admin.autodiscover()

media_url = settings.MEDIA_URL.lstrip('/')

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),

    url(r'^accounts/register/$', 'registration.views.register',
        dict(backend='registration.backends.simple.SimpleBackend',
             success_url='/'),
        name='registration_register'),
    url(r'^accounts/login/$', 'django.contrib.auth.views.login',
        name='auth_login'),
    url(r'^accounts/logout/$', 'django.contrib.auth.views.logout',
        dict(next_page='/'),
        name='auth_logout'),

    url(r'^comments/', include('django.contrib.comments.urls')),

    url(r'^projects/', include('brainstill.urls')),

    url(r'^%s(?P<path>.*)$' % media_url, 'django.views.static.serve',
        {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
)