Skip to content

Commit

Permalink
fix #188
Browse files Browse the repository at this point in the history
  • Loading branch information
shreyas-satish committed May 4, 2017
1 parent 106691e commit 672c050
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 50 deletions.
45 changes: 22 additions & 23 deletions funnel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,25 @@

# --- Configuration------------------------------------------------------------

def init_for(env):
coaster.app.init_app(app, env)
db.init_app(app)
db.app = app

mail.init_app(app)
lastuser.init_app(app)
lastuser.init_usermanager(UserManager(db, models.User, models.Team))
baseframe.init_app(app, requires=['funnel'], ext_requires=[
('codemirror-markdown', 'pygments'), 'toastr', 'baseframe-bs3', 'fontawesome>=4.0.0',
'baseframe-footable'])
app.assets.register('js_fullcalendar',
Bundle(assets.require('!jquery.js', 'jquery.fullcalendar.js', 'spectrum.js'),
output='js/fullcalendar.packed.js', filters='uglipyjs'))
app.assets.register('css_fullcalendar',
Bundle(assets.require('jquery.fullcalendar.css', 'spectrum.css', 'schedules.css'),
output='css/fullcalendar.packed.css', filters='cssmin'))
app.assets.register('js_schedules',
Bundle(assets.require('schedules.js'),
output='js/schedules.packed.js', filters='uglipyjs'))
app.assets.register('css_screens',
Bundle(assets.require('screens.css'),
output='css/screens.packed.css', filters='cssmin'))
coaster.app.init_app(app)
db.init_app(app)
db.app = app

mail.init_app(app)
lastuser.init_app(app)
lastuser.init_usermanager(UserManager(db, models.User, models.Team))
baseframe.init_app(app, requires=['funnel'], ext_requires=[
('codemirror-markdown', 'pygments'), 'toastr', 'baseframe-bs3', 'fontawesome>=4.0.0',
'baseframe-footable'])
app.assets.register('js_fullcalendar',
Bundle(assets.require('!jquery.js', 'jquery.fullcalendar.js', 'spectrum.js'),
output='js/fullcalendar.packed.js', filters='uglipyjs'))
app.assets.register('css_fullcalendar',
Bundle(assets.require('jquery.fullcalendar.css', 'spectrum.css', 'schedules.css'),
output='css/fullcalendar.packed.css', filters='cssmin'))
app.assets.register('js_schedules',
Bundle(assets.require('schedules.js'),
output='js/schedules.packed.js', filters='uglipyjs'))
app.assets.register('css_screens',
Bundle(assets.require('screens.css'),
output='css/screens.packed.css', filters='cssmin'))
1 change: 1 addition & 0 deletions instance/settings-sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@
WELCOME_MESSAGE = "The funnel is a space for proposals and voting on events. Pick an event to get started."
HASCORE_SERVER = 'https://api.hasgeek.com/'
CACHE_TYPE = 'redis'
DEBUG = True
4 changes: 2 additions & 2 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

from coaster.manage import init_manager

from funnel import app, models, init_for
from funnel import app, models


if __name__ == "__main__":
manager = init_manager(app, models.db, init_for)
manager = init_manager(app, models.db)
manager.run()
2 changes: 0 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ icalendar
git+https://github.com/hasgeek/coaster.git
git+https://github.com/hasgeek/flask-lastuser.git
git+https://github.com/hasgeek/baseframe.git
Flask-Script==0.5.3
alembic
git+https://github.com/tobiasandtobias/flask-alembic.git
qrcode
rq
psycopg2
2 changes: 1 addition & 1 deletion rq.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

rqworker -c rqdev funnel
rqworker -c rqinit funnel
16 changes: 0 additions & 16 deletions rqdev.py

This file was deleted.

3 changes: 1 addition & 2 deletions rqinit.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from urlparse import urlparse

from funnel import init_for, app
from funnel import app

init_for('production')
REDIS_URL = app.config.get('REDIS_URL', 'redis://localhost:6379/0')

# REDIS_URL is not taken by setup_default_arguments function of rq/scripts/__init__.py
Expand Down
3 changes: 1 addition & 2 deletions runserver.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#! /usr/bin/env python

import sys
from funnel import app, init_for
init_for('dev')
from funnel import app

try:
port = int(sys.argv[1])
Expand Down
3 changes: 1 addition & 2 deletions website.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import sys
import os.path
sys.path.insert(0, os.path.dirname(__file__))
from funnel import app as application, init_for
init_for('production')
from funnel import app as application

0 comments on commit 672c050

Please sign in to comment.