Forums

Django-hosts subdomains

I have a single django project with multiple apps routed to different subdomains using django-hosts (https://pypi.org/project/django-hosts/). For example, www.domain.com and play.domain.com. It works on localhost. How would I set this up on pythonanywhere without using a second web app? Currently when I go to www.domain.com, it shows that portion of my website but when I go to play.domain.com, it shows "Coming Soon! This is going to be another great website hosted by PythonAnywhere. ..."

On PythonAnywhere each subdomain needs to be a separate web app, so you'd need as many web apps as you have subdomains. Another solution would be to use routing inside your web app, e.g. play.domain.com would become www.domain.com/play, etc.