coalition.endorsements.admin

Classes

EndorsementAdmin

Encapsulate all admin options and functionality for a given model.

Module Contents

class coalition.endorsements.admin.EndorsementAdmin(model, admin_site)[source]

Bases: django.contrib.admin.ModelAdmin

Encapsulate all admin options and functionality for a given model.

list_display = ('stakeholder_name', 'stakeholder_organization', 'endorsement_type', 'campaign', 'status_badge',...[source]
list_filter = ('status', 'email_verified', 'public_display', 'display_publicly', 'created_at', 'campaign',...[source]
search_fields = ('stakeholder__first_name', 'stakeholder__last_name', 'stakeholder__organization',...[source]
raw_id_fields = ('stakeholder', 'campaign', 'reviewed_by')[source]
ordering = ('-created_at',)[source]
readonly_fields = ('verification_token', 'verification_sent_at', 'verified_at', 'terms_accepted',...[source]
fieldsets[source]
actions = ['approve_endorsements', 'reject_endorsements', 'mark_verified', 'send_verification_emails',...[source]
stakeholder_name(obj: coalition.endorsements.models.Endorsement) str[source]
stakeholder_organization(obj: coalition.endorsements.models.Endorsement) str[source]
endorsement_type(obj: coalition.endorsements.models.Endorsement) str[source]
status_badge(obj: coalition.endorsements.models.Endorsement) str[source]
email_verified_badge(obj: coalition.endorsements.models.Endorsement) str[source]
approve_endorsements(request: django.http.HttpRequest, queryset: django.db.models.QuerySet[coalition.endorsements.models.Endorsement]) None[source]
reject_endorsements(request: django.http.HttpRequest, queryset: django.db.models.QuerySet[coalition.endorsements.models.Endorsement]) None[source]
mark_verified(request: django.http.HttpRequest, queryset: django.db.models.QuerySet[coalition.endorsements.models.Endorsement]) None[source]
send_verification_emails(request: django.http.HttpRequest, queryset: django.db.models.QuerySet[coalition.endorsements.models.Endorsement]) None[source]
send_approval_notifications(request: django.http.HttpRequest, queryset: django.db.models.QuerySet[coalition.endorsements.models.Endorsement]) None[source]
approve_for_display(request: django.http.HttpRequest, queryset: django.db.models.QuerySet[coalition.endorsements.models.Endorsement]) None[source]
remove_from_display(request: django.http.HttpRequest, queryset: django.db.models.QuerySet[coalition.endorsements.models.Endorsement]) None[source]
save_model(request: django.http.HttpRequest, obj: coalition.endorsements.models.Endorsement, form: Any, change: bool) None[source]

Given a model instance save it to the database.