mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-24 07:53:47 +00:00
Users app index now list users
This commit is contained in:
parent
21487f4edc
commit
b86fe492c3
1 changed files with 9 additions and 2 deletions
|
@ -7,7 +7,7 @@ from django.core.context_processors import csrf
|
|||
from django.template import Context, RequestContext, loader
|
||||
from django.contrib import messages
|
||||
|
||||
from users.models import User, UserForm, InfoForm, PasswordForm, StateForm
|
||||
from users.models import User, UserForm, InfoForm, PasswordForm, StateForm, RightForm
|
||||
from users.forms import PassForm
|
||||
|
||||
from re2o.login import makeSecret, hashNT
|
||||
|
@ -65,5 +65,12 @@ def password(request, userid):
|
|||
user.save()
|
||||
return form({'userform': user_form}, 'users/user.html', request)
|
||||
|
||||
def add_right(request):
|
||||
right = RightForm(request.POST or None)
|
||||
if right.is_valid():
|
||||
right.save()
|
||||
return form({'userform': right}, 'users/user.html', request)
|
||||
|
||||
def index(request):
|
||||
return render(request, 'users/index.html')
|
||||
users_list = User.objects.order_by('pk')
|
||||
return render(request, 'users/index.html', {'users_list': users_list})
|
||||
|
|
Loading…
Reference in a new issue