Website update. There is now a community section.
This commit is contained in:
parent
33bb6dec37
commit
2fb50e55d9
28 changed files with 1441 additions and 33 deletions
28
flask_website/views/community.py
Normal file
28
flask_website/views/community.py
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
from flask import Module, render_template
|
||||
from flask_website.twitter import flask_tweets
|
||||
|
||||
community = Module(__name__, url_prefix='/community')
|
||||
|
||||
@community.route('/')
|
||||
def index():
|
||||
return render_template('community/index.html')
|
||||
|
||||
|
||||
@community.route('/irc/')
|
||||
def irc():
|
||||
return render_template('community/irc.html')
|
||||
|
||||
|
||||
@community.route('/twitter/')
|
||||
def twitter():
|
||||
return render_template('community/twitter.html', tweets=flask_tweets)
|
||||
|
||||
|
||||
@community.route('/badges/')
|
||||
def badges():
|
||||
return render_template('community/badges.html')
|
||||
|
||||
|
||||
@community.route('/logos/')
|
||||
def logos():
|
||||
return render_template('community/logos.html')
|
||||
|
|
@ -1,22 +1,17 @@
|
|||
from flask import Module, render_template, session, redirect, url_for, \
|
||||
request, flash, g, Response
|
||||
from flaskext.openid import COMMON_PROVIDERS
|
||||
from flask_website import oid, twitter
|
||||
from flask_website import oid
|
||||
from flask_website.twitter import flask_tweets
|
||||
from flask_website.utils import requires_login
|
||||
from flask_website.database import db_session, User
|
||||
|
||||
general = Module(__name__)
|
||||
tweets = twitter.SearchQuery(required=['flask'],
|
||||
optional=['code', 'web', 'python', 'py',
|
||||
'pocoo', 'micro', 'mitsuhiko',
|
||||
'framework', 'django', 'jinja',
|
||||
'werkzeug', 'documentation',
|
||||
'app'])
|
||||
|
||||
|
||||
@general.route('/')
|
||||
def index():
|
||||
return render_template('general/index.html', tweets=tweets)
|
||||
return render_template('general/index.html', tweets=flask_tweets)
|
||||
|
||||
|
||||
@general.route('/logout/')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue