* refactor: change references from User to Person (#5821) * refactor: Change CommunityList reference from User to Person * refactor: Convert more user references to person * refactor: Change augment_docs_and_user_with_user_info to person * refactor: Change Nomination and Feedback references from User to Person * refactor: Change a few test case function signatures to be more pythonic * refactor: Harmonize how profile and photo views look up email_or_name * refactor: Rework community views to operate on Person instead of User (#5859) * test: Update tests to try all of the person's emails and aliases * fix: Recode a test case to avoid an exception if there's Unicode in the URL This only happens using the form-filling and submission feature of WebTest, which is only used in this one test case, so just it rip out. * test: Add duplicate-person tests * fix: If there are multiple matching users, prefer the logged-in one. * chore: We no longer use WebTest, so don't include it. * fix: Address review comments * fix: case-insensitive person name or email matching (#6096) * chore: Renumber migrations * fix: Update merged code so tests pass (#6887) * fix: Use refactored method * fix: Don't assume user has person * fix: Use new view param name * chore: Drop community lists w/o person; cleanup (#6896) * fix: Don't assume user has person * fix: user->person in update_community_list_index.py * feat: Remove CommunityLists without Person * refactor: Speed up nomcom migrations --------- Co-authored-by: Paul Selkirk <paul@painless-security.com> Co-authored-by: Jennifer Richards <jennifer@staff.ietf.org>
25 lines
962 B
Python
25 lines
962 B
Python
# Copyright The IETF Trust 2017-2020, All Rights Reserved
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
from django.contrib import admin
|
|
|
|
from ietf.community.models import CommunityList, SearchRule, EmailSubscription
|
|
|
|
class CommunityListAdmin(admin.ModelAdmin):
|
|
list_display = ['id', 'person', 'group']
|
|
raw_id_fields = ['person', 'group', 'added_docs']
|
|
admin.site.register(CommunityList, CommunityListAdmin)
|
|
|
|
class SearchRuleAdmin(admin.ModelAdmin):
|
|
list_display = ['id', 'community_list', 'rule_type', 'state', 'group', 'person', 'text']
|
|
raw_id_fields = ['community_list', 'state', 'group', 'person', 'name_contains_index']
|
|
search_fields = ['person__name', 'group__acronym', 'text', ]
|
|
admin.site.register(SearchRule, SearchRuleAdmin)
|
|
|
|
class EmailSubscriptionAdmin(admin.ModelAdmin):
|
|
list_display = ['id', 'community_list', 'email', 'notify_on']
|
|
raw_id_fields = ['community_list', 'email']
|
|
admin.site.register(EmailSubscription, EmailSubscriptionAdmin)
|
|
|