Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
4,010 additions
and
609 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"python.pythonPath": "/home/warlock/.local/share/virtualenvs/blog-AAp6Teun/bin/python", | ||
"python.linting.enabled": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
[[source]] | ||
|
||
url = "https://pypi.python.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
|
||
[packages] | ||
|
||
|
||
arrow = "==0.10.0" | ||
cffi = "==1.9.1" | ||
click = "==6.6" | ||
dateparser = "==0.6.0" | ||
itsdangerous = "==0.24" | ||
misaka = "==2.0.0" | ||
mistune = "==0.7.3" | ||
pycparser = "==2.17" | ||
python-dateutil = "==2.6.0" | ||
pytz = "==2017.2" | ||
regex = "==2017.6.7" | ||
"ruamel.yaml" = "==0.15.9" | ||
six = "==1.10.0" | ||
tornado = "==4.5.1" | ||
tzlocal = "==1.4" | ||
Flask = "==0.11.1" | ||
"Jinja2" = "==2.8" | ||
Markdown = "==2.6.6" | ||
MarkupSafe = "==0.23" | ||
Pigments = "==1.6" | ||
Werkzeug = "==0.11.10" | ||
|
||
[dev-packages] | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
from flask import Flask | ||
from config import * | ||
import os | ||
|
||
# Initilize Flask App | ||
app = Flask(__name__,static_folder='static', static_url_path='') | ||
|
||
# Import views after the app is initilized | ||
from views import * | ||
|
||
# @app.after_request | ||
# def add_header(response): | ||
# response.cache_control.max_age = 360000 | ||
# response.cache_control.no_store = True | ||
# return response | ||
ENV = 'production' | ||
DEBUG_STATUS = False | ||
if ('ENV' in os.environ): | ||
if (os.environ['ENV'] == 'dev'): | ||
DEBUG_STATUS = True | ||
|
||
print(ENV) | ||
|
||
@app.after_request | ||
def add_header(response): | ||
if (DEBUG_STATUS): | ||
response.cache_control.no_store = True | ||
response.cache_control.no_cache = True | ||
else: | ||
response.cache_control.max_age = 360000 | ||
return response | ||
|
||
if __name__=="__main__": | ||
app.run(debug=DEBUG_STATUS,host=HOST,port=PORT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.