Beispiel #1
0
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()
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()
Beispiel #3
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)

@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)
Beispiel #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)

Beispiel #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()