mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-16 09:46:31 +00:00
Initial updates required to run under django 2.2
- Change to middleware.py - Change some URLs formatting - Fix django version at 2.2
This commit is contained in:
@@ -14,7 +14,7 @@ class AuthRequiredMiddleware(object):
|
||||
|
||||
response = self.get_response(request)
|
||||
|
||||
if not request.user.is_authenticated():
|
||||
if not request.user.is_authenticated:
|
||||
print(request.path_info)
|
||||
|
||||
if not request.path_info == reverse_lazy('login'):
|
||||
|
@@ -48,8 +48,8 @@ urlpatterns = [
|
||||
|
||||
url(r'^auth/', include('rest_framework.urls', namespace='rest_framework')),
|
||||
|
||||
url(r'^login/', auth_views.login, name='login'),
|
||||
url(r'^logout/', auth_views.logout, {'template_name': 'registration/logout.html'}, name='logout'),
|
||||
url(r'^login/', auth_views.LoginView.as_view(), name='login'),
|
||||
url(r'^logout/', auth_views.LogoutView.as_view(template_name='registration/logout.html'), name='logout'),
|
||||
url(r'^admin/', admin.site.urls, name='inventree-admin'),
|
||||
|
||||
url(r'^index/', IndexView.as_view(), name='index'),
|
||||
|
Reference in New Issue
Block a user