summaryrefslogtreecommitdiff
path: root/app/taxonomy/admin.py
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2022-05-14 16:38:07 -0400
committerlxf <sng@luxagraf.net>2022-05-14 16:38:07 -0400
commitbb3973ffb714c932e9ec6dd6a751228dc71fe1d3 (patch)
tree6fa32f9392ad2ec32271349b86a4c1388fd6ba95 /app/taxonomy/admin.py
initial commit
Diffstat (limited to 'app/taxonomy/admin.py')
-rw-r--r--app/taxonomy/admin.py54
1 files changed, 54 insertions, 0 deletions
diff --git a/app/taxonomy/admin.py b/app/taxonomy/admin.py
new file mode 100644
index 0000000..783584e
--- /dev/null
+++ b/app/taxonomy/admin.py
@@ -0,0 +1,54 @@
+from django.contrib import admin
+from .models import Category, LuxTag
+
+
+@admin.register(Category)
+class CategoryAdmin(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')
+
+
+@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')