Does Django 1.10 still need South to manage migrations? - django

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.

Related

Difficulty with Django Migrations

What are some good best practices to prevent the following.
Often, during django development I use postgres. If I roll back to an earlier commit, often new migrations will break things irreparably, because the postgres context is unknown to the older code. I have tried the syncdb etc, I have tried makemigrations on single apps, but neither seem to fix the problem.
Also, if creating a new postgres db and deleting all the migrations and pycache folders, this too often causes problems that are not straightforward to fix.
Is the answer to simply use sqlite during development, has anyone else encountered this?
Details: django 2.0.5 postgres: most current.

Upgrading from Django1.3 to 1.8 - Are migrations mandatory?

My application has been on production for 3 years and the DB model is stable. It seems to me that adding migrations support is more pain that it is worth.
Is it possible/desirable to upgrade without migrations support?
The good old syncdb command is still there. If all you need is to add/drop tables(models), you can continue to use that. The new migration support doesn't make any difference to you if you don't create any migrations (with makemigration and migrate commands).
That said, enabling migration is still recommended. You never know when your schema will change, even for a stable DB model. If you don't like Django's builtin migration solution, try south, which was the de facto standard, and have been proven solid.

how to work with south in django

I am trying to learn about python-django web framework.
I have successfully installed database migration tool 'south' in my ubuntu os and also added it to INSTALLED_APPS for using this tool for my web app.
When I run any command using manage.py like
$ ./manage.py runserver
I get this error:
"/usr/local/lib/python2.7/dist-packages/South-1.0.2-py2.7.egg/south/db/generic.py:9: RemovedInDjango19Warning: The django.db.backends.util module has been renamed. Use django.db.backends.utils instead.
from django.db.backends.util import truncate_name
There is no South database module 'south.db.sqlite3' for your database. Please either choose a supported database, check for SOUTH_DATABASE_ADAPTER[S] settings, or remove South from INSTALLED_APPS."
I don't understand what it means. How can I fix this error?
Please give your useful suggestion to solve this error.Thanks
Firstly, you appear to be using the development version of Django. Don't do that, especially as you're just beginning. Use the latest actual release, 1.8.
Secondly, since 1.7 Django has included built-in migrations. There is no need to install South.

Can a older version of django project work on higher version?

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.

Do I need to uninstall Django 1.3 before installing Django-nonrel?

I want to use multiple databases in my Django project. I currently have Django 1.3 installed and my project uses PostgreSQL.
I want to add an app that uses MongoDB.
As I understand(please correct me if I'm wrong), to support MongoDB, I need Django-nonrel which is a fork that provides support for non-relational databases.
So what do I need to do to get MongoEngine running in my Django project while still keeping support for the Postgre stuff in my project?
Should I just run the setup.py in the Django-nonrel package? Uninstall the official Django 1.3? I'm confused here.
If you're using pip, I think it will do it for you automatically because nonrel marks itself as supplying "django".
You are correct that you will need to uninstall django and install django-nonrel if pip doesn't do that automatically.
As for the apps living on the same project, in your database dictionary you just set one db to use postgres and one to use mongo.
If you have any questions we are here at #django-nonrel on freenode irc.
best thing you can do is installing django non real on virtualenv
http://zcentric.com/2010/09/24/get-django-nonrel-working-with-virtualenv/
this way you can have both working together (don't need to uninstall django first)