17

I started a new project a few months back using Django 1.7. The company has decided to settle on using Django 1.6 for all projects.

Is there a nice way to downgrade from Django 1.7 to 1.6?

Are migrations the only thing I have to worry about? Are the changes between the two versions large enough that I need to rewrite the app? I was hoping to just change the version in the requirements.txt and then install south and create new database migrations.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • Oh, that's interesting. Is your company going to use this version forever? – mik01aj Dec 08 '14 at 14:21
  • The only major change I can recall being introduced in 1.7 is the database migrations functionality (which you can still use by using south). Scan the 1.6-1.7 changelog and see if your app uses anything new. If it doesn't, it should be as simple as installing 1.6 instead of 1.7. – Colonel Thirty Two Dec 08 '14 at 14:23
  • 3
    Your company should bear in mind that the Django project does *not* intend to support 1.6 on a long-term basis, so security fixes will not be backported once 1.8 is released. 1.4 was the last LTS release, and 1.8 will be the next. – Daniel Roseman Dec 08 '14 at 14:28
  • @DanielRoseman you're suggesting that new Django projects should always use the latest version? I checked out Mozilla and they seem to be stuck on 1.6 –  Dec 08 '14 at 15:19
  • 1
    No, not suggesting that at all, just that you should bear in mind the consequences of such a decision, especially considering 1.6 is nearing end-of-life. – Daniel Roseman Dec 08 '14 at 15:27
  • 4
    you should really tell your company's IT about `virtualenv`. – ch3ka Dec 08 '14 at 16:08
  • type `pip install Django==1.6` on your terminal – MD. Thuaha Hadi May 31 '22 at 08:58

4 Answers4

43

Use:

sudo pip install Django==1.6.10
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Telmo Dias
  • 3,938
  • 2
  • 36
  • 48
2

You should check the Django release notes for 1.7. Just doing what you propose should be enough, but check if you are using things that changed in that log. That is project specific.

Community
  • 1
  • 1
cdvv7788
  • 2,021
  • 1
  • 18
  • 26
2

For Windows:

pip install -U Django==required version

You will have to make changes to the original suite sub-folder.

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Shardul
  • 51
  • 3
0

pip install Django==1.6 in CMD