I want users create their own account and users should get their own like user.foo.com and different point to different template folder. Is it possible in Django. I quite new to Django
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Django itself is unaware of whatever web server you are using. Usually, to configure extra sub-domains, you need to add virtual hosts to your webserver’s configuration and make sure your DNS provider forwards requests for that sub-domain to the appropriate server.
To do this directly, you’ll need to run Django under a user account that has write access to your webserver’s configuration file, which is really not recommended. Assuming all the hosts are on the same machine, you could do this indirectly, such as queuing requests and have someone manually approve them and edit the file, or have a script run through
cronand re-write the server configuration every X minutes/hours/days.Also, DNS registration is a major issue. If you have a wildcard domain name such as
"*.foo.com", you’ll be fine. If your DNS provider doesn’t allow this, you’ll need to have someone register the extra sub-domains manually.Basically, almost none this is related to Django, and almost all of it depends on your server’s software stack (which you have not specified).