login_requireddjango ビューの外でデコレータを使用しようとしています。これをユーティリティの関数で使用しています。
@login_required
def somefunc():
#logic
そして、私はこれsomefunc()を私の見解で呼んでいます
class MyView(View):
def get(self, request, *args, **kwargs):
my_func = Somefunc()
これを行うと、object has no attribute 'user'
Whats the issue here ?と表示されます。