🐍 django-boilerplate is a project for jumpstarting production-ready Django projects quickly. 🔥
Project URL -https://django-boilerplate-docs.viralsangani.me/
- Build for Django 3.0
- Works with Python 3.8
- Renders Boilerplate Django projects with 98% starting test coverage
- 12-Factor based settings using django-environ
- We belive in SSL, secure by default in Production.
- Comes with custom user model
- Media storage with AWS S3 in Production
- Static file handling via AWS S3 in Production
- Already written test in unittest and pytest
- Registration using django-allauth
- Custom and optimized settings for development and production
- SMTP already configired for AWS SES. (Mailgun, Anymail is optional)
- Currently only works with PostgreSQL
- pre-commit already configured for identifying simple issues
- Sentry intregration already configures for error logging
- Instaructions to deploy on PythonAnywhere
Setting Up Your Users
To create a normal user account, just go to Sign Up and fill out the form. Once you submit it, you'll see a "Verify Your E-mail Address" page. Go to your console to see a simulated email verification message. Copy the link into your browser. Now the user's email should be verified and ready to go.
To create an superuser account, use this command::
python manage.py createsuperuser
For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.
Running type checks with mypy:
To run the tests, check your test coverage, and generate an HTML coverage report::
coverage run -m pytest coverage html open htmlcov/index.html
Running tests with py.test
Sentry is an error logging aggregator service. You can sign up for a free account at https://sentry.io/signup/ or download and host it yourself. The system is setup with reasonable defaults, including 404 logging and integration with the WSGI application.
You must set the DSN url in production.
The following details how to deploy this application. Deployment on PythonAnywhere
If you like the project, give a like @Github