mirror of
https://github.com/django/django.git
synced 2025-10-26 23:26:08 +00:00
Remove a handful of import * from the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16973 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -4,16 +4,17 @@
|
||||
Strings can be used instead of model literals to set up "lazy" relations.
|
||||
"""
|
||||
|
||||
from django.db.models import *
|
||||
from django.db import models
|
||||
|
||||
class Parent(Model):
|
||||
name = CharField(max_length=100)
|
||||
|
||||
class Parent(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
|
||||
# Use a simple string for forward declarations.
|
||||
bestchild = ForeignKey("Child", null=True, related_name="favoured_by")
|
||||
bestchild = models.ForeignKey("Child", null=True, related_name="favoured_by")
|
||||
|
||||
class Child(Model):
|
||||
name = CharField(max_length=100)
|
||||
class Child(models.Model):
|
||||
name = models.CharField(max_length=100)
|
||||
|
||||
# You can also explicitally specify the related app.
|
||||
parent = ForeignKey("mutually_referential.Parent")
|
||||
parent = models.ForeignKey("mutually_referential.Parent")
|
||||
|
||||
Reference in New Issue
Block a user