Subdomain resolutions are a matter for the DNS, not the backend/frontend.
But you can add a *.yourdomain.com and handle the logic server-side
In that case, your question was already answered here Using subdomains in django