Amélioration de l'interface d'ajout de jeux vidéos :
Modification de : * ajout de champs d'aide sur les champs booléens * création des fichiers de migration pour ces champs d'aide * choix de l'ordre des champs dans l'interface admin de Games
This commit is contained in:
parent
04708e6286
commit
5820bdc63a
@ -10,6 +10,14 @@ class GameAdmin(admin.ModelAdmin):
|
||||
'playing',
|
||||
'wish']
|
||||
search_fields = ('name',)
|
||||
fields = [
|
||||
'name',
|
||||
'collection',
|
||||
'status',
|
||||
'playing',
|
||||
'unplayed',
|
||||
'wish'
|
||||
]
|
||||
|
||||
|
||||
class TimelineAdmin(admin.ModelAdmin):
|
||||
|
30
collection/games/migrations/0002_auto_20170824_1843.py
Normal file
30
collection/games/migrations/0002_auto_20170824_1843.py
Normal file
@ -0,0 +1,30 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11 on 2017-08-24 18:43
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('games', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='game',
|
||||
name='playing',
|
||||
field=models.BooleanField(default=False, help_text="You're currently playing this game."),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='game',
|
||||
name='unplayed',
|
||||
field=models.BooleanField(default=False, help_text='You never played this game.'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='game',
|
||||
name='wish',
|
||||
field=models.BooleanField(default=False, help_text="You're waiting X-mas father offers you this game."),
|
||||
),
|
||||
]
|
@ -37,9 +37,15 @@ class Game(Item):
|
||||
DEFAULT_CHOICE = UNFINISHED
|
||||
|
||||
# others
|
||||
playing = models.BooleanField(default=False)
|
||||
unplayed = models.BooleanField(default=False)
|
||||
wish = models.BooleanField(default=False)
|
||||
playing = models.BooleanField(
|
||||
default=False,
|
||||
help_text=_('You\'re currently playing this game.'))
|
||||
unplayed = models.BooleanField(
|
||||
default=False,
|
||||
help_text=_('You never played this game.'))
|
||||
wish = models.BooleanField(
|
||||
default=False,
|
||||
help_text=_('You\'re waiting X-mas father offers you this game.'))
|
||||
|
||||
class Meta:
|
||||
ordering = ('-playing', 'name')
|
||||
|
Loading…
Reference in New Issue
Block a user