~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to privacy_policy/models.py

  • Committer: franku
  • Date: 2018-05-07 07:50:32 UTC
  • mto: This revision was merged to the branch mainline in revision 496.
  • Revision ID: somal@arcor.de-20180507075032-a04ywdyq0isvwy6f
Use a specialized conf.py and css for the website, so the widelands-repo isn't modified

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# -*- coding: utf-8 -*-
2
 
from __future__ import unicode_literals
3
 
 
4
 
from django.db import models
5
 
from django.urls import reverse
6
 
 
7
 
 
8
 
class PrivacyPolicy(models.Model):
9
 
 
10
 
    language = models.CharField(default='English', max_length=30,
11
 
                                help_text='Will be displayed as a level 1 header',
12
 
                                unique=True)
13
 
    policy_text = models.TextField(
14
 
        help_text='Text will be rendered using markdown syntax')
15
 
    slug = models.SlugField(unique=True)
16
 
 
17
 
    class Meta:
18
 
        ordering = ['language']
19
 
 
20
 
    def __unicode__(self):
21
 
        return self.language
22
 
    
23
 
    def get_absolute_url(self):
24
 
        return reverse('policy_translated', kwargs={'slug': self.slug})
 
 
b'\\ No newline at end of file'