コード例 #1
0
ファイル: __init__.py プロジェクト: mitchellrj/mr.jeffries
def initialize(context):
    ToolInit(config.PROJECTNAME +': tools', tools=(MonitorTool,),
             product_name=config.PROJECTNAME,
             icon="resource/icon.png"
             ).initialize(context)

    dispatchers.initialize(context)
    events.initialize(context)
    listeners.initialize(context)

    import Zope2
    for p in Zope2.app().objectValues('Plone Site'):
        tool_instance = getToolByName(p, config.TOOL_NAME, None)
        if tool_instance:
            tool_instance.initializeHandlers()
コード例 #2
0
import events
import csv

def build():
	f = open('timeline.csv', encoding='utf-8')
	csv_f = csv.reader(f)

	for data in csv_f:
		events.insertRow(data)

if __name__ == '__main__':
	events.initialize()
	build()
コード例 #3
0
ファイル: app.py プロジェクト: Lutalo/HIV-Timeline-CS195
import events
from flask import Flask
from flask import render_template

app = Flask(__name__)
db = events.initialize()

@app.route('/')
def index(title='HIV Timeline'):
	timelineJSON = events.jsonTable()
	return render_template("index.html", title=title, timelineJSON=timelineJSON)

@app.route('/about')
def about(title='About Us'):
	return render_template("about.html", title=title)

@app.route('/support')
def support(title='Services | Community Support'):
	return render_template("support.html", title=title)

@app.route('/testing')
def testing(title='Services | Testing'):
	return render_template("testing.html", title=title)

@app.route('/aboutHIV')
def abouthiv(title='Information | About HIV'):
	return render_template("abouthiv.html", title=title)

@app.route('/prevention')
def prevention(title='Information | Prevention'):
	return render_template("prevention.html", title=title)
コード例 #4
0
import events
from flask import Flask
from flask import render_template

app = Flask(__name__)
db = events.initialize()


@app.route('/')
def index(title='HIV Timeline'):
    timelineJSON = events.jsonTable()
    return render_template("index.html",
                           title=title,
                           timelineJSON=timelineJSON)


@app.route('/about')
def about(title='About Us'):
    return render_template("about.html", title=title)


@app.route('/support')
def support(title='Services | Community Support'):
    return render_template("support.html", title=title)


@app.route('/testing')
def testing(title='Services | Testing'):
    return render_template("testing.html", title=title)

コード例 #5
0
import events
import csv


def build():
    f = open('timeline.csv', encoding='utf-8')
    csv_f = csv.reader(f)

    for data in csv_f:
        events.insertRow(data)


if __name__ == '__main__':
    events.initialize()
    build()