forked from MarseyWorld/MarseyWorld
sfdsfd
parent
1a21a70e59
commit
4b7e44cbf7
|
@ -20,7 +20,6 @@ services:
|
|||
- DISCORD_CLIENT_ID=3435tdfsdudebussylmaoxxt43
|
||||
- DISCORD_CLIENT_SECRET=3435tdfsdudebussylmaoxxt43
|
||||
- DISCORD_BOT_TOKEN=3435tdfsdudebussylmaoxxt43
|
||||
- CATBOX_KEY=3435tdfsdudebussylmaoxxt43
|
||||
#- HCAPTCHA_SITEKEY=3435tdfsdudebussylmaoxxt43
|
||||
- HCAPTCHA_SECRET=3435tdfsdudebussylmaoxxt43
|
||||
- YOUTUBE_KEY=3435tdfsdudebussylmaoxxt43
|
||||
|
|
1
env
1
env
|
@ -10,7 +10,6 @@ export DISCORD_SERVER_ID="3435tdfsdudebussylmaoxxt43"
|
|||
export DISCORD_CLIENT_ID="3435tdfsdudebussylmaoxxt43"
|
||||
export DISCORD_CLIENT_SECRET="3435tdfsdudebussylmaoxxt43"
|
||||
export DISCORD_BOT_TOKEN="3435tdfsdudebussylmaoxxt43"
|
||||
export CATBOX_KEY="3435tdfsdudebussylmaoxxt43"
|
||||
export HCAPTCHA_SECRET="3435tdfsdudebussylmaoxxt43"
|
||||
export YOUTUBE_KEY="3435tdfsdudebussylmaoxxt43"
|
||||
export PUSHER_KEY="3435tdfsdudebussylmaoxxt43"
|
||||
|
|
|
@ -7,7 +7,8 @@ from flask_caching import Cache
|
|||
from flask_limiter import Limiter
|
||||
from flask_compress import Compress
|
||||
from flask_limiter.util import get_ipaddr
|
||||
from flaskext.markdown import Markdown
|
||||
from flask_mail import Mail
|
||||
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
from sqlalchemy.orm import sessionmaker, scoped_session
|
||||
from sqlalchemy import *
|
||||
|
@ -63,10 +64,6 @@ app.config["RATELIMIT_STORAGE_URL"] = environ.get("REDIS_URL", "redis://127.0.0.
|
|||
|
||||
r=redis.Redis(host=environ.get("REDIS_URL", "redis://127.0.0.1"), decode_responses=True, ssl_cert_reqs=None)
|
||||
|
||||
cache = Cache(app)
|
||||
Markdown(app)
|
||||
Compress(app)
|
||||
|
||||
limiter = Limiter(
|
||||
app,
|
||||
key_func=get_ipaddr,
|
||||
|
@ -81,6 +78,9 @@ engine = create_engine(app.config['DATABASE_URL'])
|
|||
|
||||
db_session = scoped_session(sessionmaker(bind=engine, autoflush=False))
|
||||
|
||||
cache = Cache(app)
|
||||
Compress(app)
|
||||
mail = Mail(app)
|
||||
|
||||
@app.before_request
|
||||
def before_request():
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
from files.mail import *
|
||||
from files.__main__ import app, limiter
|
||||
from files.__main__ import app, limiter, mail
|
||||
from files.helpers.alerts import *
|
||||
from files.classes.award import AWARDS
|
||||
from sqlalchemy import func
|
||||
from os import path
|
||||
import calendar
|
||||
import matplotlib.pyplot as plt
|
||||
from flask_mail import Message
|
||||
|
||||
site = environ.get("DOMAIN").strip()
|
||||
site_name = environ.get("SITE_NAME").strip()
|
||||
|
||||
@app.route("/mailtest")
|
||||
def mailtest():
|
||||
msg = Message(html="<h1>Hello<h1>",
|
||||
sender="from@example.com",
|
||||
recipients=["to@example.com"])
|
||||
mail.send(msg)
|
||||
|
||||
@app.get('/rules')
|
||||
@auth_desired
|
||||
def static_rules(v):
|
||||
|
|
|
@ -4,7 +4,7 @@ Flask
|
|||
Flask-Caching
|
||||
Flask-Compress
|
||||
Flask-Limiter==1.1.0
|
||||
Flask-Markdown
|
||||
Flask-Mail
|
||||
gevent
|
||||
greenlet
|
||||
gunicorn
|
||||
|
|
Loading…
Reference in New Issue