diff --git a/handbook/troggle/trogdjango.html b/handbook/troggle/trogdjango.html index 7b3a64085..11844861e 100644 --- a/handbook/troggle/trogdjango.html +++ b/handbook/troggle/trogdjango.html @@ -51,16 +51,18 @@ plugin if it is really, really necessary and we have removed as many as we could we discovered that we weren't really using it and could work around it, so we are not planning on reinstalling staticfiles.

Why we still use django

+

Well we might not use django indefinitely, but unlike many frameworks the necessary functions are separately replaceable. So this gives us an evolution path. We can incrementally reduce the amount of django we use, replacing it with our own simpler python that does only what we need.

The separate functions within the framework form a "stack". These functions exist in all web application frameworks but in Django they are loosely coupled. +

The stack is:

  1. SQL database: mapping to/from python objects and indexing/access routines for all the entries (sqlite, MySQL, MariaDB, postgres all work). This is where the multi-user synchronisation happens too.
  2. request/response (http GET/POST) including access control and security middleware. We could never keep up with web security if we didn't use a well-supported system for this. -
  3. URL mapping/dispatch which matches a requested URL with a chunk of python code, and vice versa (declarative and bidrectional). "Cool URIs don't change." +
  4. URL mapping/dispatch which matches a requested URL with a chunk of python code, and vice versa (declarative and bidrectional). "Cool URIs don't change."
  5. templates which format the results of data queries into HTML pages or JSON data exports. [2025 article on Django templates]