Commit 952ce97d8978073bb72e15f641e8cccf70887989
- swtr.py 1 +
- templates/show_entries.html 4 --++
- Diff rendering mode:
- inline
- side by side
swtr.py
66 | response.headers['Access-Control-Allow-Origin'] = '*' | 66 | response.headers['Access-Control-Allow-Origin'] = '*' |
---|---|---|---|
67 | data = {} | 67 | data = {} |
68 | data_list = [] | 68 | data_list = [] |
69 | print request.form['data'] | ||
69 | for i in json.loads(request.form['data']): | 70 | for i in json.loads(request.form['data']): |
70 | id = g.collection.insert(i) | 71 | id = g.collection.insert(i) |
71 | data['permalink'] = app.config['URL']+'/posts/'+str(ObjectId(id)) | 72 | data['permalink'] = app.config['URL']+'/posts/'+str(ObjectId(id)) |
templates/show_entries.html
15 | {% endif %} | 15 | {% endif %} |
---|---|---|---|
16 | <ul class=entries> | 16 | <ul class=entries> |
17 | {% for entry in entries %} | 17 | {% for entry in entries %} |
18 | |||
19 | 18 | <li><a href={{ "/posts/"+entry.id }}><h2>{{ entry.title }}</h2></a>@<b>{{ entry.who }}</b> | |
19 | {{ entry.what }} {{ entry.where }} {{ entry.how|safe }} | ||
20 | {% else %} | 20 | {% else %} |
21 | <li><em>Unbelievable. No entries here so far</em> | 21 | <li><em>Unbelievable. No entries here so far</em> |
22 | {% endfor %} | 22 | {% endfor %} |