Open sunnyar opened 8 years ago
Getting the same problems but when Debug = False. I am not sure why it is not working in production while in turn, it works in development when Debug = True.
from django_markdown.models import MarkdownField
from django_markdown.widgets import AdminMarkdownWidget
Register your models here.
admin.site.register(MyModel, MarkdownModelAdmin)
class YourModelAdmin(admin.ModelAdmin):
formfield_overrides = {
MarkdownField: {
'widget': AdminMarkdownWidget, }}
It works for me
Got the same problem in Django 1.10, no matter Debug = True or False. There is nothing happened after I register markdownModelAdmin to my model. The textarea shows just like before. Anyone knows why?
Markdown widget’s media i.e. javascript and stylesheets are not getting added in admin after explicitly defining form_overrides in Django 1.10
`class Entry(models.Model): ... body = MarkdownField() ....
from django_markdown.widgets import AdminMarkdownWidget from django_markdown.models import MarkdownField
class EntryAdmin(admin.ModelAdmin): formfield_overrides = {MarkdownField: {'widget': AdminMarkdownWidget}}`