Subdomain tools for the Django framework, including subdomain-based URL routing. Version 3.0.1 is current. Releases are intermittent, mainly bug fixes.
pip install django-subdomains==3.0.1No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Basic setup: install app, add middleware, define SUBDOMAIN_URLCONFS.
Change middleware class to 'SubdomainURLMiddleware' and update imports to 'from subdomains.middleware import SubdomainURLMiddleware'.
Use only the subdomain label as key, e.g., 'api' or 'www'.
Remove the use of 'subdomain_urls' and instead put the subdomain URL patterns directly in the referenced URLconf files.