1👍
I was trying to deploy my Django Rest Api to Beanstalk by following this documentation. And I encountered the same Status Code 500 error.
I managed to solve this problem by making below two changes:
-
AWS Beanstalk’s python 3.6 environment doesn’t seem to work well with latest Django versions. So I created a new python 3.7 environment using this command.
eb init -p python-3.7 django-tutorial
-
Changed WSGI Path to:
WSGIPath: YourDjangoProjectFolder.wsgi:application
All other things are same as described in that documentation.
2👍
Did you resolve it? I struggled for weeks but with a 502 after following exactly the instructions.
Then I found this post and deduced it was a typo or outdated instructions (*/wsgi.py
should be *.wsgi:application
).
Created a pull request to AWS docs and they’ve updated since.
- [Django]-Django error "'ImageFieldFile' object has no attribute 'replace'"
- [Django]-Django: Moving from XAMPP to Django questions
1👍
I was having the same problem, until I realized I hadn’t included the following line in my settings.py file:
ALLOWED_HOSTS = ['eb-django-app-dev.elasticbeanstalk.com']
Replacing the link inside the brackets with my own custom application link, as stated in step 5 of the tutorial.
After saving the file and committing, I was able to get rid of the 500 error.
- [Django]-Python Piston equivalent for consuming RESTful APIs?
- [Django]-How to complement the block of parent template?
- [Django]-Importing celery in project fails, works(sort of) in manage.py shell
- [Django]-How to add html classes to a Django template 'for-loop' dynamically?
- [Django]-Generating simple RSS feed from parsed data