|
1
2
3
4
5
6
7
8
9
|
#-*- coding:utf-8 -*-
from django.contrib import admin
from django.contrib.sessions.models import Session
from models import AnonymousUserProfile, RealizedLemma, GroupSettings, \
RealizedPhraseology, RealizedPhraseologyBinding, \
RealizedSemantics, UserSettings, UserStats
|
|
10
11
|
class RealizedLemmaAdmin(admin.ModelAdmin):
exclude = ('lemma',)
|
|
12
|
list_filter = ('status', 'paid', 'lemma__vocabulary', 'bonus', 'counted',)
|
|
13
|
readonly_fields = ('date',)
|
|
14
|
search_fields = ('lemma__entry',)
|
|
15
16
17
|
class RealizedPhraseologyAdmin(admin.ModelAdmin):
exclude = ('lemma',)
|
|
18
|
list_filter = ('status', 'paid', 'lemma__vocabulary', 'bonus', 'counted',)
|
|
19
20
|
readonly_fields = ('date',)
search_fields = ('lemma__entry',)
|
|
21
|
|
|
22
23
|
class RealizedSemanticsAdmin(admin.ModelAdmin):
exclude = ('entry',)
|
|
24
|
list_filter = ('status', 'bonus',)
|
|
25
26
27
28
29
|
search_fields = ('entry__name',)
class UserStatsAdmin(admin.ModelAdmin):
exclude = ('lemma_real_history', 'phraseology_real_history',
'bind_phraseology_frames_history')
|
|
30
31
|
admin.site.register(AnonymousUserProfile)
|
|
32
33
34
35
36
37
38
39
40
|
admin.site.register(UserSettings)
admin.site.register(UserStats, UserStatsAdmin)
admin.site.register(RealizedLemma, RealizedLemmaAdmin)
admin.site.register(RealizedPhraseology, RealizedPhraseologyAdmin)
admin.site.register(RealizedSemantics, RealizedSemanticsAdmin)
admin.site.register(GroupSettings)
admin.site.register(RealizedPhraseologyBinding)
admin.site.register(Session)
|