Hey all,
At the moment I have a Django app that has multiple settings files and multiple databases for my customers. I run a separate Django instance for each customer. I'm going to put it all together in 1 database so that I can run it in one instance. This makes creating new customer accounts easier, for example.
Customers will visit domain.tld/customer_name/.
Now the company name gets passed as an argument to the view.
I want the user model to look like this:
user_id user_data ( all the normal fields ) company_id
So when the user logs in, Django has to retrieve the company_id for the current url and then when logging in authenticate this company_id against the user data.
How would one achieve this?
Thank you!
Regards,
Henk.