Skip to content
This repository was archived by the owner on May 11, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion pygotham/manage/events.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
"""Event-related management commands."""

import os
import sys

import arrow
from flask import current_app
from flask_script import Command, prompt, prompt_bool
from slugify import slugify
from werkzeug.datastructures import MultiDict

from pygotham.core import db
from pygotham.forms import EventForm
from pygotham.models import Event
from pygotham.models import AboutPage, Event

PAGES = {'Code of Conduct', 'Privacy Policy'}
TEMPLATE_PATH = os.path.join(
os.path.abspath(os.path.dirname(__file__)), os.path.pardir, 'templates')


class CreateEvent(Command):
Expand All @@ -29,6 +35,8 @@ def run(self):
proposals_begin = prompt('CFP start date')
active = prompt_bool('Activate the event')

add_pages = prompt_bool('Add About pages')

data = MultiDict({
'name': name,
'slug': slug,
Expand All @@ -50,6 +58,25 @@ def run(self):
event.activity_begins = now

db.session.add(event)

if add_pages:
for title in PAGES:
# While the slug will be automatically generated
# when an instance of AboutPage is saved, it's
# needed to open the correct file.
slug = slugify(title)

file = os.path.join(TEMPLATE_PATH, slug + '.rst')
with open(file) as f:
AboutPage(
title=title,
slug=slug,
content=f.read(),
navbar_path=['About', title],
event=event,
active=True,
)

db.session.commit()

print('\nEvent created successfully.')
Expand Down
62 changes: 62 additions & 0 deletions pygotham/templates/code-of-conduct.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
PyGotham is dedicated to providing a harassment-free conference experience for
everyone. We do not tolerate harassment of conference participants in any form.
Conference participants violating these rules may be sanctioned or expelled
from the conference without a refund at the discretion of the conference
organizers.

Harassment includes offensive verbal comments related to gender, gender
identity and expression, sexual orientation, disability, physical appearance,
body size, race, religion, sexual images in public spaces, deliberate
intimidation, stalking, following, harassing photography or recording,
sustained disruption of talks or other events, inappropriate physical contact,
and unwelcome sexual attention. Participants asked to stop any harassing
behavior are expected to comply immediately.

Exhibitors in the expo hall, sponsor or vendor booths, or similar activities
are also subject to the anti-harassment policy. In particular, exhibitors
should not use sexualized images, activities, or other material. Booth staff
(including volunteers) should not use sexualized clothing/uniforms/costumes, or
otherwise create a sexualized environment.

If a participant engages in harassing behavior, the conference organizers may
take any action they deem appropriate, including warning the offender or
expulsion from the conference with no refund. If you are being harassed, notice
that someone else is being harassed, or have any other concerns, please contact
a member of conference staff immediately. Conference staff can be identified by
t-shirts/special badges.

PyGotham has an additional rule of no videotaping or photography without prior
permission. If you wish to photograph, film or record any attendee, including
speakers, you must first ask for their permission to do so.

Conference staff will be happy to help participants contact hotel/venue
security or local law enforcement, provide escorts, or otherwise assist those
experiencing harassment to feel safe for the duration of the conference. We
value your attendance.

Email address for organizers
`[email protected] <mailto:[email protected]>`_

Phone number for conference organizers
929-322-3476

Local law enforcement, emergency
911

Local law enforcement, non-emergency
311

Local sexual assault hotline
800-621-HOPE (4673) or dial 311

Local medical, emergency
911

Local medical, non-emergency
311

Local taxi company
800-609-8731

We expect participants to follow these rules at all conference venues and
conference-related social events.
14 changes: 14 additions & 0 deletions pygotham/templates/privacy-policy.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Information we collect
We collect names, email addresses, and passwords. Passwords are encrypted,
and we have no way of retrieving them. If your password is lost, you must
reset it through our `forgot password </reset>`_ page.

What we do with this information
We take privacy very seriously. We use your contact information to send
updates and conference related info to attendees. Information may be shared
with third-party vendors conducting business on behalf of the conference. It
is not used for any other purpose, nor is it given or sold to any other
party, including other attendees or sponsors.

Feel free to contact `[email protected]
<mailto:[email protected]>`_ for details involving privacy.