Closed Elthan closed 5 years ago
Tried to upgrade our test server (similar environment to production) to master
, and it seems we should add django-allauth
(alongside psycopg2
) to requirements/production.txt
:
$ venv/bin/python manage.py migrate
Traceback (most recent call last):
File "manage.py", line 7, in <module>
execute_from_command_line(argv)
File "/trix/developement/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/trix/developement/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 338, in execute
django.setup()
File "/trix/developement/venv/lib/python3.6/site-packages/django/__init__.py", line 27, in setup
apps.populate(settings.INSTALLED_APPS)
File "/trix/developement/venv/lib/python3.6/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/trix/developement/venv/lib/python3.6/site-packages/django/apps/config.py", line 94, in create
module = import_module(entry)
File "/trix/developement/venv/lib64/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'allauth'
Unfortunately, migrate
still fails with all dependencies installed:
Traceback (most recent call last):
File "manage.py", line 7, in <module>
execute_from_command_line(argv)
File "/trix/developement/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 364, in execute_from_command_line
utility.execute()
File "/trix/developement/venv/lib/python3.6/site-packages/django/core/management/__init__.py", line 356, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/trix/developement/venv/lib/python3.6/site-packages/django/core/management/base.py", line 283, in run_from_argv
self.execute(*args, **cmd_options)
File "/trix/developement/venv/lib/python3.6/site-packages/django/core/management/base.py", line 327, in execute
self.check()
File "/trix/developement/venv/lib/python3.6/site-packages/django/core/management/base.py", line 359, in check
include_deployment_checks=include_deployment_checks,
File "/trix/developement/venv/lib/python3.6/site-packages/django/core/management/commands/migrate.py", line 62, in _run_checks
issues.extend(super(Command, self)._run_checks(**kwargs))
File "/trix/developement/venv/lib/python3.6/site-packages/django/core/management/base.py", line 346, in _run_checks
return checks.run_checks(**kwargs)
File "/trix/developement/venv/lib/python3.6/site-packages/django/core/checks/registry.py", line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/trix/developement/venv/lib/python3.6/site-packages/django/core/checks/urls.py", line 16, in check_url_config
return check_resolver(resolver)
File "/trix/developement/venv/lib/python3.6/site-packages/django/core/checks/urls.py", line 26, in check_resolver
return check_method()
File "/trix/developement/venv/lib/python3.6/site-packages/django/urls/resolvers.py", line 256, in check
for pattern in self.url_patterns:
File "/trix/developement/venv/lib/python3.6/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/trix/developement/venv/lib/python3.6/site-packages/django/urls/resolvers.py", line 407, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/trix/developement/venv/lib/python3.6/site-packages/django/utils/functional.py", line 35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/trix/developement/venv/lib/python3.6/site-packages/django/urls/resolvers.py", line 400, in urlconf_module
return import_module(self.urlconf_name)
File "/trix/developement/venv/lib64/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/trix/developement/venv/lib/python3.6/site-packages/trix/project/production/urls.py", line 1, in <module>
from trix.project.default.default_urls import default_urls
File "/trix/developement/venv/lib/python3.6/site-packages/trix/project/default/default_urls.py", line 9, in <module>
url(r'^authenticate/', include('trix.trix_auth.urls')),
File "/trix/developement/venv/lib/python3.6/site-packages/django/conf/urls/__init__.py", line 50, in include
urlconf_module = import_module(urlconf_module)
File "/trix/developement/venv/lib64/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/trix/developement/venv/lib/python3.6/site-packages/trix/trix_auth/urls.py", line 4, in <module>
from trix.trix_auth.views import allauth_views, login
ModuleNotFoundError: No module named 'trix.trix_auth.views'
@Elthan: could the issue be as simple as trix_auth/views
is missing a __init__.py
file? :thinking:
Probably, let's try.
@Elthan: got it running, but login raises a server error due to the template trix_auth/login.django.html
not existing.
It looks like the template does exist at trix/trix_auth/templates/trix_auth/login.django.html
so I guess it's rather an issue with some sort of redirecting to it?
It looks like the template does exist at
trix/trix_auth/templates/trix_auth/login.django.html
so I guess it's rather an issue with some sort of redirecting to it?
Made the beta release 3.0.0b1
today to do more controlled testing (still an issue there). I guess that makes it easier to reproduce in your end?
Using
django-allauth
I have added the option to use Dataporten instead of normal login. Should close #88 - though extensive testing should be performed of course.