Created
February 27, 2013 00:54
-
-
Save jeffmarshall/5043896 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from hvad.admin import TranslatableStackedInline, TranslatableAdmin | |
from generic.models import Text, Page | |
class TextInline(TranslatableStackedInline): | |
model = Text | |
extra = 1 | |
class PageAdmin(admin.ModelAdmin): | |
inlines = [TextInline] | |
admin.site.register(Page, PageAdmin) | |
admin.site.register(Text, TranslatableAdmin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment