Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Daniel Dutra Rufasto
adega
Commits
eaa33022
Commit
eaa33022
authored
9 years ago
by
Jomaro Rodrigues
Browse files
Options
Download
Email Patches
Plain Diff
Adicionadas ações para aceitar e recusar requisições de acesso ao sistema
parent
ddc6ab74
master
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
public/admin.py
+15
-0
public/admin.py
public/templates/request_access/mail/request_approved.html
+6
-0
public/templates/request_access/mail/request_approved.html
with
21 additions
and
0 deletions
+21
-0
public/admin.py
+
15
-
0
View file @
eaa33022
# coding: utf-8
from
django.contrib
import
admin
from
public.models
import
Request
...
...
@@ -7,5 +9,18 @@ class RequestAdmin(admin.ModelAdmin):
list_display
=
(
'name'
,
'email'
,
'status'
,
'courses_as_str'
)
list_filter
=
(
'status'
,
)
actions
=
[
'accept'
,
'deny'
]
def
accept
(
self
,
request
,
queryset
):
for
_request
in
queryset
:
_request
.
accept
()
def
deny
(
self
,
request
,
queryset
):
for
_request
in
queryset
:
_request
.
deny
()
accept
.
short_description
=
"Aceitar as requisições selecionadas"
deny
.
short_description
=
"recusar as requisições selecionadas"
admin
.
site
.
register
(
Request
,
RequestAdmin
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
public/templates/request_access/mail/request_approved.html
+
6
-
0
View file @
eaa33022
...
...
@@ -8,5 +8,11 @@
<h1>
Sua requisição de acesso ao sistema ADEGA foi aprovada.
</h1>
<h3>
Seus dados de acesso são:
</h3>
<p>
Email: {{ user.email }}
</p>
<p>
Senha: {{ passwd }}
</p>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help