Thursday, December 30, 2021

Re: Automatic subdomain for each user

Check out the django-hosts package, the docs are pretty explanatory and easy to use. 
You'd also want to add '.yourdomain' to the allowed_hosts list and it doesn't work with '127.0.0.1' as its harder for if to figure out the sub-domain, if you want to use it on your development server use localhost, e.g mrj.localhost:8000

On Thu, Dec 30, 2021, 12:02 AM Sherif Adigun <adigunsherif@gmail.com> wrote:
I am faced with a requirement where each user is required to use the application under his own subdomain. Whenever a user registers, he gets username.domain.com and he can add staff, manage reports, etc under his subdomain.

What is the best approach to you can suggest please? 

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/f330ad74-75c1-4244-ae27-aa6b97717940n%40googlegroups.com.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJ4Kmg7P12reF-DN_uuLg%3DvAn6sb0yu%3DScWUHZ1%2BxeZyHdoJKw%40mail.gmail.com.

No comments:

Post a Comment