Merge pull request #38 from audreyr/master

Give unicode methods to models in example project
This commit is contained in:
Daniel Greenfeld 2013-05-18 04:51:32 -07:00
commit 5e7c9df2e0
6 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,7 @@
{% extends "admin/base.html" %}
{% block content %}
TODO
{% endblock content %}

View file

@ -0,0 +1,7 @@
{% extends "admin/base.html" %}
{% block content %}
TODO
{% endblock content %}

View file

@ -0,0 +1,7 @@
{% extends "admin/base.html" %}
{% block content %}
TODO
{% endblock content %}

View file

@ -0,0 +1,7 @@
{% extends "admin/base.html" %}
{% block content %}
TODO
{% endblock content %}

View file

@ -0,0 +1,7 @@
{% extends "admin/base.html" %}
{% block content %}
TODO
{% endblock content %}

View file

@ -4,6 +4,12 @@ class Post(models.Model):
title = models.CharField(max_length=255)
body = models.TextField()
def __unicode__(self):
return self.title
class Comment(models.Model):
post = models.ForeignKey(Post)
body = models.TextField()
def __unicode__(self):
return self.body