开发者

How can I pass a variable to all of my views? (Django)

I need to use the same object in all of my views. Is there a better way to get it in the template than repeating myself in each view. e.g., I need to get Myobj.objects.all() fo开发者_如何学运维r all of my views.

Thanks


Sounds like context processors are what you're looking for here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