move call for participation from template to the database, prepare to move call for sponsors in the same way. This commit means we will need to copy the content of the old templates to the prod db after deploy

This commit is contained in:
Thomas Steen Rasmussen 2018-05-25 14:27:53 +02:00
parent 157050d30e
commit eb807a6853
15 changed files with 97 additions and 258 deletions

View file

@ -0,0 +1,23 @@
# Generated by Django 2.0.4 on 2018-05-25 08:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('camps', '0026_auto_20180506_1633'),
]
operations = [
migrations.AddField(
model_name='camp',
name='call_for_participation',
field=models.TextField(blank=True, help_text='The CFP markdown for this Camp'),
),
migrations.AddField(
model_name='camp',
name='call_for_sponsors',
field=models.TextField(blank=True, help_text='The CFS markdown for this Camp'),
),
]

View file

@ -0,0 +1,23 @@
# Generated by Django 2.0.4 on 2018-05-25 08:25
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('camps', '0027_auto_20180525_1019'),
]
operations = [
migrations.AlterField(
model_name='camp',
name='call_for_participation',
field=models.TextField(blank=True, default='The Call For Participation for this Camp has not been written yet', help_text='The CFP markdown for this Camp'),
),
migrations.AlterField(
model_name='camp',
name='call_for_sponsors',
field=models.TextField(blank=True, default='The Call For Sponsors for this Camp has not been written yet', help_text='The CFS markdown for this Camp'),
),
]

View file

@ -70,11 +70,23 @@ class Camp(CreatedUpdatedModel, UUIDModel):
default=False, default=False,
) )
call_for_participation = models.TextField(
blank=True,
help_text='The CFP markdown for this Camp',
default='The Call For Participation for this Camp has not been written yet',
)
call_for_sponsors_open = models.BooleanField( call_for_sponsors_open = models.BooleanField(
help_text='Check if the Call for Sponsors is open for this camp', help_text='Check if the Call for Sponsors is open for this camp',
default=False, default=False,
) )
call_for_sponsors = models.TextField(
blank=True,
help_text='The CFS markdown for this Camp',
default='The Call For Sponsors for this Camp has not been written yet',
)
def get_absolute_url(self): def get_absolute_url(self):
return reverse('camp_detail', kwargs={'camp_slug': self.slug}) return reverse('camp_detail', kwargs={'camp_slug': self.slug})

View file

@ -1,56 +0,0 @@
{% extends 'program_base.html' %}
{% block title %}
Call for Speakers | {{ block.super }}
{% endblock %}
{% block program_content %}
{% if not camp.call_for_participation_open %}
<div class="alert alert-danger">
<strong>Note!</strong> This Call for Speakers is no longer relevant. It is kept here for historic purposes.
</div>
{% endif %}
<h2>BornHack 2016: Call for Speakers</h2>
<p>BornHack 2016 is a 7 days outdoor technology tent camping festival that will take place from the 27th of August to the 3rd of September 2016 on the island of Bornholm in Denmark. It is first time that BornHack will take place and it is our goal to make BornHack a yearly recurring event with 100 to 350 participants.</p>
<p>We are looking for gifted, entertaining and technically enlightening speakers to host talks, lightning talks and workshops at BornHack.</p>
<p>Please reach out to us on speakers@bornhack.dk with a title, abstract, biography, an optional picture of yourself and whether it is a regular talk, lightning talk, workshop or something entirely different. Please ensure that all information is in English. The submitted information will be published both as a news entry and in the official event program on our website, if the submission is accepted.</p>
<p>We are very open to different topics. We expect that the majority of the presentation at BornHack will be on security, networking, programming, distributed systems, privacy, and how these technologies relate to society.</p>
<p>The ticket shop for BornHack 2016 is already open and available at <a href="{% url 'shop:index' %}">https://bornhack.dk/shop/</a> - please make sure you have also read our <a href="{% url 'conduct' %}">Code of Conduct</a>.</p>
<h3>Regular Talk</h3>
<p>Regular talks are 45 minutes of presentation, 10 minutes of questions from the audience followed by 5 minutes of preparation for setting up the next speaker.</p>
<p>Please bring your own laptop with your presentation on; it should have an HDMI socket and we will provide the cable to the projector. We do not guarantee that audio will work, even if your laptop supports that.</p>
<p>We will provide you with a one-day entrance ticket free of charge, but due to our limited funds, you would have to pay for transportation to and from the event yourself. We also encourage you to participate for the entire week, but you would also have to pay for the ticket yourself.</p>
<h3>Lightning Talk</h3>
<p>Lightning talks are 10 minutes of presentation. A laptop will be connected to the projector at the location of the presentations.</p>
<p>A lightning talk is an excellent opportunity for inexperienced speakers to present a topic that you find interesting.</p>
<p>You MUST buy yourself an entrance ticket to host a lightning talk; we are unable to offer free tickets for everyone that gives a lightning talk.</p>
<h3>Workshop</h3>
<p>We have two workshop areas that will be able to host workshops for approximately 20 people per room. Workshops can be up to 3 hours per slot and can be extended for daily workshops.</p>
<p>You MUST buy yourself an entrance ticket to host a workshop; we are unable to offer free tickets for everyone that hosts a workshop.</p>
<h2>Contact Information</h2>
<p>The BornHack speakers team can be contacted via speakers@bornhack.dk - for general information reach out to the info team via info@bornhack.dk</p>
<p>We are also reachable via IRC in #BornHack on irc.baconsvin.org or 6nbtgccn5nbcodn3.onion - both listening for TLS connections on port 6697.</p>
<p>For more information, please have a look at <a href="{% url 'camp_detail' camp_slug='bornhack-2016' %}">https://bornhack.dk/</a> or follow us on Twitter at <a href="https://twitter.com/bornhax">@bornhax</a>.</p>
{% endblock %}

