How to get unique users across multiple Django sites powered by the “sites” framework?

前端 未结 3 664
庸人自扰
庸人自扰 2020-12-04 14:57

I am building a Django site framework which will power several independent sites, all using the same apps but with their own templates. I plan to accomplish this by using mu

3条回答
  •  青春惊慌失措
    2020-12-04 15:20

    You can plug your own authorization and authentication backends that take the site id into consideration.

    See other authentication sources on the django documentation and the authentication backends references

    Besides that, if your django source is too old, you can always modify the authenticate() or login() code yourself. After all... Isn't that one of the wonders of open source. Be aware that by doing so you may affect your compatibility with other modules.

    Hope this helps.

提交回复
热议问题