Skip to content
Browse files

Merge branch 'master' of https://github.com/selwin/django-fiber into …

…selwin-master

Conflicts:
	fiber/static/fiber/js/admin.js
  • Loading branch information...
2 parents 0c709f5 + 8b9e1ff commit 91da87dd7bf6d168552c501d20ae072b76a98fc1 @dbunskoek dbunskoek committed Oct 25, 2011
Showing with 10 additions and 0 deletions.
  1. +10 −0 fiber/context_processors.py
View
10 fiber/context_processors.py
@@ -1,10 +1,20 @@
import re
+from app_settings import EXCLUDE_URLS
from models import Page
from utils.urls import get_named_url_from_quoted_url, is_quoted_url
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 = []

0 comments on commit 91da87d

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