diff --git a/app.py b/app.py index 6bdf9f8..3edfb3c 100755 --- a/app.py +++ b/app.py @@ -119,9 +119,9 @@ def set_url_args(**new_args): def init_profile(): g.profiling = [] -@app.route("/") -def index(): - return render_template('index.html', +@app.route("/browse") +def browse_index(): + return render_template('browse_index.html', props=find_more_props, username=get_username()) @@ -163,7 +163,11 @@ def property_query_page(property_id): pid=pid, rows=rows) -@app.route('/random') +@app.route('/') +def start(): + return random_painting() + +@app.route('/next') def random_painting(): rows = wdqs.run_query_with_cache(painting_no_depicts_query) row = random.choice(rows) diff --git a/templates/index.html b/templates/browse_index.html similarity index 95% rename from templates/index.html rename to templates/browse_index.html index ad55ff8..b30996d 100644 --- a/templates/index.html +++ b/templates/browse_index.html @@ -11,7 +11,9 @@ {% endif %}

+ {% if username %}

username: {{ username }}

+ {% endif %} {% if not username %}

This tool must be connected with Wikidata to work.

diff --git a/templates/item.html b/templates/item.html index 1cc24bc..37d9cec 100644 --- a/templates/item.html +++ b/templates/item.html @@ -17,7 +17,9 @@

view this painting on Wikidata | - open a random painting + switch to another painting + | + browse paintings

diff --git a/templates/property.html b/templates/property.html index b3df277..d984c93 100644 --- a/templates/property.html +++ b/templates/property.html @@ -6,7 +6,7 @@

{{ self.title() }}

-

back to index

+

back to index

Sort order: {% if order == 'name' %}