Open nils-werner opened 9 years ago
Hi Nils,
This isn't pertinent to the content of this pull request specifically, but I need to point out that wagtail's main repo now contains its own project template. This specific repo is mainly now for internal Torchbox use. It's effectively not for public consumption. It was for the public, but We rethought things, stripped it back a little, made it less opinionated, and added it to wagtail's main repo here: https://github.com/torchbox/wagtail/tree/master/wagtail/project_template
Any changes you're suggesting here, while extremely useful, probably ought to be made in the main wagtail repo.
@nils-werner Thanks, this is a really good idea.
Could we use the manage.py check
command instead? As this template is for starting Django 1.7 projects and validate
has been deprecated in favour of check
.
@davecranwell Yes, this template is aimed at Torchbox projects but it is still open to the public to use just as before. We only decided to create a separate template for wagtail start
as we didn't want the default one to be so opinionated.
Ah ok, my point still stands though. Your changes may need to occur in two places. Perhaps not this specific pr, but perhaps https://github.com/torchbox/wagtail-template/pull/8 and any others you're due to submit
This doesn't really prevent errors from happening but rather stops the deployment when there are validation errors. This check will happen prior to changing the database etc.
You could also implement a rollback mechanism using
this will pull the changes, try validating the system and, if it fails, undo the pull. I didn't implement this as it will not undo failing migrations etc. and currently only gives a false sense of security. :-)