I would like to create django sites in runtime, using the same settings.py
For example, I have in my django_site table the following rows,
1 | 127.0.0.1:8001 | sitea
2 | 127.0.0.1:8002 | siteb
3 | 127.0.0.1:8003 | sitec
My django goes to my settings.py, fetchs the site_id and brings the right site.. What I would like to do is:
1 | 127.0.0.1:8001 | genericsite
but then the user access:
127.0.0.1:8001/sitea -> it brings sitea
127.0.0.1:8001/siteb -> it brings siteb
How would you go about setting up your urlpatterns? For instance, if I go to my admin page again, create a sited
, I should be able to access sited
. P.s. All the info I need after that will be filtered based on the site the user is requesting..
I really need a hand with this! Thanks a lot..