def setUp(self):
		initialize()
		self.manifest = Manifest({
			'no_defaults': Program(
				model=[no_defaults],
				view=BasicView()
			),
			'defaults': Program(
				model=[defaults],
				view=BasicView()
			),
			'primitives': Program(
				model=[primitive],
				view=BasicView()
			),
			'raw': Program(
				model=[raw],
				view=BasicView()
			),
			'none': Program(
				model=[none],
				view=BasicView
			),
			'order': Program(
				model=[order],
				view=BasicView
			)
		})
Beispiel #2
0
 def setUp(self):
     initialize()
     self.manifest = Manifest({
         '':
         Program(model=[none], view=BasicView()),
         'named':
         Program(model=[defaults], view=BasicView()),
         "another": {
             '': Program(name='another root'),
             'name': Program(name='another name', view=BasicView())
         }
     })
Beispiel #3
0
 def setUp(self):
     initialize()
     self.manifest = Manifest({
         'no_defaults':
         Program(model=[no_defaults], view=BasicView()),
         'defaults':
         Program(model=[defaults], view=BasicView()),
         'primitives':
         Program(model=[primitive], view=BasicView()),
         'raw':
         Program(model=[raw], view=BasicView()),
         'none':
         Program(model=[none], view=BasicView),
         'order':
         Program(model=[order], view=BasicView)
     })
	def setUp(self):
		initialize()
		self.manifest = Manifest({
			'': Program(
				model=[none],
				view=BasicView()
			),
			'named': Program(
				model=[defaults],
				view=BasicView()
			),
			"another": {
				'': Program(name='another root'),
				'name': Program(name='another name', view=BasicView())
			}
		})
#!/usr/bin/env python
# coding: utf-8
from giotto import initialize
initialize("multiply")

from multiply.manifest import manifest

mock = '--model-mock' in sys.argv
from giotto.controllers.http import make_app, fancy_error_template_middleware, serve

application = make_app(manifest, model_mock=mock)

if not get_config('debug'):
    application = fancy_error_template_middleware(application)

if '--run' in sys.argv:
    serve('127.0.0.1', 5000, application, ssl=None, use_debugger=True, use_reloader=True)

if '--run-ssl' in sys.argv:
    serve('127.0.0.1', 443, application, ssl='adhoc', use_debugger=True, use_reloader=True)
Beispiel #6
0
#!/usr/bin/env python
# coding: utf-8
from giotto import initialize, get_config
initialize("ldss")

from ldss.manifest import manifest

import sys
mock = '--model-mock' in sys.argv
from giotto.controllers.http import make_app, fancy_error_template_middleware, serve

application = make_app(manifest, model_mock=mock)

if not get_config('debug'):
    application = fancy_error_template_middleware(application)

if '--run' in sys.argv:
    serve('127.0.0.1', 5000, application, ssl=None, use_debugger=True, use_reloader=True)

if '--run-ssl' in sys.argv:
    serve('127.0.0.1', 443, application, ssl='adhoc', use_debugger=True, use_reloader=True)
Beispiel #7
0
#!/usr/bin/env python
# coding: utf-8
from giotto import initialize
initialize("lmds")

from lmds.manifest import manifest
import sys
mock = '--model-mock' in sys.argv
from giotto.controllers.http import make_app, fancy_error_template_middleware, serve

application = make_app(manifest, model_mock=mock)

if not get_config('debug'):
    application = fancy_error_template_middleware(application)

if '--run' in sys.argv:
    serve('127.0.0.1', 5000, application, ssl=None, use_debugger=True, use_reloader=True)

if '--run-ssl' in sys.argv:
    serve('127.0.0.1', 443, application, ssl='adhoc', use_debugger=True, use_reloader=True)
Beispiel #8
0
import argparse
import sys
from giotto import initialize

try:
    import secrets
except ImportError:
    secrets = None
    print("Warning: no secret.py found.")

try:
    import machine
except ImportError:
    machine = None
    print("Warning: no machine.py found.")

import config
initialize(config, secrets, machine)

from manifest import manifest

args = sys.argv
mock = '--model-mock' in args
if mock:
    # remove the mock argument so the controller doesn't get confused
    args.pop(args.index('--model-mock'))
from giotto.controllers.cmd import CMDController, CMDRequest
request = CMDRequest(sys.argv)
controller = CMDController(request=request, manifest=manifest, model_mock=mock)
controller.get_response()
Beispiel #9
0
#!/usr/bin/env python
# coding: utf-8
from giotto import initialize
initialize("multiply")

from multiply.manifest import manifest

args = sys.argv
mock = '--model-mock' in args
if mock:
    # remove the mock argument so the controller doesn't get confused
    args.pop(args.index('--model-mock'))
from giotto.controllers.cmd import CMDController, CMDRequest
request = CMDRequest(sys.argv)
controller = CMDController(request=request, manifest=manifest, model_mock=mock)
controller.get_response()