GithubHelp home page GithubHelp logo

taranovskiy / education-backend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tough-dev-school/education-backend

0.0 1.0 0.0 1.33 MB

Django-based backend for our learning management system

Home Page: https://education.borshev.com

License: MIT License

Python 99.04% Dockerfile 0.47% CSS 0.04% JavaScript 0.25% Makefile 0.14% Procfile 0.06%

education-backend's Introduction

CI Maintainability Test Coverage

Django-based production project, integrated with Tinkoff, zoom.us, Dashamail, Postmark, S3 and telegram. Frontend is built on vue.js in the separate repo.

Configuration

Configuration is stored in src/app/.env, for examples see src/app/.env.ci

Installing on a local machine

This project requires python3.9, running postgres and redis.

Install requirements:

pip install --upgrade pip pip-tools
pip-sync dev-requirements.txt requirements.txt
cd src
cp app/.env.ci app/.env  # default environment variables
./manage.py migrate
./manage.py createsuperuser

Testing:

# run unit tests
$ pytest

Development servers:

# run django dev server
$ ./manage.py runserver

Backend Code requirements

Style

  • Obey django's style guide.
  • Configure your IDE to use flake8 for checking your python code. For running flake8 manualy, do cd src && flake8
  • Prefer English over your native language in comments and commit messages.
  • Commit messages should contain the unique id of issue they are linked to (refs #100500)
  • Every model and a model method should have a docstring.

Code organisation

  • KISS and DRY.
  • Obey django best practices
  • If you want to implement some business logic โ€” make a service for that. Service examples: UserCreator, OrderCreator
  • No logic is allowed within the views or templates. Only services and models.
  • Use PEP-484 type hints when possible.
  • Prefer Manager methods over static methods.
  • Do not use signals for business logic. Signals are good only for notification purposes.
  • No l10n is allowed in python code, use django translation.

education-backend's People

Contributors

abdujabbar avatar dependabot-preview[bot] avatar dependabot[bot] avatar f213 avatar grepto avatar igoose1 avatar inerv avatar metheoryt avatar nvo87 avatar renovate[bot] avatar sobolevn avatar tvojamamalama avatar withshubh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.