About Dynamic Class or Function Loading
For reusable apps, you can easily make some classes or functions overwritable in the settings, by defining their paths there. You can load them with the import_string()
utility.
registration/views.py
1 2 3 4 5 6 7 8 |
|
settings.py
1 |
|
Tips and Tricks Programming Architecture Django 4.2 Django 3.2 Django 2.2 Python 3
Also by me
Django Paddle Subscriptions app
For Django-based SaaS projects.
Django GDPR Cookie Consent app
For Django websites that use cookies.