HackSoftware / Django-Styleguide

Django styleguide used in HackSoft projects

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Django Styleguide Survey: Feedback

RadoRado opened this issue · comments

A collection if things to address, based on the feedback from the survey we are running - https://www.hacksoft.io/blog/django-styleguide-survey:

  • Explain why we are approaching this with a service layer & not custom model methods / custom managers & querysets
  • Add reasoning about the lack of ModelViewSet / other DRF generics
  • When to use function-based or class-based services
  • Make it clear, that you can cherry-pick things that you like from this particular styleguide. By no means you should follow it entirely.
  • Explain why we are not following strict REST
  • Working with M2M fields (services, selectors) 🤔
  • pre-commit hooks 🤔
  • Non-API perspective (classic views + templates)
  • Async 🤔
  • Recommend default test runner (pytest)
  • Check https://github.com/kiwicom/pytest-recording / https://github.com/betamaxpy/betamax
  • Add alternative to the "giant test folder" from here - https://github.com/HackSoftware/Django-Styleguide#naming-conventions (test per module, as in JavaScript world)
  • Explain API error formatting better
  • Explain the combination of 12factor app & settings files.
  • Add section about i18n/l10
  • Beginner tutorials - how to get from the official Django tutorial to Django Styleguide
  • Add a dedicated section about signals
  • Add a dedicated section about management commands (for example - doing some kind of data migration outside a data migration)
  • Maybe some tips and tricks about deployment part of Django projects and further support.
  • API versioning
  • Permission Checks / permissions
  • Mention database transactions
  • Mention DX
  • Mention caching / redis
  • Storing and handling constants
  • Dealing with 3rd party services
  • API Schema / Documentation
  • Use better documentation format (PDF, readthedocs, etc.)
  • Mention graphql

Addressed the first 2 items via #91

Addressed the 3rd item here -> 81d5e04

Addressed the 4th item here -> 6493086

Reviewing this list I feel the point:

Check https://github.com/kiwicom/pytest-recording / https://github.com/betamaxpy/betamax

Should also include https://github.com/kevin1024/vcrpy which is far more popular.