2010-10-09 02:24:25 +04:00
|
|
|
from django.conf.urls.defaults import *
|
2010-02-11 00:38:23 +03:00
|
|
|
from django.views import static
|
2010-10-01 02:04:40 +04:00
|
|
|
from django.conf import settings
|
2010-01-21 21:09:06 +03:00
|
|
|
|
2010-10-14 03:52:46 +04:00
|
|
|
from base import views as base_views
|
2010-01-24 17:09:47 +03:00
|
|
|
|
2010-02-11 00:38:23 +03:00
|
|
|
|
2011-03-15 23:49:46 +03:00
|
|
|
urls = [url(r'^$', base_views.homepage, name='home')]
|
2010-09-16 15:08:02 +04:00
|
|
|
|
|
|
|
if settings.DEBUG:
|
2010-01-24 17:09:47 +03:00
|
|
|
|
2010-10-14 03:55:39 +04:00
|
|
|
from django.contrib import admin
|
|
|
|
admin.autodiscover()
|
2010-10-01 02:04:40 +04:00
|
|
|
# admin
|
|
|
|
urls.extend([
|
|
|
|
(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
|
|
|
(r'^admin/', include(admin.site.urls))
|
|
|
|
])
|
2010-02-10 17:23:40 +03:00
|
|
|
|
2010-09-16 15:08:02 +04:00
|
|
|
urls.extend([
|
2010-10-01 15:24:59 +04:00
|
|
|
url(r'^media/(?P<path>.*)$', static.serve,
|
|
|
|
{'document_root': settings.MEDIA_ROOT}, name='media'),
|
2010-02-11 00:38:23 +03:00
|
|
|
|
2011-05-16 20:16:43 +04:00
|
|
|
# XPI build
|
2010-12-10 14:05:18 +03:00
|
|
|
(r'^xpi/', include('xpi.urls')),
|
|
|
|
|
2011-08-08 21:43:43 +04:00
|
|
|
# AMO upload
|
|
|
|
(r'^amo/', include('amo.urls')),
|
|
|
|
|
2011-05-31 22:29:58 +04:00
|
|
|
# /docs are an Apache rewrite
|
2010-05-06 22:19:20 +04:00
|
|
|
|
2010-10-01 02:04:40 +04:00
|
|
|
(r'^tutorial/', include('tutorial.urls')),
|
2010-06-19 16:32:20 +04:00
|
|
|
|
2010-10-01 02:04:40 +04:00
|
|
|
(r'^user/', include('person.urls')),
|
2010-10-14 03:55:39 +04:00
|
|
|
|
2011-04-08 04:27:31 +04:00
|
|
|
# Search
|
|
|
|
(r'^search/', include('search.urls')),
|
|
|
|
|
2011-05-16 20:16:43 +04:00
|
|
|
# Repackage
|
|
|
|
(r'^repackage/', include('repackage.urls')),
|
|
|
|
|
2010-10-14 03:55:39 +04:00
|
|
|
# Jetpack
|
2010-12-22 03:48:10 +03:00
|
|
|
(r'', include('jetpack.urls')),
|
2011-02-01 18:23:39 +03:00
|
|
|
|
|
|
|
# Monitor
|
2011-03-19 01:57:10 +03:00
|
|
|
(r'', include('base.urls')),
|
|
|
|
|
|
|
|
# Worker HACK
|
|
|
|
(r'worker-javascript.js$', static.serve, {
|
|
|
|
'document_root': settings.MEDIA_ROOT,
|
|
|
|
'path': 'lib/ace/worker-javascript.js'})
|
2010-02-07 05:15:11 +03:00
|
|
|
])
|
2010-05-06 22:19:20 +04:00
|
|
|
urlpatterns = patterns('', *urls)
|