Django Views – The Right Way

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • CPython

    The Python programming language

  • I'm not so sure about the 'including data in your template' section. It shows the regular way of adding context fields directly.

    I found greater success and clarity with the @property and its cached brother @cached_property decorators. Using these two, you can access the view instance and its properties via just, e.g., 'view.foo' in the template.

    @caches_property from what I understand is in fact originally a Django creation too (or at least its first popularising use https://github.com/python/cpython/issues/65344).

  • Django-Styleguide

    Django styleguide used in HackSoft projects

  • I think this is a great resource. The only comment I have is on the Thin Views chapter. Instead of attaching logic to the models, I like to make a services.py file in my app that has functions that satisfy all sorts of business logic.

    Here's another opinionated Django guide: https://github.com/HackSoftware/Django-Styleguide if anyone's interested

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • lazyweb

  • If it's a really simple app, check out this flask+dataset(sqlite) approach: https://github.com/void4/lazyweb/

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts