mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-10-31 02:27:10 -04:00 
			
		
		
		
	Fix redirect for subpaths (hopefully)
This commit is contained in:
		
							parent
							
								
									4386b09eb1
								
							
						
					
					
						commit
						4585308e7f
					
				| @ -1,6 +1,7 @@ | |||||||
| from django.conf import settings | from django.conf import settings | ||||||
| from django.conf.urls import include, static, url | from django.conf.urls import include, static, url | ||||||
| from django.contrib import admin | from django.contrib import admin | ||||||
|  | from django.urls import reverse_lazy | ||||||
| from django.views.decorators.csrf import csrf_exempt | from django.views.decorators.csrf import csrf_exempt | ||||||
| from django.views.generic import RedirectView | from django.views.generic import RedirectView | ||||||
| from rest_framework.routers import DefaultRouter | from rest_framework.routers import DefaultRouter | ||||||
| @ -45,7 +46,8 @@ urlpatterns = [ | |||||||
|     url(r"admin/", admin.site.urls), |     url(r"admin/", admin.site.urls), | ||||||
| 
 | 
 | ||||||
|     # Redirect / to /admin |     # Redirect / to /admin | ||||||
|     url(r"^$", RedirectView.as_view(permanent=True, url="/admin/")), |     url(r"^$", RedirectView.as_view( | ||||||
|  |         permanent=True, url=reverse_lazy("admin:index"))), | ||||||
| 
 | 
 | ||||||
| ] + static.static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) | ] + static.static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user