pythonanywhere

How to “reset” a postgres database on PythonAnywhere?

ⅰ亾dé卋堺 提交于 2021-02-11 14:16:17
问题 After some testing with Django on PythonAnywhere, I want to get rid of my testing data before I import my actual data to the postgres database. I thought the best way would be to start from scratch and "reset" somehow the database. Unfortunately there is no button for that on pythonanywhere.com and the documentation does not say anything. So the question is: how can I "reset" or empty the postgres database on PythonAnywhere? 回答1: With the help of the PythonAnywhere support I found a way which

How to overwrite Django app to Pythonanywhere? 3

被刻印的时光 ゝ 提交于 2021-02-11 12:20:12
问题 After the second time deploying the Django app to Pythonanywhere, (I re-edited and overwritten in VS code and did git push) I got the following error. The command is pa_autoconfigure_django.py https://github.com/[user_name]/[project_name].git --nuke Is that something exceeded? What should I delete? I don't know what wrong it is... Downloading llvmlite-0.33.0-cp36-cp36m-manylinux1_x86_64.whl (18.3 MB) |███████████████████████████▍ | 15.7 MB 14.7 MB/s eta 0:00:01ERROR: Could not install

Alternative of send_file() in flask on Pythonanywhere?

余生颓废 提交于 2021-02-07 14:43:08
问题 I am new to python and still learning. I created a small python 3.6 Flask webapp on pythonanwhere and found out that send_file() is not working on pythonanywhere servers. I am actively looking for an alternative to download an excel file directly on the user machine. I also tried Response but it is not giving desired output. I read alot about it online and found that the send_file works fine if we set below wsgi-disable-file-wrapper = True However, i don't know where to set this as i couldn't

How to execute code in Django after response has been sent to the client (on PythonAnywhere)?

寵の児 提交于 2021-01-29 18:28:37
问题 I'm looking for a way to execute code in Django after the response has been sent to the client. I know the usual way is to implement a task queue (e.g., Celery). However, the PaaS service I'm using (PythonAnywhere) doesn't support task queues as of May 2019. It also seems overly complex for a few simple use cases. I found the following solution on SO: Execute code in Django after response has been sent to the client. The accepted answer works great when run locally. However, in production on

Privacy error using pythonanywhere ssl certificate

依然范特西╮ 提交于 2021-01-29 05:27:28
问题 I have a payment gateway in my web-app that requires an SSL certificate to work properly. the web-app is a django web-app hosted at pythonanywhere . I used their Auto-renewing Let's Encrypt certificate to add an SSL certificate and make the website load as an HTTPS website. The website now loads as an HTTPS website but when exiting the payment gateway I still get a Privacy error as follows Your connection is not private Attackers might be trying to steal your information from <my domain> (for

How to overwrite Django app to Pythonanywhere? 2

情到浓时终转凉″ 提交于 2021-01-07 01:21:35
问题 After the second time deploying the Django app to Pythonanywhere, (I re-edited and overwritten in VS code and did git push) I got the following error. Looking in links: /usr/share/pip-wheels Processing /opt/concourse/worker/volumes/live/0291c9e1-4b15-459f-623e-2770f55be269/volume/appnope_1594338395037/work ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/opt/concourse/worker/volumes/live/0291c9e1-4b15-459f-623e-2770f55be269/volume/appnope

django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet. (django 2.0.1)(Python 3.6)

孤人 提交于 2020-12-29 04:59:17
问题 It's my first time trying to deploy a Django app(django 2.0.1)(Python 3.6) to pythonanywhere, it is a simple portfolio app with no models, no bootstrap. Just Django, HTML, CSS & Javascript. After pulling it from the Github repo onto pythnanywhere with their bash console, I run : python manage.py migrate & was hit with this error : Traceback (most recent call last): File "manage.py", line 22, in <module> execute_from_command_line(sys.argv) File "/home/Limerin555/.virtualenvs/projectenv/lib

ModuleNotFoundError: No module named 'django'

不羁的心 提交于 2020-12-26 08:27:40
问题 I'm trying make online a project but there is an error i can't solve myself. I already installed django but the server give me this error. Virtualenv is also active. 2017-09-25 20:10:27,471: *************************************************** 2017-09-25 20:10:30,892: Error running WSGI application 2017-09-25 20:10:30,893: ModuleNotFoundError: No module named 'django' 2017-09-25 20:10:30,893: File "/var/www/asd1_pythonanywhere_com_wsgi.py", line 17, in <module> 2017-09-25 20:10:30,893: from

ClientConnectorError: Cannot connect to host discordapp.com:443 ssl:default [Connect call failed ('162.159.134.233', 443)]

我们两清 提交于 2020-11-29 19:25:59
问题 So I was trying out making a bot in Discord and I tried running my discord bot over Gitpod and it was able to run, but when I tried running it on pythonanywhere.com, I get this error: aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host discordapp.com:443 ssl:default [Connect call failed ('162.159.134.233', 443)] Here is a snippet of my code: import discord from discord.ext import commands import json with open("credentials.json") as creds: creds = json.loads(creds.read())

ClientConnectorError: Cannot connect to host discordapp.com:443 ssl:default [Connect call failed ('162.159.134.233', 443)]

本秂侑毒 提交于 2020-11-29 19:21:18
问题 So I was trying out making a bot in Discord and I tried running my discord bot over Gitpod and it was able to run, but when I tried running it on pythonanywhere.com, I get this error: aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host discordapp.com:443 ssl:default [Connect call failed ('162.159.134.233', 443)] Here is a snippet of my code: import discord from discord.ext import commands import json with open("credentials.json") as creds: creds = json.loads(creds.read())