I'm getting to know the Sites framework in Django. One thing I cannot find in the documentation is how to restrict users to "their" sites.
Lets say I have example.com and sexyblog.com. Both sites run of the same code base and share the same db using Sites.
How to make sure that the sexyblog-users can't log in to example.com?
Thank you for your help.
When you are using the Sites framework, you can retrieve the current site with
get_current_siteanywhere, so you can build your permission system. https://docs.djangoproject.com/en/4.1/ref/contrib/sites/#get-current-site-shortcutI suppose you have stored user sites allowed somewhere, so you just have to create a mixin/decorator for managing this permission checking in view.
There is none existing system for managing your case in Site framework I think