centered quest title and changed session storage to server side

This commit is contained in:
iou1name 2018-06-22 07:55:36 -04:00
parent 34b96f49de
commit 9903b79252
4 changed files with 6 additions and 3 deletions

2
.gitignore vendored
View File

@ -1,5 +1,5 @@
__pycache__/ __pycache__/
*.cfg flask_session/
*.swp *.swp
secret_key secret_key
db_key db_key

View File

@ -4,7 +4,7 @@ By popular demand, I'm building a better anonkun. It doesn't do much right now t
## Requirements ## Requirements
Python 3.6+ Python 3.6+
MariaDB 10.2+ MariaDB 10.2+
Python packages: `flask flask_socketio flask-paranoid passlib argon2_cffi bleach` Python packages: `flask flask_socketio flask-paranoid passlib argon2_cffi bleach flask-session`
## Install ## Install
``` ```

View File

@ -7,6 +7,7 @@ import time
from flask import Flask from flask import Flask
from flask_paranoid import Paranoid from flask_paranoid import Paranoid
from flask_session import Session
from flask_socketio import SocketIO from flask_socketio import SocketIO
from events import socketio from events import socketio
@ -51,6 +52,8 @@ app = Flask(__name__)
app.wsgi_app = ReverseProxied(app.wsgi_app) app.wsgi_app = ReverseProxied(app.wsgi_app)
app.register_blueprint(views) app.register_blueprint(views)
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024
app.config['SESSION_TYPE'] = 'filesystem'
Session(app)
socketio.init_app(app) socketio.init_app(app)
paranoid = Paranoid(app) paranoid = Paranoid(app)
paranoid.redirect_view = 'views.index' paranoid.redirect_view = 'views.index'

View File

@ -84,7 +84,7 @@
{% block content %} {% block content %}
<div id="questContainer"> <div id="questContainer">
<div id="questBody"> <div id="questBody">
<h1>{{ quest_title }}</h1> <center><h1>{{ quest_title }}</h1></center>
<table id="questPosts"> <table id="questPosts">
{% for quest_post in quest_posts %} {% for quest_post in quest_posts %}
<tr> <tr>