mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
new: parameter MODOBOA_WEBPATH added to settings.py. The default value is "modoboa/". It corresponds to urls prefix.
Documentation update.
This commit is contained in:
@@ -72,9 +72,16 @@ requires a migration::
|
||||
MEDIA_ROOT = os.path.join(MODOBOA_DIR, '/static')
|
||||
MEDIA_URL = '/static/'
|
||||
|
||||
* Then, delete the following variables: STATIC_ROOTDIR and
|
||||
* Add the following variable::
|
||||
|
||||
MODOBOA_WEBPATH = 'modoboa/'
|
||||
|
||||
* Delete the following variables: STATIC_ROOTDIR and
|
||||
TEMPLATE_CONTEXT_PROCESSORS.
|
||||
|
||||
* Finally, add 'modoboa.lib.middleware.ExtControlMiddleware' to
|
||||
MIDDLEWARE_CLASSES.
|
||||
|
||||
0.8 -> 0.8.1 : project renamed.
|
||||
|
||||
* First, rename your mailng folder to modoboa and copy all the
|
||||
|
||||
@@ -7,7 +7,7 @@ from modoboa.admin.models import Extension
|
||||
def isinstalled(ext):
|
||||
return "modoboa.extensions.%s" % ext in settings.INSTALLED_APPS
|
||||
|
||||
def loadextensions():
|
||||
def loadextensions(prefix):
|
||||
basedir = "%s/extensions" % settings.MODOBOA_DIR
|
||||
result = []
|
||||
for f in os.listdir(basedir):
|
||||
@@ -22,7 +22,7 @@ def loadextensions():
|
||||
module.main.init()
|
||||
except Extension.DoesNotExist:
|
||||
pass
|
||||
u = module.main.urls()
|
||||
u = module.main.urls(prefix)
|
||||
if u == ():
|
||||
continue
|
||||
result += [u]
|
||||
|
||||
@@ -37,8 +37,8 @@ def destroy():
|
||||
events.unregister("UserMenuDisplay", menu)
|
||||
parameters.unregister_app("amavis_quarantine")
|
||||
|
||||
def urls():
|
||||
return (r'^modoboa/quarantine/',
|
||||
def urls(prefix):
|
||||
return (r'^%squarantine/' % prefix,
|
||||
include('modoboa.extensions.amavis_quarantine.urls'))
|
||||
|
||||
def menu(**kwargs):
|
||||
|
||||
@@ -41,8 +41,8 @@ def destroy():
|
||||
events.unregister("UserMenuDisplay", menu)
|
||||
parameters.unregister_app("postfix_autoreply")
|
||||
|
||||
def urls():
|
||||
return (r'^modoboa/postfix_autoreply/',
|
||||
def urls(prefix):
|
||||
return (r'^%spostfix_autoreply/' % prefix,
|
||||
include('modoboa.extensions.postfix_autoreply.urls'))
|
||||
|
||||
def menu(**kwargs):
|
||||
|
||||
@@ -34,8 +34,8 @@ def init():
|
||||
def destroy():
|
||||
events.unregister("AdminMenuDisplay", menu)
|
||||
|
||||
def urls():
|
||||
return (r'^modoboa/stats/',
|
||||
def urls(prefix):
|
||||
return (r'^%sstats/' % prefix,
|
||||
include('modoboa.extensions.stats.urls'))
|
||||
|
||||
def menu(**kwargs):
|
||||
|
||||
@@ -64,8 +64,8 @@ def infos():
|
||||
"description" : _("Simple IMAP webmail")
|
||||
}
|
||||
|
||||
def urls():
|
||||
return (r'^modoboa/webmail/',
|
||||
def urls(prefix):
|
||||
return (r'^%swebmail/' % prefix,
|
||||
include('modoboa.extensions.webmail.urls'))
|
||||
|
||||
def menu(**kwargs):
|
||||
|
||||
@@ -5,6 +5,7 @@ DEBUG = False
|
||||
TEMPLATE_DEBUG = DEBUG
|
||||
|
||||
MODOBOA_DIR = os.path.dirname(__file__)
|
||||
MODOBOA_WEBPATH = "modoboa/"
|
||||
|
||||
ADMINS = (
|
||||
# ('Your Name', 'your_email@domain.com'),
|
||||
|
||||
@@ -3,14 +3,21 @@ 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'^modoboa/admin/', include('modoboa.admin.urls')),
|
||||
(r'^modoboa/userprefs/', include('modoboa.userprefs.urls')),
|
||||
(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()
|
||||
*loadextensions(prefix)
|
||||
)
|
||||
|
||||
if settings.DEBUG:
|
||||
|
||||
Reference in New Issue
Block a user