Why reverse-URL mapping is important

This commit is contained in:
Philip Sargent
2020-07-30 01:21:03 +01:00
parent 0a10cef8f7
commit c5dde279d8
3 changed files with 14 additions and 5 deletions

View File

@@ -41,6 +41,11 @@
<p>[ However django-extensions looks like it could be useful explicitly to help us through the upgrade process:
<a href="https://pypi.org/project/django-extensions/">pypi.org/project/django-extensions/</a> (only available for django 2.2 and later). ]
<h4>Why we still use django</h4>
<p>Well we <a href="trog2030.html">might not use django indefinitely</a>, but unlike many frameworks the necessary functions are separately replaceable. So this gives us an evolution path.
<p>The stack is: database, request/response (GET/POST http),
<a href="https://docs.djangoproject.com/en/1.11/topics/http/urls/">URL mapping/dispatch</a> (declarative and bidrectional), and <a href="https://docs.djangoproject.com/en/3.0/topics/templates/">templates</a> (data to HTML). See the <a href="https://docs.djangoproject.com/en/3.0/misc/design-philosophies/">django design philosophy</a>. Note that having a URL dispatcher that supports <a href="https://docs.djangoproject.com/en/1.11/topics/http/urls#s-reverse-resolution-of-urls">reverse resolution</a> is important: it is a key reason why we need a framework and not just a mess of javascript. We have nearly 100 URL patterns.
<h3>Important Tricks</h3>
<p>There are five critical tricks that make everything much, much easier:
<ol>