mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
fix: again renaming, the last one, I promise!
This commit is contained in:
@@ -4,7 +4,7 @@ import re
|
||||
from django.conf import settings
|
||||
|
||||
def loadextensions():
|
||||
basedir = "%s/extensions" % settings.MAILNG_DIR
|
||||
basedir = "%s/extensions" % settings.MODOBOA_DIR
|
||||
result = []
|
||||
for f in os.listdir(basedir):
|
||||
if not os.path.isdir("%s/%s" % (basedir, f)):
|
||||
|
||||
@@ -203,7 +203,7 @@ class Email(object):
|
||||
if re.search("\.\.", fname):
|
||||
return None
|
||||
path = "/static/tmp/" + fname
|
||||
fp = open(settings.MAILNG_DIR + path, "wb")
|
||||
fp = open(settings.MODOBOA_DIR + path, "wb")
|
||||
fp.write(part.get_payload(decode=True))
|
||||
fp.close()
|
||||
return path
|
||||
|
||||
@@ -7,13 +7,13 @@ register = template.Library()
|
||||
|
||||
@register.simple_tag
|
||||
def get_version():
|
||||
if os.path.isdir("%s/.hg" % settings.MAILNG_DIR):
|
||||
if os.path.isdir("%s/.hg" % settings.MODOBOA_DIR):
|
||||
version = "dev-"
|
||||
code, output = exec_cmd("hg id -i", cwd=settings.MAILNG_DIR)
|
||||
code, output = exec_cmd("hg id -i", cwd=settings.MODOBOA_DIR)
|
||||
version += output.rstrip()
|
||||
return version
|
||||
elif os.path.exists("%s/VERSION" % settings.MAILNG_DIR):
|
||||
code, output = exec_cmd("cat %s/VERSION" % settings.MAILNG_DIR)
|
||||
elif os.path.exists("%s/VERSION" % settings.MODOBOA_DIR):
|
||||
code, output = exec_cmd("cat %s/VERSION" % settings.MODOBOA_DIR)
|
||||
return output.rstrip()
|
||||
else:
|
||||
return "Unknown"
|
||||
|
||||
@@ -32,7 +32,7 @@ def update_extension(name, extdir, state):
|
||||
if __name__ == "__main__":
|
||||
if len(sys.argv) != 3:
|
||||
usage()
|
||||
extdir = "%s/extensions/%s" % (settings.MAILNG_DIR, sys.argv[1])
|
||||
extdir = "%s/extensions/%s" % (settings.MODOBOA_DIR, sys.argv[1])
|
||||
if not os.path.isdir(extdir):
|
||||
print "Extension not found"
|
||||
sys.exit(1)
|
||||
|
||||
+2
-2
@@ -68,8 +68,8 @@ MIDDLEWARE_CLASSES = (
|
||||
|
||||
ROOT_URLCONF = 'modoboa.urls'
|
||||
|
||||
MAILNG_DIR = os.path.dirname(__file__)
|
||||
STATIC_ROOTDIR = os.path.join(MAILNG_DIR, 'static')
|
||||
MODOBOA_DIR = os.path.dirname(__file__)
|
||||
STATIC_ROOTDIR = os.path.join(MODOBOA_DIR, 'static')
|
||||
TEMPLATE_DIRS = (
|
||||
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
|
||||
# Always use forward slashes, even on Windows.
|
||||
|
||||
Reference in New Issue
Block a user