heroku

Tying a unique game id to a user in a Flask app to handle multiple requests to the server

折月煮酒 提交于 2020-07-23 07:39:06
问题 I built a chess app with Python and used Flask to create a site for users to play on. I used Heroku to deploy the app (http://pythonchessapp.herokuapp.com/). I am new to web development and was wondering how I can handle multiple users (on separate laptops or tabs) going on the site to play the app? Something like having a unique game id per user to serve a different game to different requests. Below is some of my code for routes and initializing games. I basically initialize a Board object

Why are some of my photos missing after I re-deploy heroku even though I have s3 set up

依然范特西╮ 提交于 2020-07-23 06:37:14
问题 So when I go to re-deploy my heroku, some of my profiles are missing photos, and the same ones every single time. When I upload a user photo, I can see a copy of it being put into my AWS bucket. And it uploads and shows up. But when I re-deploy, it's gone. Why is this happening? settings.py STATIC_URL = '/static/' PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) STATIC_ROOT = os.path.join(PROJECT_DIR, 'staticfiles') STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) MEDIA_URL =

Why are some of my photos missing after I re-deploy heroku even though I have s3 set up

冷暖自知 提交于 2020-07-23 06:34:21
问题 So when I go to re-deploy my heroku, some of my profiles are missing photos, and the same ones every single time. When I upload a user photo, I can see a copy of it being put into my AWS bucket. And it uploads and shows up. But when I re-deploy, it's gone. Why is this happening? settings.py STATIC_URL = '/static/' PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) STATIC_ROOT = os.path.join(PROJECT_DIR, 'staticfiles') STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) MEDIA_URL =

Status Code: 405 Not Allowed in React frontend hosted on Heroku

廉价感情. 提交于 2020-07-22 05:14:06
问题 I have made an app in react frontend and express as backend framework. These both are working fine in my local computer and when I have hosted Both server and client in Heroku they are deployed properly but when I am trying to login I am getting 405: Not allowed error. When I am using the same server hosted in Heroku with the frontend hosted in my desktop it is working fine. client : https://calm-fjord-20606.herokuapp.com/login server : https://recorder-server-pkr.herokuapp.com/user/login I

Heroku : tensorflow 2.2.1 too large for deployment

那年仲夏 提交于 2020-07-22 03:54:51
问题 im trying to deploy a keras project to heroku but pushing to the repository master branch seems to be problematic for me as the following error is reported every time I try it: remote: -----> Compressing... remote: ! Compiled slug size: 836M is too large (max is 500M). remote: ! See: http://devcenter.heroku.com/articles/slug-size remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to ... I figured this is due to the tensorflow requirement being way too

No module named 'sendgrid_backend' in django

会有一股神秘感。 提交于 2020-07-21 11:28:09
问题 When sending an email on heroku I get this error: No module named 'sendgrid_backend' I have this set up in settings.py: EMAIL_BACKEND = "sendgrid_backend.SendgridBackend" SENDGRID_API_KEY = os.environ.get("SENDGRID_API_KEY") EMAIL_PORT = 587 EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.sendgrid.net' EMAIL_HOST_USER = 'apikey' EMAIL_HOST_PASSWORD = os.environ.get('SENDGRID_API_KEY') I also did install of sendgrid using pip and included it in the requirements.txt 回答1: I think this will help you

No module named 'sendgrid_backend' in django

|▌冷眼眸甩不掉的悲伤 提交于 2020-07-21 11:28:08
问题 When sending an email on heroku I get this error: No module named 'sendgrid_backend' I have this set up in settings.py: EMAIL_BACKEND = "sendgrid_backend.SendgridBackend" SENDGRID_API_KEY = os.environ.get("SENDGRID_API_KEY") EMAIL_PORT = 587 EMAIL_USE_TLS = True EMAIL_HOST = 'smtp.sendgrid.net' EMAIL_HOST_USER = 'apikey' EMAIL_HOST_PASSWORD = os.environ.get('SENDGRID_API_KEY') I also did install of sendgrid using pip and included it in the requirements.txt 回答1: I think this will help you

Are there any reasons not to use RAILS_ENV=staging on Heroku?

ⅰ亾dé卋堺 提交于 2020-07-21 07:53:42
问题 The Heroku documentation at https://devcenter.heroku.com/articles/deploying-to-a-custom-rails-environment says I shouldn't use a staging.rb file to define my staging environment. It may be tempting to create another custom environment such as “staging” and create a config/environments/staging.rb and deploy to a Heroku app with RAILS_ENV=staging. This is not a good practice. Instead we recommend always running in production mode and modifying any behavior by setting your config vars. I think

Are there any reasons not to use RAILS_ENV=staging on Heroku?

安稳与你 提交于 2020-07-21 07:53:12
问题 The Heroku documentation at https://devcenter.heroku.com/articles/deploying-to-a-custom-rails-environment says I shouldn't use a staging.rb file to define my staging environment. It may be tempting to create another custom environment such as “staging” and create a config/environments/staging.rb and deploy to a Heroku app with RAILS_ENV=staging. This is not a good practice. Instead we recommend always running in production mode and modifying any behavior by setting your config vars. I think

Message “28000: no pg_hba.conf entry for host \”xx.xxx.xxx.xxxx\“, user \”User“, database \”databasename\“, SSL off”

元气小坏坏 提交于 2020-07-20 11:44:12
问题 I 'm trying to connect postgresql database remotely ( Heroku ). I use ASP Web api but always i have the same exception :Message "28000: no pg_hba.conf entry for host \"xx.xxx.xxx.xxxx\", user \"User", database \"databasename\", SSL off" I search some solution by editing the pg_hba.conf file and i add : host databasename username xx.xxx.xxx.xxxx md5 and no change . 回答1: Add sslmode=Require; and Trust Server Certificate=true; in your connection string.It will work for sure. 回答2: Heroku Postgres