Fixes on deployment

This commit is contained in:
Marc Aymerich 2015-10-03 19:50:24 +00:00
parent c115be72e9
commit f2e9849337
2 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,14 @@
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from orchestra.utils.apps import isinstalled
def validate_website_saas_directives(app):
def validator(enabled, app=app):
if enabled and isinstalled('orchestra.contrib.websites'):
from orchestra.contrib.websites import settings
if app not in settings.WEBSITES_SAAS_DIRECTIVES:
raise ValidationError(_("Allow custom URL is enabled for '%s', "
"but has no associated WEBSITES_SAAS_DIRECTIVES" % app))
return validator

View File

@ -253,6 +253,8 @@ function main () {
install_orchestra "$dev" $home $repo install_orchestra "$dev" $home $repo
if [[ ! -e $project_name ]]; then if [[ ! -e $project_name ]]; then
surun "orchestra-admin startproject $project_name" surun "orchestra-admin startproject $project_name"
else
echo "Not deploying, $project_name already exists."
fi fi
cd $project_name cd $project_name
setup_database "$dev" "$noinput" setup_database "$dev" "$noinput"