File: models.py

package info (click to toggle)
django-haystack 2.8.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 2,220 kB
  • sloc: python: 15,512; xml: 1,708; makefile: 71; sh: 45
file content (21 lines) | stat: -rw-r--r-- 449 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# encoding: utf-8

from __future__ import absolute_import, division, print_function, unicode_literals

from django.db import models


class Foo(models.Model):
    title = models.CharField(max_length=255)
    body = models.TextField()

    def __unicode__(self):
        return self.title


class Bar(models.Model):
    author = models.CharField(max_length=255)
    content = models.TextField()

    def __unicode__(self):
        return self.author