diff --git a/.gitignore b/.gitignore index 49cb6de..436408a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.pyo *.swp dist/ +var/ *.egg-info *.project *.pydevproject diff --git a/inst/bluebream.zcml b/inst/bluebream.zcml index c54c82c..aec67c3 100644 --- a/inst/bluebream.zcml +++ b/inst/bluebream.zcml @@ -12,8 +12,7 @@ - - + @@ -42,13 +41,15 @@ - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/inst/bluebream/config.py b/inst/bluebream/config.py index 163b2af..ca15134 100644 --- a/inst/bluebream/config.py +++ b/inst/bluebream/config.py @@ -2,14 +2,11 @@ from dotenv import load_dotenv from os import getenv -from scopes.server.app import zope_app_factory load_dotenv() server_port = getenv('SERVER_PORT', '8099') -app_factory = zope_app_factory - # storage settings from scopes.storage.db.postgres import StorageFactory dbengine = 'postgresql+psycopg' diff --git a/inst/bluebream/main.py b/inst/bluebream/main.py index 7cd6ab5..93fc76e 100644 --- a/inst/bluebream/main.py +++ b/inst/bluebream/main.py @@ -1,20 +1,15 @@ # loops/inst/bluebream/main.py -from wsgiref.simple_server import make_server +import waitress +from zope.app.wsgi import config, getWSGIApplication def run(app, config): port = int(config.server_port) - with make_server('', port, app) as httpd: - print(f'Serving on port {port}.') - try: - httpd.serve_forever() - except KeyboardInterrupt: - print('Shutting down.') + waitress.serve(app, port=port) + print(f'Serving on port {port}.') if __name__ == '__main__': import config - #run(config.app, config) - app = config.app_factory(config) + app = getWSGIApplication('zope.conf') run(app, config) - # see zope.app.wsgi.getWSGIApplication diff --git a/inst/bluebream/notfound.pt b/inst/bluebream/notfound.pt new file mode 100644 index 0000000..f3d4483 --- /dev/null +++ b/inst/bluebream/notfound.pt @@ -0,0 +1,18 @@ + + + +

+ The page that you are trying to access is not available +

+
+Please note the following: +
+
    +
  1. You might have misspelled the url
  2. +
  3. + You might be trying to access a non-existing page +
  4. +
+ + \ No newline at end of file diff --git a/inst/bluebream/overrides.zcml b/inst/bluebream/overrides.zcml index e1d9b9c..1417c49 100644 --- a/inst/bluebream/overrides.zcml +++ b/inst/bluebream/overrides.zcml @@ -4,8 +4,6 @@ - - - - diff --git a/inst/bluebream/securitypolicy.zcml b/inst/bluebream/securitypolicy.zcml index a27e369..9ab3b78 100644 --- a/inst/bluebream/securitypolicy.zcml +++ b/inst/bluebream/securitypolicy.zcml @@ -36,7 +36,6 @@ -