Skip to content

Commit

Permalink
Merge pull request #155 from MarkusH/lazy-fk-reference
Browse files Browse the repository at this point in the history
Use lazy evaluated ForeignKey references to prevent future problems
  • Loading branch information
olasitarska committed Nov 5, 2014
2 parents 590e606 + 3f53aa9 commit f371d52
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions django_models/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,9 @@ Let's open `blog/models.py`, remove everything from it and write code like this:

from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User

class Post(models.Model):
author = models.ForeignKey(User)
author = models.ForeignKey('auth.User')
title = models.CharField(max_length=200)
text = models.TextField()
created_date = models.DateTimeField(
Expand Down

0 comments on commit f371d52

Please sign in to comment.