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