support py2/3
This commit is contained in:
parent
976d95e61a
commit
6d44e8e1c2
|
@ -4,12 +4,11 @@ from django import forms
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from markdownx.admin import MarkdownxModelAdmin
|
from markdownx.admin import MarkdownxModelAdmin
|
||||||
from markdownx.widgets import AdminMarkdownxWidget
|
from markdownx.widgets import AdminMarkdownxWidget
|
||||||
# Register your models here.
|
|
||||||
from models import *
|
|
||||||
|
|
||||||
from photologue.admin import GalleryAdmin as GalleryAdminDefault
|
from photologue.admin import GalleryAdmin as GalleryAdminDefault
|
||||||
from photologue.models import Gallery
|
from photologue.models import Gallery
|
||||||
|
|
||||||
|
from .models import *
|
||||||
|
|
||||||
class ContentParentsInline(admin.TabularInline):
|
class ContentParentsInline(admin.TabularInline):
|
||||||
model = ContentContent
|
model = ContentContent
|
||||||
|
@ -53,7 +52,7 @@ class GalleryAdmin(GalleryAdminDefault):
|
||||||
|
|
||||||
class ContentAdmin(admin.ModelAdmin):
|
class ContentAdmin(admin.ModelAdmin):
|
||||||
save_on_top = True
|
save_on_top = True
|
||||||
list_display = ('__unicode__', 'datestart', 'shortname', 'type')
|
list_display = ('__str__', 'datestart', 'shortname', 'type')
|
||||||
list_filter = ['datestart', 'type']
|
list_filter = ['datestart', 'type']
|
||||||
search_fields = ['title', 'body', 'header', 'shortname']
|
search_fields = ['title', 'body', 'header', 'shortname']
|
||||||
inlines = [ContentParentsInline, FileInline, LinkInline]
|
inlines = [ContentParentsInline, FileInline, LinkInline]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user