workout/gym/mixins.py

7 lines
224 B
Python
Raw Normal View History

class SessionResetMixin:
def dispatch(self, request, *args, **kwargs):
if 'session_pk' in request.session:
del request.session['session_pk']
return super().dispatch(request, *args, **kwargs)