mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
django2.2: replace removed is_anonymous() and is_authenticated to their now used counterparts
This commit is contained in:
@ -56,7 +56,7 @@ class EbouticMain(TemplateView):
|
||||
request.session.modified = True
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
if not request.user.is_authenticated():
|
||||
if not request.user.is_authenticated:
|
||||
return HttpResponseRedirect(
|
||||
reverse_lazy("core:login", args=self.args, kwargs=kwargs)
|
||||
+ "?next="
|
||||
@ -67,7 +67,7 @@ class EbouticMain(TemplateView):
|
||||
return super(EbouticMain, self).get(request, *args, **kwargs)
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
if not request.user.is_authenticated():
|
||||
if not request.user.is_authenticated:
|
||||
return HttpResponseRedirect(
|
||||
reverse_lazy("core:login", args=self.args, kwargs=kwargs)
|
||||
+ "?next="
|
||||
@ -118,7 +118,7 @@ class EbouticCommand(TemplateView):
|
||||
template_name = "eboutic/eboutic_makecommand.jinja"
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
if not request.user.is_authenticated():
|
||||
if not request.user.is_authenticated:
|
||||
return HttpResponseRedirect(
|
||||
reverse_lazy("core:login", args=self.args, kwargs=kwargs)
|
||||
+ "?next="
|
||||
@ -129,7 +129,7 @@ class EbouticCommand(TemplateView):
|
||||
)
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
if not request.user.is_authenticated():
|
||||
if not request.user.is_authenticated:
|
||||
return HttpResponseRedirect(
|
||||
reverse_lazy("core:login", args=self.args, kwargs=kwargs)
|
||||
+ "?next="
|
||||
@ -192,7 +192,7 @@ class EbouticPayWithSith(TemplateView):
|
||||
with transaction.atomic():
|
||||
if (
|
||||
"basket_id" not in request.session.keys()
|
||||
or not request.user.is_authenticated()
|
||||
or not request.user.is_authenticated
|
||||
):
|
||||
return HttpResponseRedirect(
|
||||
reverse_lazy("eboutic:main", args=self.args, kwargs=kwargs)
|
||||
|
Reference in New Issue
Block a user