Changeset - 4a142551e694
[Not reviewed]
default
0 1 0
Dennis Fink - 10 years ago 2014-12-13 10:16:01
dennis.fink@c3l.lu
Fixed manage.py to new configuration loading
1 file changed with 0 insertions and 3 deletions:
0 comments (0 inline, 0 general)
manage.py
Show inline comments
 
import pprint
 
import subprocess
 
import os
 
import os.path
 

	
 
from flask import current_app
 
from flask.ext.script import Manager
 
from flask.ext.script.commands import Clean, ShowUrls
 

	
 
os.environ['ENNSTATUS_SETTINGS'] = '../test/config.py'
 

	
 
from ennstatus import create_app
 

	
 

	
 
manager = Manager(create_app())
 

	
 

	
 
@manager.command
 
def dumpconfig():
 
    """Show config."""
 

	
 
    pprint.pprint(current_app.config)
 

	
 

	
 
def checkers(checker):
 

	
 
    def get_files(root, files):
 
        for f in files:
 
            if os.path.splitext(f)[1] == '.py':
 
                yield os.path.join(root, f)
 

	
 
    for root, dirs, files in os.walk('./'):
 
        for f in get_files(root, files):
 
            subprocess.call([checker, f])
 

	
 

	
 
@manager.command
 
def pep8():
0 comments (0 inline, 0 general)