Questions tagged [django-upgrade]

28 questions
43
votes
1 answer

django.core.servers.basehttp.FileWrapper disappears in Django 1.9

I am migrating from django 1.8 to 1.9. and I got the following error: ImportError: cannot import name 'FileWrapper' I import it as follow: from django.core.servers.basehttp import FileWrapper Searching this name in django 1.9 release notes gives…
albar
  • 3,020
  • 1
  • 14
  • 27
4
votes
0 answers

"CSRF Failed: CSRF cookie not set after" Django upgrade

I've made a Django upgrade from 1.7.5 to 1.11.15. I'm also using Django Rest Framework verion 3.3.2. After this all PUT/POST (probably DELETE too) requests are denied with 403 Status code and message : {"detail":"CSRF Failed: CSRF cookie not…
klaus johan
  • 4,370
  • 10
  • 39
  • 56
4
votes
1 answer

Running python manage.py test gives "Maximum Recursion Depth reached" error

So I have a django project which was built on 1.6.5 and now I'm migrating it to 1.9.5. I successfully migrated it to 1.7.0 and then to 1.8.0. When doing so from 1.8.0 to 1.9.0, I had to replace SortedDict by collections.OrderedDict. Now I'm…
Priyansh Agrawal
  • 330
  • 2
  • 19
3
votes
3 answers

How can i fix the error Uncaught ReferenceError: addEvent is not defined

After changing my python and Django version I came up with the error of Uncaught ReferenceError: addEvent is not defined. The error took place at my DateTimeShortcuts.js file. The code raising the error is: addEvent(window, 'load',…
gtopal
  • 544
  • 1
  • 9
  • 35
2
votes
2 answers

Upgrading to Django 4.0.1 from Django 3.2.10 - "got both positional and keyword arguments for field" error message

I'm trying to update a Django project from version 3.2.10 to 4.0.1 When running the tests, I'm getting this error: File "/Users/akira/Projects/work/speedy/cash_flow/jobs/bank_account/process_flinks_transactions_job.py", line 63, in __init__ …
akira
  • 432
  • 3
  • 8
2
votes
2 answers

command error after start project in django

After upgrading my django from 1.8 to 1.10, when i start a project(django-admin startproject lwc) there is an error: CommandError: C:\Python34\binesh\lwc\lwc\settings.py already exists, overlaying a project or app into an existing directory won't…
fatemeh
  • 41
  • 3
1
vote
1 answer

Upgrade Django with incompatible migrations

I'm tasked with upgrading the Django version for a project that currently uses Django 2.2.24. It contains a model (with existing migrations) that looks roughly like this: class Membership(models.Model): person = models.ForeignKey(Person,…
1
vote
1 answer

Can't login in Django project after switching to django 3 and return to django 2

I have a Django 2.2 project that runs in a bunch of different servers, but they use the same database. I've created a branch to migrate to Django 3, but not all servers will be migrated at the same time. I use Argon2: #…
equalium
  • 1,241
  • 2
  • 12
  • 18
1
vote
0 answers

Why am I seeing message for Unapplied Migration(s) after Upgrading Django from 2.0 to 2.2

I upgraded Django from version 2.0 to 2.2. The upgrade completed without any issue. However trying to start the server issues the following message: Watching for file changes with StatReloader Performing system checks... System check identified no…
shaan
  • 351
  • 2
  • 15
1
vote
1 answer

Django 2.0.13 -> 2.1 upgrade causes std library function to not find module (AttributeError)

Upgrading Django 2.0.13 -> 2.1.0 (or greater) causes the following error when calling runserver, migrate etc. On Django 2.0.13 (and any lower) does not throw this error. Traceback (most recent call last): File…
Levi
  • 141
  • 1
  • 9
1
vote
1 answer

Django upgrade from 1.8 to 1.9 is breaking on model import in init

I have run into the same problem that @JohnnyQ has commented on here. My __init__.py is referring to multiple imports that in-turn are referring to models and these are required. The code works perfectly fine with django 1.8.x but breaks when Django…
1
vote
0 answers

NoReverseMatch at /admin/ error after upgrading Django

After I upgraded my Django project from 1.8 to 2.0, I try to log into the admin page, and receive this error message. I am able to see the login page, other links of the admin like "http://159.203.172.178/admin/QI/page/", but I can't see the first…
S.Xia
  • 35
  • 5
1
vote
1 answer

Django version upgrade 1.7 to 1.8 - content type issue

While upgrading django version from 1.7 to 1.8, I got a new migration called 0002_remove_content_type_name, after that I migrated that file, then I run my project, after that, it shows below error. (1054, "Unknown column 'django_content_type.name'…
Sekar Raj
  • 113
  • 1
  • 1
  • 11
1
vote
1 answer

AttributeError: model object has no attribute 'rel'

In django 1.9 I used this custom MultilingualCharField, then I upgrade to django 2.0 and it give error at runserver: class MultilingualCharField(models.CharField): def __init__(self, verbose_name=None, **kwargs): self._blank =…
fabio
  • 1,210
  • 2
  • 26
  • 55
0
votes
0 answers

Is there any auxiliary tool or a quick way to upgrade django 3.0.5 to django 4.x?

My project is built from Django 3.0.5, and now the system is very large. If I want to upgrade to Django 4.x, I will encounter many problems. Are there people who have encountered such troubles like me? so I wonder if anyone has a solution?
JayHung
  • 159
  • 1
  • 6
1
2