admin stuff

This commit is contained in:
Sanj 2011-10-05 14:49:08 +05:30
parent 209cb8e05a
commit 1ceb88c052

View File

@ -4,16 +4,16 @@ from models import *
class ProjectImageInline(admin.TabularInline): class ProjectImageInline(admin.TabularInline):
model = ProjectImage model = ProjectImage
extra = 12 extra = 20
class ProjectAdmin(admin.ModelAdmin): class ProjectAdmin(admin.ModelAdmin):
prepopulated_fields = {'slug': ('title',)}
inlines = [ProjectImageInline] inlines = [ProjectImageInline]
class SliderImageAdmin(admin.ModelAdmin): class SliderImageAdmin(admin.ModelAdmin):
list_display = ('__unicode__', 'order',) list_display = ('__unicode__', 'order',)
list_editable = ('order',) list_editable = ('order',)
admin.site.register(Project, ProjectAdmin) admin.site.register(Project, ProjectAdmin)
admin.site.register(SliderImage, SliderImageAdmin) admin.site.register(SliderImage, SliderImageAdmin)
admin.site.register(Link) admin.site.register(Link)