/usr/share/pyshared/markupfield/tests/models.py is in python-django-markupfield 1.2.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from markupfield.fields import MarkupField
@python_2_unicode_compatible
class Post(models.Model):
title = models.CharField(max_length=50)
body = MarkupField('body of post')
comment = MarkupField(escape_html=True, default_markup_type='markdown')
def __str__(self):
return self.title
class Article(models.Model):
normal_field = MarkupField()
markup_choices_field = MarkupField(markup_choices=(
('pandamarkup', lambda x: 'panda'),
('nomarkup', lambda x: x)))
default_field = MarkupField(default_markup_type='markdown')
markdown_field = MarkupField(markup_type='markdown')
class Abstract(models.Model):
content = MarkupField()
class Meta:
abstract = True
class Concrete(Abstract):
pass
|