diff --git a/boards/admin.py b/boards/admin.py --- a/boards/admin.py +++ b/boards/admin.py @@ -1,5 +1,5 @@ from django.contrib import admin -from boards.models import Post, Tag, Ban, Thread +from boards.models import Post, Tag, Ban, Thread, KeyPair class PostAdmin(admin.ModelAdmin): @@ -25,7 +25,14 @@ class ThreadAdmin(admin.ModelAdmin): list_filter = ('bump_time', 'archived') search_fields = ('id', 'title') + +class KeyPairAdmin(admin.ModelAdmin): + list_display = ('public_key', 'primary') + list_filter = ('primary',) + search_fields = ('public_key',) + admin.site.register(Post, PostAdmin) admin.site.register(Tag, TagAdmin) admin.site.register(Ban) admin.site.register(Thread, ThreadAdmin) +admin.site.register(KeyPair, KeyPairAdmin) diff --git a/boards/models/post.py b/boards/models/post.py --- a/boards/models/post.py +++ b/boards/models/post.py @@ -198,9 +198,9 @@ class Post(models.Model, Viewable): # page loading (no need to get all the referenced posts from the database). refmap = models.TextField(null=True, blank=True) - # Sender key. If the message was downloaded from another server, this - # indicates the server. - public_key = models.TextField(null=True, blank=True) + # Global ID with author key. If the message was downloaded from another + # server, this indicates the server. + global_id = models.TextField(null=True, blank=True) def __unicode__(self): return '#' + str(self.id) + ' ' + self.title + ' (' + \