django-base-site
django-base-site copied to clipboard
The Django Base Site is a Django site that is built using the best Django practices and comes with all the common Django packages that you need to jumpstart your next project.
Django Base Site
The Django Base Site is a Django site that is built using the best Django practices and comes with all the common Django packages that you need to jumpstart your next project.
Documentation
Documentation is available at http://django-base-site.readthedocs.org/.
Features
- Black for automatic Python code formatting
- Bootstrap 5
- Celery
- Custom User Model
- Django 3.2 LTS
- Django Crispy Forms
- Django Debug Toolbar
- Django-allauth
- dj Lint for formatting and linting HTML
- Docker Support
- Environs for 12factor inspired environment variables
- Eslint for linting Javascript
- MkDocs for documentation
- Mypy for Python Type checking
- Pip-tools
- Pytest Django
- Pytest-cov
- Pytest
- Stylelint for linting SASS
- Vite for building SASS and JS
Install Requirements
Installing locally with Python is possible but not supported. The preferred way is to use the quickstart script below and to use Docker with docker-compose. Before proceeding make sure you've installed Docker.
Quickstart
Using the Install Script
Running the following script mostly does the same thing as manual quickstart method. The exception is that the install script has questions to customize your new project setup. Just run the following in your terminal to get started.
bash <(curl -s https://raw.githubusercontent.com/epicserve/django-base-site/main/scripts/start_new_project)
Example output:
$ cd ~/Sites
$ bash <(curl -s https://raw.githubusercontent.com/epicserve/django-base-site/main/scripts/start_new_project)
What is the project name slug [example]?
What directory do you want your project in [/Users/brento/Sites/example]?
Are going to use Docker Compose (Y/n)? Y
Done.
To start Docker Compose run:
$ cd /Users/brento/Sites/example
$ docker-compose up
Manual
$ curl -LOk https://github.com/epicserve/django-base-site/archive/main.zip && unzip main
$ mv django-base-site-main example
$ cd example
$ mkdir -p public/static
$ export SECRET_KEY=$(python -c "import random; print(''.join(random.SystemRandom().choice('abcdefghijklmnopqrstuvwxyz0123456789%^&*(-_=+)') for i in range(50)))")
$ cat > .env <<EOF
DEBUG=on
SECRET_KEY='$SECRET_KEY'
EOF
$ docker-compose up
Contribute
- Look for an open issue or create new issue to get a dialog going about the new feature or bug that you've discovered.
- Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
- Make a pull request.