This commit is contained in:
Jeff Balogh 2010-02-10 11:45:40 -08:00
Родитель d7619c0ac8
Коммит 783ac14517
5 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -51,8 +51,8 @@ class FeatureAdmin(admin.ModelAdmin):
class CategoryAdmin(admin.ModelAdmin):
raw_id_fields = ('addons',)
list_display = ('name', 'application', 'addontype', 'count')
list_filter = ('application', 'addontype')
list_display = ('name', 'application', 'type', 'count')
list_filter = ('application', 'type')
admin.site.register(BlacklistedGuid)

Просмотреть файл

@ -253,7 +253,7 @@ class Category(amo.models.ModelBase):
name = TranslatedField()
slug = models.SlugField(max_length=50, help_text='Used in Category URLs.')
description = TranslatedField()
addontype = models.ForeignKey(AddonType)
type = models.ForeignKey('AddonType', db_column='addontype_id')
application = models.ForeignKey('applications.Application')
count = models.IntegerField('Addon count')
weight = models.IntegerField(

Просмотреть файл

@ -39,7 +39,7 @@ def sidebar(app):
return [], []
q = Category.objects.filter(application=app.id, weight__gte=0,
addontype=amo.ADDON_EXTENSION)
type=amo.ADDON_EXTENSION)
_categories = list(q)
# Plugins are on a static page, so we add it to categories dynamically.

Просмотреть файл

@ -22,7 +22,7 @@
"created": "2007-03-05 13:09:26",
"modified": "2010-01-17 18:54:06",
"application": 1,
"addontype": 1,
"type": 1,
"slug": "privacy-security",
"name": null
}
@ -37,7 +37,7 @@
"created": "2007-03-05 13:09:27",
"modified": "2010-01-17 18:54:06",
"application": 1,
"addontype": 1,
"type": 1,
"slug": "bookmarks",
"name": null
}
@ -52,7 +52,7 @@
"created": "2007-12-19 21:48:37",
"modified": "2010-01-17 18:54:06",
"application": 1,
"addontype": 1,
"type": 1,
"slug": "tabs",
"name": null
}

Просмотреть файл

@ -26,7 +26,7 @@ from stats.models import DownloadCount, UpdateCount
def CategoryForm(request):
"""Makes a form to select a category for the current app, and a date."""
q = Category.objects.filter(application=request.APP.id,
addontype=amo.ADDON_EXTENSION)
type=amo.ADDON_EXTENSION)
choices = (('', '--------'),) + tuple((c.slug, c.name) for c in q)
class _CategoryForm(forms.Form):