Changeset - 8b3301e5c077
[Not reviewed]
Merge
0 9 2
Joshua Simmons - 7 years ago 2017-08-14 16:11:33
i@joshuasimmons.name
Merge branch 'master' of github.com:northbaypython/website
9 files changed with 274 insertions and 16 deletions:
0 comments (0 inline, 0 general)
pinaxcon/proposals/forms.py
Show inline comments
 
from django import forms
 
from symposion.proposals.forms import ProposalMixIn
 

	
 
from .models import TalkProposal
 
from .models import ConferenceSpeaker, TalkProposal
 

	
 

	
 
class ProposalForm(forms.ModelForm):
 
class ConferenceSpeakerForm(forms.ModelForm):
 

	
 
    class Meta:
 
        model = ConferenceSpeaker
 
        exclude = [
 
            'user',
 
            'biography_html',
 
            'experience_html',
 
            'invite_email',
 
            'invite_token',
 
            'annotation',
 
        ]
 

	
 
    def __init__(self, *a, **k):
 
        super(ConferenceSpeakerForm, self).__init__(*a, **k)
 
        self.fields['code_of_conduct'].required = True
 

	
 

	
 

	
 
class ProposalForm(forms.ModelForm, ProposalMixIn):
 

	
 
    def __init__(self, *a, **k):
 
        super(ProposalForm, self).__init__(*a, **k)
 
        self.description_required()
 
        self.abstract_required()
 

	
 
    def clean_description(self):
 
        value = self.cleaned_data["description"]
 
        if len(value) > 400:
 
            raise forms.ValidationError(
 
                u"The description must be less than 400 characters"
 
            )
 
        return value
 

	
 

	
 
class TalkProposalForm(ProposalForm):
 

	
 
    class Meta:
 
        model = TalkProposal
 
        fields = [
 
            "title",
 
            "audience_level",
 
            "description",
 
            "abstract",
 
            "new_presentation",
 
            "extended_presentation",
 
            "additional_notes",
 
            "extra_av",
 
            "slides_release",
 
            "recording_release",
 
        ]
pinaxcon/proposals/migrations/0002_conferencespeaker.py
Show inline comments
 
new file 100644
 
# -*- coding: utf-8 -*-
 
# Generated by Django 1.11.4 on 2017-08-13 18:45
 
from __future__ import unicode_literals
 

	
 
from django.db import migrations, models
 
import django.db.models.deletion
 

	
 

	
 
