aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat/routes.py
diff options
context:
space:
mode:
Diffstat (limited to 'fatcat/routes.py')
-rw-r--r--fatcat/routes.py21
1 files changed, 3 insertions, 18 deletions
diff --git a/fatcat/routes.py b/fatcat/routes.py
index 61228638..c59922b3 100644
--- a/fatcat/routes.py
+++ b/fatcat/routes.py
@@ -2,7 +2,7 @@
import os
from flask import Flask, render_template, send_from_directory, request, \
url_for, abort, g, redirect, jsonify
-from fatcat import app, db
+from fatcat import app, db, examples
### Views ###################################################################
@@ -13,25 +13,10 @@ def work_create():
@app.route('/work/random', methods=['GET'])
def work_random():
- work = {
- "title": "Structure and Interpretation",
- "work_type": "book",
- "date": None,
- "contributors": [
- {"name": "Alyssa P. Hacker"},
- ],
- "primary": {
- "title": "Structure and Interpretation",
- "release_type": "online",
- "date": "2000-01-01",
- "doi": "10.491/599.sdo14",
- },
- "releases": [
- ]
- }
+ work = examples['work']
return render_template('work_view.html', work=work, primary=work['primary'])
-@app.route('/work/<work_id>/random', methods=['GET'])
+@app.route('/work/random', methods=['GET'])
def work_view(work_id):
return render_template('work_view.html')