diff --git a/src/app/views.py b/src/app/index.py similarity index 94% rename from src/app/views.py rename to src/app/index.py index 8106857..ffe9e76 100644 --- a/src/app/views.py +++ b/src/app/index.py @@ -14,6 +14,7 @@ urls = ( '/logout', 'Logout', '/register', 'Register', '/guestbook', 'Guestbook', + '/admin', 'Admin', ) # Initialize application using the web py framework @@ -32,6 +33,7 @@ else: # Add session to global variables render._add_global(session, 'session') +# Make the session available cross modules through webctx def session_hook(): web.ctx.session = session web.template.Template.globals['session'] = session diff --git a/src/app/main.py b/src/app/main.py index 5c20663..0d6f48b 100644 --- a/src/app/main.py +++ b/src/app/main.py @@ -1,4 +1,4 @@ -from views import app +from index import app if __name__ == "__main__": app.run()