mirror of
https://github.com/Hopiu/django.git
synced 2026-04-08 17:11:06 +00:00
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15286 bcc190cf-cafb-0310-a4f2-bffc1f526a37
9 lines
284 B
Python
9 lines
284 B
Python
from django.db import models
|
|
from django.contrib import admin
|
|
|
|
class Parent(models.Model):
|
|
name = models.CharField(max_length=128)
|
|
|
|
class Child(models.Model):
|
|
parent = models.ForeignKey(Parent, editable=False, null=True)
|
|
name = models.CharField(max_length=30, blank=True)
|