Compare commits

..

No commits in common. "99b180681ffa326bd98422e8902477c7e2c11ca0" and "662fdcaa2b526472555354d98d027045ff40f717" have entirely different histories.

3 changed files with 5 additions and 7 deletions

View file

@ -1,12 +1,12 @@
#!/usr/bin/python3
from main import app
import sys
from confarchive import database, model, wikidata
DB_URL = "postgresql:///confarchive"
app.config.from_object("config.default")
database.init_app(app)
database.init_db(DB_URL)
def add_country(name: str) -> None:

View file

@ -156,9 +156,7 @@ def search_people() -> str:
q = model.Person.query.filter(model.Person.name.ilike(f"%{search_for}%")).order_by(
model.Person.name
)
return flask.render_template(
"search_people.html", q=q, search_for=search_for, is_admin=check_admin_mode
)
return flask.render_template("search_people.html", q=q, search_for=search_for)
@app.route("/merge", methods=["GET", "POST"])

View file

@ -20,7 +20,7 @@
{% set count = q.count() %}
Found {{ count }} people matching '{{ search_for }}'
{% if is_admin() and count %}
{% if config.ADMIN_MODE and count %}
<a href="{{ url_for("merge", q=search_for) }}">merge</a>
{% endif %}
</p>