neutronX / django-markdownx

Comprehensive Markdown plugin built for Django
https://neutronx.github.io/django-markdownx/
Other
854 stars 153 forks source link

/markdownx/markdownify/ 404 not found error #205

Closed TrangPham closed 3 years ago

TrangPham commented 3 years ago

Versions: python 3.8, Django 2.2, markdownx 3.0.1

urls.py

urlpatterns += [url(r"^markdownx/", include("markdownx.urls"))]

Screen Shot 2021-04-15 at 2 52 24 PM Screen Shot 2021-04-15 at 2 52 30 PM Screen Shot 2021-04-15 at 2 52 43 PM

I am getting a 404 not found error, when I go directly to localhost:8000/markdownx/markdownify/ I also see the same error. It does look like Django registered the url patterns though. Does anyone else have this issue?

TrangPham commented 3 years ago

After some debugging - I found out this was because I needed to add the urlparttern to my nginx file.

And if you're using Django 3.0 or "django.middleware.clickjacking.XFrameOptionsMiddleware", you have to set X_FRAME_OPTIONS = "SAMEORIGIN" in settings.py