Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
Issue #88, [BUGFIX] Session Crash Every Time
Browse files Browse the repository at this point in the history
  • Loading branch information
minhoryang committed Mar 6, 2016
1 parent 2561a77 commit 2df4124
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 1 addition & 3 deletions config.py.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from os import urandom

SQLALCHEMY_TRACK_MODIFICATIONS = True
SQLALCHEMY_DATABASE_URI = 'mysql+pymysql://{{ username }}:{{ password }}@{{ server }}/{{ database }}?charset=utf8mb4'
SECRET_KEY = urandom(24)
SECRET_KEY = {{ secret_key }}
UPLOAD_FOLDER = '{{ folder }}'
4 changes: 4 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from os import urandom

from flask_script import (
Manager,
prompt,
Expand Down Expand Up @@ -40,6 +42,7 @@ def config(
database = prompt("MySQL DB Database", default=database)
if folder is _folder:
folder = prompt("Image Upload Folder", default=folder)
secret_key = urandom(24)
with open("config.py.tmpl") as tmpl:
Template(
tmpl.read()
Expand All @@ -49,6 +52,7 @@ def config(
server=server,
database=database,
folder=folder,
secret_key=secret_key,
).dump("config.py")


Expand Down

0 comments on commit 2df4124

Please sign in to comment.