mirror of
https://github.com/nanoy42/coope
synced 2024-11-05 09:26:27 +00:00
11 lines
393 B
Python
11 lines
393 B
Python
from django.shortcuts import redirect
|
|
from django.urls import reverse
|
|
|
|
def home(request):
|
|
if request.user is not None:
|
|
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'))
|