Skip to content

erlendgit/boilerplate

Repository files navigation

Copy .env-example to .env

settings.py should contain as little exact values as possible. Default environment settings should go in the .env-example file.

Run your project

docker-compose pull
docker-compose up -d

Create a random secret key

Replace the SECRET_KEY in .env with the output of this file.

docker-compose exec web python manage.py shell
from django.core.management import utils
print(utils.get_random_secret_key())

Restart your machine

docker-compose stop
docker-compose pull
docker-compose up -d

Create a requirements.txt file

Update versions at requirements.txt

docker-compose exec web pip freeze

Keep requirements that you did not explicitly use out of the requirements.txt, to make maintenance easier.

Setup Grunt

To start working with your assets, install nodejs dependencies.

npm install grunt \
            grunt-contrib-copy \
            grunt-contrib-sass \
            grunt-contrib-watch

Add lines to the package.json file to start building and watching assets:

{
  "scripts": {
    "watch": "grunt",
    "build": "grunt build"
  }
}

Test it

npm run build
npm run watch

Note: watch will build first, then start watching. It is not manditory to run build before watch

Initialize django database

docker-compose exec web python manage.py migrate
docker-compose exec web python manage.py createsuperuser

And now visit http://localhost:8000/admin

Remove boilerplate

Create your own README.md, and remove the git history of the boilerplate.

mv README.md maybe-nice-to-remember.md
rm -rf .git
git init .
git add .
git commit -m "Initial commit"

Start developing

Last but not least... start developing your, super special - one of a kind, web application.

About

Boilerplate project, to quickly start new projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published