Merge pull request #1 from tanrax/master

Merge
This commit is contained in:
Andros Fenollosa 2016-09-27 13:57:57 +02:00 committed by GitHub
commit 5a08df6b62

View File

@ -1,6 +1,6 @@
* PyConES16: Flask-note (Clone of Evernote with Flask and Markdown) * PyConES16: Flask-note (Clone of Evernote with Flask and Markdown)
** [[https://flasknote.fenollosa.work][DEMO]] ** [[http://flask-note.programadorwebvalencia.com/][DEMO]]
#+CAPTION: Flask-note #+CAPTION: Flask-note
#+NAME: Flask-note #+NAME: Flask-note
@ -45,6 +45,7 @@ Create *app.py*
#+BEGIN_SRC python #+BEGIN_SRC python
from flask import Flask from flask import Flask
from functools import wraps
app = Flask(__name__) app = Flask(__name__)
def login_required(f): def login_required(f):
@ -127,3 +128,30 @@ INSERT INTO user VALUES (NULL, 'py@con.es', '2016');
.exit .exit
#+END_SRC #+END_SRC
** Future resource
*master.html*
#+BEGIN_SRC html
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>
<link href="https://bootswatch.com/flatly/bootstrap.min.css" rel="stylesheet">
<title>Flask-note</title>
</head>
<body>
<div class="container">
<div class="page-header">
<h1 class="text-center">
<small>Flask-note</small>
</h1>
</div>
<div class="row">
{% block contain %}
{% endblock %}
</div>
</div>
</body>
</html>
#+END_SRC