Twitter Monitor
This project was built using the Django React Boilerplate.
django-admin startproject
How to test If you made changes to this boilerplate and want to test them, commit your changes and use git archive -o boilerplate.zip HEAD
to create the template zip.
How to test Heroku deployment
Push your changes to a branch and visit https://dashboard.heroku.com/new?template=https://github.com/fill-org-or-user/fill-project-repo-name/tree/fill-branch
(replace all fill
).
How to add a 'Deploy to Heroku' button
Read this.
p.s. if you want to deploy in a different way please take a look the app.json
file for what needs to be configured.
Developing
Quickstart
- Create a copy of
{{project_name}}/settings/local.py.example
in{{project_name}}/settings/local.py
- Create a
.env
file in the root of the project and addDJANGO_SETTINGS_MODULE="{{project_name}}.settings.local"
to it - Create the migrations for
users
app:python manage.py makemigrations
- Run the migrations:
python manage.py migrate
Tools
- Setup editorconfig, flake8 and ESLint in the text editor you will use to develop.
Running the project
pip install -r requirements.txt
npm install
make bundle
python manage.py runserver
Testing
make test
Will run django tests using --keepdb
and --parallel
. You may pass a path to the desired test module in the make command. E.g.:
make test someapp.tests.test_views
Adding new pypi libs
Add high level dependecies to requirements-to-freeze.txt
and pip freeze > requirements.txt
. This is A Better Pip Workflow.
Checking lint
- Manually with
flake8
andnpm run lint
on project root. - During development with an editor compatible with flake8 and ESLint.
Pre-commit hooks
- Run
pre-commit install
to enable the hook into your git repo. The hook will run automatically for each commit. - Run
git commit -m "Your message" -n
to skip the hook if you need.