Files
postgres-web/pgweb/core/admin.py
Magnus Hagander 7855d1b06c Implement ability for moderators to send notices to organisations
Notices entered will be sent to the organisations email address - so there
needs to be one (if not, the notification field doesn't show up).

Notifications also go in the database, and show up on each object so you
can see the previous history of it, and get emailed to the slaves list.

Finally, it's possible to reject-with-notification, in which case the
notification is sent off to the user and after that the object is deleted.
The notification history stays in the database, but is not linked anywhere
(but can be viewed from the admin interface on that model directly).
Unfortunately, this seems to cause double notifications to the slaves list,
but we'll have to live with that for now.

Closes #137
2012-06-26 14:34:26 +02:00

25 lines
762 B
Python

from django.contrib import admin
from django import forms
from django.db import connection
from django.http import HttpResponseRedirect, HttpResponse
from pgweb.core.models import *
class OrganisationAdmin(admin.ModelAdmin):
list_display = ('name', 'approved', 'lastconfirmed',)
list_filter = ('approved',)
ordering = ('name', )
filter_horizontal = ('managers', )
search_fields = ('name', )
class VersionAdmin(admin.ModelAdmin):
list_display = ('versionstring', 'reldate', 'supported', 'current', )
admin.site.register(Version, VersionAdmin)
admin.site.register(OrganisationType)
admin.site.register(Organisation, OrganisationAdmin)
admin.site.register(ImportedRSSFeed)
admin.site.register(ImportedRSSItem)
admin.site.register(ModerationNotification)