Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mediatek
Base de données Mediatek
Commits
9ae8bfbe
Verified
Commit
9ae8bfbe
authored
Aug 10, 2019
by
erdnaxe
🦋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Autocomplete for perf
parent
c306113f
Pipeline
#1410
passed with stage
in 3 minutes and 24 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
media/admin.py
media/admin.py
+4
-0
users/admin.py
users/admin.py
+2
-0
No files found.
media/admin.py
View file @
9ae8bfbe
...
...
@@ -16,6 +16,7 @@ class AuteurAdmin(VersionAdmin):
class
MediaAdmin
(
VersionAdmin
):
list_display
=
(
'titre'
,
'authors'
,
'cote'
)
search_fields
=
(
'titre'
,
'authors'
,
'cote'
)
autocomplete_fields
=
(
'auteur'
,)
def
authors
(
self
,
obj
):
return
", "
.
join
([
a
.
nom
for
a
in
obj
.
auteur
.
all
()])
...
...
@@ -26,12 +27,15 @@ class EmpruntAdmin(VersionAdmin):
'permanencier_emprunt'
,
'permanencier_rendu'
)
search_fields
=
(
'media'
,
'user'
,
'date_emprunt'
,
'date_rendu'
)
date_hierarchy
=
'date_emprunt'
autocomplete_fields
=
(
'media'
,
'user'
,
'permanencier_emprunt'
,
'permanencier_rendu'
)
class
JeuAdmin
(
VersionAdmin
):
list_display
=
(
'nom'
,
'proprietaire'
,
'duree'
,
'nombre_joueurs_min'
,
'nombre_joueurs_max'
,
'comment'
)
search_fields
=
(
'nom'
,
'proprietaire'
,
'duree'
,
'comment'
)
autocomplete_fields
=
(
'proprietaire'
,)
admin_site
.
register
(
Auteur
,
AuteurAdmin
)
...
...
users/admin.py
View file @
9ae8bfbe
...
...
@@ -20,10 +20,12 @@ class ClefAdmin(VersionAdmin):
list_display
=
(
'nom'
,
'proprio'
,
'commentaire'
)
ordering
=
(
'nom'
,)
search_fields
=
(
'nom'
,
'proprio'
,
'commentaire'
)
autocomplete_fields
=
(
'proprio'
,)
class
AdhesionAdmin
(
VersionAdmin
):
list_display
=
(
'annee_debut'
,
'annee_fin'
)
autocomplete_fields
=
(
'adherent'
,)
class
IsAdherentFilter
(
admin
.
SimpleListFilter
):
...
...
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