What is the correct way to upgrade django?


#1

While trying to upgrade django [sudo pip install django] i receive the following errors. Anyone an idea what is going wrong?

*** Error compiling ‘/tmp/pip_build_root/django/django/conf/app_template/apps.py’…
File “/tmp/pip_build_root/django/django/conf/app_template/apps.py”, line 1
{{ unicode_literals }}from django.apps import AppConfig
^
SyntaxError: invalid syntax

*** Error compiling ‘/tmp/pip_build_root/django/django/conf/app_template/models.py’…
File “/tmp/pip_build_root/django/django/conf/app_template/models.py”, line 1
{{ unicode_literals }}from django.db import models
^
SyntaxError: invalid syntax


Django doesn't run
#2

Hey @orbmkruger :slightly_smiling:,

Did you use the Django Workspace template when you made your workspace?
What do you get when you do django-admin --version ?

Best,
Mike
:alien:


#3

hi @mikeumus

thank you for your reply. figured out that this is a django1.9 installation bug, as described in your attached document. how ever i’m still facing issues within django (admin not login not working), already try’ed to create a new superuser. no result.

thought it could have something to do with how i upgrade to python3 within , as when i run the app locally no issues arise.

Cheres,
Olivier


#4

You’re welcome @orbmkruger,

When I work with Django in C9 I keep Python 2.7 but that hopefully isn’t the issue. You’re running the app with python ./manage.py runserver $IP:$PORT :question:

Is your project open, if so if you don’t mind sharing the link to the workspace? :link: :hand: