Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown widget’s not added in admin #72

Open
sunnyar opened this issue Aug 29, 2016 · 3 comments
Open

Markdown widget’s not added in admin #72

sunnyar opened this issue Aug 29, 2016 · 3 comments

Comments

@sunnyar
Copy link

sunnyar commented Aug 29, 2016

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).
@Toltar
Copy link

Toltar commented Jan 24, 2017

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.

@moonclearner
Copy link

moonclearner commented Apr 24, 2017

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

@JiangPQ
Copy link

JiangPQ commented May 20, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants