Skip to content

Commit

Permalink
app.py: create app before importing delegate
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored and hornc committed Aug 20, 2019
1 parent c16ae6a commit 7ce3879
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion infogami/utils/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
import web

import flash
import delegate as infogami_delegate

urls = ("/.*", "item")
app = web.application(urls, globals(), autoreload=False)

import delegate as infogami_delegate # create app before importing delegate

# magical metaclasses for registering special paths and modes.
# Whenever any class extends from page/mode, an entry is added to pages/modes.
modes = {}
Expand Down

2 comments on commit 7ce3879

@tfmorris
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cclauss What was the purpose of this change?

@cclauss
Copy link
Author

@cclauss cclauss commented on 7ce3879 Oct 2, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry. I do not recall that change.

At that time, I was looking at other uses of https://github.com/webpy/webpy/blob/master/web/application.py The reload = False on the line just above is about module reloading in web/application.py but I would have thought that the False part would have disabled all of that.

@iredmail have you seen this kind of import order sensitivity before?

Please sign in to comment.