django_markdown icon indicating copy to clipboard operation
django_markdown copied to clipboard

Markdown widget’s not added in admin

Open sunnyar opened this issue 8 years ago • 3 comments

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}}`

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/37376452-markdown-widget-s-not-added-in-admin?utm_campaign=plugin&utm_content=tracker%2F332251&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F332251&utm_medium=issues&utm_source=github).

sunnyar avatar Aug 29 '16 13:08 sunnyar

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.

Toltar avatar Jan 24 '17 17:01 Toltar

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

moonclearner avatar Apr 24 '17 11:04 moonclearner

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?

JiangPQ avatar May 20 '17 03:05 JiangPQ