Пример #1
0
def casual():
    if request.args.get('t'):
        return render_template('casual/index.html',
                               path=request.path,
                               posts=mongo.db.casual.find(
                                   {'topic': request.args.get('t')}),
                               topics=topics(),
                               topic=request.args.get('t'))
    return render_template('casual/index.html',
                           path=request.path,
                           posts=mongo.db.casual.find({}),
                           topics=topics(),
                           topic='')
Пример #2
0
def postActivism(objectID):
    return render_template('activism/post.html',
                           path=request.path,
                           post=mongo.db.activism.find_one_or_404(
                               {'_id': ObjectId(objectID)}),
                           topics=topics())
Пример #3
0
def createActivism():
    return render_template('activism/create.html',
                           path=request.path,
                           schools=schools(),
                           topics=topics(),
                           school=request.cookies.get('school'))
Пример #4
0
def activism():
    return render_template('activism/index.html',
                           path=request.path,
                           posts=mongo.db.activism.find({}),
                           topics=topics())
Пример #5
0
def flashresources():
    return render_template('resources.html',
                           resources=resources(),
                           path=request.path,
                           topics=topics())
Пример #6
0
def index():
    return render_template('index.html', path=request.path, topics=topics())
Пример #7
0
def postCasual(objectID):
    return render_template('casual/post.html',
                           post=mongo.db.casual.find_one_or_404(
                               {'_id': ObjectId(objectID)}),
                           path=request.path,
                           topics=topics())
Пример #8
0
def createCasual():
    return render_template('casual/create.html',
                           path=request.path,
                           schools=schools(),
                           topics=topics(),
                           school=request.cookies.get('school'))