Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for python3 is needed #5

Open
ManPython opened this issue Jan 4, 2020 · 0 comments
Open

Support for python3 is needed #5

ManPython opened this issue Jan 4, 2020 · 0 comments

Comments

@ManPython
Copy link

ManPython commented Jan 4, 2020

@saxix Do you planing update the django-site-maintenance?

 File "E:\Python36\lib\site-packages\django\core\servers\basehttp.py", line 45, in get_internal_wsgi_appl
ication
    return import_string(app_path)
  File "E:\Python36\lib\site-packages\django\utils\module_loading.py", line 17, in import_string
    module = import_module(module_path)
  File "E:\Python36\lib\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 "E:\django\_app\wsgi.py", line 17, in <module>
    application = get_wsgi_application()
  File "E:\Python36\lib\site-packages\django\core\wsgi.py", line 13, in get_wsgi_application
    return WSGIHandler()
  File "E:\Python36\lib\site-packages\django\core\handlers\wsgi.py", line 135, in __init__
    self.load_middleware()
  File "E:\Python36\lib\site-packages\django\core\handlers\base.py", line 35, in load_middleware
    middleware = import_string(middleware_path)
  File "E:\Python36\lib\site-packages\django\utils\module_loading.py", line 17, in import_string
    module = import_module(module_path)
  File "E:\Python36\lib\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 "E:\Python36\lib\site-packages\maintenance\middleware.py", line 3, in <module>
    from django.utils.importlib import import_module
ModuleNotFoundError: No module named 'django.utils.importlib'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "E:\Python36\lib\threading.py", line 916, in _bootstrap_inner
    self.run()
  File "E:\Python36\lib\threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "E:\Python36\lib\site-packages\django\utils\autoreload.py", line 54, in wrapper
    fn(*args, **kwargs)
  File "E:\Python36\lib\site-packages\django\core\management\commands\runserver.py", line 137, in inner_ru
n
    handler = self.get_handler(*args, **options)
  File "E:\Python36\lib\site-packages\django\contrib\staticfiles\management\commands\runserver.py", line 2
7, in get_handler
    handler = super().get_handler(*args, **options)
  File "E:\Python36\lib\site-packages\django\core\management\commands\runserver.py", line 64, in get_handl
er
    return get_internal_wsgi_application()
  File "E:\Python36\lib\site-packages\django\core\servers\basehttp.py", line 50, in get_internal_wsgi_appl
ication
    ) from err
django.core.exceptions.ImproperlyConfigured: WSGI application '_app.wsgi.application' could not be loaded; Error importing module.

E:\django\_app\settings.py changed, reloading.
Watching for file changes with StatReloader
Performing system checks...

api.py #59

print("Active sessions detected. Waiting for logout. (Session timeout set to {} secs) ").format(SESSION_COOKIE_AGE)
                        print("Type double ^C to stop")
                        sys.stdout.write(
                            "%s pending sessions. %s (%d sec)\r" % (users, C[rounds % 2], round(time.time() - _start)))

Want sugesst to migrate as django-site-maintenance-2 including idea from:
https://github.com/alsoicode/django-maintenancemode-2
I mind the turn off by httacess is ok, but we need as phase 1 but we need phase 2 to test that all is ok as staff user only, then allow for all users.
It can be good to include in this the rest-framework as some maintenance/api.html (outpu as json "maintenace mode") and admin.html site.html other.html

@ManPython ManPython changed the title Suppoert for python3 is needed Support for python3 is needed Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant