Fixes on deployment
This commit is contained in:
parent
c115be72e9
commit
f2e9849337
|
@ -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
|
|
@ -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"
|
||||||
|
|
Loading…
Reference in New Issue