Questions tagged [django-south]

Tool to provide consistent, easy-to-use and database-agnostic database migrations for Django applications. Deprecated since Django 1.7.

South was a tool to provide consistent, easy-to-use and database-agnostic s for applications.

Since Django 1.7, the features previously provided by South are included directly in Django.

1022 questions
17
votes
3 answers

UUID field added after data already in database. Is there any way to populate the UUID field for existing data?

I've added a UUID field to some of my models and then migrated with South. Any new objects I create have the UUID field populated correctly. However the UUID fields on all my older data is null. Is there any way to populate UUID data for existing…
blinduck
  • 428
  • 1
  • 5
  • 20
16
votes
1 answer

South: run a migration for a column that is both unique and not null

Using South/Django, I am running into a problem where I'm trying to add a UNIQUE and NOT NULL column for a model with existing rows in the database. South prompts me to specify a default for the column, since it is NOT NULL. But since it also has a…
Jamie Forrest
  • 10,895
  • 6
  • 51
  • 68
16
votes
3 answers

Adding a "through" table to django field and migrating with South?

Seems like this should be "easy" or at least documented somewhere, I just cant find it. Lets say I have a model: class A(models.Model): users = models.ManyToMany('auth.User', blank=True) Now I want to migrate to have a through table to add…
dlamotte
  • 6,145
  • 4
  • 31
  • 40
16
votes
3 answers

from django.db import models, migrations ImportError: cannot import name migrations

So I've started to experience some issues with south on my Django web server. Migrate command is failing with this output everytime: from django.db import models, migrations ImportError: cannot import name migrations (Above this the error…
Pablo
  • 163
  • 1
  • 1
  • 4
16
votes
2 answers

Django - Filter queryset by CharField value length

Given that I have a legacy model with a CharField or CharField-based model field like: class MyModel(models.Model): name = models.CharField(max_length=1024, ...) ... I need to make migrations to make it have a max_length of max. 255. First…
Gerard
  • 9,088
  • 8
  • 37
  • 52
16
votes
2 answers

What value do I use for _ptr when migrating reparented classes with South?

I have two classes, one of which is descended from the other, and I would like to make them both sibling classes descended from the same base class. Before: from django.db import models class A(models.Model): name =…
Jack Twilley
  • 346
  • 2
  • 10
16
votes
7 answers

Django Proxy Model Permissions Do Not Appear

I extended Django admin site for my app to allow non-staff/superusers access. This is working just fine. I created a proxy model for an existing model and registered it to my admin site, however, it doesn't appear for non-staff users. From the…
chirinosky
  • 4,438
  • 1
  • 28
  • 39
15
votes
3 answers

newbie difficulty using south with pycharm - DatabaseError: no such table: south_migrationhistory

I'm using sqlite3 and pycharm to learn more about django, and googled to find that south is recommended to make it easier to modify models after they have been created. I'm trying to follow the advice on…
Marg
  • 183
  • 1
  • 1
  • 6
15
votes
4 answers

How do I exclude South migrations from Pylint?

I'm using South for migration in my Django project. When I run Pylint on my project I get a bunch of errors from the migration files. How can I exclude migration files from Pylint? I'm on a Windows system so I can't use filename exclusions in the…
Mridang Agarwalla
  • 43,201
  • 71
  • 221
  • 382
15
votes
3 answers

Can not create South database models in Django 1.7

Django 1.7 has built-in database migration mechanizm. However, I'd like to run South migrations for the ols third-party django apps. I failed to to 'syncdb' management command with Django 1.7 in order to create South…
Daria
  • 753
  • 7
  • 22
15
votes
3 answers

Django South Error: "there is no enabled application matching 'myapp'"

So, I finally gave in and grabbed South. The problem is, every time I try to follow the tutorial and run "python manage.py schemamigration myapp --initial" I get an error "There is no enabled application matching 'myapp'" --Things I have…
Dreadicon
  • 243
  • 2
  • 7
15
votes
4 answers

South migrate error: name 'UUID' is not defined

I have a model with a CharField field with a default value of uuid4: f = models.CharField(default=uuid4, max_length=36, unique=True, blank=True) and this is causing the following error: Cannot successfully create field 'f' for model 'm': name…
daveoncode
  • 18,900
  • 15
  • 104
  • 159
14
votes
4 answers

Can I combine schema and data (South) migrations into one?

I want to move the field honk and it's data from one model to another using South: class Foo(models.Model): foofield = models.CharField() honk = models.PositiveIntegerField() class Bar(models.Model): barfield = models.CharField() I've…
Ingmar Hupp
  • 2,409
  • 18
  • 22
14
votes
4 answers

How do I access auth User's User.objects.create_user(...) in a south migration?

Instead of using django's auth module I've used my own and already regret it a lot. In an effort to rectify the situation, I'm trying to migrate the data from my User model to django.auth.models.User. I've created a data migration as follows: def…
Gezim
  • 7,112
  • 10
  • 62
  • 98
14
votes
5 answers

There is no South database module 'south.db.postgresql_psycopg2' for your database

i new to django and I'm getting this error from south but i don't know what i'm missing. I search for answers but i can't found anything. There is no South database module 'south.db.postgresql_psycopg2' for your database. Please either choose a…
ferprez
  • 143
  • 1
  • 1
  • 6