Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:ITCase/pyramid_sacrud_pages into…
Browse files Browse the repository at this point in the history
… develop
  • Loading branch information
uralbash committed Dec 12, 2014
2 parents 283d387 + 6e3d2bf commit a53ef0c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pyramid_sacrud_pages/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,17 @@ def page_view(context, request):
return Response(status_code=int(redirect_type),
location=page.redirect_url)
return context


class Root(dict):
__name__ = 'user'
__parent__ = None

def __init__(self, request):
dict.__init__(self)
self.request = request
self['user'] = {'foo': {}, 'bar': {}}

@view_config(renderer='json', context=Root)
def home(context, request):
return {'info': 'Project API'}

0 comments on commit a53ef0c

Please sign in to comment.