Rafał Pitoń 10 лет назад
Родитель
Сommit
32a88dd551
2 измененных файлов с 3 добавлено и 3 удалено
  1. 1 1
      misago/admin/views/__init__.py
  2. 2 2
      misago/users/middleware.py

+ 1 - 1
misago/admin/views/__init__.py

@@ -14,7 +14,7 @@ def get_protected_namespace(request):
     for namespace in settings.MISAGO_ADMIN_NAMESPACES:
         try:
             admin_path = reverse('%s:index' % namespace)
-            if request.path.startswith(admin_path):
+            if request.path_info.startswith(admin_path):
                 return namespace
         except NoReverseMatch:
             pass

+ 2 - 2
misago/users/middleware.py

@@ -19,9 +19,9 @@ class RealIPMiddleware(object):
 
 class AvatarServerMiddleware(object):
     def process_request(self, request):
-        if request.path.startswith(settings.MISAGO_AVATAR_SERVER_PATH):
+        if request.path_info.startswith(settings.MISAGO_AVATAR_SERVER_PATH):
             request.user = DjAnonymousUser()
-            resolved_path = resolve(request.path)
+            resolved_path = resolve(request.path_info)
             return resolved_path.func(request, **resolved_path.kwargs)