mdk.fr/content/pages/supinternet_flask2.md

1.4 KiB

status: hidden title: Python — Flask 2 slug: wah0eiMe-flask2 robots: noindex

flask2

The project name is flask2, the reply protocol is here.

Please follow the protocol strictly, not following it will cost points.

Paste as Markdown

This application looks at first like a pastebin.com, a dpaste.de or my wyz.fr, but accepts only Markdown.

One does not have to create an account to paste.

The app should allow one to choose a part of the path of the page (leaving the path blank auto-generate a path, like tinyurl does).

All pastes should be rooted on a fixed path like /articles/, so if I choose to paste with the URL "i18n", the final URL will be /articles/i18n.

While querying the URL, the pasted markdown should be rendered as HTML on the body of the page, with nothing more, nothing less.

Bonus

  • An admin zone should allow to add/edit/remove markdown pastes. The admin is under /admin/ and it's not the role of the app to block non-admin users to acces the user page.
  • Write tests.
  • Write a README.md.
  • Format using black.
  • Don't give me your venv.

Hints

You'll probably need flask-sqlalchemy, sqlite3 is enough for this project, and Markdown.