django-danceschool / production-template

Django template for dance schools
5 stars 4 forks source link

Using Cookiecutter or a generic templating tool #2

Open riclima opened 6 years ago

riclima commented 6 years ago

In keeping with the spirit of keeping school-template flexible, I'd like to suggest converting the project to use a mature project scaffolding tool, such as https://github.com/audreyr/cookiecutter. What's great about Cookiecutter is that it allows for customization of the project directly on setup, making the workflow for starting a new project extremely straightforward, and opens the door for in the future adding options to setup the project tailored to more deployment environments than Heroku in a clean manner.

A new project setup could look like this:

pip install -U cookiecutter
cookiecutter https://github.com/django-danceschool/school-template.git
# Answer the form questions
cd "$PROJECT_DIR"
docker-compose up

As a stretch goal (although I don't know how feasible that would be), perhaps we could merge the django-admin startproject --template https://raw.githubusercontent.com/django-danceschool/django-danceschool/master/setup/default_setup.zip <your_project_name> and python manage.py setupschool directly into the Cookiecutter template, as we can write pre and post setup hooks that I think could cover all the tasks done in the in the setupschool script.

I feel this would greatly simplify the Basic Installation process: just a few commands and a full production system would be ready for deployment. I'm available for making a PR for the conversion, if you think it's a good plan.

leetucker commented 6 years ago

Hey, sorry it took me so long to take a look at this, but I am definitely interested in this idea. I need to take a look at the cookiecutter tool, but in principle I think this is a great approach.

afs2015 commented 5 years ago

Just saw this ticket. I would propose after the next Django Dance School release focusing on this and bug fixes be a priority because I think this would lower the barrier of entry to set Django Dance School up.