aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django
diff options
context:
space:
mode:
Diffstat (limited to 'bn_django')
-rw-r--r--bn_django/git_browse/models.py10
-rw-r--r--bn_django/git_wiki/models.py6
-rw-r--r--bn_django/photos/models.py5
3 files changed, 18 insertions, 3 deletions
diff --git a/bn_django/git_browse/models.py b/bn_django/git_browse/models.py
index b2e62df..7c41ad6 100644
--- a/bn_django/git_browse/models.py
+++ b/bn_django/git_browse/models.py
@@ -31,7 +31,8 @@ class Repository(models.Model):
description = models.TextField("description of repo",blank=True)
class Admin:
- ordering = ['slug']
+ list_display = ['name', 'slug', 'path']
+ ordering = ['name']
def __str__(self):
return self.name
def get_absolute_url(self):
@@ -97,7 +98,9 @@ class Tree(models.Model):
type = 'tree'
class Admin:
+ list_display = ['path','name','repo', 'id']
ordering = ['repo','path']
+ list_filter = ['repo','path']
def __str__(self):
return self.name
@@ -155,6 +158,9 @@ class Blob(models.Model):
type='blob'
class Admin:
+ list_filter = ['repo','path']
+ list_display = ['name','path','id','size','repo']
+ search_fields = ['contents']
ordering = ['repo','path','name']
def __str__(self):
return self.name
@@ -200,6 +206,8 @@ class Commit(models.Model):
type='commit'
class Admin:
+ list_filter = ['repo']
+ list_display = ['id', 'commit_date', 'author', 'repo']
ordering = ['repo','commit_date','author_date','author']
def __str__(self):
return self.id
diff --git a/bn_django/git_wiki/models.py b/bn_django/git_wiki/models.py
index 83a275b..ba0f5c9 100644
--- a/bn_django/git_wiki/models.py
+++ b/bn_django/git_wiki/models.py
@@ -20,6 +20,7 @@ class Tree(models.Model):
return ''.join(self.path.replace('"','').replace("'","").strip().lower().split())
class Admin:
+ list_display = ['name', 'id', 'mode']
ordering = ['path','name']
def __str__(self):
@@ -75,7 +76,9 @@ class Item(models.Model):
return ''.join(self.name.replace('"','').replace("'","").strip().lower().split())
class Admin:
- ordering = ['path','name']
+ list_display = ['name', 'id', 'size']
+ search_fields = ['contents']
+ ordering = ['name']
def __str__(self):
return self.name
def get_absolute_url(self):
@@ -125,6 +128,7 @@ class Commit(models.Model):
class Admin:
ordering = ['commit_date','author_date','author']
+ list_display = ['id', 'commit_date', 'author']
def __str__(self):
return self.id
def get_absolute_url(self):
diff --git a/bn_django/photos/models.py b/bn_django/photos/models.py
index 33b2e0a..925f91b 100644
--- a/bn_django/photos/models.py
+++ b/bn_django/photos/models.py
@@ -90,7 +90,10 @@ class Photo(models.Model):
get_latest_by = ['date']
class Admin:
- ordering = ['date']
+ list_display = ('title', 'date', 'gallery', 'id')
+ ordering = ['id']
+ list_filter = ['gallery']
+ search_fields = ['title']
def __str__(self):
return self.title