archives: correction du texte pour Amélie
[auf_framonde.git] / project / contact / models.py
... / ...
CommitLineData
1# -*- encoding: utf-8 -*-
2from django.db import models
3from django.utils.translation import ugettext_lazy as _
4from cms.models.pluginmodel import CMSPlugin
5
6
7class Contact(CMSPlugin):
8 site_email = models.EmailField(_('Email reciepient'))
9 email_label = models.CharField(_('Email sender label'), max_length=100)
10 subject_label = models.CharField(_('Subject label'), max_length=200)
11 content_label = models.CharField(
12 _('Message content label'),
13 max_length=100)
14 thanks = models.CharField(
15 _('Message displayed on successful submit'),
16 max_length=200)
17 submit = models.CharField(
18 _('Submit button value'),
19 blank=True,
20 max_length=30)
21
22 def __unicode__(self):
23 return self.site_email
24
25
26class VideoPlugin(CMSPlugin):
27 titre = models.CharField(max_length=250)
28 video = models.TextField(
29 null=True,
30 blank=True,
31 verbose_name='Code de la vidéo')
32 description = models.TextField(
33 null=True,
34 blank=True,
35 verbose_name='Description de la vidéo')
36
37 def __unicode__(self):
38 return self.titre
39
40 def copy_relations(self, oldinstance):
41 self.sections = oldinstance.sections.all()