diff options
-rw-r--r-- | app/taxonomy/admin.py | 28 | ||||
-rw-r--r-- | app/taxonomy/models.py | 4 |
2 files changed, 31 insertions, 1 deletions
diff --git a/app/taxonomy/admin.py b/app/taxonomy/admin.py index cc48fac..783584e 100644 --- a/app/taxonomy/admin.py +++ b/app/taxonomy/admin.py @@ -1,5 +1,5 @@ from django.contrib import admin -from .models import Category +from .models import Category, LuxTag @admin.register(Category) @@ -26,3 +26,29 @@ class CategoryAdmin(admin.ModelAdmin): class Media: js = ('image-loader.js', 'next-prev-links.js') + + +@admin.register(LuxTag) +class LuxTagAdmin(admin.ModelAdmin): + list_display = ( + 'name', + 'color_rgb', + ) + fieldsets = ( + ('Item', { + 'fields': ( + 'name', + 'color_rgb', + 'slug', + ), + 'classes': ( + 'show', + 'extrapretty', + 'wide' + ) + } + ), + ) + + class Media: + js = ('image-loader.js', 'next-prev-links.js') diff --git a/app/taxonomy/models.py b/app/taxonomy/models.py index 38f1bf7..18d7ae3 100644 --- a/app/taxonomy/models.py +++ b/app/taxonomy/models.py @@ -34,6 +34,10 @@ class Category(models.Model): def __str__(self): return self.name + + class Meta: + verbose_name = _("Category") + verbose_name_plural = _("Categories") def get_absolute_url(self): return reverse("taxonomy:categories", kwargs={"slug": self.slug}) |