~ubuntu-branches/ubuntu/saucy/python-django/saucy-updates

« back to all changes in this revision

Viewing changes to tests/regressiontests/comment_tests/models.py

  • Committer: Package Import Robot
  • Author(s): Luke Faraone, Jakub Wilk, Luke Faraone
  • Date: 2013-05-09 15:10:47 UTC
  • mfrom: (1.1.21) (4.4.27 sid)
  • Revision ID: package-import@ubuntu.com-20130509151047-aqv8d71oj9wvcv8c
Tags: 1.5.1-2
[ Jakub Wilk ]
* Use canonical URIs for Vcs-* fields.

[ Luke Faraone ]
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
more information.
4
4
"""
5
5
 
 
6
from __future__ import unicode_literals
 
7
 
6
8
from django.db import models
7
 
 
8
 
 
 
9
from django.utils.encoding import python_2_unicode_compatible
 
10
 
 
11
 
 
12
@python_2_unicode_compatible
9
13
class Author(models.Model):
10
14
    first_name = models.CharField(max_length=30)
11
15
    last_name = models.CharField(max_length=30)
13
17
    def __str__(self):
14
18
        return '%s %s' % (self.first_name, self.last_name)
15
19
 
 
20
@python_2_unicode_compatible
16
21
class Article(models.Model):
17
22
    author = models.ForeignKey(Author)
18
23
    headline = models.CharField(max_length=100)
20
25
    def __str__(self):
21
26
        return self.headline
22
27
 
 
28
@python_2_unicode_compatible
23
29
class Entry(models.Model):
24
30
    title = models.CharField(max_length=250)
25
31
    body = models.TextField()