Patch.
This commit is contained in:
parent
98ceec37ea
commit
983ff8d169
|
@ -22,6 +22,9 @@ from . import util
|
|||
bp = Blueprint('agora', __name__)
|
||||
|
||||
|
||||
G = db.G
|
||||
|
||||
|
||||
# Special
|
||||
@bp.route('/index')
|
||||
@bp.route('/')
|
||||
|
@ -138,12 +141,12 @@ def garden(garden):
|
|||
# Lists
|
||||
@bp.route('/nodes')
|
||||
def nodes():
|
||||
return render_template('nodes.html', nodes=db.all_nodes(include_journals=False))
|
||||
return render_template('nodes.html', nodes=G.nodes(include_journals=False))
|
||||
|
||||
@bp.route('/notes') # alias
|
||||
@bp.route('/subnodes')
|
||||
def subnodes():
|
||||
return render_template('subnodes.html', subnodes=db.all_subnodes())
|
||||
return render_template('subnodes.html', subnodes=G.subnodes())
|
||||
|
||||
@bp.route('/users')
|
||||
def users():
|
||||
|
|
|
@ -51,7 +51,7 @@ class Graph:
|
|||
# looks up a node by uri (essentially [[wikilink]]).
|
||||
# horrible
|
||||
nodes = self.nodes()
|
||||
return [node for node in nodes if node.uri == uri][0]
|
||||
return nodes_by_wikilink(uri)[0]
|
||||
|
||||
def nodes(self, include_journals=True):
|
||||
# returns a list of all nodes
|
||||
|
@ -287,7 +287,6 @@ def wikilink_to_node(node):
|
|||
# We'll handle 404 in the template, as we want to show backlinks to non-existent nodes.
|
||||
return False
|
||||
|
||||
|
||||
def subnodes_by_wikilink(wikilink, fuzzy_matching=True):
|
||||
if fuzzy_matching:
|
||||
# TODO
|
||||
|
|
Loading…
Reference in New Issue