Skip to content

silverlogic/chatTSL-django

This branch is 1 commit ahead of master.

Folders and files

NameName
Last commit message
Last commit date
Aug 27, 2023
Aug 8, 2022
Jan 31, 2025
Mar 22, 2025
Apr 16, 2024
Jan 31, 2025
Apr 16, 2024
Aug 15, 2022
Jul 21, 2020
Jan 14, 2025
Jan 14, 2025
Dec 27, 2019
Mar 1, 2021
Jun 19, 2020
Sep 19, 2019
Sep 19, 2019
Sep 19, 2019

Repository files navigation

Django Backend

Requirements

  • Python 3.6

Getting Started

  1. Review and follow the README in the sibling ansible repo.
  2. Read the contributing guidelines found in CONTRIBUTING.md

Django Code

Code Style

  • Use flake8 (found in requirements/dev.txt) to lint code.
  • Use isort (found in requirements/dev.txt) to automatically sort your imports before commiting. (isort **/*.py)
  • Use black (found in requirements/dev.txt) to automatically format your code before comitting. (black .)

Tests

Tests are written and run using pytest. All tests can be found under the tests directory at the root of the repository.

With the exception of changes to the Django Admin, all code must be accompanied by tests.

Definitions

  • Unit test - Any test that can be performed without touching the database or any network resources.
  • Integration test - Any test that does require the use of the database or a network resource.
  • Functional test - Currently not in use.

Test Running Primer

For the full details on all of the available options when running tests refer to the pytest documentation.

Run all the tests

py.test

Run all the tests in a specific file.

py.test tests/path/to/file.py

Run tests whose class name and/or function name match a string

py.test -k some_string

Reuse the database structure between tests (speeds things up)

py.test --reuse-db

API Documentation

All changes to the Django API must be reflected in the API documentation.

The API documentation is built using middleman and is located under the apidocs directory. All documentation is written in asciidoctor format.

See apidocs/README.md for more info.

UML Generation

Examples

./manage.py generate_uml
./manage.py generate_uml --library pydot --format pdf
./manage.py generate_uml --library pydot --apps users --format svg
./manage.py generate_uml --library pydot --apps users --models User --format png
./manage.py generate_uml --library pydot --apps users --models User UserReferral --format dot

To see available options run

./manage.py generate_uml --help

Recommend using GraphvizOnline with output of .dot file for editing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published