Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 65 lines (53 sloc) 2.099 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
from django.conf.urls.defaults import include, patterns, url
from django.conf import settings
from django.contrib import admin
from django.views.i18n import javascript_catalog
from django.views.decorators.cache import cache_page

from adminplus import AdminSitePlus
import authority
from waffle.views import wafflejs


admin.site = AdminSitePlus()
admin.autodiscover()
authority.autodiscover()

urlpatterns = patterns('',
    (r'^search', include('search.urls')),
    (r'^forums', include('forums.urls')),
    (r'^questions', include('questions.urls')),
    (r'^flagged', include('flagit.urls')),
    (r'^upload', include('upload.urls')),
    (r'^kb', include('wiki.urls')),
    (r'^gallery', include('gallery.urls')),
    (r'^army-of-awesome', include('customercare.urls')),
    (r'^chat', include('chat.urls')),
    (r'^messages', include('messages.urls')),
    (r'^1', include('inproduct.urls')),
    (r'^postcrash', include('postcrash.urls')),
    (r'^groups', include('groups.urls')),
    (r'^karma', include('karma.urls')),
    (r'^kpi/', include('kpi.urls')),
    (r'^products', include('products.urls')),
    (r'^topics', include('topics.urls')),

    # Kitsune admin (not Django admin).
    (r'^admin/', include(admin.site.urls)),

    # Javascript translations.
    url(r'^jsi18n/.*$', cache_page(60 * 60 * 24 * 365)(javascript_catalog),
        {'domain': 'javascript', 'packages': ['kitsune']}, name='jsi18n'),
    # JavaScript Waffle.
    url(r'^wafflejs$', wafflejs, name='wafflejs'),

    (r'^', include('dashboards.urls')),
    (r'^', include('landings.urls')),
    (r'^', include('tidings.urls')), # Keep short for email wrapping.

    # Users
    ('', include('users.urls')),

    # Services and sundry.
    (r'', include('sumo.urls')),
)

# Handle 404 and 500 errors
handler404 = 'sumo.views.handle404'
handler500 = 'sumo.views.handle500'

if settings.DEBUG:
    media_url = settings.MEDIA_URL.lstrip('/').rstrip('/')
    urlpatterns += patterns('',
        (r'^%s/(?P<path>.*)$' % media_url, 'django.views.static.serve',
          {'document_root': settings.MEDIA_ROOT}),
    )
Something went wrong with that request. Please try again.