https://github.com/marksweb/django-example
Example django project setup
https://github.com/marksweb/django-example
Last synced: about 1 year ago
JSON representation
Example django project setup
- Host: GitHub
- URL: https://github.com/marksweb/django-example
- Owner: marksweb
- License: agpl-3.0
- Created: 2022-08-31T07:41:42.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-11-10T15:15:03.000Z (over 1 year ago)
- Last Synced: 2025-02-12T16:19:57.645Z (over 1 year ago)
- Language: Python
- Size: 33.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
django-example
--------------
This is an example django project started with `uv`.
Features
--------
Clear cache view
================
It's possible to clear the cache from the admin using a custom admin view.
This is achieved using a subclass of ``AdminSite``. See ``core.admin.MyAdminSite``
for the view and the URL setup. A basic example is included, but within the view
there is access to the request, so permissions checking can be carried out on
the user if necessary. It also loops over all defined caches and clears each
by default. You could modify this so it only clear certain cache(s).
To use a custom ``AdminSite``, you add it to the installed apps in place of
`django.contrib.admin`. So in `settings.py` you'll see ``"core.apps.MyAdminConfig"`` instead.