This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Added support for FirePython logging when logged in as administrator.

  • Loading branch information...
Arachnid committed Nov 28, 2008
1 parent 5d683ff commit 346e5fb7c1fd87259dc79f2c4ae852badb6f2b79
Showing with 19 additions and 8 deletions.
  1. +3 −0 .gitmodules
  2. +3 −0 app.yaml
  3. +12 −8 main.py
  4. +1 −0 utils/external/firepython
View
@@ -0,0 +1,3 @@
[submodule "utils/external/firepython"]
path = utils/external/firepython
url = git://github.com/woid/firepython.git
View
@@ -39,4 +39,7 @@ skip_files: |
(dev/.*)|
(tests/.*)|
(docs/.*)|
(.*\.markdown)|
(license\.txt)|
(setup.py)
)$
View
20 main.py
@@ -23,18 +23,20 @@
__author__ = 'William T. Katz'
from google.appengine.ext import webapp
import logging
import config
import os
import sys
import wsgiref.handlers
from handlers.bloog import blog, contact, cache_stats, timings
import config
# Force sys.path to have our own directory first, so we can import from it.
sys.path.insert(0, config.APP_ROOT_DIR)
sys.path.insert(1, os.path.join(config.APP_ROOT_DIR, 'utils/external'))
import logging
import wsgiref.handlers
from firepython.middleware import FirePythonWSGI
from google.appengine.ext import webapp
from google.appengine.api import users
from handlers.bloog import blog, contact, cache_stats, timings
# Import custom django libraries
webapp.template.register_template_library('utils.django_libs.gravatar')
@@ -64,8 +66,10 @@
def main():
path = timings.start_run()
application = webapp.WSGIApplication(ROUTES, debug=config.DEBUG)
if users.is_current_user_admin():
application = FirePythonWSGI(application)
wsgiref.handlers.CGIHandler().run(application)
timings.stop_run(path)
if __name__ == "__main__":
main()
main()
Submodule firepython added at aad76f

1 comment on commit 346e5fb

@darwin

This comment has been minimized.

Show comment
Hide comment
@darwin

darwin Dec 15, 2008

Sorry guys, I’ve changed my nick to darwin, so firepython repo url has changed.

darwin commented on 346e5fb Dec 15, 2008

Sorry guys, I’ve changed my nick to darwin, so firepython repo url has changed.

Please sign in to comment.