404.2.25
by franku
added old notification app to widelands; deactivated notification feed |
1 |
from django.contrib import admin |
450.1.1
by franku
commented notice related things |
2 |
from notification.models import NoticeType, NoticeSetting, ObservedItem |
450.1.10
by franku
changed notification admin pages |
3 |
from django.utils.translation import ugettext_lazy as _ |
404.2.25
by franku
added old notification app to widelands; deactivated notification feed |
4 |
|
438.1.6
by franku
run the script |
5 |
|
404.2.25
by franku
added old notification app to widelands; deactivated notification feed |
6 |
class NoticeTypeAdmin(admin.ModelAdmin): |
7 |
list_display = ('label', 'display', 'description', 'default') |
|
8 |
||
438.1.6
by franku
run the script |
9 |
|
404.2.25
by franku
added old notification app to widelands; deactivated notification feed |
10 |
class NoticeSettingAdmin(admin.ModelAdmin): |
450.1.10
by franku
changed notification admin pages |
11 |
search_fields = ['user__username',] |
12 |
list_display = ('user', 'notice_type', 'medium', 'send') |
|
404.2.25
by franku
added old notification app to widelands; deactivated notification feed |
13 |
|
438.1.6
by franku
run the script |
14 |
|
450.1.1
by franku
commented notice related things |
15 |
class ObserverdItemAdmin(admin.ModelAdmin): |
450.1.10
by franku
changed notification admin pages |
16 |
readonly_fields = ('observed_object', 'content_type', 'object_id') |
450.1.11
by franku
remove notification 'wiki_article_edited' instead observe the article a user has created |
17 |
search_fields = ['user__username', 'notice_type__label'] |
450.1.10
by franku
changed notification admin pages |
18 |
list_display = ('user', 'notice_type', 'content_type', 'get_content_object') |
19 |
fieldsets = ( |
|
20 |
(None, {'fields': ('user',)}), |
|
21 |
(_('Observed object'), {'fields': ('observed_object', 'content_type', 'object_id')}), |
|
22 |
(_('Settings'), {'fields': ('added', 'notice_type', 'signal')}), |
|
23 |
)
|
|
450.1.8
by franku
minor changes |
24 |
|
404.2.25
by franku
added old notification app to widelands; deactivated notification feed |
25 |
admin.site.register(NoticeType, NoticeTypeAdmin) |
26 |
admin.site.register(NoticeSetting, NoticeSettingAdmin) |
|
450.1.1
by franku
commented notice related things |
27 |
admin.site.register(ObservedItem, ObserverdItemAdmin) |