-
Notifications
You must be signed in to change notification settings - Fork 0
Home
John Heasly edited this page Nov 19, 2017
·
13 revisions
loaddata auth.user.json
loaddata entity.json
(requires search & replace)
loaddata location.json
(requires search & replace)
loaddata munged_schedule_event.json
(output of json_transformer.py
)
- Get your
Schedule.Event
/Civic_calendar.Meeting
house in order by first doing thescripts/json_transformer.py
munge dance, as you may haveEntity
and/orLocation
data that references uncreated/non-existentSchedule.Event
and/orUser
. - Log in to
civic_calendar
on livedjango110
server, use Django utilitydumpdata
to export fullcivic_calendar
andschedule
apps.
$ python manage.py dumpdata schedule --format=json --indent=2 --settings=django_root.settings.production > schedule.json
$ python manage.py dumpdata civic_calendar --format=json --indent=2 --settings=django_root.settings.production > civic_calendar.json
- Copy
schedule.json
andcivic_calendar.json
tocivic_calendar2/scripts
directory, cd down tocivic_calendar2/scripts
and runjson_transformer.py
-
cd
up todjango_root
and useloaddata
to import the resultingmunged_schedule_event.json
file. - Still using
civic_calendar
on livedjango110
server, use Django utilitydumpdata
to exportEntity
,Location
model data. Probably won't need to exportJursidiction
(unless there's been a new city/town added).
$ python manage.py dumpdata civic_calendar.entity --format=json --indent=2 --settings=django_root.settings.production > civic_calendar.entity.json
$ python manage.py dumpdata civic_calendar.location --format=json --indent=2 --settings=django_root.settings.production > civic_calendar.location.json
- Search and replace
civic_calendar.entity
withcivic_calendar2.entity
. - Search and replace
civic_calendar.location
withcivic_calendar2.location
. -
loaddata
into yourdjango111
civic_calendar2
app.