Skip to content
This repository has been archived by the owner on Jan 19, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1526 from akatsoulas/1302721-profile-report-autoc…
Browse files Browse the repository at this point in the history
…omplete

[bug 1302721] Add django-autocomplete light to ReportAbuse model in a…
  • Loading branch information
akatsoulas committed Sep 27, 2016
2 parents e68e19d + 0058371 commit b2effd2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mozillians/users/admin.py
Expand Up @@ -654,7 +654,19 @@ class VouchAdmin(admin.ModelAdmin):
admin.site.register(Vouch, VouchAdmin)


class AbuseReportAutocompleteForm(forms.ModelForm):

class Meta:
model = AbuseReport
fields = '__all__'
widgets = {
'profile': autocomplete.ModelSelect2(url='users:vouchee-autocomplete'),
'reporter': autocomplete.ModelSelect2(url='users:vouchee-autocomplete'),
}


class AbuseReportAdmin(admin.ModelAdmin):
form = AbuseReportAutocompleteForm
list_display = ['profile', 'reporter', 'type', 'created', 'updated']
list_filter = ['type', 'is_akismet']

Expand Down

0 comments on commit b2effd2

Please sign in to comment.