Copy user table before anything else

- Legacy-Id: 3785
This commit is contained in:
Ole Laursen 2011-12-23 13:12:28 +00:00
parent 010ca9362e
commit aaee353493
2 changed files with 11 additions and 6 deletions

View file

@ -2,12 +2,13 @@
# basic dependencies
set -e
python import-reused-tables.py base
python import-persons.py
python import-states.py
python import-groups.py
python import-roles.py
python import-reused-tables.py
python import-reused-tables.py others
python import-meetings.py
python import-announcements.py
python import-docs.py

View file

@ -22,11 +22,15 @@ from ietf.ipr.models import IprSelecttype, IprLicensing, IprDetail, IprContact,
from ietf.submit.models import IdSubmissionStatus, IdSubmissionDetail, IdApprovedDetail, TempIdAuthors
from django.contrib.auth.models import User
models_to_copy = [Redirect, Suffix, Command,
TelechatAgendaItem, WGAction,
IprSelecttype, IprLicensing, IprDetail, IprContact, IprNotification, IprUpdate,
IdSubmissionStatus, IdSubmissionDetail, IdApprovedDetail, TempIdAuthors,
User]
known_models = {
'base': [User],
'others': [Redirect, Suffix, Command,
TelechatAgendaItem, WGAction,
IprSelecttype, IprLicensing, IprDetail, IprContact, IprNotification, IprUpdate,
IdSubmissionStatus, IdSubmissionDetail, IdApprovedDetail, TempIdAuthors]
}
models_to_copy = known_models[sys.argv[1]]
def queryset_chunks(q, n):
"""Split queryset q up in chunks of max size n."""