Renaming python template files.

fixes #458
This commit is contained in:
Antoine Nguyen
2013-08-01 16:39:27 +02:00
parent a74f533ed0
commit 315b13baf0
4 changed files with 10 additions and 8 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
include README.rst COPYING requirements.txt
recursive-include modoboa *.html *.js *.css *.png *.po *.mo *.json *.gif
recursive-include modoboa/core/templates *.py
recursive-include modoboa/core/templates *.tpl
recursive-include doc *
+9 -7
View File
@@ -114,17 +114,19 @@ class DeployCommand(Command):
)
mod = __import__(parsed_args.name, globals(), locals(), ['settings'])
tpl = self._render_template("%s/settings.py" % self._templates_dir, {
'default_conn': default_conn, 'amavis_conn': amavis_conn,
'secret_key': mod.settings.SECRET_KEY,
'name': parsed_args.name, 'django14': django14,
'allowed_host': allowed_host
})
tpl = self._render_template(
"%s/settings.py.tpl" % self._templates_dir, {
'default_conn': default_conn, 'amavis_conn': amavis_conn,
'secret_key': mod.settings.SECRET_KEY,
'name': parsed_args.name, 'django14': django14,
'allowed_host': allowed_host
}
)
fp = open("%s/settings.py" % path, "w")
fp.write(tpl)
fp.close()
shutil.copyfile(
"%s/urls.py" % self._templates_dir, "%s/urls.py" % path
"%s/urls.py.tpl" % self._templates_dir, "%s/urls.py" % path
)
os.mkdir("%s/media" % path)