Closed DGTV11 closed 3 weeks ago
hello
Ok i did the md editor
Ok i did the md editor
slight issue - it doesn't work through flask
127.0.0.1 - - [10/Jul/2024 17:44:30] "POST / HTTP/1.1" 200 -
[2024-07-10 17:44:32,594] ERROR in app: Exception on /posts/a [GET]
Traceback (most recent call last):
File "/home/danielwee/.local/lib/python3.10/site-packages/flask/app.py", line 1473, in wsgi_app
response = self.full_dispatch_request()
File "/home/danielwee/.local/lib/python3.10/site-packages/flask/app.py", line 882, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/danielwee/.local/lib/python3.10/site-packages/flask/app.py", line 880, in full_dispatch_request
rv = self.dispatch_request()
File "/home/danielwee/.local/lib/python3.10/site-packages/flask/app.py", line 865, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return]
File "/media/danielwee/Data stuffs/School/ACS(I)/CCT/BlogPostManager/blog-post-manager/app.py", line 35, in posts
return render_template("form.html", post_name=postname)
File "/home/danielwee/.local/lib/python3.10/site-packages/flask/templating.py", line 150, in render_template
return _render(app, template, context)
File "/home/danielwee/.local/lib/python3.10/site-packages/flask/templating.py", line 131, in _render
rv = template.render(context)
File "/home/danielwee/.local/lib/python3.10/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/home/danielwee/.local/lib/python3.10/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/media/danielwee/Data stuffs/School/ACS(I)/CCT/BlogPostManager/blog-post-manager/templates/form.html", line 26, in top-level template code
Content: <textarea id="content" name="content">{{ get_post_content(post_name) }}</textarea>
File "/home/danielwee/.local/lib/python3.10/site-packages/jinja2/utils.py", line 83, in from_obj
if hasattr(obj, "jinja_pass_arg"):
jinja2.exceptions.UndefinedError: 'get_post_content' is undefined
127.0.0.1 - - [10/Jul/2024 17:44:32] "GET /posts/a HTTP/1.1" 500 -
okay new plan we have to work on main
because the editor is not really functional
TODO: 1) Add persistence (config, styles, content in each blog post folder) 2) Fixed interface between Python and md editor (post_name and post_content loader)
1, 2 somewhat fixed (style persistence not implemented yet)
TODO: Allow saving/loading
Things to do: 1) Implement the update styles (button functionality) 2) start implementing to the advanced mode (convert md to html and use css styling)
Daniel -> implement update styles Everyone else -> start implementing advanced mode
okay i will do export ingo will do basic-advanced
better styles -> future me problemo
im dying send help
okay now we do export to single html file ig
Todo: actually get blog.html to download (ugh)
You also have to make a new branch
blog-post
and work from there until you are ready to merge withmain
The editor should have BASIC MODE: (minimum, plz tell me if it's the only mode you implemented before merging)
ADVANCED MODE: (optional, plz tell me if you dont do this before merging)
Yea @warm-milk-foam you are in charge of this tks