mirror of
				https://github.com/django/django.git
				synced 2025-10-31 09:41:08 +00:00 
			
		
		
		
	magic-removal: Moved django.core.meta to django.db.models
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@1631 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
		| @@ -7,12 +7,12 @@ which are other ``Person`` objects. | ||||
| Set ``related_name`` to designate what the reverse relationship is called. | ||||
| """ | ||||
|  | ||||
| from django.core import meta | ||||
| from django.db import models | ||||
|  | ||||
| class Person(meta.Model): | ||||
|     full_name = meta.CharField(maxlength=20) | ||||
|     mother = meta.ForeignKey('self', null=True, related_name='mothers_child') | ||||
|     father = meta.ForeignKey('self', null=True, related_name='fathers_child') | ||||
| class Person(models.Model): | ||||
|     full_name = models.CharField(maxlength=20) | ||||
|     mother = models.ForeignKey('self', null=True, related_name='mothers_child') | ||||
|     father = models.ForeignKey('self', null=True, related_name='fathers_child') | ||||
|  | ||||
|     def __repr__(self): | ||||
|         return self.full_name | ||||
|   | ||||
		Reference in New Issue
	
	Block a user