Skip to content

Commit

Permalink
init project
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyleite committed Feb 2, 2015
1 parent 65da5ae commit e196f89
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 0 deletions.
8 changes: 8 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# *-* coding: utf-8 *-*

import os
basedir = os.path.abspath(os.path.dirname(__file__))

CSRF_ENABLED = True
SECRET_KEY = '\x93\xb9\x80\xba\xba\t\xc0\xf8\xbc\x1d\x9c+g\x10\xc3\xb3\xefx\xaf\xa0.B\xbc@\x0b\xc4\xc32\xe9\xd1k'

Binary file added config.pyc
Binary file not shown.
19 changes: 19 additions & 0 deletions core.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# *-* coding: utf-8 *-*
# Set the path
import os, sys
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))

from flask.ext.script import Manager, Server
from core import app

manager = Manager(app)

# Turn on debugger by default and reloader
manager.add_command("runserver", Server(
use_debugger = True,
use_reloader = True,
host = '0.0.0.0')
)

if __name__ == "__main__":
manager.run()
11 changes: 11 additions & 0 deletions core/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# *-* coding: utf-8 *-*
from flask import Flask, render_template, abort, Response, url_for, Blueprint
from imports import *

app = Flask(__name__)
app.config.from_object('config')

#app.register_blueprint(cpu)
from blue_register import *

import core.views
Binary file added core/__init__.pyc
Binary file not shown.
5 changes: 5 additions & 0 deletions core/blue_register.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from core import app
from imports import *

app.register_blueprint(cpu)
app.register_blueprint(net)
Binary file added core/blue_register.pyc
Binary file not shown.
2 changes: 2 additions & 0 deletions core/imports.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from cpus import cpu
from nets import net
Binary file added core/imports.pyc
Binary file not shown.
6 changes: 6 additions & 0 deletions core/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# *-* coding: utf-8 *-*
from core import app

@app.route('/')
def index():
return 'Index'
Binary file added core/views.pyc
Binary file not shown.

0 comments on commit e196f89

Please sign in to comment.