DGTV11 / BlogPostManager

Some CCT Project Team's app dev project
MIT License
0 stars 0 forks source link

Implement basic blog post editor #4

Closed DGTV11 closed 3 weeks ago

DGTV11 commented 1 month ago

You also have to make a new branch blog-post and work from there until you are ready to merge with main

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

warm-milk-foam commented 1 month ago

hello

warm-milk-foam commented 1 month ago

Ok i did the md editor

DGTV11 commented 1 month ago

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 -
DGTV11 commented 1 month ago

okay new plan we have to work on main because the editor is not really functional

DGTV11 commented 1 month ago

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)

DGTV11 commented 1 month ago

1, 2 somewhat fixed (style persistence not implemented yet)

DGTV11 commented 1 month ago

TODO: Allow saving/loading

DGTV11 commented 1 month ago

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)

DGTV11 commented 1 month ago

Daniel -> implement update styles Everyone else -> start implementing advanced mode

DGTV11 commented 1 month ago

okay i will do export ingo will do basic-advanced

better styles -> future me problemo

warm-milk-foam commented 1 month ago

im dying send help

DGTV11 commented 4 weeks ago

okay now we do export to single html file ig

DGTV11 commented 4 weeks ago

https://chatgpt.com/share/1765791c-3a7a-4cc2-a2c1-12f055f98624

DGTV11 commented 4 weeks ago

Todo: actually get blog.html to download (ugh)