rgs258 / django-markdown-view Goto Github PK
View Code? Open in Web Editor NEWServe .md pages as Django templates
License: BSD 3-Clause "New" or "Revised" License
Serve .md pages as Django templates
License: BSD 3-Clause "New" or "Revised" License
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.
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.
Write tests and set up Travis correctly
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.
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 |
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.