I cannot get my django application to deply as my webapp. I have tried a few times over several days but I can't get it to work.
I'm following the excellent DjangoGirls tutorial, specifically https://tutorial.djangogirls.org/en/deploy/.
I used my personal access token and was able to authenticate. However when I run the autoconfigure:
pa_autoconfigure_django.py --python=3.6 --nuke https://github.com/robline/skip.git
I get a collectstatic failed because there is no module named django_extensions:
ModuleNotFoundError: No module named 'django_extensions'
Traceback (most recent call last):
File "/home/robline/.local/bin/pa_autoconfigure_django.py", line 47, in <module>
main(arguments['<git-repo-url>'], arguments['--domain'], arguments['--python'], nuke=arguments.get('--nuke'))
File "/home/robline/.local/bin/pa_autoconfigure_django.py", line 37, in main
project.run_collectstatic()
File "/home/robline/.local/lib/python3.6/site-packages/pythonanywhere/django_project.py", line 87, in run_collectstatic
'--noinput',
File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/robline/.virtualenvs/robline.pythonanywhere.com/bin/python', '/home/robline/robline.pythonanywhere.com/manage.py', 'collectstatic', '--noinput']' returned non-zero exit status 1.
So I tried to install django-extensions and it says requirement already satisfied:
18:42 /home $ pip3.6 install --user django_extensions
Looking in links: /usr/share/pip-wheels
Requirement already satisfied: django_extensions in ./robline/.local/lib/python3.6/site-packages (3.0.9)
When I try to manually run collectstatic it fails because I'm not in the correct directory. I'd expect the automatic virtualenv creation to put me there which is why I mention it. Anyway I navigated to the correct directory to collect static, and also tried create superuser:
python manage.py collectstatic
And I got a SyntaxError:
18:50 ~/robline.pythonanywhere.com (main)$ python manage.py createsuperuser
File "manage.py", line 17
) from exc
^
SyntaxError: invalid syntax
I am not sure what else to try. Thanks for any insights!