Inline promises in organization view.

parent dd6bde8a
......@@ -52,13 +52,19 @@ class UrlRatingAdminInline(CompactInline):
ordering = ["-when"]
class PromiseAdminInline(CompactInline):
model = Promise
extra = 0
ordering = ["-created_on"]
class OrganizationAdmin(admin.ModelAdmin):
list_display = ('name', 'type', 'country')
search_fields = (['name', 'country', 'type__name'])
list_filter = ('name', 'type__name', 'country') # todo: type is now listed as name, confusing
fields = ('name', 'type', 'country', 'twitter_handle')
inlines = [UrlAdminInline, CoordinateAdminInline, OrganizationRatingAdminInline] #
inlines = [UrlAdminInline, CoordinateAdminInline, OrganizationRatingAdminInline, PromiseAdminInline] #
actions = ['rate_organization', 'scan_organization']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment