How can I display content side-wide (on every page) based on if the user is logged in or not? I have a sidebar area defined in my base.html which is either populated with login/register forms (if the user is not logged in) or a dashboard (if the user is logged in).
How can I make this universal to every single web page on my site? Do I have to manually check the user each time a new view is called and pass a user variable to my render_to_response()? There’s got to be a simpler way.
I don’t think there are a system wide solution if I understood you right. You have to verify each page based on whether the user is authenticated or not.
In the template you add the following code to see whether the user is a valid and authenticated. And you have to do so for each template with user level contents.
Another idea maybe is to use decoration
@login_required. However you would still need to add it to each view with user level contents.