mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Start diarioview
This commit is contained in:
parent
db50424a62
commit
715cd686a3
1 changed files with 18 additions and 0 deletions
18
royalnet/web/royalprints/diarioview/__init__.py
Normal file
18
royalnet/web/royalprints/diarioview/__init__.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
"""A Royal Games Diario viewer :py:class:`royalnet.web.Royalprint`."""
|
||||||
|
|
||||||
|
import flask as f
|
||||||
|
import os
|
||||||
|
from ... import Royalprint
|
||||||
|
from ....database.tables import Royal, WikiPage, WikiRevision
|
||||||
|
|
||||||
|
|
||||||
|
tmpl_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'templates')
|
||||||
|
rp = Royalprint("diarioview", __name__, url_prefix="/diarioview", template_folder=tmpl_dir,
|
||||||
|
required_tables={Royal, WikiPage, WikiRevision})
|
||||||
|
|
||||||
|
|
||||||
|
@rp.route("/", defaults={"page": 0})
|
||||||
|
@rp.route("/<int:page>")
|
||||||
|
def diarioview_index(page):
|
||||||
|
alchemy, alchemy_session = f.current_app.config["ALCHEMY"], f.current_app.config["ALCHEMY_SESSION"]
|
||||||
|
return "TODO"
|
Loading…
Reference in a new issue