I'm happy to announce the 1.1.0 release of django-service-urls package, an evolution of dj-database-url which can handle CACHES and EMAIL_BACKEND setting other than DATABASES.
*News* Simplified installation: instead of modifying the setting file (possibility that is always available) just add import service_urls.patch in your manage.py/wsgi.py files. *Urls* pypi and docs: https://pypi.org/project/django-service-urls/ main repo (bitbucket/mercurial): https://bitbucket.org/rsalmaso/django-service-urls/ github mirror: https://github.com/rsalmaso/django-service-urls gitlab mirror: https://gitlab.com/rsalmaso/django-service-urls (I accept patches from every repository) *Install* $ python3 -m pip install django-service-urls Add import service_urls.patch to manage.py and wsgi.py *manage.py:* #!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys import service_urls.patch def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project_name.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " "available on your PYTHONPATH environment variable? Did you " "forget to activate a virtual environment?" ) from exc execute_from_command_line(sys.argv) if __name__ == '__main__': main() *wsgi.py:*import os import service_urls.patch from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project_name.settings') application = get_wsgi_application() *Usage* Configure your setting (see docs for better example). DATABASES = { 'default': os.environ.get('DATABASE_DEFAULT', 'postgres://myuser:mypasswd@localhost:5432/mydb'), } CACHES = { 'default': os.environ.get('CACHE_DEFAULT', ''memcached://127.0.0.1:11211 '), } EMAIL_BACKEND = os.environ.get('EMAIL_BACKEND', 'smtp://localhost:25') -- | Raffaele Salmaso | https://salmaso.org | https://bitbucket.org/rsalmaso | https://github.com/rsalmaso -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CABgH4Jsy4PXQXLj5SQc0FOq7fAAW%2BEcRexy2u9XV40-ry4uJXw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.