- This boilerplate is no longer supported. Thank you very much for the contribution and it's now only supported the second version Here
- The template is using foundation as a framework but this can be changed by your personal preference, you only need to update the references in the
static
andtemplates
folder. - Inside the views located in accounts, there are some that you need to create your own files, such as the registration or change password, the code is there, you only need to place the HTML inside the proper directory. The only HTML placed and working is the login and the homepage to allow you to do a first run.
- Comes with a bunch of plugins for many kinds of projects. Not all of them are needed, feel free to remove what you don't need
- This boilerplate is now supporting Django Channels.
- Read more about this here
django-admin startproject --template=https://github.com/tiagoarasilva/django-boilerplate/archive/master.zip --extension=py,md,html,txt,scss,sass project_name
- Make sure you change the "project_name" to the name you desire for you project.
- The tests for the views won't work until you implement the solution to make the tests passing, that means, once you implement the views!
- Change the {{ project_name }} in your docker file to the desired name gave to the project when running the previous command.
- Run
docker volume create --name={{ project_name }}_db_data
- Run
docker-compose up
. It will download all the resources needed to build your docker containers - Run
docker-compose exec {{ project_name }} bash
to go inside the container - Run
make run
to start the server (inside docker container) - Run
make shell
to start the shell_plus
If you desire, you can create somes aliases in your local machine, inside the bash_profile/bashrc/profile to do automatically some previous instructions for you
E.g.:
alias shell_plus='docker-compose exec {{ project_name }} bash && make run'
alias run_server='docker-compose exec {{ project_name }} bash && make shell'
- Inside docker container:
- Run
make migrate
. This is a special command inside the Makefile to run the first migration or if you are on windows or you don't want to run the Makefile, just runpython {{ project_name }}/manage.py migrate
- Run
python {{ project_name }}/manage.py createsuperuser
to create a super user for yourself - It will create a "User Admin" by default as first and last name respectively. This can be changed in
accounts/management/commands/createsuperuser.py
- Run
make unittests TESTONLY='profiles.tests.models_tests'
- OR
make unittests TESTONLY='profiles.tests.models_tests:ProfileUserTest.test_create_user'
for a specific test
make reusedb_unittests TESTONLY='profiles.tests.models_tests
All of your Django "apps" go in this {{ project_name}} directory. These have models, views, forms, urls,
templates or all of the above. These should be Python packages you would add to
your project's INSTALLED_APPS
list.
Install Homebrew (MacOS Users)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install OpenSSL or Upgrade (MacOS Users)
brew install openssl
Install OpenSSL or Upgrade
sudo apt update
sudo apt install openssl-server
Install OpenSSL or Upgrade
sudo apt-get update
sudo apt-get install openssl-server
Install VirtualenvWrapper
https://virtualenvwrapper.readthedocs.io/en/latest/install.html
Upgrade pip
pip install --upgrade pip
Project-wide templates are located in templates/
This projects integrates Redis with RabbitMQ and Celery