Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
oser-backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hamza Touizrat
oser-backend
Commits
e096a4ef
Commit
e096a4ef
authored
6 years ago
by
Auriane Strasser
Browse files
Options
Downloads
Patches
Plain Diff
change visits/admin.py to redirect to users
parent
6c386a5a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
visits/admin.py
+2
-2
2 additions, 2 deletions
visits/admin.py
with
2 additions
and
2 deletions
visits/admin.py
+
2
−
2
View file @
e096a4ef
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
from
django
import
forms
from
django
import
forms
from
django.contrib
import
admin
,
messages
from
django.contrib
import
admin
,
messages
from
django.template.defaultfilters
import
pluralize
from
django.template.defaultfilters
import
pluralize
from
django.
core
import
urlresol
vers
from
django.
urls
import
re
vers
e
from
.models
import
Participation
,
Place
,
Visit
from
.models
import
Participation
,
Place
,
Visit
...
@@ -113,7 +113,7 @@ class ParticipationAdmin(admin.ModelAdmin):
...
@@ -113,7 +113,7 @@ class ParticipationAdmin(admin.ModelAdmin):
list_filter
=
(
'
submitted
'
,
'
accepted
'
,
'
present
'
)
list_filter
=
(
'
submitted
'
,
'
accepted
'
,
'
present
'
)
actions
=
[
accept_selected_participations
,
reject_selected_participations
]
actions
=
[
accept_selected_participations
,
reject_selected_participations
]
def
link_to_user
(
self
,
obj
):
def
link_to_user
(
self
,
obj
):
link
=
urlresolvers
.
reverse
(
"
admin:visits_user_change
"
,
args
=
[
obj
.
user
.
id
])
link
=
reverse
(
"
admin:visits_user_change
"
,
args
=
[
obj
.
user
.
id
])
return
u
'
<a href=
"
%s
"
>%s</a>
'
%
(
link
,
obj
.
user
.
email
)
return
u
'
<a href=
"
%s
"
>%s</a>
'
%
(
link
,
obj
.
user
.
email
)
link_to_user
.
allow_tags
=
True
link_to_user
.
allow_tags
=
True
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment