From b78293130cd24e7b70fc5de604be7fe72022883c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Wed, 4 Aug 2021 18:21:10 +0200 Subject: [PATCH] fdfdfd --- .gitignore | 2 +- appspec.yml | 6 +++--- docker-compose.yml | 9 ++++----- files/__main__.py | 2 +- files/templates/api.html | 6 +++--- files/templates/badmins.html | 2 +- files/templates/default.html | 6 +++--- files/templates/errors/502.html | 2 +- files/templates/errors/503.html | 4 ++-- files/templates/header.html | 4 ++-- files/templates/leaderboard.html | 10 +++++----- files/templates/login_2fa.html | 2 +- files/templates/settings.html | 6 +++--- files/templates/settings2.html | 6 +++--- files/templates/settings_filters.html | 2 +- files/templates/settings_profile.html | 2 +- files/templates/sign_up.html | 10 +++++----- files/templates/sign_up_failed_ref.html | 8 ++++---- files/templates/submission.html | 6 +++--- files/templates/userpage.html | 10 +++++----- files/templates/userpage_private.html | 2 +- supervisord.conf | 6 +++--- 22 files changed, 56 insertions(+), 57 deletions(-) diff --git a/.gitignore b/.gitignore index 82c550881..61ea3f4af 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ image.gif -dramacache/ +cache/ __pycache__/ *.py[cod] *$py.class diff --git a/appspec.yml b/appspec.yml index 0ab4dac11..5a7cff88d 100644 --- a/appspec.yml +++ b/appspec.yml @@ -2,12 +2,12 @@ version: 0.0 os: linux files: - source: / - destination: drama + destination: files permissions: - - object: drama/* + - object: files/* mode: 4755 hooks: AfterInstall: - location: scripts/install_pip ApplicationStart: - - location: scripts/start_drama \ No newline at end of file + - location: scripts/start_files \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 3f8d41b62..c98050634 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,13 +1,13 @@ version: '2.3' services: - drama: + files: build: context: . volumes: - - "./:/drama/service" + - "./:/service" environment: - - PYTHONPATH="drama/service" + - PYTHONPATH="/service" - REDIS_URL=redis://redis - DATABASE_URL=postgresql://postgres@postgres:5432/postgres - DATABASE_CONNECTION_POOL_URL=postgresql://postgres@postgres:5432/postgres @@ -19,7 +19,6 @@ services: - TENOR_KEY=vcxvdfgfc6r554etrgd - MAILGUN_KEY=vcxvdfgfc6r554etrgd - MAILGUN_DOMAIN=rdrama.net - - admin_email=drama@rdrama.net - FORCE_HTTPS=0 - DISCORD_SERVER_ID=vcxvdfgfc6r554etrgd - DISCORD_CLIENT_ID=vcxvdfgfc6r554etrgd @@ -27,7 +26,7 @@ services: - DISCORD_BOT_TOKEN=vcxvdfgfc6r554etrgd - imgurkey=vcxvdfgfc6r554etrgd - FACEBOOK_TOKEN=vcxvdfgfc6r554etrgd - #- HCAPTCHA_SITEKEY=vcxvdfgfc6r554etrgd + #- HCAPTCHA_SITEKEY=vcxvdfgfc6r554etrgd - HCAPTCHA_SECRET=vcxvdfgfc6r554etrgd - youtubekey=vcxvdfgfc6r554etrgd - PUSHER_KEY=vcxvdfgfc6r554etrgd diff --git a/files/__main__.py b/files/__main__.py index 96b4ff2cc..946e02b5a 100644 --- a/files/__main__.py +++ b/files/__main__.py @@ -31,7 +31,7 @@ app.wsgi_app = ProxyFix(app.wsgi_app, x_for=3) app.url_map.strict_slashes = False app.config["SITE_NAME"]=environ.get("SITE_NAME").strip() - +app.config["coins_name"]=environ.get("SITE_NAME").strip() app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False app.config['DATABASE_URL'] = environ.get("DATABASE_CONNECTION_POOL_URL",environ.get("DATABASE_URL")) diff --git a/files/templates/api.html b/files/templates/api.html index 2663cd9bf..c97a27236 100644 --- a/files/templates/api.html +++ b/files/templates/api.html @@ -43,7 +43,7 @@ Python example: headers={"Authorization": "access_token_goes_here", "User-Agent": "sex"} - url="https://rdrama.net/@carpathianflorist" + url="{{request.host_url}}@carpathianflorist" r=requests.get(url, headers=headers) @@ -93,7 +93,7 @@ DO NOT reveal your Client ID or Access Token. Anyone with these information will ## Step 2: Prompt Your User for Authorization -Send your user to `https://rdrama.net/authorize/?client_id=YOUR_CLIENT_ID` +Send your user to `{{request.host_url}}authorize/?client_id=YOUR_CLIENT_ID` If done correctly, the user will see that your application wants to access their {{"SITE_NAME" | app_config}} account, and be prompted to approve or deny the request. @@ -112,7 +112,7 @@ Python example: headers={"Authorization": "access_token_goes_here", "User-Agent": "sex"} - url="https://rdrama.net/@carpathianflorist" + url="{{request.host_url}}@carpathianflorist" r=requests.get(url, headers=headers) diff --git a/files/templates/badmins.html b/files/templates/badmins.html index fe0bf7c7b..87e791c50 100644 --- a/files/templates/badmins.html +++ b/files/templates/badmins.html @@ -16,7 +16,7 @@ {% for user in badmins %} {{user.username}} - {{user.dramacoins}} + {{user.coins}} {% endfor %} diff --git a/files/templates/default.html b/files/templates/default.html index 16d18d6e5..870a61503 100644 --- a/files/templates/default.html +++ b/files/templates/default.html @@ -807,13 +807,13 @@ - + - + - + diff --git a/files/templates/errors/502.html b/files/templates/errors/502.html index 342736568..ccbde8f27 100644 --- a/files/templates/errors/502.html +++ b/files/templates/errors/502.html @@ -37,7 +37,7 @@