You wrote: P/ APP2/ middlewares.py -> MyMiddleware And then: 'P.APP2.middlewares.ProfileMiddleware',
MyMiddleware != ProfileMiddleware Is it right? On 13 янв, 13:53, Grindizer <[EMAIL PROTECTED]> wrote: > Hello. > > I have one project let say P, > In this project i define several applications, APP1, APP2, APP3 > > In INSTALLED_APPS of my settings i add those application with full > name, > ("P.APP1", "P.APP2", etc.) > > and all was working fine. (Admin interface and front end). > > After i wrote a middleware class for APP2, i put it in midllewares.py > on APP2 directory. > so i have: > P/ > APP2/ > middlewares.py -> MyMiddleware > > i add then this class to MIDDLEWARE_CLASSES in settings.py, using the > full path. > so i have: > > MIDDLEWARE_CLASSES = ( > 'django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware', > 'django.middleware.doc.XViewMiddleware', > 'django.middleware.transaction.TransactionMiddleware', > 'P.APP2.middlewares.ProfileMiddleware', > ) > > But with this APP2 doesn't appear in Admin Interface (but still work > fine ( as it should) in the front end ). > APP1, APP2 still appear in admin interface but not APP2. > > I tried to trace the problem, and finally found that if i remove the > project name from the middleware class, APP2 appear in the admin > interface > have something like this: > MIDDLEWARE_CLASSES = ( > 'django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware', > 'django.middleware.doc.XViewMiddleware', > 'django.middleware.transaction.TransactionMiddleware', > 'APP2.middlewares.ProfileMiddleware', > ) > > it very strange, i think it is a problem with models import (not > really sure), and I wasn't able to go further. > > PS: > I use mod_python, and django development version. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---