Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1from builtins import object 

2import logging 

3import pyramid.httpexceptions as exc 

4from pyramid.httpexceptions import HTTPFound 

5from pyramid.response import Response 

6from pyramid.view import view_config, view_defaults 

7from marshall_webapp.templates.responses import templates_resources_transients 

8from marshall_webapp.models.transients import models_transients_post, models_transients_get 

9from marshall_webapp.models.transients.element import models_transients_element_put, models_transients_element_post 

10from dryxPyramid.views.views_base import base_view 

11from venusian import lift 

12 

13@view_defaults(route_name='index', permission="view_users") 

14class views_services_index(object): 

15 

16 def __init__(self, request): 

17 self.request = request 

18 self.log = logging.getLogger(__name__) 

19 self.log.debug("instantiating a new 'index_view'' view") 

20 

21 @view_config(request_method='POST', permission="view_users") 

22 @view_config(request_param="method=post", permission="edit_users") 

23 def post(self): 

24 href = self.request.route_path('transients') 

25 # REDIRECTS TO /transients 

26 return HTTPFound(location=href) 

27 

28 @view_config(request_method='GET', permission="view_users") 

29 @view_config(request_param="method=get", permission="view_users") 

30 def get(self): 

31 href = self.request.route_path('transients') 

32 # REDIRECTS TO /transients 

33 return HTTPFound(location=href)