HTMLField does not load correctly when model displayed as inline in Django Admin
See original GitHub issueI’m having problems trying to get the HTMLField editor to work when the field is displayed on an inline. The two below screenshots demonstrates viewing the admin of the model directly, where it works, and then as an inline where it doesn’t:
models.py:
from django.db import models
from djangocms_text_ckeditor.fields import HTMLField
class Header(models.Model):
name = models.CharField(max_length=50)
def __unicode__(self):
return '%s' % self.name
class TestField(models.Model):
header = models.ForeignKey('Header')
text = HTMLField()
def __unicode__(self):
return self.text[:50]
admin.py:
from django.contrib import admin
from .models import TestField, Header
@admin.register(TestField)
class TestFieldAdmin(admin.ModelAdmin):
pass
class TestFieldInline(admin.StackedInline):
model = TestField
extra = 0
@admin.register(Header)
class HeaderAdmin(admin.ModelAdmin):
inlines = (TestFieldInline,)
I’m using:
Django==1.9.10
django-cms==3.3.1
djangocms-text-ckeditor==3.1.0
Any ideas?!
Thanks
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
HTMLField does not load correctly when model displayed as ...
I'm having problems trying to get the HTMLField editor to work when the field is displayed on an inline. The two below screenshots ......
Read more >Django InlineModelAdmin not displaying inlineformset correctly
I think there is an error in your code where your FichaTecnicaInline class is overwritten by your admin class definition.
Read more >TinyMCE not working: possible causes and fixes
When inline mode is on, but TinyMCE isn't working, check the element you've selected to be a rich text editor. TinyMCE inline mode...
Read more >Django admin: How to insert Inline between fields
It does not quite work properly under the most recent version of django (2.1.7). I made some edits to fieldset.html to get it...
Read more >Mezzanine Documentation - Read the Docs
When registering content type models with PageAdmin or subclasses of it, the admin class won't be listed in the.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @tdsymonds, we can reproduce the issue locally. We’ll update you once a fix is out. Thanks!
Should be fixed with 3.3.0