View file

@ -1,56 +0,0 @@
{% extends 'program_base.html' %}
{% block title %}
Call for Speakers | {{ block.super }}
{% endblock %}
{% block program_content %}
{% if not camp.call_for_speakers_open %}
<div class="alert alert-danger">
<strong>Note!</strong> This Call for Speakers is no longer relevant. It is kept here for historic purposes.
</div>
{% endif %}
<h2>BornHack 2016: Call for Speakers</h2>
<p>BornHack 2016 is a 7 days outdoor technology tent camping festival that will take place from the 27th of August to the 3rd of September 2016 on the island of Bornholm in Denmark. It is first time that BornHack will take place and it is our goal to make BornHack a yearly recurring event with 100 to 350 participants.</p>
<p>We are looking for gifted, entertaining and technically enlightening speakers to host talks, lightning talks and workshops at BornHack.</p>
<p>Please reach out to us on speakers@bornhack.dk with a title, abstract, biography, an optional picture of yourself and whether it is a regular talk, lightning talk, workshop or something entirely different. Please ensure that all information is in English. The submitted information will be published both as a news entry and in the official event program on our website, if the submission is accepted.</p>
<p>We are very open to different topics. We expect that the majority of the presentation at BornHack will be on security, networking, programming, distributed systems, privacy, and how these technologies relate to society.</p>
<p>The ticket shop for BornHack 2016 is already open and available at <a href="{% url 'shop:index' %}">https://bornhack.dk/shop/</a> - please make sure you have also read our <a href="{% url 'conduct' %}">Code of Conduct</a>.</p>
<h3>Regular Talk</h3>
<p>Regular talks are 45 minutes of presentation, 10 minutes of questions from the audience followed by 5 minutes of preparation for setting up the next speaker.</p>
<p>Please bring your own laptop with your presentation on; it should have an HDMI socket and we will provide the cable to the projector. We do not guarantee that audio will work, even if your laptop supports that.</p>
<p>We will provide you with a one-day entrance ticket free of charge, but due to our limited funds, you would have to pay for transportation to and from the event yourself. We also encourage you to participate for the entire week, but you would also have to pay for the ticket yourself.</p>
<h3>Lightning Talk</h3>
<p>Lightning talks are 10 minutes of presentation. A laptop will be connected to the projector at the location of the presentations.</p>
<p>A lightning talk is an excellent opportunity for inexperienced speakers to present a topic that you find interesting.</p>
<p>You MUST buy yourself an entrance ticket to host a lightning talk; we are unable to offer free tickets for everyone that gives a lightning talk.</p>
<h3>Workshop</h3>
<p>We have two workshop areas that will be able to host workshops for approximately 20 people per room. Workshops can be up to 3 hours per slot and can be extended for daily workshops.</p>
<p>You MUST buy yourself an entrance ticket to host a workshop; we are unable to offer free tickets for everyone that hosts a workshop.</p>
<h2>Contact Information</h2>
<p>The BornHack speakers team can be contacted via speakers@bornhack.dk - for general information reach out to the info team via info@bornhack.dk</p>
<p>We are also reachable via IRC in #BornHack on irc.baconsvin.org or 6nbtgccn5nbcodn3.onion - both listening for TLS connections on port 6697.</p>
<p>For more information, please have a look at <a href="{% url 'camp_detail' camp_slug='bornhack-2016' %}">https://bornhack.dk/</a> or follow us on Twitter at <a href="https://twitter.com/bornhax">@bornhax</a>.</p>
{% endblock %}

