Navigation Menu

Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Added support for FirePython logging when logged in as administrator.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arachnid committed Nov 28, 2008
1 parent 5d683ff commit 346e5fb
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "utils/external/firepython"]
path = utils/external/firepython
url = git://github.com/woid/firepython.git
3 changes: 3 additions & 0 deletions app.yaml
Expand Up @@ -39,4 +39,7 @@ skip_files: |
(dev/.*)|
(tests/.*)|
(docs/.*)|
(.*\.markdown)|
(license\.txt)|
(setup.py)
)$
20 changes: 12 additions & 8 deletions main.py
Expand Up @@ -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')
Expand Down Expand Up @@ -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()
1 change: 1 addition & 0 deletions utils/external/firepython
Submodule firepython added at aad76f

1 comment on commit 346e5fb

@darwin
Copy link

@darwin darwin commented on 346e5fb Dec 15, 2008

Choose a reason for hiding this comment

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

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

Please sign in to comment.