Fix (nebyla definována metoda handle)
https://stackoverflow.com/questions/43107630/from-django-core-management-base-import-noargscommand-commanderror-importerror
This commit is contained in:
		
							parent
							
								
									6d9c2ea021
								
							
						
					
					
						commit
						d4317ae9f2
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		|  | @ -11,7 +11,7 @@ class Command(BaseCommand): | |||
|     uložen v cookie sessionid) a pokud session existuje a příslušný přihlášený | ||||
|     uživatel má právo přihlásit se do admina, vypíše jeho username. | ||||
|     """ | ||||
|     def handle_noargs(self, **options): | ||||
|     def handle(self, *args, **options): | ||||
|         session_key = raw_input() | ||||
|         s = Session.objects.get(pk=session_key).get_decoded() | ||||
|         user_id = s['_auth_user_id'] | ||||
|  |  | |||
|  | @ -17,7 +17,7 @@ User = django.contrib.auth.get_user_model() | |||
| class Command(BaseCommand): | ||||
|     help = "Clear database and load testing data." | ||||
| 
 | ||||
|     def handle_noargs(self, **options): | ||||
|     def handle(self, *args, **options): | ||||
|         assert settings.DEBUG == True | ||||
|         dbfile = settings.DATABASES['default']['NAME'] | ||||
|         if os.path.exists(dbfile): | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 LEdoian
						LEdoian