Compatibility with different session backend + admin layout
This commit is contained in:
		
							
								
								
									
										11
									
								
								cas_server/management/commands/cas_clean_sessions.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								cas_server/management/commands/cas_clean_sessions.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
			
		||||
from django.core.management.base import BaseCommand, CommandError
 | 
			
		||||
from django.utils.translation import ugettext_lazy as _
 | 
			
		||||
 | 
			
		||||
from ... import models
 | 
			
		||||
 | 
			
		||||
class Command(BaseCommand):
 | 
			
		||||
    args = ''
 | 
			
		||||
    help = _(u"Clean deleted sessions")
 | 
			
		||||
 | 
			
		||||
    def handle(self, *args, **options):
 | 
			
		||||
        models.User.clean_deleted_sessions()
 | 
			
		||||
		Reference in New Issue
	
	Block a user