python - django 前后台系统如何分离
PHPz
PHPz 2017-04-18 09:53:23
0
1
395

1,总需求是前台系统和后台管理系统分离。
2,实现共用数据层。
3,授权系统分离,也就是前后台各一套授权机制。
下图为我的站点结构
请为怎么设计比较好呢?

PHPz
PHPz

学习是最好的投资!

reply all(1)
黄舟

Just continue with your current structure. You mainly want to separate front-end and back-end authorization. The models involved in each app are defined in the models to which the app belongs, and then the respective authorization mechanisms allow the front-end user model and the back-end user model to inherit AbstractBaseUser and write their own authorization methods. (Of course, you can also use other methods. You don’t have to inherit AbstractBaseUser. For example, if the front desk is an interface, you can use token authorization.) I have written a website before that requires student login, teacher login, and background login. That’s about it. Made.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template