##// END OF EJS Templates
Added an admin page for keypair. Renamed the public key to global id in the...
neko259 -
r797:7dc20073 decentral
parent child Browse files
Show More
@@ -1,5 +1,5 b''
1 from django.contrib import admin
1 from django.contrib import admin
2 from boards.models import Post, Tag, Ban, Thread
2 from boards.models import Post, Tag, Ban, Thread, KeyPair
3
3
4
4
5 class PostAdmin(admin.ModelAdmin):
5 class PostAdmin(admin.ModelAdmin):
@@ -25,7 +25,14 b' class ThreadAdmin(admin.ModelAdmin):'
25 list_filter = ('bump_time', 'archived')
25 list_filter = ('bump_time', 'archived')
26 search_fields = ('id', 'title')
26 search_fields = ('id', 'title')
27
27
28
29 class KeyPairAdmin(admin.ModelAdmin):
30 list_display = ('public_key', 'primary')
31 list_filter = ('primary',)
32 search_fields = ('public_key',)
33
28 admin.site.register(Post, PostAdmin)
34 admin.site.register(Post, PostAdmin)
29 admin.site.register(Tag, TagAdmin)
35 admin.site.register(Tag, TagAdmin)
30 admin.site.register(Ban)
36 admin.site.register(Ban)
31 admin.site.register(Thread, ThreadAdmin)
37 admin.site.register(Thread, ThreadAdmin)
38 admin.site.register(KeyPair, KeyPairAdmin)
@@ -198,9 +198,9 b' class Post(models.Model, Viewable):'
198 # page loading (no need to get all the referenced posts from the database).
198 # page loading (no need to get all the referenced posts from the database).
199 refmap = models.TextField(null=True, blank=True)
199 refmap = models.TextField(null=True, blank=True)
200
200
201 # Sender key. If the message was downloaded from another server, this
201 # Global ID with author key. If the message was downloaded from another
202 # indicates the server.
202 # server, this indicates the server.
203 public_key = models.TextField(null=True, blank=True)
203 global_id = models.TextField(null=True, blank=True)
204
204
205 def __unicode__(self):
205 def __unicode__(self):
206 return '#' + str(self.id) + ' ' + self.title + ' (' + \
206 return '#' + str(self.id) + ' ' + self.title + ' (' + \
General Comments 0
You need to be logged in to leave comments. Login now