View file

@ -1,58 +0,0 @@
{% extends 'program_base.html' %}
{% block title %}
Call for Speakers | {{ block.super }}
{% endblock %}
{% block program_content %}
{% if not camp.call_for_participation_open %}
<div class="alert alert-danger">
<strong>Note!</strong> This Call for Speakers is no longer relevant. It is kept here for historic purposes.
</div>
{% endif %}
<h2>Call for Speakers</h2>
<p>We are looking for gifted, talented, humourous, technically enlightened speakers to host talks, lightning talks, and workshops at BornHack.</p>
<p>We are very open to different topics. We expect that the majority of the presentation at BornHack will be on security, networking, programming, distributed systems, privacy, and how these technologies relate to society.</p>
<p>BornHack is trying to be an inclusive event so please make sure you have read and understood our <a href="{% url 'conduct' %}">Code of Conduct</a>.</p>
<h3>Regular Talk</h3>
<p>Regular talks are 45 minutes of presentation, 10 minutes of questions from the audience followed by 5 minutes of preparation for setting up the next speaker.</p>
<p>Please bring your own laptop with your presentation on; it should have an ordinary HDMI output and we will provide the cable to the projector. We do not guarantee that audio will work, even if your laptop supports it - please reach out to us early if this is a requirement.</p>
<p>We will provide speakers with a one-day entrance ticket free of charge, but due to our limited funds, you would have to pay for transportation to and from the event yourself. We also encourage speakers to participate for the entire week, but you will have to pay for the full ticket yourself.</p>
<h3>Lightning Talk</h3>
<p>Lightning talks are 10 minutes of presentation. A laptop will be connected to the projector at the location of the presentations.</p>
<p>A lightning talk is an excellent opportunity for inexperienced speakers to share an interesting idea, presentation, or maybe just a small story.</p>
<p>You must buy an entrance ticket to host a lightning talk; we are unable to offer free tickets for lightning talks.</p>
<h3>Workshops</h3>
<p>We have two workshop areas that will be able to host workshops for approximately 20 people per room. Workshops can be up to 3 hours per slot and can be extended to full day workshops.</p>
<p>You must buy an entrance ticket to host a workshop; we are unable to offer free tickets for workshops.</p>
<h3>Submitting Content</h3>
<p>Please submit content for BornHack 2017 as early as possible. You can submit content via our website:</p>
<ol>
<li>Create a <a href="{% url 'account_signup' %}">user account</a> on the BornHack website</li>
<li>Visit <a href="{% url 'program:proposal_list' camp_slug='bornhack-2017' %}">the proposals page</a></li>
<li>Propose a new speaker</li>
<li>Propose a new event</li>
</ol>
<p>We will review incoming proposals and notify you as early as possible on whether the proposal was accepted or not. Proposals submitted before 1st of July will be notified by us no later than the 16th of July. Late submissions are welcome, but we might be running low on available slots at that time.</p>
<h3>Contact Information</h3>
<p>The BornHack content team can be reached at content@bornhack.dk - for general questions regarding the event please reach out to the info team at info@bornhack.dk</p>
<p>We are reachable via IRC in #BornHack on irc.baconsvin.org (6nbtgccn5nbcodn3.onion) on port 6697 with TLS, you can also follow us on Twitter at @bornhax.</p>
{% endblock %}

