Re: [Django] #32605: Custom Middleware Error ====> WSGI application '.wsgi.application' could not be loaded; Error importing module.

2021-03-30 Thread Django
#32605: Custom Middleware Error > WSGI application
'.wsgi.application' could not be loaded; Error importing
module.
-+-
 Reporter:  alimp5   |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Core (System |  Version:  3.1
  checks)|
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  Middleware, WSGI-| Triage Stage:
  Error, Windows, Django3.1  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * resolution:  fixed => invalid


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.8876bb220eacdebdd3c97014eea49761%40djangoproject.com.


Re: [Django] #32605: Custom Middleware Error ====> WSGI application '.wsgi.application' could not be loaded; Error importing module.

2021-03-30 Thread Django
#32605: Custom Middleware Error > WSGI application
'.wsgi.application' could not be loaded; Error importing
module.
-+-
 Reporter:  alimp5   |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Core (System |  Version:  3.1
  checks)|
 Severity:  Normal   |   Resolution:  fixed
 Keywords:  Middleware, WSGI-| Triage Stage:
  Error, Windows, Django3.1  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by alimp5):

 * resolution:  invalid => fixed


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.5afb979493df0b49983032107f356fc6%40djangoproject.com.


Re: [Django] #32605: Custom Middleware Error ====> WSGI application '.wsgi.application' could not be loaded; Error importing module.

2021-03-30 Thread Django
#32605: Custom Middleware Error > WSGI application
'.wsgi.application' could not be loaded; Error importing
module.
-+-
 Reporter:  alimp5   |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Core (System |  Version:  3.1
  checks)|
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  Middleware, WSGI-| Triage Stage:
  Error, Windows, Django3.1  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by alimp5):

 # FROM:
 {{{
 MIDDLEWARE = [
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',

 'coffehouse.utils.middleware.CoffehouseMiddleware',<===
 ]

 }}}


  TO:
 {{{
 MIDDLEWARE = [
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',

 'coffehouse.utils.middleware.CoffehouseMiddleware.CoffehouseMiddleware',
 <===
 ]

 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.2cb6ebea66276e4f18c75fc595ed3608%40djangoproject.com.


Re: [Django] #32605: Custom Middleware Error ====> WSGI application '.wsgi.application' could not be loaded; Error importing module.

2021-03-30 Thread Django
#32605: Custom Middleware Error > WSGI application
'.wsgi.application' could not be loaded; Error importing
module.
-+-
 Reporter:  alimp5   |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Core (System |  Version:  3.1
  checks)|
 Severity:  Normal   |   Resolution:  invalid
 Keywords:  Middleware, WSGI-| Triage Stage:
  Error, Windows, Django3.1  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Mariusz Felisiak):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 Please don't use Trac as a support channel. Closing per
 TicketClosingReasons/UseSupportChannels.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.f7bb3586ebd04c2aefe567c82cd7594f%40djangoproject.com.


Re: [Django] #32605: Custom Middleware Error ====> WSGI application '.wsgi.application' could not be loaded; Error importing module.

2021-03-30 Thread Django
#32605: Custom Middleware Error > WSGI application
'.wsgi.application' could not be loaded; Error importing
module.
-+-
 Reporter:  alimp5   |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Core (System |  Version:  3.1
  checks)|
 Severity:  Normal   |   Resolution:
 Keywords:  Middleware, WSGI-| Triage Stage:
  Error, Windows, Django3.1  |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by alimp5):

 * Attachment "errors for debugging.txt" added.


-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.df6753cc5a1a653f5c7f310f942b4b5b%40djangoproject.com.


[Django] #32605: Custom Middleware Error ====> WSGI application '.wsgi.application' could not be loaded; Error importing module.

2021-03-30 Thread Django
#32605: Custom Middleware Error > WSGI application
'.wsgi.application' could not be loaded; Error importing
module.
-+-
   Reporter:  alimp5 |  Owner:  nobody
   Type: | Status:  new
  Uncategorized  |
  Component:  Core   |Version:  3.1
  (System checks)|   Keywords:  Middleware, WSGI-
   Severity:  Normal |  Error, Windows, Django3.1
   Triage Stage: |  Has patch:  0
  Unreviewed |
Needs documentation:  0  |Needs tests:  0
Patch needs improvement:  0  |  Easy pickings:  0
  UI/UX:  0  |
-+-
 Greetings

 Django: 3.1.7
 OS: Windows 10 - 64 bit
 Python: 3.8.6 - 64 bit

 Project Name: coffehouse
 App Names: about, stores, coffe_app

 I was creating a custom middleware for my django project. And after adding
 the path of middleware file to settings.py file (in MIDDLEWARE variable),
 I got error below:

 {{{
 raise ImproperlyConfigured(
 django.core.exceptions.ImproperlyConfigured: WSGI application
 'coffehouse.wsgi.application' could not be loaded; Error importing module.
 }}}


  settings.py:

 {{{
 INSTALLED_APPS = [
 'coffe_app.apps.CoffeAppConfig',
 'stores',
 'about',

 'django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 ]

 MIDDLEWARE = [
 'django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',

 'coffehouse.utils.middleware.CoffehouseMiddleware',<===
 ]

 }}}

  coffehouse\coffehouse\utils\middleware\CoffehouseMiddleware.py:

 {{{
 class CoffehouseMiddleware (object):
 def __init__(self, get_response):
 self.get_response = get_response

 def __call__(self, request):
 response = self.get_response (request)
 return response

 def process_view (self, request, view_func, view_args, view_kwargs):
 pass

 def process_exception (self, request, exception):
 pass

 def process_template_response (self, request, response):
 pass
 }}}


  wsgi.py:

 {{{
 import os
 from django.core.wsgi import get_wsgi_application
 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'coffehouse.settings')
 application = get_wsgi_application()
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.5b9a8603c05d5df3de662e50838f2b7b%40djangoproject.com.