Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed putting 'page_id' in fiber_data in the body-tag when not using …

…the deprecated context_processor

- Issue #115
  • Loading branch information...
commit 204dc3e36c129fc112df258057d148787aa93f95 1 parent fe0985d
@mvdwaeter mvdwaeter authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 fiber/middleware.py
View
6 fiber/middleware.py
@@ -69,8 +69,10 @@ def process_response(self, request, response):
).replace('</body>', '</div>' + t.render(c) + '</body>')
fiber_data['frontend'] = True
- if 'fiber_page' in c:
- fiber_data['page_id'] = c['fiber_page'].id
+ try:
+ fiber_data['page_id'] = Page.objects.get_by_url(request.path_info).pk
+ except AttributeError:
+ pass
# Inject header html in head.
# Add fiber-data attribute to body tag.
Please sign in to comment.
Something went wrong with that request. Please try again.