simple blog engine written on Flask
simple blog ~~engine~~ written on Flask
you can try it here
git clone https://github.com/dmaslov/flask-blog.git
virtualenv --no-site-packages ./env
pip install -r requirements.txt
After this edit the
CONNECTION_STRINGvariable with your own connection string;
DATABASEvariable to your own one;
If the default collection names don't work for you please replace the
USERS_COLLECTIONvariables to any names you like;
If you use this code on a production sever replace the
mongod, then when you in project dir with actived environment just type in terminal
When you run the application for the first time the "Install" page appears. You need to create a user profile and set some display settings on this page.
If you have an account on Gravatar and your logged-in email links to it, the userpic will display. It will be a random gravatar image if it doesn't.
All necessary MongoDB indexes will be created during the installation. A test text post will be created as well.
There should be at least one post and one user for the database to be installed. That is why it's impossible to delete the last post or user.
If you want to start it from scratch please remove all existing collections from your database and delete the browser session cookie. The Install page will show up again.
If you are using mongolab, please copy the outlined on the screenshot line to connect using driver, type in your dbuser and dbpassword and paste the line into the
CONNECTION_STRINGvariable in the
For Heroku you'll find
gunicornserver in the
requirements.txtfile. You are welcome to see how to deploy a Python web application on Heroku here.
WYSIWYG editor uses Markdown. Only available on the editor panel tags are intepreted.
The editor is based on MDMagick project.
To insert any tag you need to SELECT a word and then click on a needed tag on the editor panel.
You can insert github Gists.
For this click on the Gist tag on the panel, copy the gist id from the github gists page and paste it to the dialog window.
The word will be replaced with a working gist tag.
~~To insert an image you also need to select a word that will be used like a title attribute and paste the image URL into the dialog window.~~
Don't need to highlight text to add a link or an image anymore. Now you can simply click some tag in the editor menu and put a link. The 'Markdown' tag will be created automatically with a highlighted temporary description. The existing pasting algorithm works as it did before.