host django allauth project in pythonanywhere

225 views Asked by At

I tried to upload a simple authentification project to pythonhosted which works and builds on my local machine without errors.

Then i tried to host this one in pythonanywhere. Nevertheless the main page seems to run but but when i try to use the allauth login feature it crashes:

python3.4 manage.py makemigrations

or

make rebuild 

throws the following error:

enter image description here

Here is the code of that project. It is build from this template with little modifications like python3 and some script modification.

Here is my wsgi-file (updated and working)

# +++++++++++ DJANGO +++++++++++
# To use your own django app use code like this:
import os
import sys
#
## assuming your django settings file is at '/home/MaRcMaN/mysite/mysite/settings.py'
path = '/home/MaRcMaN/sqlnoodle_django'
if path not in sys.path:
    sys.path.append(path)
#
os.environ['DJANGO_SETTINGS_MODULE'] = 'allauthdemo.settings'
#
## then, for django >=1.5:
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
## or, for older django <=1.4
#import django.core.handlers.wsgi
#application = django.core.handlers.wsgi.WSGIHandler()
1

There are 1 answers

1
Glenn On

The stacktrace that you provided (which is almost impossible to read) suggests some possibilities:

  • that you haven't activated your virtualenv in the Bash shell where you're running your manage.py command
  • that you haven't installed the correct version of Django into the virtualenv
  • that you've installed Django into your home directory (not into the virtualenv) and it's a different version to the one that you're using on your local machine