53 lines
1.4 KiB
Markdown
53 lines
1.4 KiB
Markdown
status: hidden
|
|
title: Python — Flask 2
|
|
slug: wah0eiMe-flask2
|
|
robots: noindex
|
|
|
|
|
|
# flask2
|
|
|
|
The project name is `flask2`, the reply protocol is
|
|
[here](https://mdk.fr/pages/obiree2uaza2sh-rendu.html).
|
|
|
|
Please follow the protocol strictly, not following it will cost
|
|
points.
|
|
|
|
|
|
## Paste as Markdown
|
|
|
|
This application looks at first like a
|
|
[pastebin.com](https://pastebin.com), a [dpaste.de](https://dpaste.de)
|
|
or my [wyz.fr](https://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](https://tinyurl.com) 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](https://pypi.org/project/Flask-SQLAlchemy/),
|
|
sqlite3 is enough for this project, and
|
|
[Markdown](https://pypi.org/project/Markdown/).
|