Update testing fixtures to add admin users
This allows testing deployments to have accounts that can log in as admin.
This commit is contained in:
		
							parent
							
								
									71a612baa4
								
							
						
					
					
						commit
						855c71eaca
					
				
					 3 changed files with 70 additions and 1 deletions
				
			
		
							
								
								
									
										12
									
								
								README.rst
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								README.rst
									
										
									
									
									
								
							|  | @ -87,7 +87,17 @@ Base Data | |||
| On initial creation and whenever you reset the database you must reload the | ||||
| basic data. This data is stored in the /fixtures directory. You can load this with: | ||||
| 
 | ||||
| ``./manage.py loaddata ./fixtures/*.json`` | ||||
| ``./manage.py loaddata ./fixtures/{conference,proposal_base,sites,sitetree}.json`` | ||||
| 
 | ||||
| And to load the base admin users: | ||||
| 
 | ||||
| ``./manage.py loaddata ./fixtures/admin_users.json`` | ||||
| 
 | ||||
| admin1:Inq4JVQyQvWnqXDI | ||||
| 
 | ||||
| admin2:w0jYMJsM4S+1zHds | ||||
| 
 | ||||
| admin3:XzynbNH9Sw3pLPXe | ||||
| 
 | ||||
| Creating review permissions objects | ||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||
|  |  | |||
|  | @ -3,5 +3,8 @@ | |||
| /usr/local/bin/python /app/symposion_app/manage.py migrate | ||||
| /usr/local/bin/python /app/symposion_app/manage.py loaddata /app/symposion_app/fixtures/conference.json /app/symposion_app/fixtures/proposal_base.json /app/symposion_app/fixtures/sites.json /app/symposion_app/fixtures/sitetree.json | ||||
| /usr/local/bin/python /app/symposion_app/manage.py populate_inventory | ||||
| if [ $DATABASE_URL == "sqlite:////tmp/symposion.sqlite" ]; then | ||||
|     /usr/local/bin/python /app/symposion_app/manage.py loaddata /app/symposion_app/fixtures/admin_users.json | ||||
| fi | ||||
| 
 | ||||
| exec /usr/local/bin/uwsgi --http-socket 0.0.0.0:8000 --wsgi-file pinaxcon/wsgi.py | ||||
|  |  | |||
							
								
								
									
										56
									
								
								fixtures/admin_users.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								fixtures/admin_users.json
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,56 @@ | |||
| [ | ||||
|     { | ||||
|         "model": "auth.user", | ||||
|         "pk": 1, | ||||
|         "fields": { | ||||
|             "password": "pbkdf2_sha256$36000$MR4vF1x1RYpz$LybSUxFYJqWrPI4VkFHc2fY18y609vY/2NvEijCY5oo=", | ||||
|             "last_login": null, | ||||
|             "is_superuser": true, | ||||
|             "username": "admin1", | ||||
|             "first_name": "", | ||||
|             "last_name": "", | ||||
|             "email": "admin1@example.com", | ||||
|             "is_staff": true, | ||||
|             "is_active": true, | ||||
|             "date_joined": "2017-08-16T04:15:23.716Z", | ||||
|             "groups": [], | ||||
|             "user_permissions": [] | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "model": "auth.user", | ||||
|         "pk": 2, | ||||
|         "fields": { | ||||
|             "password": "pbkdf2_sha256$36000$COHwScAAXg7Y$jx7+CBDHgaaIzJ7SIR0HV2cYHDI9kJzpugumbSjKmLo=", | ||||
|             "last_login": null, | ||||
|             "is_superuser": true, | ||||
|             "username": "admin2", | ||||
|             "first_name": "", | ||||
|             "last_name": "", | ||||
|             "email": "admin2@example.com", | ||||
|             "is_staff": true, | ||||
|             "is_active": true, | ||||
|             "date_joined": "2017-08-16T04:15:39.342Z", | ||||
|             "groups": [], | ||||
|             "user_permissions": [] | ||||
|         } | ||||
|     }, | ||||
|     { | ||||
|         "model": "auth.user", | ||||
|         "pk": 3, | ||||
|         "fields": { | ||||
|             "password": "pbkdf2_sha256$36000$hpkXv3kvaNqK$TvGw5pT1uXTRvMlWdjkiSuRe/leZK+5jGADpyBj3fic=", | ||||
|             "last_login": null, | ||||
|             "is_superuser": true, | ||||
|             "username": "admin3", | ||||
|             "first_name": "", | ||||
|             "last_name": "", | ||||
|             "email": "admin3@example.com", | ||||
|             "is_staff": true, | ||||
|             "is_active": true, | ||||
|             "date_joined": "2017-08-16T04:15:55.150Z", | ||||
|             "groups": [], | ||||
|             "user_permissions": [] | ||||
|         } | ||||
|     } | ||||
| ] | ||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Sachi King
						Sachi King