I have a django project version 1.4 Is it possible to upgrade it to higher version so that it still works. Should I start the project again from scratch. Is so what are the steps? Is the a proper documentation of django for deployment of the project in windows.
You're right, the django migration is something not very documented.
In my opinion, the best thing you can do to be quick and secure, is:
Check all the major changes between Django 1.4 and 1.7 (look for changelog and Djang website).
Take a look to your code to be aware of what part will be obsolete after the migration.
Do the migration, in a non-critic environment of course. For this purpose, don't touch to your code first, just upgrade the Django version
Fix your code until it works perfectly (run unit tests if you have some).
You're ready to do the migration in a production environment.
I did it between Django 1.6 and Django 1.7 (and migrating from Python 2.x to 3.x in the same time). It was easier than I had imagined. However, Django 1.4 to 1.7 could be a little bit longer, but nothing hard.
Related
We have an existing Django application which uses Django 1.11 and Python 3.6. For some security reasons I have been asked to use Python 3.7. I need to make the minimum changes possible. Do I need to upgrade Django as well? If so , is there any code changes required?
Thanks,
Python 3.7 compatibility was retrospectively added into the classifiers for Django v2.0 in this commit, even though v2.1 was already out. 1.11 was not included.
Discussion on Django tracker is here: https://code.djangoproject.com/ticket/28814
However, 1.11.x is LTS release series, so maybe if you're lucky that will still be added in a micro version upgrade at some later date.
Edit: Python 3.7 support was added in the micro version upgrade for Django 1.11.17 (2018-12-03, about 3 months after this question was originally asked)
According to this page on the Django docs, support for Python 3.7 was added in Django 1.11.17.
https://docs.djangoproject.com/en/1.11/faq/install/#what-python-version-can-i-use-with-django
"Django 1.11 requires Python 2.7, 3.4, 3.5, or 3.6. Django 1.11 is the first release to support Python 3.6. We highly recommend and only officially support the latest release of each series."
In the future, such questions are inevitably asked and answered in the Django docs.
I am following online instructions on starting a Django project the right way.
The instructions are based on an earlier version of Django. From my (admittedly limited) knowledge of Django. The latest release of Django (1.10 at the time of posing this question), already handles migrations seemingly well - by way of the manage.py script.
My question then is this: Do I still need to install South to manage my migrations, or can I simply skip that part of the instructions, and use manage.py to deal with my db schema changes?
No, South was for Django before 1.7. With 1.10 everything you would have used it for is baked into Django itself.
I am new to django and i have a django 1.4 version project. i am trying to run it in django 1.8 environment. I'd like to upgrade my 1.4 project to 1.8 without rewriting the project.
If someone knows a way to do this please help me. I tried surfing for answers but couldn't find any.
There is no magic answer I am afraid.
You'll need to read the Django release notes for 1.5, 1.6, 1.7 and 1.8, and make any appropriate changes to your code.
Django recently updated their release roadmap, which will make it easier to upgrade from the current LTS 1.8 to the next LTS 1.11.
As specified in the tutorial (http://www.jython.org/jythonbook/en/1.0/JythonDjango.html), I am using doj.backends.zxjdbc.postgresql as Django's DB engine. However, when I do
jython manage.py syncdb
I get an ImproperlyConfigured error, stating that doj.backends.zxjdbc.postgresql is not an available backend and that no module named postgresql exists. Strangely, if I enter the Jython shell, I can do
import doj.backends.zxjdbc.postgresql
without any error messages.
Ideas on what is going on here?
Solution: django-jython is out of date. 1.4 is not currently supported, so there is no solution to this issue other than to revert to a supported version of django.
Unfortunately it seems like django-jython is not seeing much/any active development anymore...
However, I have found that development versions available at the Google code repository below do work in Django 1.5 (and I assume they may work with 1.4 too, if you pick the right version):
https://code.google.com/p/django-jython/source/list
In particular, I have found that this dev version works with Django 1.5:
https://code.google.com/p/django-jython/source/detail?r=c4a0dd949a6d86a4baf8d1bed3b1926fa5318e87
I recently started looking into django and I started with the tutorial.
I noticed that django-admin.py startproject project_name creates a flat file system structure.
According to the tutorial, the project layout has changed:
The default project layout recently changed. If you're seeing a "flat" layout (with no inner mysite/ directory), you're probably using a version of Django that doesn't match this tutorial version. You'll want to either switch to the older tutorial or the newer Django version.
I checked the version of django by running:
import django
django.get_version()
And I have the latest version 1.3.1
I was wondering if it is possible that I have two copies of django installed?? Or how can I solve this? I want to make sure that I have the latest django running.
I don't understand the confusion.
All 1.3 versions use the old flat layout. The development version - recently tagged as 1.4 alpha - uses the new one. You should be using the documentation that matches your version.