Sorry, this is unrelated to spirit django.
I need a help in creating subdomain for one of the apps in my project. I've tried implementing django-hosts which worked well locally but on production couldn't detect static files for the subdomain.
I deployed the project to digitalocean, everything is working fine but for the subdomain.
Can anyone pls enlighten me on how to create subdomain in django project deployed to digitalocean?
One way is having two django servers, one for the main domain, and one for the subdomain. You can share the same code for both applications, just have some setting to register one set of URLs or the other. Also, you may need to have different setting files for both applications, not sure.
About django'hosts and the static files issue, better ask in their github issues, or on StackOverflow
@nitely, thanks for your reply.
By two servers, do you mean to ngnix files? I was wondering how have two settings file or do you making that django a project?
@ojophilip, create two users on your server or two folder, like site/project1 and site/project2. Install in each folder virtual environment. Then tine nginx for main domain and sub
@Marci, thanks very much
I've been able to do this by splitting the project into two and deploy into different folder but with the same user.
It's working perfectly now
ojophilip, wow! That's just what I need for my website! could you say in more detail how you managed to run together your main website and this forum. Especially interesting, did you setup a common authentication system for them. I mean, if a user logs in to the website, he is already logged in the forum.
@miha_romanov, this new project is does not have this forum integrated in it. However, for my former project I did use common authentication for the main site and the forum.
For the authentication, I made use of django-allauth while retaining the forum profile as it is important for the forum also. It should be noted however that I didn't deploy spirit-forum as a project on its own but as apps