mirror of
https://github.com/nanoy42/coope
synced 2024-12-01 17:12:24 +00:00
11 lines
398 B
Python
11 lines
398 B
Python
from django.shortcuts import redirect
|
|
from django.urls import reverse
|
|
|
|
def home(request):
|
|
if request.user.is_authenticated:
|
|
if(request.user.has_perm('gestion.can_manage')):
|
|
return redirect(reverse('gestion:manage'))
|
|
else:
|
|
return redirect(reverse('users:profile', kwargs={'pk': request.user.pk}))
|
|
else:
|
|
return redirect(reverse('users:login'))
|