1 # -*- encoding: utf-8 -*-
2 from django
.db
import models
3 from django
.utils
.translation
import ugettext_lazy
as _
4 from cms
.models
.pluginmodel
import CMSPlugin
7 class 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'),
14 thanks
= models
.CharField(
15 _('Message displayed on successful submit'),
17 submit
= models
.CharField(
18 _('Submit button value'),
22 def __unicode__(self
):
23 return self
.site_email
26 class VideoPlugin(CMSPlugin
):
27 titre
= models
.CharField(max_length
=250)
28 video
= models
.TextField(
31 verbose_name
='Code de la vidéo')
32 description
= models
.TextField(
35 verbose_name
='Description de la vidéo')
37 def __unicode__(self
):
40 def copy_relations(self
, oldinstance
):
41 self
.sections
= oldinstance
.sections
.all()