class Migration(migrations.Migration):
 

	
 
    dependencies = [
 
        ('symposion_speakers', '0007_auto_20170810_1651'),
 
        ('proposals', '0001_initial'),
 
    ]
 

	
 
    operations = [
 
        migrations.CreateModel(
 
            name='ConferenceSpeaker',
 
            fields=[
 
                ('speakerbase_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='symposion_speakers.SpeakerBase')),
 
                ('twitter_username', models.CharField(blank=True, help_text='Your Twitter account', max_length=15)),
 
                ('first_time', models.BooleanField(help_text='')),
 
                ('experience', models.TextField(blank=True, help_text="List any past speaking experience you have.  Edit using <a href='http://warpedvisions.org/projects/markdown-cheat-sheet/target='_blank'>Markdown</a>.", verbose_name='Past speaking experience')),
 
                ('experience_html', models.TextField(blank=True)),
 
                ('travel_assistance', models.BooleanField(help_text='Check this field if you require travel assistance to get to North Bay Python in Petaluma, California.')),
 
                ('lodging_assistance', models.BooleanField(help_text='Check this field if you require lodging assistance in Petaluma, California during North Bay Python.')),
 
                ('home_city', models.CharField(blank=True, help_text='Which city (and state, and country) will you be traveling from to get to North Bay Python?', max_length=127)),
 
                ('minority_group', models.CharField(blank=True, help_text='If you are a member of one or more groups that are underrepresented in the tech industry, you may list these here. Your response is optional.', max_length=256, verbose_name='Diversity statement')),
 
                ('code_of_conduct', models.BooleanField(help_text="I have read and, in the event that my proposal is accepted, agree that I will comply with the <a href='/code-of-conduct'>Code of Conduct</a>.")),
 
            ],
 
            bases=('symposion_speakers.speakerbase',),
 
        ),
 
    ]
pinaxcon/proposals/migrations/0003_auto_20170813_1945.py
Show inline comments
 
new file 100644
 
# -*- coding: utf-8 -*-
 
# Generated by Django 1.11.4 on 2017-08-13 19:45
 
from __future__ import unicode_literals
 

	
 
from django.db import migrations, models
 

	
 

	
 
class Migration(migrations.Migration):
 

	
 
    dependencies = [
 
        ('proposals', '0002_conferencespeaker'),
 
    ]
 

	
 
    operations = [
 
        migrations.RemoveField(
 
            model_name='talkproposal',
 
            name='audience_level',
 
        ),
 
        migrations.AddField(
 
            model_name='talkproposal',
 
            name='extended_presentation',
 
            field=models.BooleanField(default=False, help_text='Most talks at North Bay Python go for 30 minutes. We have some openings for 45-minute talks. If you check this field, please explain in your additional notes how you would use the extra 15 minutes.', verbose_name='Optionally consider this proposal for a 45-minute slot'),
 
        ),
 
        migrations.AddField(
 
            model_name='talkproposal',
 
            name='extra_av',
 
            field=models.TextField(blank=True, help_text='We will provide you with a projector with HDMI connection, an audio connection, and one microphone per speaker. If you need anything more than this to present this talk, please list them here.', verbose_name='Extra tech and A/V requirements'),
 
        ),
 
        migrations.AddField(
 
            model_name='talkproposal',
 
            name='new_presentation',
 
            field=models.BooleanField(default=False, help_text='Check this box if North Bay Python will be the first time this talk is presented at a technical conference.', verbose_name='This is a new presentation'),
 
        ),
 
        migrations.AddField(
 
            model_name='talkproposal',
 
            name='slides_release',
 
            field=models.BooleanField(default=True, help_text='I authorize North Bay Python to release a copy of my slides and related materials under the Creative Commons Attribution-ShareAlike 3.0 United States licence, and certify that I have the authority to do so.'),
 
        ),
 
        migrations.AlterField(
 
            model_name='conferencespeaker',
 
            name='experience',
 
            field=models.TextField(blank=True, help_text="List any past speaking experience you have. This can include user groups, meetups, or presentations at work or school.  Edit using <a href='http://warpedvisions.org/projects/markdown-cheat-sheet/target='_blank'>Markdown</a>.", verbose_name='Past speaking experience'),
 
        ),
 
        migrations.AlterField(
 
            model_name='conferencespeaker',
 
            name='first_time',
 
            field=models.BooleanField(help_text='Check this field if this is your first time speaking at a technical conference.', verbose_name='First-time speaker?'),
 
        ),
 
        migrations.AlterField(
 
            model_name='conferencespeaker',
 
            name='lodging_assistance',
 
            field=models.BooleanField(help_text='Check this field if you require lodging assistance in Petaluma, California during North Bay Python.', verbose_name='Lodging assistance required?'),
 
        ),
 
        migrations.AlterField(
 
            model_name='conferencespeaker',
 
            name='minority_group',
 
            field=models.CharField(blank=True, help_text='If you are a member of one or more groups that are under-represented in the tech industry, you may list these here. Your response is optional.', max_length=256, verbose_name='Diversity statement'),
 
        ),
 
        migrations.AlterField(
 
            model_name='conferencespeaker',
 
            name='travel_assistance',
 
            field=models.BooleanField(help_text='Check this field if you require travel assistance to get to North Bay Python in Petaluma, California.', verbose_name='Travel assistance required?'),
 
        ),
 
        migrations.AlterField(
 
            model_name='talkproposal',
 
            name='recording_release',
 
            field=models.BooleanField(default=True, help_text='I authorize North Bay Python to release a recording of my talk under the Creative Commons Attribution-ShareAlike 3.0 United States licence.'),
 
        ),
 
    ]
pinaxcon/proposals/models.py
Show inline comments
 
from django.db import models
 
from django.utils.translation import ugettext_lazy as _
 

	
 
from symposion.markdown_parser import parse
 
from symposion.proposals.models import ProposalBase
 
from symposion.speakers.models import SpeakerBase
 

	
 

	
 
class Proposal(ProposalBase):
 

	
 
    AUDIENCE_LEVEL_NOVICE = 1
 
    AUDIENCE_LEVEL_EXPERIENCED = 2
 
    AUDIENCE_LEVEL_INTERMEDIATE = 3
 
class ConferenceSpeaker(SpeakerBase):
 

	
 
    def clean_twitter_username(self):
 
        value = self.twitter_username
 
        if value.startswith("@"):
 
            value = value[1:]
 
        return value
 

	
 
    AUDIENCE_LEVELS = [
 
        (AUDIENCE_LEVEL_NOVICE, "Novice"),
 
        (AUDIENCE_LEVEL_INTERMEDIATE, "Intermediate"),
 
        (AUDIENCE_LEVEL_EXPERIENCED, "Experienced"),
 
    ]
 
    def save(self, *args, **kwargs):
 
        self.experience_html = parse(self.experience)
 
        self.twitter_username = self.clean_twitter_username()
 
        return super(ConferenceSpeaker, self).save(*args, **kwargs)
 

	
 
    twitter_username = models.CharField(
 
        max_length=15,
 
        blank=True,
 
        help_text=_(u"Your Twitter account")
 
    )
 

	
 
    audience_level = models.IntegerField(choices=AUDIENCE_LEVELS)
 
    first_time = models.BooleanField(
 
        blank=True,
 
        verbose_name=_("First-time speaker?"),
 
        help_text=_("Check this field if this is your first time speaking "
 
                    "at a technical conference."),
 
        )
 

	
 
    experience = models.TextField(blank=True, help_text=_
 
        ("List any past speaking experience you have. This can include "
 
         "user groups, meetups, or presentations at work or school.  Edit "
 
         "using <a href='http://warpedvisions.org/projects/"
 
         "markdown-cheat-sheet/target='_blank'>"
 
         "Markdown</a>."),
 
         verbose_name=_("Past speaking experience"),
 
    )
 
    experience_html = models.TextField(blank=True)
 

	
 
    travel_assistance = models.BooleanField(
 
        blank=True,
 
        verbose_name=_("Travel assistance required?"),
 
        help_text=_("Check this field if you require travel assistance to get "
 
                    "to North Bay Python in Petaluma, California."),
 
    )
 

	
 
    lodging_assistance = models.BooleanField(
 
        blank=True,
 
        verbose_name=_("Lodging assistance required?"),
 
        help_text=_("Check this field if you require lodging assistance in "
 
                    "Petaluma, California during North Bay Python."),
 
    )
 

	
 
    home_city = models.CharField(
 
        blank=True,
 
        max_length=127,
 
        help_text=_("Which city (and state, and country) will you be "
 
                    "traveling from to get to North Bay Python?"),
 
    )
 

	
 
    minority_group = models.CharField(blank=True, max_length=256,
 
        verbose_name=_("Diversity statement"),
 
        help_text=_("If you are a member of one or more groups that are "
 
                    "under-represented in the tech industry, you may list "
 
                    "these here. Your response is optional."),
 
    )
 

	
 
    code_of_conduct = models.BooleanField(
 
        help_text=_("I have read and, in the event that my proposal is "
 
                    "accepted, agree that I will comply with the "
 
                    "<a href='/code-of-conduct'>Code of Conduct</a>."),
 
    )
 

	
 

	
 
class Proposal(ProposalBase):
 

	
 
    extended_presentation = models.BooleanField(
 
        default=False,
 
        verbose_name=_("Optionally consider this proposal for a 45-minute "
 
                       "slot"),
 
        help_text=_("Most talks at North Bay Python go for 30 minutes. We "
 
                    "have some openings for 45-minute talks. If you check this "
 
                    "field, please explain in your additional notes how you "
 
                    "would use the extra 15 minutes."),
 
    )
 
    extra_av = models.TextField(
 
        blank=True,
 
        verbose_name=_("Extra tech and A/V requirements"),
 
        help_text=_("We will provide you with a projector with HDMI "
 
                    "connection, an audio connection, and one microphone per "
 
                    "speaker. If you need anything more than this to present "
 
                    "this talk, please list them here."),
 
    )
 
    new_presentation = models.BooleanField(
 
        default=False,
 
        verbose_name=_("This is a new presentation"),
 
        help_text=_("Check this box if North Bay Python will be the first "
 
                    "time this talk is presented at a technical conference."),
 
    )
 
    slides_release = models.BooleanField(
 
        default=True,
 
        help_text=_("I authorize North Bay Python to release a copy of my "
 
                    "slides and related materials under the Creative Commons "
 
                    "Attribution-ShareAlike 3.0 United States licence, and "
 
                    "certify that I have the authority to do so."),
 
    )
 
    recording_release = models.BooleanField(
 
        default=True,
 
        help_text="By submitting your proposal, you agree to give permission to the conference organizers to record, edit, and release audio and/or video of your presentation. If you do not agree to this, please uncheck this box."
 
        help_text=_("I authorize North Bay Python to release a recording of "
 
                    "my talk under the Creative Commons "
 
                    "Attribution-ShareAlike 3.0 United States licence."),
 

	
 
    )
 

	
 
    class Meta:
 
        abstract = True
 

	
 

	
 
class TalkProposal(Proposal):
 

	
 
    class Meta:
 
        verbose_name = "talk proposal"
pinaxcon/settings.py
Show inline comments
...
 
@@ -247,24 +247,27 @@ AUTHENTICATION_BACKENDS = [
 

	
 
CONFERENCE_ID = 1
 
PROPOSAL_FORMS = {
 
    "talk": "pinaxcon.proposals.forms.TalkProposalForm",
 
}
 
PINAX_PAGES_HOOKSET = "pinaxcon.hooks.PinaxPagesHookSet"
 
PINAX_BOXES_HOOKSET = "pinaxcon.hooks.PinaxBoxesHookSet"
 

	
 
PINAX_STRIPE_PUBLIC_KEY = os.environ.get("STRIPE_PUBLIC_KEY", "your test public key")
 
PINAX_STRIPE_SECRET_KEY = os.environ.get("STRIPE_SECRET_KEY", "your test secret key")
 
PINAX_STRIPE_SEND_EMAIL_RECEIPTS = False
 

	
 
SYMPOSION_SPEAKER_MODEL = "pinaxcon.proposals.models.ConferenceSpeaker"
 
SYMPOSION_SPEAKER_FORM = "pinaxcon.proposals.forms.ConferenceSpeakerForm"
 

	
 
# Registrasion Attendee profile model
 
ATTENDEE_PROFILE_MODEL = "pinaxcon.registrasion.models.AttendeeProfile"
 
# Registrasion attendee profile form -- must act on ATTENDEE_PROFILE_FORM
 
# You only need to provide this if you're customising the form from the default
 
# ATTENDEE_PROFILE_FORM = "pinaxcon.registrasion.forms.ProfileForm"
 

	
 
# Ticket product category -- used to identify which products must be available
 
# in order to register.
 
TICKET_PRODUCT_CATEGORY = 1
 

	
 

	
 
INVOICE_CURRENCY = "AUD"
pinaxcon/templates/site_base.html
Show inline comments
...
 
@@ -2,29 +2,33 @@
 

	
 
{% load staticfiles %}
 
{% load metron_tags %}
 
{% load i18n %}
 
{% load sitetree %}
 

	
 
{% block styles %}
 
    {% include "_styles.html" %}
 
{% endblock %}
 

	
 
{% block extra_head_base %}
 
    {% block extra_head %}
 
      <meta property="twitter:card" content="summary">
 
      <meta property="og:type" content="website">
 
      <meta property="og:title" content="{% block head_title %}{% endblock %} | {{ SITE_NAME }}">
 
      <meta property="twitter:title" content="{{ SITE_NAME }}">
 
      <meta property="og:site_name" content="North Bay Python">
 
      <meta property="og:image" content="http://{{ request.META.HTTP_HOST }}{% static "images/square_icon.png" %}">
 
      <meta property="og:url" content="{{ request.build_absolute_uri }}">
 
      <meta property="og:description" content="North Bay Python, a community-organized conference, comes to Petaluma, California on December 2 and 3, 2017.">
 
      <meta property="twitter:description" content="North Bay Python, a community-organized conference, comes to Petaluma, California on December 2 and 3, 2017.">
 
      <meta name="description" content="North Bay Python, a community-organized conference, comes to Petaluma, California on December 2 and 3, 2017.">
 
      <meta name="google-site-verification" content="sTU0G4IghY_jV9iPgCVD1WZuk4C_MSWY2QzxQUjDcC4">
 
    {% endblock %}
 
{% endblock %}
 

	
 
{% block nav %}
 
    {% sitetree_menu from "main" include "trunk" template "sitetree/menu_bootstrap3.html" %}
 
{% endblock %}
 

	
 
{% block body_base %}
 

	
 
  <div class="homepage-block-bg website-background"></div>
pinaxcon/templates/static_pages/about/north_bay_python.html
Show inline comments
 
{% extends "page_with_title_and_lede.html" %}
 

	
 
{% load i18n %}
 

	
 
{% block head_title %}About North Bay Python{% endblock %}
 

	
 
{% block heading %}About North Bay Python{% endblock %}
 

	
 
{% block body_class %}about{% endblock %}
 

	
 
{% block lede %}
 

	
 
A single-track conference north of the Bay focused on community, collaboration, and all things Python.
 

	
 
{% endblock %}
 

	
 
{% block content %}
 

	
 
<h2>Welcome to the North Bay</h2>
 

	
 
<p>North Bay Python is a two-day, single-track Python conference held in the Mystic Theater in Petaluma, California, held over the weekend of December 2 &amp; 3, 2017.</p>
 

	
 
<p>We're a nonprofit conference for professionals, enthusiasts and students alike, focused on inclusion, accessibility, diversity, and affordability, with not only a great lineup of talks from all over the Python ecosystem but plenty of time to meet new people and develop new ideas too.</p>
 

	
 
<p>Our venue, the historic Mystic Theater in Downtown Petaluma, is not only a beautiful example of an early 1900s Vaudeville theatre, but is a short walk away from over fifty different food and drink options in Downtown Petaluma, as well as several different hotels, the closest of which is only a block away.</p>
 

	
 
<h2>The Conference</h2>
 

	
 
<p>North Bay Python is a single-track conference, with a carefully curated set of talks representing the truly diverse Python community and their different areas of interest. If a topic is less to your interest, or you've met some people you really want to sit down and chat with, we'll have plenty of areas away from the main theater to catch up and chat as well.</p>
 

	
 
<h2>The Location</h2>
 

	
 
<p>Petaluma is right in the middle of the beautiful scenery of the North Bay, and less than an hour's drive from San Francisco over the Golden Gate Bridge. The Mystic is not the only example of early 1900s architecture, either; downtown is full of historic buildings, as well as being at the center of thing things like the maker movement and a thriving craft brewery scene.</p>
 

	
 
<p>If you want to stay overnight, we have deals with local hotels - the closest one is just one block away. If you're driving up, Petaluma has plenty of free parking, and if you don't feel like driving, we'll be putting on a shuttle from public transport stops as well.</p>
 

	
 
{% endblock %}
requirements/base.txt
Show inline comments
...
 
@@ -4,23 +4,24 @@ django-user-accounts==1.3.1
 
metron==1.3.7
 
pinax-eventlog==1.1.1
 
dj-static==0.0.6
 
dj-database-url==0.4.0
 
pinax-pages==0.4.2
 
pinax-boxes==2.1.2
 
django-libsass==0.7
 
django-markdown-deux==1.0.5
 
django-sitetree==1.8.0
 
django-countries==4.6.1
 
easy-thumbnails==2.4.1
 
django-timezone-field==2.0
 
django-model-utils==3.0.0
 

	
 

	
 
# For testing
 
django-nose==1.4.4
 
coverage==4.0.3
 

	
 
# Registrasion
 
https://github.com/chrisjrn/registrasion/tarball/master#egg=registrasion
 
https://github.com/pinax/symposion/tarball/ad81810#egg=symposion
 
https://github.com/chrisjrn/symposion/tarball/northbaypython#egg=symposion
 
https://github.com/chrisjrn/registrasion-stripe/tarball/master#egg=registrasion-stripe
 
https://github.com/chrisjrn/symposion-bootstrap-templates/tarball/master#egg=symposion-bootstrap-templates
runtime.txt
Show inline comments
 
python-2.7.13
 
python-2.7.12
0 comments (0 inline, 0 general)