View file

@ -1,58 +0,0 @@
{% extends 'program_base.html' %}
{% block title %}
Call for Speakers | {{ block.super }}
{% endblock %}
{% block program_content %}
{% if not camp.call_for_speakers_open %}
<div class="alert alert-danger">
<strong>Note!</strong> This Call for Speakers is no longer relevant. It is kept here for historic purposes.
</div>
{% endif %}
<h2>Call for Speakers</h2>
<p>We are looking for gifted, talented, humourous, technically enlightened speakers to host talks, lightning talks, and workshops at BornHack.</p>
<p>We are very open to different topics. We expect that the majority of the presentation at BornHack will be on security, networking, programming, distributed systems, privacy, and how these technologies relate to society.</p>
<p>BornHack is trying to be an inclusive event so please make sure you have read and understood our <a href="{% url 'conduct' %}">Code of Conduct</a>.</p>
<h3>Regular Talk</h3>
<p>Regular talks are 45 minutes of presentation, 10 minutes of questions from the audience followed by 5 minutes of preparation for setting up the next speaker.</p>
<p>Please bring your own laptop with your presentation on; it should have an ordinary HDMI output and we will provide the cable to the projector. We do not guarantee that audio will work, even if your laptop supports it - please reach out to us early if this is a requirement.</p>
<p>We will provide speakers with a one-day entrance ticket free of charge, but due to our limited funds, you would have to pay for transportation to and from the event yourself. We also encourage speakers to participate for the entire week, but you will have to pay for the full ticket yourself.</p>
<h3>Lightning Talk</h3>
<p>Lightning talks are 10 minutes of presentation. A laptop will be connected to the projector at the location of the presentations.</p>
<p>A lightning talk is an excellent opportunity for inexperienced speakers to share an interesting idea, presentation, or maybe just a small story.</p>
<p>You must buy an entrance ticket to host a lightning talk; we are unable to offer free tickets for lightning talks.</p>
<h3>Workshops</h3>
<p>We have two workshop areas that will be able to host workshops for approximately 20 people per room. Workshops can be up to 3 hours per slot and can be extended to full day workshops.</p>
<p>You must buy an entrance ticket to host a workshop; we are unable to offer free tickets for workshops.</p>
<h3>Submitting Content</h3>
<p>Please submit content for BornHack 2017 as early as possible. You can submit content via our website:</p>
<ol>
<li>Create a <a href="{% url 'account_signup' %}">user account</a> on the BornHack website</li>
<li>Visit <a href="{% url 'proposal_list' camp_slug='bornhack-2017' %}">the proposals page</a></li>
<li>Propose a new speaker</li>
<li>Propose a new event</li>
</ol>
<p>We will review incoming proposals and notify you as early as possible on whether the proposal was accepted or not. Proposals submitted before 1st of July will be notified by us no later than the 16th of July. Late submissions are welcome, but we might be running low on available slots at that time.</p>
<h3>Contact Information</h3>
<p>The BornHack content team can be reached at content@bornhack.dk - for general questions regarding the event please reach out to the info team at info@bornhack.dk</p>
<p>We are reachable via IRC in #BornHack on irc.baconsvin.org (6nbtgccn5nbcodn3.onion) on port 6697 with TLS, you can also follow us on Twitter at @bornhax.</p>
{% endblock %}

View file

@ -1,11 +0,0 @@
{% extends 'program_base.html' %}
{% block title %}
Call for Participation | {{ block.super }}
{% endblock %}
{% block program_content %}
<h2>Call for Participation coming soon!</h2>
{% endblock %}

View file

@ -1,11 +0,0 @@
{% extends 'program_base.html' %}
{% block title %}
Call for Speakers | {{ block.super }}
{% endblock %}
{% block program_content %}
<h2>Call for Speakers coming eventually!</h2>
{% endblock %}

View file

@ -1 +0,0 @@
program/templates/bornhack-2019_call_for_speakers.html

View file

@ -1 +0,0 @@
program/templates/bornhack-2019_call_for_speakers.html

