In my models, there is a many-to-many relationship between User and Store that she works for. After authenticated, if the user want to access a view that is specific to a store that she belongs to, a prerequisite action would be prompting her for the store she want to work with, unless she only belong to one store.
This prerequisite logic is very similar to loggin requirement. Is there a way i can implement this in a similar way as follow:
from braces.views import LoginRequiredMixin
class StoreSpecific_view(LoginRequiredMixin,generic.ListView):
model = StoreSpecificModel
I rather keep this logic away from the authentication process. Thank you for any suggestion or alternative solution.