Config, secrets, basic POST handling
* add script/config * add atst.ini * add cookie_secret * update docs
This commit is contained in:
committed by
Jason Garber
parent
6cf7a7bffa
commit
a340eede07
@@ -16,7 +16,7 @@ from atst.api_client import ApiClient
|
||||
ENV = os.getenv("TORNADO_ENV", "dev")
|
||||
|
||||
|
||||
def make_app(config):
|
||||
def make_app(config,**kwargs):
|
||||
|
||||
authz_client = ApiClient(config["default"]["AUTHZ_BASE_URL"])
|
||||
authnid_client = ApiClient(config["default"]["AUTHNID_BASE_URL"])
|
||||
|
@@ -1,5 +1,6 @@
|
||||
import tornado
|
||||
from atst.handler import BaseHandler
|
||||
import tornado.httputil
|
||||
|
||||
class RequestNew(BaseHandler):
|
||||
screens = [
|
||||
@@ -23,6 +24,18 @@ class RequestNew(BaseHandler):
|
||||
def initialize(self, page):
|
||||
self.page = page
|
||||
|
||||
@tornado.web.authenticated
|
||||
def post(self, screen = 1):
|
||||
self.check_xsrf_cookie()
|
||||
all = {
|
||||
arg: self.get_argument(arg)
|
||||
for arg in self.request.arguments
|
||||
if not arg.startswith('_')
|
||||
}
|
||||
print( all )
|
||||
import json
|
||||
self.write( json.dumps( all ) )
|
||||
|
||||
@tornado.web.authenticated
|
||||
def get(self, screen = 1):
|
||||
self.render( 'requests/screen-%d.html.to' % int(screen),
|
||||
@@ -30,4 +43,3 @@ class RequestNew(BaseHandler):
|
||||
screens = self.screens,
|
||||
current = int(screen),
|
||||
next_screen = int(screen) + 1 )
|
||||
|
||||
|
Reference in New Issue
Block a user