mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +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:
@@ -10,11 +10,11 @@ In this example, a ``Category`` is related to itself. That is, each
|
||||
Set ``related_name`` to designate what the reverse relationship is called.
|
||||
"""
|
||||
|
||||
from django.core import meta
|
||||
from django.db import models
|
||||
|
||||
class Category(meta.Model):
|
||||
name = meta.CharField(maxlength=20)
|
||||
parent = meta.ForeignKey('self', null=True, related_name='child')
|
||||
class Category(models.Model):
|
||||
name = models.CharField(maxlength=20)
|
||||
parent = models.ForeignKey('self', null=True, related_name='child')
|
||||
|
||||
def __repr__(self):
|
||||
return self.name
|
||||
|
||||
Reference in New Issue
Block a user