dostałem do upgrade aplikację Django, działającą w pythonie 2.7 i django 1.8.19, użyłem pyugrade i django upgrade, poczytałem trochę o zależnościach, zainstalowałem je w nowym środowisku wirtualnym i próbuję uruchomić serwer django, niestety się nie udaje, dostaję błąd:
Exception in thread django-main-thread:
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/tomek/www/upgraded2/app/env-upg/lib/python3.10/site-packages/django/utils/autoreload.py", line 64, in wrapper
fn(*args, **kwargs)
File "/home/tomek/www/upgraded2/app/env-upg/lib/python3.10/site-packages/django/core/management/commands/runserver.py", line 118, in inner_run
self.check(display_num_errors=True)
File "/home/tomek/www/upgraded2/app/env-upg/lib/python3.10/site-packages/django/core/management/base.py", line 419, in check
all_issues = checks.run_checks(
File "/home/tomek/www/upgraded2/app/env-upg/lib/python3.10/site-packages/django/core/checks/registry.py", line 76, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/home/tomek/www/upgraded2/app/env-upg/lib/python3.10/site-packages/django/core/checks/urls.py", line 40, in check_url_namespaces_unique
all_namespaces = _load_all_namespaces(resolver)
File "/home/tomek/www/upgraded2/app/env-upg/lib/python3.10/site-packages/django/core/checks/urls.py", line 57, in _load_all_namespaces
url_patterns = getattr(resolver, 'url_patterns', [])
File "/home/tomek/www/upgraded2/app/env-upg/lib/python3.10/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/tomek/www/upgraded2/app/env-upg/lib/python3.10/site-packages/django/urls/resolvers.py", line 602, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/home/tomek/www/upgraded2/app/env-upg/lib/python3.10/site-packages/django/utils/functional.py", line 48, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/home/tomek/www/upgraded2/app/env-upg/lib/python3.10/site-packages/django/urls/resolvers.py", line 595, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/home/tomek/www/upgraded2/app/epaszport/urls.py", line 7, in <module>
from cmms.api import *
File "/home/tomek/www/upgraded2/app/cmms/api.py", line 5, in <module>
from cmms.models import Genre, Make, Device, Mileage, Ticket, Service
File "/home/tomek/www/upgraded2/app/cmms/models.py", line 17, in <module>
from crm.models import Invoice, Contractor, Location, CostCentre, Hospital, UserProfile
File "/home/tomek/www/upgraded2/app/crm/models.py", line 6, in <module>
from django.contrib.auth.models import AbstractUser
File "/home/tomek/www/upgraded2/app/env-upg/lib/python3.10/site-packages/django/contrib/auth/models.py", line 5, in <module>
from django.contrib.contenttypes.models import ContentType
File "/home/tomek/www/upgraded2/app/env-upg/lib/python3.10/site-packages/django/contrib/contenttypes/models.py", line 133, in <module>
class ContentType(models.Model):
File "/home/tomek/www/upgraded2/app/env-upg/lib/python3.10/site-packages/django/db/models/base.py", line 113, in __new__
raise RuntimeError(
RuntimeError: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
W INSTALLED_APPS oczywiście mam django.contrib.contenttype,:
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django_comments',
'django.contrib.staticfiles',
'django.contrib.contenttypes',
'crm.apps.CrmConfig',
'guardian',
'cmms.apps.CmmsConfig',
'tastypie',
'dane.apps.DaneConfig',
'utils.apps.CoursesConfig',
'kombu.transport',
'django_extensions',
'wkhtmltopdf',
'ckeditor',
'csvimport.app.CSVImportConf',
'reminders.apps.RemindersConfig',
'simple_history',
'sendfile',
'data_import.apps.DataImportConfig',
]
próbowałem wszystkiego co znalazłem w sieci, pytałem chata GPT, niestety nic nie dało, pycharm nic nie podkreśla... w virtuaenv mam pythona 3.10 i odpowiednio dobrane requirementsy... Ktoś jest mnie w stanie naprowadzić?