[damned-lies] Add webpage_url to Person admin
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Add webpage_url to Person admin
- Date: Sat, 8 Jan 2022 11:32:12 +0000 (UTC)
commit b4477434014a3c3cbf7c070842c6de6d7c6442fc
Author: Claude Paroz <claude 2xlibre net>
Date: Sat Jan 8 12:30:51 2022 +0100
Add webpage_url to Person admin
This also allows detecting more easily fake promotion URLs.
people/admin.py | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/people/admin.py b/people/admin.py
index 1c1ff24b..dcfee618 100644
--- a/people/admin.py
+++ b/people/admin.py
@@ -4,14 +4,13 @@ from django.contrib.auth.models import User
from people.models import Person
+@admin.register(Person)
class PersonAdmin(admin.ModelAdmin):
search_fields = ('username', 'first_name', 'last_name', 'email')
- list_display = ('username', 'first_name', 'last_name', 'email')
+ list_display = ('username', 'first_name', 'last_name', 'email', 'webpage_url')
UserAdmin.list_display = ('username', 'email', 'last_name', 'first_name', 'is_active', 'last_login')
admin.site.unregister(User)
admin.site.register(User, UserAdmin)
-
-admin.site.register(Person, PersonAdmin)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]