mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-18 05:51:26 +02:00
A new admin parameter is available to specify the default application that will be launched when no one is present in the url. (ie. when the top level "/" is called). fixed #165
32 lines
955 B
Python
32 lines
955 B
Python
from django.conf.urls.defaults import *
|
|
from django.conf import settings
|
|
from modoboa.extensions import *
|
|
from modoboa.lib import parameters
|
|
|
|
prefix = settings.MODOBOA_WEBPATH
|
|
if prefix != "":
|
|
if prefix.startswith("/"):
|
|
prefix = prefix[1:]
|
|
if not prefix.endswith("/"):
|
|
prefix += "/"
|
|
|
|
urlpatterns = patterns('',
|
|
(r'^%s$' % prefix, 'modoboa.lib.webutils.topredirection'),
|
|
(r'^%sadmin/' % prefix, include('modoboa.admin.urls')),
|
|
(r'^%suserprefs/' % prefix, include('modoboa.userprefs.urls')),
|
|
(r'^accounts/login/$', 'modoboa.auth.views.dologin'),
|
|
(r'^accounts/logout/$', 'modoboa.auth.views.dologout'),
|
|
(r'^jsi18n/$', 'django.views.i18n.javascript_catalog',
|
|
{'packages': ('modoboa',),}),
|
|
*loadextensions(prefix)
|
|
)
|
|
|
|
if settings.DEBUG:
|
|
urlpatterns += patterns(
|
|
'',
|
|
(r'^static/(?P<path>.*)$', 'django.views.static.serve',
|
|
{'document_root': settings.MEDIA_ROOT})
|
|
)
|
|
|
|
|