Code Monkey home page Code Monkey logo

django-markdown-view's People

Contributors

flipperpa avatar jankruska avatar rgs258 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

django-markdown-view's Issues

Unable to import MarkdownView or anything in views.py in version 0.0.2

Hey @rgs258, sorry to bring this up again but in 0.0.2 the same problem is still there. It's not possible to follow the Usage section under README because views is not available. Here's what happens when I import the package:

>>> import markdown_view
>>> dir(markdown_view)
['ImproperlyConfigured', 'SETTINGS_TYPES', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', 'apps', 'checks', 'default_app_config', 'instance_type', 'models', 'settings', 'variable']

No views module available in the list and it immediately throws ImportError: cannot import name 'MarkdownView' from 'markdown_view' (/Users/matt/Envs/djmdview/lib/python3.8/site-packages/markdown_view/__init__.py) when you try to import one of the three views in the usage instructions.

I recommend doing a completely fresh virtualenv then installing django and django-markdown-view then you should be able to immediately reproduce this error.

render .md inside an html / template

first of all thanks to all contributors of this awesome extension, i just need to insert the converted HTML inside my website base HTML. so is there a method for something like render_to_string or is there a way to render the generated HTML as a section inside another template ?

sorry i couldn't see the setting "MARKDOWN_VIEW_TEMPLATE" , which is what i was locking for.

Unable to follow "usage" in readme

Hey @rgs258 thanks for open sourcing this code. I'm actually unable to follow the usage instructions. It appears that in markdown_view/constants.py there is an import statement from markdown_view.markdown_extensions import ImageExtension, but markdown_extensions is not included with the code and therefore causes an error. This prevents the extension from working as specified in the README.

'PosixPath' object has no attribute 'endswith'

Under Django 3.2.12 and python 3.8 I get in the default configration "AttributeError at /impressum/
'PosixPath' object has no attribute 'endswith'".

Request Method: GET
http://localhost:8000/impressum/
3.2.12
AttributeError
'PosixPath' object has no attribute 'endswith'
/usr/local/lib/python3.8/site-packages/markdown_view/loaders.py, line 49, in get_template_sources
/usr/local/bin/python
3.8.12
['/code', '/code', '/usr/local/lib/python38.zip', '/usr/local/lib/python3.8', '/usr/local/lib/python3.8/lib-dynload', '/usr/local/lib/python3.8/site-packages']
Sat, 05 Mar 2022 21:47:08 +0000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.