Commit a8df36fc authored by matjaz's avatar matjaz
Browse files

Small (productivity) improvements of admin sites:

- "Save as new" button to all admin interfaces
- admin buttons also on the top of the page
- search button on top of admin lists (always searches by name)
parent 1ad986a2
...@@ -5,6 +5,10 @@ from django.db import models ...@@ -5,6 +5,10 @@ from django.db import models
from orderable_inlines import OrderableTabularInline from orderable_inlines import OrderableTabularInline
admin.ModelAdmin.save_as = True; #adds "Save as new" button to all admin interfaces
admin.ModelAdmin.save_on_top = True; #adds admin buttons also on the top of the page
admin.ModelAdmin.search_fields = ['name'] #adds search button on top of admin lists (allways searches by name)
class OrderableTabularInlineStyled(OrderableTabularInline): class OrderableTabularInlineStyled(OrderableTabularInline):
formfield_overrides = { formfield_overrides = {
models.CharField: {'widget': TextInput(attrs={'size':10})}, models.CharField: {'widget': TextInput(attrs={'size':10})},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment