Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better examples2 #326

Merged
merged 2 commits into from Jul 14, 2013
Merged

Better examples2 #326

merged 2 commits into from Jul 14, 2013

Conversation

bootandy
Copy link
Contributor

@bootandy bootandy commented Jul 9, 2013

Provide sample code for 'example' blog project.

If no blog entries then root of webapp shows same HTML as before.
Else web app will look like a vanilla blogging application with links to Admin and Admin2 on the bottom

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 5477b7a on bootandy:better_examples2 into c545912 on twoscoops:develop.

@@ -21,7 +21,7 @@ class Meta:


class Comment(models.Model):
post = models.ForeignKey(Post, verbose_name=_('post'))
post = models.ForeignKey(Post, verbose_name=_('post'), related_name="comments")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is related_name working now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I had to regenerate the POST request data for the tests, then it
worked fine. I didn't realize adding related_name would have that effect.

andy

On 13 July 2013 11:16, Daniel Greenfeld notifications@github.com wrote:

In example/blog/models.py:

@@ -21,7 +21,7 @@ class Meta:

class Comment(models.Model):

  • post = models.ForeignKey(Post, verbose_name=_('post'))
  • post = models.ForeignKey(Post, verbose_name=_('post'), related_name="comments")

Is related_name working now?


Reply to this email directly or view it on GitHubhttps://github.com//pull/326/files#r5179072
.

andy,
www.nuclearcarrot.com

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\o/ Great work! 💯

@pydanny pydanny merged commit 5477b7a into jazzband:develop Jul 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants