summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-01-31 22:29:49 +0100
committerDan McGee <dan@archlinux.org>2010-01-31 22:29:49 +0100
commitb13947bb774676918d3c81578d454703188c09e1 (patch)
tree93a09d63609b455390ca093afefbe7d1bf1ba7c1
parentf58b354a037d2c46fd8db9320f8ba29c9e014436 (diff)
downloadarchweb-b13947bb774676918d3c81578d454703188c09e1.tar.gz
archweb-b13947bb774676918d3c81578d454703188c09e1.tar.xz
Kill a no longer necessary hack in the admin
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--main/admin.py2
-rw-r--r--main/models.py14
2 files changed, 1 insertions, 15 deletions
diff --git a/main/admin.py b/main/admin.py
index cd1ffda..0ca2c38 100644
--- a/main/admin.py
+++ b/main/admin.py
@@ -63,7 +63,7 @@ class MirrorAdmin(admin.ModelAdmin):
]
class PackageAdmin(admin.ModelAdmin):
- list_display = ('pkgname', '_reponame', '_archname', '_maintainername')
+ list_display = ('pkgname', 'repo', 'arch', 'maintainer')
list_filter = ('repo', 'arch', 'maintainer')
ordering = ['pkgname']
search_fields = ('pkgname',)
diff --git a/main/models.py b/main/models.py
index 9e572ce..336f0ec 100644
--- a/main/models.py
+++ b/main/models.py
@@ -182,20 +182,6 @@ class Package(models.Model):
def __unicode__(self):
return self.pkgname
- # According to http://code.djangoproject.com/ticket/2583 we have "bad data"
- # The problem is the queries constructed by the admin to retrieve foreign
- # keys are empty. This allows us to display items in the list but kills
- # sorting
- def _reponame(self):
- return self.repo.name
- _reponame.short_description='Repo'
- def _archname(self):
- return self.arch.name
- _archname.short_description='Arch'
- def _maintainername(self):
- return self.maintainer.username
- _maintainername.short_description = 'Maintainer'
-
def get_absolute_url(self):
return '/packages/%s/%s/%s/' % (self.repo.name.lower(),
self.arch.name, self.pkgname)