diff --git a/entries/admin.py b/entries/admin.py index 2afdbaa..408e83c 100644 --- a/entries/admin.py +++ b/entries/admin.py @@ -8,6 +8,9 @@ class SyndicationInline(admin.TabularInline): class EntryAdmin(admin.ModelAdmin): + date_hierarchy = 'published' + list_display = ('title', 'id', 'kind', 'published') + list_filter = ('kind',) inlines = ( SyndicationInline, ) diff --git a/users/admin.py b/users/admin.py index 1531810..04c7ed2 100644 --- a/users/admin.py +++ b/users/admin.py @@ -3,6 +3,10 @@ from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from .models import Key, Profile, Site, User +class SiteAdmin(admin.ModelAdmin): + list_display = ('name', 'icon', 'url') + + class KeyInline(admin.TabularInline): model = Key extra = 1 @@ -23,5 +27,5 @@ class UserAdmin(BaseUserAdmin): ) -admin.site.register(Site) +admin.site.register(Site, SiteAdmin) admin.site.register(User, UserAdmin) diff --git a/users/models.py b/users/models.py index 94b1762..732d5f0 100644 --- a/users/models.py +++ b/users/models.py @@ -73,7 +73,7 @@ class Profile(models.Model): display_name = models.CharField(max_length=100, blank=True) def __str__(self): - return '{name}@{site}'.format(name=self.username, site=self.site) + return self.url @property def name(self):