is_authenticated is now a @property
This commit is contained in:
parent
7549c5ce46
commit
8481874ad7
1 changed files with 3 additions and 3 deletions
|
@ -37,7 +37,7 @@ def calendar(request, pYear, pMonth):
|
|||
lEvents = Event.objects.filter(date__gte=lCalendarFromMonth,
|
||||
date__lte=lCalendarToMonth,
|
||||
calendrier=True)
|
||||
if request.user.is_authenticated():
|
||||
if request.user.is_authenticated:
|
||||
lEvents = Event.objects.filter(date__gte=lCalendarFromMonth,
|
||||
date__lte=lCalendarToMonth)
|
||||
lCalendar = EventCalendar(lEvents).formatmonth(lYear, lMonth)
|
||||
|
@ -71,7 +71,7 @@ def calendar(request, pYear, pMonth):
|
|||
|
||||
def view_event(request, pYear, pMonth, id):
|
||||
ev = get_object_or_404(Event, id=id)
|
||||
if not request.user.is_authenticated() and not ev.calendrier:
|
||||
if not request.user.is_authenticated and not ev.calendrier:
|
||||
return redirect('calendrier.views.home')
|
||||
nom = ev.nom.capitalize
|
||||
fin = False
|
||||
|
@ -89,7 +89,7 @@ def view_event(request, pYear, pMonth, id):
|
|||
|
||||
def view_eventbis(request, id):
|
||||
ev = get_object_or_404(Event, id=id)
|
||||
if not request.user.is_authenticated() and not ev.calendrier:
|
||||
if not request.user.is_authenticated and not ev.calendrier:
|
||||
return redirect('calendrier.views.home')
|
||||
part = ev.participants_set.all()
|
||||
nom = ev.nom.capitalize
|
||||
|
|
Loading…
Add table
Reference in a new issue