View file

@ -0,0 +1,17 @@
{% extends 'program_base.html' %}
{% block title %}
Call for Participation | {{ block.super }}
{% endblock %}
{% block program_content %}
{% if not camp.call_for_participation_open %}
<div class="alert alert-danger">
<strong>Note!</strong> This Call for Particilation is not open.
</div>
{% endif %}
{{ cfp_markdown|safe }}
{% endblock %}

View file

@ -1,10 +1,12 @@
<a href="{% url 'program:schedule_index' camp_slug=camp.slug %}" class="btn {% if url_name == "schedule_index" or urlyear %}btn-primary{% else %}btn-default{% endif %}">Schedule</a> <a href="{% url 'program:schedule_index' camp_slug=camp.slug %}" class="btn {% if url_name == "schedule_index" or urlyear %}btn-primary{% else %}btn-default{% endif %}">Schedule</a>
<a href="{% url 'program:event_index' camp_slug=camp.slug %}" class="btn {% if url_name == "event_index" %}btn-primary{% else %}btn-default{% endif %}">Events</a> <a href="{% url 'program:event_index' camp_slug=camp.slug %}" class="btn {% if url_name == "event_index" %}btn-primary{% else %}btn-default{% endif %}">Events</a>
<a href="{% url 'program:speaker_index' camp_slug=camp.slug %}" class="btn {% if url_name == "speaker_index" %}btn-primary{% else %}btn-default{% endif %}">Speakers</a> <a href="{% url 'program:speaker_index' camp_slug=camp.slug %}" class="btn {% if url_name == "speaker_index" %}btn-primary{% else %}btn-default{% endif %}">Speakers</a>
{% if camp.call_for_participation_open %}
<a href="{% url 'program:call_for_participation' camp_slug=camp.slug %}" class="btn {% if url_name == "call_for_participation" %}btn-primary{% else %}btn-default{% endif %}">Call for Participation</a> <a href="{% url 'program:call_for_participation' camp_slug=camp.slug %}" class="btn {% if url_name == "call_for_participation" %}btn-primary{% else %}btn-default{% endif %}">Call for Participation</a>
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
{% if camp.call_for_participation_open %}
<a href="{% url 'program:proposal_list' camp_slug=camp.slug %}" class="btn {% if url_name in proposal_urls %}btn-primary{% else %}btn-default{% endif %}">Submit Proposal</a> <a href="{% url 'program:proposal_list' camp_slug=camp.slug %}" class="btn {% if url_name in proposal_urls %}btn-primary{% else %}btn-default{% endif %}">Submit Proposal</a>
{% else %}
<a href="{% url 'program:proposal_list' camp_slug=camp.slug %}" class="btn {% if url_name in proposal_urls %}btn-primary{% else %}btn-default{% endif %}">View Proposals</a>
{% endif %} {% endif %}
{% endif %} {% endif %}

View file

@ -6,7 +6,14 @@ Proposals | {{ block.super }}
{% block program_content %} {% block program_content %}
{% if camp.call_for_participation_open %}
{% include 'includes/event_proposal_type_select.html' %} {% include 'includes/event_proposal_type_select.html' %}
{% else %}
<div class="alert alert-danger">
<strong>Note!</strong> This Call for Particilation is not open.
</div>
{% endif %}
{% if speakerproposal_list or eventproposal_list %} {% if speakerproposal_list or eventproposal_list %}
<div class="panel panel-default"> <div class="panel panel-default">

View file

@ -631,8 +631,15 @@ class ScheduleView(CampViewMixin, TemplateView):
class CallForParticipationView(CampViewMixin, TemplateView): class CallForParticipationView(CampViewMixin, TemplateView):
def get_template_names(self): template_name = 'call_for_participation.html'
return '%s_call_for_participation.html' % self.camp.slug
def get_context_data(self, *args, **kwargs):
context = super().get_context_data(**kwargs)
if self.camp.call_for_participation:
context['cfp_markdown'] = self.camp.call_for_participation
else:
context['cfp_markdown'] = "<p class='lead'>This CFP has not been written yet.</p>"
return context
################################################################################################### ###################################################################################################