summaryrefslogtreecommitdiff
path: root/app/stuff/admin.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/stuff/admin.py')
-rw-r--r--app/stuff/admin.py46
1 files changed, 40 insertions, 6 deletions
diff --git a/app/stuff/admin.py b/app/stuff/admin.py
index 638b40a..dc15a1f 100644
--- a/app/stuff/admin.py
+++ b/app/stuff/admin.py
@@ -1,19 +1,53 @@
from django.contrib import admin
-from stuff.models import Item
+from .models import Item
+@admin.register(Item)
class ItemAdmin(admin.ModelAdmin):
list_display = (
'title',
- 'image_url',
'admin_thumbnail',
- 'creator',
'item_type',
- 'current_price',
+ 'creator',
+ 'purchase_price',
'item_format',
'isbn'
)
list_filter = ['item_format', 'item_type']
-
-admin.site.register(Item, ItemAdmin)
+ fieldsets = (
+ ('Item', {
+ 'fields': (
+ 'title',
+ ('date_purchased', 'date_added'),
+ 'item_format',
+ 'purchase_price',
+ 'image',
+ 'item_type',
+ 'serial_number',
+ 'isbn',
+ ),
+ 'classes': (
+ 'show',
+ 'extrapretty',
+ 'wide'
+ )
+ }
+ ),
+ ('Extra', {
+ 'fields': (
+ 'creator',
+ 'creator_sort_last_name',
+ 'creator_sort_first_name',
+ 'current_price',
+ 'retail_price',
+ 'amazon_url',
+ 'image_url',
+ ),
+ 'classes': (
+ 'collapse',
+ 'extrapretty',
+ 'wide'
+ )
+ }),
+ )