阅读背景:

Django init的东西在底部。html从数据库

来源:互联网 

I am looking for better solution then my one. I have base.html which represents my layout, at the top of the layout is menu. The trick is that some menu items are 'generated' depending on database values. I have dynamic application where user can log in, the menu item is 'projects' and I want there only projects for specific user. Another user can have different projects, so different menu items are generated for him. I had one idea, but I'm not very satisfied with this, and it is making ajax calls and set html of this menu element. There is a problem that ajax calls would ask server for data after every request. Do you have an idea how to sensibly solve my problem? thanks. I forgot to specify I am using Django framework.I am looking for better solution then my one. I




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: