mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-02 18:47:10 -05:00 
			
		
		
		
	Code clean up
This commit is contained in:
		
							parent
							
								
									05b7bcd199
								
							
						
					
					
						commit
						4386b09eb1
					
				@ -1,4 +1,4 @@
 | 
			
		||||
class Renderable(object):
 | 
			
		||||
class Renderable:
 | 
			
		||||
    """
 | 
			
		||||
    A handy mixin to make it easier/cleaner to print output based on a
 | 
			
		||||
    verbosity value.
 | 
			
		||||
 | 
			
		||||
@ -92,11 +92,11 @@ MIDDLEWARE_CLASSES = [
 | 
			
		||||
    'django.middleware.clickjacking.XFrameOptionsMiddleware',
 | 
			
		||||
]
 | 
			
		||||
 | 
			
		||||
#If AUTH is disabled, we just use our "bypass" authentication middleware
 | 
			
		||||
# If auth is disabled, we just use our "bypass" authentication middleware
 | 
			
		||||
if bool(os.getenv("PAPERLESS_DISABLE_LOGIN", "false").lower() in ("yes", "y", "1", "t", "true")):
 | 
			
		||||
    _index = MIDDLEWARE_CLASSES.index('django.contrib.auth.middleware.AuthenticationMiddleware')
 | 
			
		||||
    MIDDLEWARE_CLASSES[_index] = 'paperless.middleware.Middleware'
 | 
			
		||||
    MIDDLEWARE_CLASSES.remove('django.contrib.auth.middleware.SessionAuthenticationMiddleware')
 | 
			
		||||
    _index = MIDDLEWARE_CLASSES.index("django.contrib.auth.middleware.AuthenticationMiddleware")
 | 
			
		||||
    MIDDLEWARE_CLASSES[_index] = "paperless.middleware.Middleware"
 | 
			
		||||
    MIDDLEWARE_CLASSES.remove("django.contrib.auth.middleware.SessionAuthenticationMiddleware")
 | 
			
		||||
 | 
			
		||||
ROOT_URLCONF = 'paperless.urls'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user