Skip to content

Commit

Permalink
Keep pep8 happy
Browse files Browse the repository at this point in the history
  • Loading branch information
fmr committed Apr 8, 2015
1 parent c599586 commit f1fb6fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions fancypages/templatetags/fp_sitemap_tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def get_page_tree(group=None, depth=1, relative_to=None):
if relative_to:
depth_offset = relative_to.depth
pages = pages.filter(
Q(node__path__startswith=relative_to.path) &
~Q(node__path=relative_to.path))
Q(node__path__startswith=relative_to.path) & ~Q(
node__path=relative_to.path))

pages = pages.filter(node__depth__lte=(depth + depth_offset))

Expand Down
3 changes: 2 additions & 1 deletion fancypages/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def loaddata(orm, fixture_name):
"""
from dingus import patch

_get_model = lambda model_identifier: orm[model_identifier]
def _get_model(model_identifier):
return orm.get(model_identifier)

with patch('django.core.serializers.python._get_model', _get_model):
from django.core.management import call_command
Expand Down

0 comments on commit f1fb6fe

Please sign in to comment.