I read some reviews in AWS forums they said some people Django 2.2 and python 3.6 possible to AWS deployment but in this mean while most of the people said 2.1 only work not 2.2. so i want some clarification about which Django version should i use to AWS. i already test 2.2 it is not working state but 2.1 fine.
The aws documentation:
Deploying a Django application to Elastic Beanstalk
Indicates Django 2.1.1. This could explain why you found tat 2.2 is not working, but 2.1 is.
Related
I'm trying to upgrade an existing application on AWS from the now deprecated Python 3.4 platform to 3.7 with Amazon Linux 2/3.0.1, and in the process I ran into an issue with where the application source code is deployed on the EC2 instance.
From some empirical testing, I found that instead of /opt/python/current/app directory that most if not all AWS documentations say (e.g Troubleshooting issues with the EB CLI - AWS Elastic Beanstalk), with Python 3.7 it is actually deployed in /var/app/current/. I wasn't able to find any documentation regarding this change, and it is causing some issues with the application. I'm wondering is there any reason that this change is made? And if it is possible to revert it, how to do so?
Thanks in advance!
This is because the 3.7 Python Elastic Beanstalk distribution uses Amazon Linux 2 which is fundamentally different from the AMI predecessor. If you opt to use Python 3.6 instead you should be able to avoid this issue, as it runs on the earlier Linux version where deployments still occur in /opt/var/app/current. Most tutorials I've found are designed to work with this older rollout, including the most up-to-date Amazon start guide.
If you have the time, try migrating your code to the newer version, as this seems to be the workflow Amazon is embracing going forward, for all newer versions of Python (such as 3.8 and others yet to come).
I was running Django 1.11 with Python 3.5 and I decided to upgrade to Python 3.6.
Most things worked well, but I am having issues connection to AWS S3. I know that they have a new boto version boto3 and that django-storages is a little outdated, so now there is django-storages-redux.
I've been trying multiple combinations of boto/boto3 and django-storages-redux/django-storages to see if it works. But I'm getting a lot of erros, from SSL connection failing to the whole website being offline due to server errors. The newest is my website throwing a 400 Bad Request to all urls.
My app does run on Python 3.5, so I'm confident that the issue is around collectstatic and S3.
Is there anybody here who made a similar update work and tell me what configuration was used?
Thanks a lot!
Found the issue.
Django-storages-redux was temporarily replacing django-storages since it's development had been interrupted.
Now the django-storages team restarted to support it.
That means that the correct configuration to use is: django-storages + boto3
I have created a project in Django rest framework and able to deploy on Apache 2.2 using mod_wsgi.
Now I need to deploy it on IIS7 (windows 7). I go through a lot of blog but all are telling about python 2.7 and IIS. I didn't get any answer for python 3.4.
I read that I can use FastCgi of IIS to deploy but I really didn't understand, how?
I tried a lot but without success.
Any help?
I am new on hosting servers and i want to know the easiest way to get my django app running on a free/or not hosting server.
Please give some very detail information's and suggestions!!!
My application is built on python 2.7 with Django 1.6
Follow this documentation :
https://devcenter.heroku.com/articles/getting-started-with-django
I'm trying to deploy my Django app to Google App Engine (GAE) as per this document. I created and configured a Google Cloud SQL instance, as described in that document. I use PyCharm as development environment and created a GAE project with Django support.
I configured a local server to point to the GAE server. When I try to launch the GAE local server in PyCharm, it's raising exceptions on an improperly configured database in SETTINGS.PY:
google.appengine.ext.django.backends.rdbms' isn't an available database backend
I can see from the stack trace that the local server is using the Django version in /Library/Python/2.7/site-packages while I presume it should use the one in /usr/local/google_appengine/lib.
What would be the best way to solve this given that I have other Django projects as well that should use the Django version in /Library/Python/2.7/site-packages? If I modify my PYTHONPATH to include the GAE version of Django, would not all my projects be referencing that version of Django?
EDIT: To be more precise, the GAE local server starts just fine but throws the mentioned stack trace when I do a syncdb task to update my database.
EDIT 2: In PyCharm Settings under Python Interpreter, I found the possibility to modify paths and added the Django 1.4 version as distributed with GAE SDK. When I start the GAE development server, I can actually see it uses the Django version from the GAE SDK but it still crashes on the database definitions:
Error was: No module named google.appengine.ext.django.backends.rdbms.base
EDIT 3: I ran into problems when trying to deploy an existing Django app using the tutorial. See this separate question.
Looks like PyCharms call of syncdb is using the wrong Django installation.
google.appengine.ext.django.backends.rdbms is not part of the official Django distribution, but it is part of GAEs django.
My GAE django is in /usr/local/google_appengine/lib/
If you're on linux/OS X you could add this to your .bashrc/.bash_profile and make syncdb use this:
export GAE="/usr/local/google_appengine"
export PYTHONPATH="$PYTHONPATH:$GAE:$GAE/lib/django_1_4"
export PATH=${PATH}:$GAE/lib/django_1_4/django/bin/
export PATH=${PATH}:/usr/local/mysql/bin
I wrote a tutorial about using Django with GAE and Google Cloud SQL. There might be some relevant infos there as well.