 8c64de92f4
			
		
	
	8c64de92f4
	
	
	
		
			
			The default Django User model PK is an int() AutoField and django-openstack-auth sets this to a hash string. Django then breaks trying to coerce that string to an int(). This patch adds a new explicit PK to the d-o-a User model. It also adds the standard Django "models.py" so that the consumer application (Horizon) may use it. The consumer application must set: AUTH_USER_MODEL = 'openstack_auth.User' to use the new model in place of the default 'auth.User'. The approach in this patch was inspired by Lin Hua Cheng <os.lcheng@gmail.com>. Partial-Bug: 1491117 Change-Id: I549209eb0bb0ddf36d92ee9dc1a9bac799ce67e5
		
			
				
	
	
		
			16 lines
		
	
	
		
			651 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			651 B
		
	
	
	
		
			Python
		
	
	
	
	
	
| # Licensed under the Apache License, Version 2.0 (the "License");
 | |
| # you may not use this file except in compliance with the License.
 | |
| # You may obtain a copy of the License at
 | |
| #
 | |
| #    http://www.apache.org/licenses/LICENSE-2.0
 | |
| #
 | |
| # Unless required by applicable law or agreed to in writing, software
 | |
| # distributed under the License is distributed on an "AS IS" BASIS,
 | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 | |
| # implied.
 | |
| # See the License for the specific language governing permissions and
 | |
| # limitations under the License.
 | |
| 
 | |
| # import the User model in here so Django can find it
 | |
| from openstack_auth.user import User        # noqa
 |