# Path: src/moviesapp/views/mixins.py
# class TemplateAnonymousView(TemplateViewOriginal):
#     pass


from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from django.urls import reverse
from django.utils.decorators import method_decorator
from django.views.generic.edit import FormView
from moviesapp.forms import UserForm
from .mixins import TemplateAnonymousView




def logout_view(request):
    logout(request)
    return redirect("/")


@method_decorator(login_required, name="dispatch")
class PreferencesView(FormView):
    template_name = "user/preferences.html"
    form_class = UserForm


# Path: src/moviesapp/views/mixins.py
# class TemplateAnonymousView(TemplateViewOriginal):
#     pass


# Path: src/moviesapp/views/user.py
from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect
from django.urls import reverse
from django.utils.decorators import method_decorator
from django.views.generic.edit import FormView
from moviesapp.forms import UserForm
from .mixins import TemplateAnonymousView





def logout_view(request):
    logout(request)
    return redirect("/")


@method_decorator(login_required, name="dispatch")
class PreferencesView(FormView):
    template_name = "user/preferences.html"
    form_class = UserForm


    def get_form_kwargs(self):