Skip to content
Browse files

Slightly adapted Selwin Ong's pull request

  • Loading branch information...
1 parent 91da87d commit b3613381f1458fdad948bb6f7823201bd11ebb3a @dbunskoek dbunskoek committed Oct 25, 2011
Showing with 8 additions and 9 deletions.
  1. +8 −9 fiber/context_processors.py
View
17 fiber/context_processors.py
@@ -6,22 +6,21 @@
def page_info(request):
-
- """
- Avoid further processing or database query if page is in EXCLUDE_URL
- """
- if EXCLUDE_URLS:
- for exclude_url in EXCLUDE_URLS:
- if re.search(exclude_url, request.path.lstrip('/')):
- return {}
-
context = {}
page = None
current_pages = []
url = request.path_info
"""
+ Avoid further processing or database queries if page is in EXCLUDE_URLS.
+ """
+ if EXCLUDE_URLS:
+ for exclude_url in EXCLUDE_URLS:
+ if re.search(exclude_url, request.path.lstrip('/')):
+ return context
+
+ """
Find Page that matches the requested URL.
First check if there is a Page whose `url` matches the requested URL.

0 comments on commit b361338

Please sign in to comment.
Something went wrong with that request. Please try again.