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

« back to all changes in this revision

Viewing changes to tests/modeltests/prefetch_related/models.py

  • Committer: Package Import Robot
  • Author(s): Luke Faraone
  • Date: 2013-08-13 16:49:39 UTC
  • mfrom: (1.3.9)
  • mto: This revision was merged to the branch mainline in revision 47.
  • Revision ID: package-import@ubuntu.com-20130813164939-irlkd7hokvcgocfl
Tags: upstream-1.5.2
ImportĀ upstreamĀ versionĀ 1.5.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
 
196
196
    class Meta:
197
197
        ordering = ['id']
 
198
 
 
199
 
 
200
### Ticket 19607
 
201
 
 
202
@python_2_unicode_compatible
 
203
class LessonEntry(models.Model):
 
204
    name1 = models.CharField(max_length=200)
 
205
    name2 = models.CharField(max_length=200)
 
206
 
 
207
    def __str__(self):
 
208
        return "%s %s" % (self.name1, self.name2)
 
209
 
 
210
 
 
211
@python_2_unicode_compatible
 
212
class WordEntry(models.Model):
 
213
    lesson_entry = models.ForeignKey(LessonEntry)
 
214
    name = models.CharField(max_length=200)
 
215
 
 
216
    def __str__(self):
 
217
        return "%s (%s)" % (self.name, self.id)