mirror of
https://github.com/jazzband/django-admin2.git
synced 2026-04-18 05:41:04 +00:00
Merge pull request #38 from audreyr/master
Give unicode methods to models in example project
This commit is contained in:
commit
5e7c9df2e0
6 changed files with 41 additions and 0 deletions
7
djadmin2/templates/admin2/bootstrap/model_add_form.html
Normal file
7
djadmin2/templates/admin2/bootstrap/model_add_form.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
TODO
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
TODO
|
||||
|
||||
{% endblock content %}
|
||||
7
djadmin2/templates/admin2/bootstrap/model_detail.html
Normal file
7
djadmin2/templates/admin2/bootstrap/model_detail.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
TODO
|
||||
|
||||
{% endblock content %}
|
||||
7
djadmin2/templates/admin2/bootstrap/model_edit_form.html
Normal file
7
djadmin2/templates/admin2/bootstrap/model_edit_form.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
TODO
|
||||
|
||||
{% endblock content %}
|
||||
7
djadmin2/templates/admin2/bootstrap/model_list.html
Normal file
7
djadmin2/templates/admin2/bootstrap/model_list.html
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
TODO
|
||||
|
||||
{% endblock content %}
|
||||
|
|
@ -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
|
||||
Loading…
Reference in a new issue