# encoding: utf-8
import fix_path
from server.base.main_config import domain_middleware, app_id, handle_404, handle_500, DEBUG
from server.modules.module_urls import app_urls, admin_urls
from server.base import micro_webapp2
import email_logger
import re

# route module regex goes here
ADMIN_RE = re.compile(r"^admin.%s.appspot.com$" % app_id)

app = micro_webapp2.WSGIApplication(debug=DEBUG)

# register custom exception handlers with all of the apps
app.error_handlers[404] = handle_404
app.error_handlers[500] = handle_500

# this middleware is in charge of choosing the correct app module instance based on the app regex tuple
application = domain_middleware([
    (ADMIN_RE, app, admin_urls),
    ('.*', app, app_urls)
])

# register email logger and recipients
email_logger.register_logger([])


# import all shared services for your python app modules here
app = micro_webapp2.WSGIApplication(debug=DEBUG, config=config)
admin_app = micro_webapp2.WSGIApplication(debug=DEBUG, config=config)

# register custom exception handlers with all of the apps
app.error_handlers[404] = handle_404
app.error_handlers[500] = handle_500
admin_app.error_handlers[404] = handle_404
admin_app.error_handlers[500] = handle_500


# this middleware is in charge of choosing the correct app module instance based on the app regex tuple
application = domain_middleware([
    (ADMIN_RE, admin_app, admin_urls),
    (BYU_ADMIN_RE, admin_app, admin_urls),
    (COACH_RE, app, front_urls),
    ('.*/app.*', app, app_urls),
    ('.*', app, front_urls)
])

# register email logger and recipients
email_logger.register_logger([
    '*****@*****.**',
    '*****@*****.**',
    '*****@*****.**'
])


from server.common.blob_serve import UploadService, DownloadService
from server.common.channel_service import ChannelService, ChannelConnected, ChannelDisconnected
Example #3
0
# encoding: utf-8
import fix_path
from server.modules.module_urls import app_urls
from server.base.main_config import domain_middleware, DEBUG
from server.base.main_config import handle_404
from server.base import micro_webapp2
import email_logger


app = micro_webapp2.WSGIApplication(debug=DEBUG)

# register custom exception handlers with all of the apps
app.error_handlers[404] = handle_404

# this middleware is in charge of choosing the correct app module instance based on the app regex tuple
application = domain_middleware([
    ('.*', app, app_urls)
])

# register email logger and recipients
email_logger.register_logger([])

from server.restangular_entities.endpoint import RestangularEntityEndpoint