In Rails if I want to setup a "context" which is basically objects that every view will need like the user object for a logged in user, or say a store/account/location object, how would I have this available on every view in the django framework?
In Rails I would do something like this:
class BaseController
before_action :setup_context
def setup_user
@user = # load user from db
@location = # load location for user
end
end
class HomeController < BaseController
def index
# I now can use the variables @user and @location
end
end
Does Django have these types of events that I can load objects and use them in all my views?