[Python-modules-commits] [python-django] 01/01: Add django-migrate-south script.
Brian May
bam at moszumanska.debian.org
Tue Sep 16 01:36:05 UTC 2014
This is an automated email from the git hooks/post-receive script.
bam pushed a commit to branch debian/experimental
in repository python-django.
commit 873609a8e1093edfe2b4698a0b428dbe37dc9cea
Author: Brian May <brian at microcomaustralia.com.au>
Date: Tue Sep 16 10:48:10 2014 +1000
Add django-migrate-south script.
---
debian/django-migrate-south | 14 ++++++++++++++
debian/python-django-common.install | 1 +
debian/python-django.NEWS | 17 +++++++++++++----
3 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/debian/django-migrate-south b/debian/django-migrate-south
new file mode 100755
index 0000000..55de901
--- /dev/null
+++ b/debian/django-migrate-south
@@ -0,0 +1,14 @@
+#!/bin/sh
+set -e
+
+TMPDIR=$(mktemp -d)
+trap "rm -rf -- '$TMPDIR'" EXIT HUP INT TERM
+
+virtualenv --system-site-packages "$TMPDIR"
+. "$TMPDIR/bin/activate"
+
+pip install django==1.6.5
+pip install south
+
+CMD="$(command -v django-admin)"
+python "$CMD" migrate "$@"
diff --git a/debian/python-django-common.install b/debian/python-django-common.install
index 34bcb77..9393d4e 100644
--- a/debian/python-django-common.install
+++ b/debian/python-django-common.install
@@ -1,2 +1,3 @@
debian/django-admin usr/bin/
+debian/django-migrate-south usr/bin/
extras/django_bash_completion etc/bash_completion.d/
diff --git a/debian/python-django.NEWS b/debian/python-django.NEWS
index b153701..311b15f 100644
--- a/debian/python-django.NEWS
+++ b/debian/python-django.NEWS
@@ -2,10 +2,19 @@ python-django (1.7-1) unstable; urgency=medium
Django 1.7 has a new feature to handle database schema upgrade called
"migrations" which is incompatible with South (provided by
- python-django-south in Debian). If you have Django applications using
- South, make sure that you have applied all migrations prior to the
- upgrade (alternatively you can use a virtualenv running Django 1.6
- to run those migrations after the upgrade).
+ python-django-south in Debian).
+
+ If you have Django applications using South, you will need to install Django
+ 1.6 to run pending migrations. This *must* be done first before running any
+ Django 1.7 migrations.
+
+ There is a script included with this package to automate the task of
+ installing Django 1.6 and south into a virtualenv and running the migrations.
+
+ apt-get install virtualenv
+ django-migrate-south --settings app.settings
+
+ Replace app.settings with the settings module your app uses.
Django 1.7 comes with many new features and some backwards incompatible
changes. They are well documented in the Django documentation:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-django.git
More information about the Python-modules-commits
mailing list