Saturday, August 7, 2021

Django Migration Error - '%s=%s' % (k, v) for k, v in params.items(),

Django Migration Error :

  File "/home/pavi/ldap/lib/python3.8/site-packages/django/contrib/admin/__init__.py", line 4, in <module>
    from django.contrib.admin.filters import (
  File "/home/pavi/ldap/lib/python3.8/site-packages/django/contrib/admin/filters.py", line 10, in <module>
    from django.contrib.admin.options import IncorrectLookupParameters
  File "/home/pavi/ldap/lib/python3.8/site-packages/django/contrib/admin/options.py", line 12, in <module>
    from django.contrib.admin import helpers, widgets
  File "/home/pavi/ldap/lib/python3.8/site-packages/django/contrib/admin/widgets.py", line 151
    '%s=%s' % (k, v) for k, v in params.items(),

Solution :

Update file at line number 151

Add the Parenthesis
  File "/home/pavi/ldap/lib/python3.8/site-packages/django/contrib/admin/widgets.py", line 151

('%s=%s' % (k, v) for k, v in params.items()),

Postman Error : The requested URL /upload/drive/v3/files was not found on this server. That’s all we know.

Error : The requested URL /upload/drive/v3/files was not found on this server. That’s all we know. 

Solution :

The issue is in the Headers section.
Add always default header Host, Do not skip it while sending the request.

Django sqlite Migration error

Error : django.db.utils.OperationalError: no such table: main.auth_user__old

Solution :
Do not use Django 2.0.0 with sqlite database. The issue is fixed in later versions of Django.
Django 2.1.5 does not have this error.

pip install django==2.1.5