diff --git a/example/blog/models.py b/example/blog/models.py index ee43fd9..7222041 100644 --- a/example/blog/models.py +++ b/example/blog/models.py @@ -21,7 +21,7 @@ class Post(models.Model): class Comment(models.Model): - post = models.ForeignKey(Post, verbose_name=_('post')) + post = models.ForeignKey(Post, verbose_name=_('post'), related_name="comments") body = models.TextField(verbose_name=_('body')) def __unicode__(self): diff --git a/example/blog/templates/blog/blog_detail.html b/example/blog/templates/blog/blog_detail.html new file mode 100644 index 0000000..56956a6 --- /dev/null +++ b/example/blog/templates/blog/blog_detail.html @@ -0,0 +1,54 @@ +{% extends "base.html" %} +{% load staticfiles %} + +{% block content %} +
+ {{ post.body }} +
+ +Unpublished - publish it in admin2
+ {% endif %} +
+
+
+ Powered by django.contrib.admin. This is just here for reference.
++ {{ post.body }} +
+ {% else %} +Unpublished - publish it in admin2
+ {% endif %} + {% empty %} +Pretend that this is the homepage of a big Django site.
+ +Imagine lots of things are here:
+In other words, these are items that we can introspect through the Django admin.
+ +Now, explore the Django admin for example.com. Click on either of the following:
+ {% endfor %} + +
+
+
+ Powered by django.contrib.admin. This is just here for reference.
+