aboutsummaryrefslogtreecommitdiffstats
path: root/pysite/constants.py
diff options
context:
space:
mode:
authorGravatar Leon Sandøy <[email protected]>2018-04-20 22:12:03 +0200
committerGravatar GitHub <[email protected]>2018-04-20 22:12:03 +0200
commit35e0f4466677602e9ec6db614e8ea881dbf656cb (patch)
tree43ebdcc530b57211e45e4fe96bb2811e334640f0 /pysite/constants.py
parentAdded image URLs for each of these famous rappers. (#55) (diff)
[#1eeu1] Hiphopify (#54)
* Changed the dev-mode logic to be the same as prod for creating new tables if they don't exist. Also added a new feature where a table can be initialized with data if you create a JSON file in the pysite/database/table_init/ folder and fill it with a list of dicts where each dict represents a row in your table. Included a hiphoppers json so that I can actually test if it works in production. It will only init the table if the table is empty. * Not sure if this will solve it, but I think so. * Renamed the tables and primary keys, and alphabetized the dict. Now complies with the gdudes holy wishes. * Almost done with the initial build for this. Implemented GET and DELETE, in order to finish POST I need to expand the database.py interface class. * Alphabetized database convenience wrappers. * Fixed a few typehints and added the sample convenience wrapper to the database class. * Finishing up the POST method and adding a duration parser to the utils folder so we can handle strings like 2w3d and turn them into a timestamp. * Fixed API blueprint loading, which was broken by the setup method in the DBMixIn. I'd forgotten to remove the check for table_name attribute. Also adde some logging and got the DELETE route working. * Added timezone-sensitivity to the duration parser so it will work with rethink. renamed the json and fixed some bugs in the hiphopify API. * Added a utility to test if rdb timestamps are expired, and only returning data from the GET calls if it isn't expired. * changed some log wording * Setting up Lil Joseph as default image. Adding some rappers to the list. * Adding a bunch of logging * These tests no longer apply. New tests must be written in the long run, removing them for now. * Addressing review comments left by Volcyy * Fixed misleading comment.
Diffstat (limited to 'pysite/constants.py')
-rw-r--r--pysite/constants.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/pysite/constants.py b/pysite/constants.py
index ca18a288..4eff3606 100644
--- a/pysite/constants.py
+++ b/pysite/constants.py
@@ -22,7 +22,6 @@ class ValidationTypes(Enum):
DEBUG_MODE = "FLASK_DEBUG" in environ
# All snowflakes should be strings as RethinkDB rounds them as ints
-
OWNER_ROLE = "267627879762755584"
ADMIN_ROLE = "267628507062992896"
MODERATOR_ROLE = "267629731250176001"
@@ -44,7 +43,7 @@ DISCORD_OAUTH_SECRET = environ.get('DISCORD_OAUTH_SECRET', '')
DISCORD_OAUTH_SCOPE = 'identify email guilds.join'
OAUTH_DATABASE = "oauth_data"
-PREFERRED_URL_SCHEME = environ.get("PREFERRED_URL_SCHEME", "https") # Change this in testing to "http"
+PREFERRED_URL_SCHEME = environ.get("PREFERRED_URL_SCHEME", "http")
ERROR_DESCRIPTIONS = {
# 5XX
@@ -78,7 +77,6 @@ DATADOG_ADDRESS = environ.get("DATADOG_ADDRESS") or None
DATADOG_PORT = int(environ.get("DATADOG_PORT") or 0)
# CSRF
-
CSRF = CSRFProtect()
# GitHub Token