How To Upgrade Django To Specific Version Based On Exist Project

1. Question.

As the article title said, every Django version upgrade on exist project need a lot of re-install and re-compile. That make too much trouble. Is there any easy way to do it?

2. Answer 1.

  1. First use pip freeze to export current python library to file a.
  2. Then install the exported library in new machine with command pip install -r a.
  3. When the process complete, python issue should be fixed.

3. Answer 2.

  1. You can open a terminal and try pip install Django --upgrade to fix your issue.
  2. What python library do you install and compile on your machine?
  3. Django provides a running environment, if your code do not has problems, then you can upgrade and install it directly.
  4. Large version upgrades may have compatibility problems. The new version of Django maybe discard some functions. So it is recommended that you first test it locally, when test passed then deploy it to production environment.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.