diff --git a/cfp/models.py b/cfp/models.py index 03469e8..943f653 100644 --- a/cfp/models.py +++ b/cfp/models.py @@ -40,6 +40,10 @@ class Conference(models.Model): venue = models.TextField(blank=True, default="") city = models.CharField(max_length=64, blank=True, default="") contact_email = models.CharField(max_length=100, blank=True) + + custom_css = models.TextField(blank=True) + external_css_link = models.URLField(blank=True) + #subscriptions_open = models.BooleanField(default=False) # workshop subscription #def cfp_is_open(self): @@ -62,23 +66,27 @@ class Conference(models.Model): class Participant(PonyConfModel): - #LICENCES = IntEnum('Video licence', 'CC-Zero CC-BY CC-BY-SA CC-BY-ND CC-BY-NC CC-BY-NC-SA CC-BY-NC-ND') - site = models.ForeignKey(Site, on_delete=models.CASCADE) - name = models.CharField(max_length=128, blank=True) + name = models.CharField(max_length=128, verbose_name=_('Your Name')) email = models.EmailField() - phone_number = models.CharField(max_length=16, blank=True, default='', verbose_name=_('Phone number')) - biography = models.TextField(blank=True, verbose_name=_('Biography')) + biography = models.TextField(verbose_name=_('Biography')) token = models.UUIDField(default=uuid.uuid4, editable=False) - # TALK - #videotaped = models.BooleanField(_("I'm ok to be recorded on video"), default=True) - #video_licence = models.IntegerField(choices=enum_to_choices(LICENCES), default=2, verbose_name=_("Video licence")) - #sound = models.BooleanField(_("I need sound"), default=False) + twitter = models.CharField(max_length=100, blank=True, default='', verbose_name=_('Twitter')) + linkedin = models.CharField(max_length=100, blank=True, default='', verbose_name=_('LinkedIn')) + github = models.CharField(max_length=100, blank=True, default='', verbose_name=_('Github')) + website = models.CharField(max_length=100, blank=True, default='', verbose_name=_('Website')) + facebook = models.CharField(max_length=100, blank=True, default='', verbose_name=_('Facebook')) + mastodon = models.CharField(max_length=100, blank=True, default='', verbose_name=_('Mastodon')) + + phone_number = models.CharField(max_length=64, blank=True, default='', verbose_name=_('Phone number')) + + language = models.CharField(max_length=10, blank=True) notes = models.TextField(default='', blank=True, verbose_name=_("Notes"), help_text=_('This field is only visible by organizers.')) + vip = models.BooleanField(default=False) class Meta: @@ -223,10 +231,10 @@ class Talk(PonyConfModel): title = models.CharField(max_length=128, verbose_name=_('Talk Title')) slug = AutoSlugField(populate_from='title', unique=True) #abstract = models.CharField(max_length=255, blank=True, verbose_name=_('Abstract')) - description = models.TextField(blank=True, verbose_name=_('Description of your talk')) + description = models.TextField(verbose_name=_('Description of your talk')) track = models.ForeignKey(Track, blank=True, null=True, verbose_name=_('Track')) notes = models.TextField(blank=True, verbose_name=_('Message to organizers'), help_text=_('If you have any constraint or if you have anything that may help you to select your talk, like a video or slides of your talk, please write it down here')) - category = models.ForeignKey(TalkCategory, blank=True, null=True, verbose_name=_('Talk Category')) + category = models.ForeignKey(TalkCategory, verbose_name=_('Talk Category')) videotaped = models.BooleanField(_("I'm ok to be recorded on video"), default=True) video_licence = models.CharField(choices=LICENCES, default='CC-BY-SA', max_length=10, verbose_name=_("Video licence")) sound = models.BooleanField(_("I need sound"), default=False) diff --git a/cfp/urls.py b/cfp/urls.py index f9da443..f173afb 100644 --- a/cfp/urls.py +++ b/cfp/urls.py @@ -5,7 +5,7 @@ from . import views urlpatterns = [ url(r'^$', views.talk_proposal, name='talk-proposal'), url(r'^(?P[\w\-]+)/speaker/add/$', views.talk_proposal_speaker_edit, name='talk-proposal-speaker-add'), - url(r'^(?P[\w\-]+)/speaker/(?P[\w\-]+)/$', views.talk_proposal_speaker_edit, name='talk-proposal-speaker-edit'), + url(r'^(?P[\w\-]+)/speaker/(?P[\w\-]+)/$', views.talk_proposal_speaker_edit, name='talk-proposal-speaker-edit'), url(r'^(?P[\w\-]+)/(?P[\w\-]+)/$', views.talk_proposal, name='talk-proposal-edit'), #url(r'^markdown/$', views.markdown_preview, name='markdown'), #url(r'^$', views.home, name='home'), diff --git a/cfp/views.py b/cfp/views.py index 6a921b6..13745d8 100644 --- a/cfp/views.py +++ b/cfp/views.py @@ -33,6 +33,7 @@ def talk_proposal(request, talk_id=None, participant_id=None): participant, created = Participant.objects.get_or_create(email=participant_form.cleaned_data['email'], site=site) participant_form = ParticipantForm(request.POST, instance=participant) participant = participant_form.save() + participant.language = request.LANGUAGE_CODE participant.save() talk.save() @@ -50,7 +51,7 @@ Your talk has been submitted for {}. Here are the details of your talk: Title: {} -Description {} +Description: {} You can at anytime: - edit your talk: {} diff --git a/ponyconf/templates/_base.html b/ponyconf/templates/_base.html index fa47fb3..df528dc 100644 --- a/ponyconf/templates/_base.html +++ b/ponyconf/templates/_base.html @@ -16,6 +16,10 @@ {% block js %}{% endblock %} + {% if site.conference.external_css_link %} + + {% endif %} +