Skip to content

Instantly share code, notes, and snippets.

@hir4k
Last active March 22, 2025 02:43
Show Gist options
  • Select an option

  • Save hir4k/5bf19754e097761bd41ac7771e20043c to your computer and use it in GitHub Desktop.

Select an option

Save hir4k/5bf19754e097761bd41ac7771e20043c to your computer and use it in GitHub Desktop.
An opinionated django style guide.
  • views.py - manage template rendering
  • forms.py - validate input data
  • services.py - all business logic goes here (call model to CRUD data in db, calling apis, tasks etc.)
  • models.py - represent db table, and do basic things like save,update,retrieve,delete in database.
  • views call services
  • services call models
  • forms only validate data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment