You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Created posts have an @id like: "@id" : "http://api.smilodon.localhost:5000/test/posts/0", but the viewPost route queries for a post with @id at the request's url_root, which isn't typically the same. So, when I try to load a particular post in the web browser, the server throws an error like:
16:50:01 web.1 | File "/Users/nick/code/mastodon/smilodon/app/views.py", line 118, in viewPost
16:50:01 web.1 | return render_template('feed.html', posts=p, mongo=mongo)
16:50:01 web.1 | File "/Users/nick/code/mastodon/env3/lib/python3.5/site-packages/flask/templating.py", line 134, in render_template
16:50:01 web.1 | context, ctx.app)
16:50:01 web.1 | File "/Users/nick/code/mastodon/env3/lib/python3.5/site-packages/flask/templating.py", line 116, in _render
16:50:01 web.1 | rv = template.render(context)
16:50:01 web.1 | File "/Users/nick/code/mastodon/env3/lib/python3.5/site-packages/jinja2/environment.py", line 1008, in render
16:50:01 web.1 | return self.environment.handle_exception(exc_info, True)
16:50:01 web.1 | File "/Users/nick/code/mastodon/env3/lib/python3.5/site-packages/jinja2/environment.py", line 780, in handle_exception
16:50:01 web.1 | reraise(exc_type, exc_value, tb)
16:50:01 web.1 | File "/Users/nick/code/mastodon/env3/lib/python3.5/site-packages/jinja2/_compat.py", line 37, in reraise
16:50:01 web.1 | raise value.with_traceback(tb)
16:50:01 web.1 | File "/Users/nick/code/mastodon/smilodon/app/templates/feed.html", line 1, in top-level template code
16:50:01 web.1 | {% extends 'basic.html' %}
16:50:01 web.1 | File "/Users/nick/code/mastodon/smilodon/app/templates/basic.html", line 37, in top-level template code
16:50:01 web.1 | <div class="content">{% block content %}{% endblock content %}</div>
16:50:01 web.1 | File "/Users/nick/code/mastodon/smilodon/app/templates/feed.html", line 4, in block "content"
16:50:01 web.1 | <p> {%for p in posts%}
16:50:01 web.1 | TypeError: 'NoneType' object is not iterable
Whether there need to be separate URIs for the API and the server at all is also unclear to me, but probably a separate issue.
The text was updated successfully, but these errors were encountered:
That latter issue I've opened as #90. That might just be me not understanding how you want this system to work, but it could also make this easier to fix if there aren't two separate URI systems in parallel.
viewPost is out of date :) i haven't updated any of the templates while i've been doing a bunch of restructuring data stuff (eg adding @-prefixes to ids)
Created posts have an
@id
like:"@id" : "http://api.smilodon.localhost:5000/test/posts/0"
, but theviewPost
route queries for a post with@id
at the request'surl_root
, which isn't typically the same. So, when I try to load a particular post in the web browser, the server throws an error like:Whether there need to be separate URIs for the API and the server at all is also unclear to me, but probably a separate issue.
The text was updated successfully, but these errors were encountered: