I have a TranslatableModel "django-hvad" like the following:
class News(TranslatableModel):
pub_date = models.DateTimeField('Publish Date')
published = models.BooleanField()
featured = models.BooleanField()
translations = TranslatedFields(
title = models.CharField(max_length=255),
)
content = PlaceholderField('content_placeholder')
def __unicode__(self):
return self.title
I am trying to register this model in admin site but I do not know how. I tried:
admin.site.register(NewsItem, PlaceholderAdmin)
It works as expected except for the title field (it does not show up in the form)
I also tried:
admin.site.register(NewsItem, TranslatableAdmin)
I got an error:
| Request Method: |
GET |
| Request URL: |
http://212.14.233.81:8000/en/admin/articles/news/1/ |
| Django Version: |
1.5.1 |
| Exception Type: |
TypeError |
| Exception Value: |
<lambda>() takes exactly 1 argument (2 given) |
| Exception Location: |
/home/razi/Development/Django1.5/src/cms/cms/forms/widgets.py in render, line 201 |
anyone know how to achieve this ? "having a translatedfield + placehoderfield in the admin site