django context processor required scene 200318

demand

E.g

Each page will need to show some information about the user

For example, after landing will display the user name, etc.

Normal processing in the view will be defined function

But if every page must deal with the same content, it is a troublesome

Look at the scene

Home view

Here Insert Picture Description

User login user object is returned

Home Templates

Here Insert Picture Description

effect

Here Insert Picture Description

Published 298 original articles · won praise 1 · views 4011

Guess you like

Origin blog.csdn.net/whalecode/article/details/104961450