Skip to content

samanthasgroup/django-webapps

Repository files navigation

GitHub Actions pre-commit.ci status

django-webapps

Backend for the database, implemented in Django

API Documentation

Can be found at /docs/swagger or /docs/redoc after deployment (or when running locally).

For developers

  1. Clone this repository
  2. Install Poetry
  3. Run poetry install in the project directory to install dependencies.
  4. Activate virtual environment: poetry shell.
  5. Install pre-commit hooks: pre-commit install. They will run on files being committed. black and isort will fix the issues automatically. To check all code, run pre-commit run -a.
  6. Copy the sample settings file to settings.py. For local development, you don't need to make any changes to the contents of the file.
  7. Create database migrations: python manage.py makemigrations api
  8. Apply database migrations: python manage.py migrate
  9. Collect static content: python manage.py collectstatic
  10. Create a superuser for admin interface: python manage.py createsuperuser
  11. Run the server locally: python manage.py runserver
  12. Whenever you register a model with django-reversion, run python manage.py createinitialrevisions.
  13. Run tests: poetry run pytest (or make test)

Note that in development mode (if you don't change the settings) you will be working with an SQLite database. Since some models contain JSONFields, it is required that your SQLite installation supports JSON. To check if it does, follow the instructions here.

The main page is the admin page, as no user-facing web interface is planned yet.

That's it for developing locally. To set up a remote server during development, see e.g. this tutorial.

Side notes

If pre-commit hooks produce strange errors that definitely shouldn't be there, re-installing pre-commit could help:

pre-commit clean
pre-commit uninstall
pre-commit install
pre-commit run

Licenses of 3rd-party packages

DoubleScroll is dual-licensed under the MIT and GPL licenses:

About

Backend for the database, implemented in Django

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages