mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	Removed 'to_field' from ForeignKey(settings.AUTH_USER_MODEL) in admin's initial migration.
This enables using a custom user model with a primary key with a name different than 'id'; refs #22889.
This commit is contained in:
		| @@ -23,7 +23,7 @@ class Migration(migrations.Migration): | |||||||
|                 ('action_flag', models.PositiveSmallIntegerField(verbose_name='action flag')), |                 ('action_flag', models.PositiveSmallIntegerField(verbose_name='action flag')), | ||||||
|                 ('change_message', models.TextField(verbose_name='change message', blank=True)), |                 ('change_message', models.TextField(verbose_name='change message', blank=True)), | ||||||
|                 ('content_type', models.ForeignKey(to_field='id', blank=True, to='contenttypes.ContentType', null=True)), |                 ('content_type', models.ForeignKey(to_field='id', blank=True, to='contenttypes.ContentType', null=True)), | ||||||
|                 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL, to_field='id')), |                 ('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)), | ||||||
|             ], |             ], | ||||||
|             options={ |             options={ | ||||||
|                 'ordering': ('-action_time',), |                 'ordering': ('-action_time',), | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user