Changeset - 0f76f1c295c2
[Not reviewed]
Merge
0 2 1
Christopher Neugebauer - 7 years ago 2017-09-18 03:28:56
chrisjrn@gmail.com
Merge branch 'master' into prod
3 files changed with 34 insertions and 2 deletions:
0 comments (0 inline, 0 general)
pinaxcon/proposals/migrations/0004_auto_20170917_2028.py
Show inline comments
 
new file 100644
 
# -*- coding: utf-8 -*-
 
# Generated by Django 1.11.4 on 2017-09-18 03:28
 
from __future__ import unicode_literals
 

	
 
from django.db import migrations, models
 

	
 

	
 
class Migration(migrations.Migration):
 

	
 
    dependencies = [
 
        ('proposals', '0003_auto_20170813_1945'),
 
    ]
 

	
 
    operations = [
 
        migrations.AlterField(
 
            model_name='conferencespeaker',
 
            name='first_time',
 
            field=models.BooleanField(default=False, 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(default=False, 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='travel_assistance',
 
            field=models.BooleanField(default=False, help_text='Check this field if you require travel assistance to get to North Bay Python in Petaluma, California.', verbose_name='Travel assistance required?'),
 
        ),
 
    ]
pinaxcon/proposals/models.py
Show inline comments
...
 
@@ -7,72 +7,75 @@ from symposion.speakers.models import SpeakerBase
 

	
 

	
 

	
 
class ConferenceSpeaker(SpeakerBase):
 

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

	
 
    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")
 
    )
 

	
 
    first_time = models.BooleanField(
 
        blank=True,
 
        default=False,
 
        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,
 
        default=False,
 
        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,
 
        default=False,
 
        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>."),
 
    )
pinaxcon/settings.py
Show inline comments
...
 
@@ -8,50 +8,49 @@ BASE_DIR = PACKAGE_ROOT
 

	
 
DEBUG = bool(int(os.environ.get("DEBUG", "1")))
 

	
 
DATABASES = {
 
    "default": {
 
        "ENGINE": "django.db.backends.sqlite3",
 
        "NAME": os.path.join(PROJECT_ROOT, "dev.db"),
 
    }
 
}
 

	
 
UNPREPEND_WWW = bool(int(os.environ.get("DJANGO_UNPREPEND_WWW", "0")))
 

	
 
# HEROKU: Update database configuration with $DATABASE_URL.
 
import dj_database_url
 
db_from_env = dj_database_url.config()
 
DATABASES['default'].update(db_from_env)
 

	
 
ALLOWED_HOSTS = [".localhost", ".herokuapp.com", ".northbaypython.org"]
 
CANONICAL_HOST = os.environ.get("DJANGO_CANONICAL_HOST", None)
 

	
 
# If DEFAULT_FROM_EMAIL is not set, email will most likely break in prod.
 
from_email = os.environ.get("DJANGO_DEFAULT_FROM_EMAIL", None)
 
if from_email is not None:
 
    DEFAULT_FROM_EMAIL = from_email
 

	
 
SERVER_EMAIL = DEFAULT_FROM_EMAIL
 
    SERVER_EMAIL = DEFAULT_FROM_EMAIL
 

	
 
# Local time zone for this installation. Choices can be found here:
 
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
 
# although not all choices may be available on all operating systems.
 
# On Unix systems, a value of None will cause Django to use the same
 
# timezone as the operating system.
 
# If running in a Windows environment this must be set to the same as your
 
# system time zone.
 
TIME_ZONE = os.environ.get("TZ", "America/Los_Angeles")
 

	
 

	
 
# Set the email address that will receive errors.
 
admin_email = os.environ.get("DJANGO_ADMIN_EMAIL", None)
 
if admin_email is not None:
 
    ADMINS = [("Webmaster", admin_email)]
 

	
 

	
 
# Use SSLRedirectMiddleware
 
SSL_ON = os.environ.get("DJANGO_SSL_ON", True)
 
SSL_ALWAYS = os.environ.get("DJANGO_SSL_ALWAYS", False)
 

	
 
# Language code for this installation. All choices can be found here:
 
# http://www.i18nguy.com/unicode/language-identifiers.html
 
LANGUAGE_CODE = "en-us"
0 comments (0 inline, 0 general)