Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sfranklin/coc reporting #23

Open
wants to merge 344 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
344 commits
Select commit Hold shift + click to select a range
6d32510
Moving static directory out of pybay to solve static finders/app find…
simeonf May 11, 2017
a218a53
Move static files up a level
simeonf May 11, 2017
99ba35c
Style Ticket Page
OnurOzayyy May 12, 2017
a3b7a9d
Merge pull request #44 from OnurOzayyy/ticket_page
OnurOzayyy May 12, 2017
28daa4c
fix sponsors table
avyfain May 12, 2017
a2d4236
display pie charts horizontally
OnurOzayyy May 12, 2017
ca20696
Merge pull request #45 from avyfain/spon
OnurOzayyy May 12, 2017
f53c698
Merge pull request #46 from OnurOzayyy/temp
OnurOzayyy May 12, 2017
cbbb539
Style subscribe email button
OnurOzayyy May 13, 2017
46be6e3
Make counter responsive
OnurOzayyy May 13, 2017
5d83cbc
De-italic header for cpf and faq
OnurOzayyy May 13, 2017
757cc0b
Make columns closer to middle
OnurOzayyy May 13, 2017
1e375ef
Add more space on top line
OnurOzayyy May 13, 2017
d3f7d21
fix links
OnurOzayyy May 13, 2017
b4a7bc4
Center the input text
OnurOzayyy May 13, 2017
d36af65
Fix PyBay 2016 Video
OnurOzayyy May 13, 2017
fb28f76
Fix Pybay2016 button
OnurOzayyy May 13, 2017
f55d250
Fix links
OnurOzayyy May 13, 2017
5c23b5f
Merge pull request #48 from OnurOzayyy/frontend_changes
OnurOzayyy May 13, 2017
89fbcd1
Update graph2.js
ccsv May 13, 2017
b18f474
Update graph1.js
ccsv May 13, 2017
30d78ea
Update sponsors.html
ccsv May 13, 2017
e992f74
put FAQ on menu bar
OnurOzayyy May 14, 2017
3059f1a
Fix Sponsor Contact
OnurOzayyy May 14, 2017
16767ea
Fix legends and sponsor graphs
ccsv May 15, 2017
e37d85c
Fix the link to the CoC.
asweigart May 11, 2017
28432d7
Add DevOps category
mzdaniel May 15, 2017
fc5a261
Change verbiage and proofreading
mzdaniel May 15, 2017
05d1b54
Fix Admin Page and Add more Fields to CFP
OnurOzayyy May 16, 2017
0361320
Add more field to the Admin Page
OnurOzayyy May 16, 2017
2d51a86
Merge pull request #54 from OnurOzayyy/cfp_admin_page
PirosB3 May 17, 2017
eb7da8a
fixed multiple things
May 17, 2017
75273d5
fxied
May 17, 2017
900ac6b
reviewd
May 17, 2017
927392a
Merge pull request #55 from pybay/cfp_admin_page
PirosB3 May 17, 2017
1ecb8f7
Also allow pybyay.com as domain
simeonf May 17, 2017
f9f7de3
Resampling jpg to go from 7MB->300K with minimal loss of quality
simeonf May 17, 2017
3020b45
Update code of conduct
ccsv May 17, 2017
4d42f07
Merge branch 'master' of https://github.com/pybay/pybay
ccsv May 17, 2017
2a02ec1
add favicon
ccsv May 18, 2017
96d1065
graph titles & cfp date changes
ccsv May 18, 2017
bd98390
Merge pull request #56 from pybay/ccbranch
OnurOzayyy May 19, 2017
826dbb0
delete blog and pybay2016 button
OnurOzayyy May 19, 2017
ad0078e
change tickets -> registration, add logo row
avyfain May 20, 2017
bd125c2
Merge pull request #57 from avyfain/tix
mzdaniel May 20, 2017
09add8d
Add old cpf url
mzdaniel May 20, 2017
88927ae
Add faq link on registration page
mzdaniel May 20, 2017
a368d20
add images for venues on registration page
avyfain May 20, 2017
dbf3d1f
adds speakers view
filipeximenes May 22, 2017
75eb1dc
adds link to speakers list page to the navbar
filipeximenes May 22, 2017
f8ed0aa
uses proposal speakers method to fetch all speakers
filipeximenes May 22, 2017
d1ef436
graph responsive svg
ccsv May 23, 2017
37065e0
Speed up page rendering time by not using embedded video player
May 22, 2017
f4026ce
Merge pull request #66 from mistermocha/fastervideo
mzdaniel May 23, 2017
73b0ebb
adding .travis.yml for ci-testing
May 22, 2017
788b08a
Merge pull request #71 from mistermocha/travisci
mzdaniel May 23, 2017
a5c4137
Putting the travis build status on the README page
May 23, 2017
22225a7
Merge pull request #76 from mistermocha/travisbadge
mzdaniel May 23, 2017
eb0a161
Updated description to brief description, also changed the placeholde…
May 22, 2017
a6e57ce
Merge branch 'master' of github.com:pybay/pybay into ccbranch
May 24, 2017
2b38b6c
Merge pull request #75 from pybay/ccbranch
PirosB3 May 24, 2017
b3a67b5
Merge pull request #74 from filipeximenes/speakers
PirosB3 May 24, 2017
4dfd800
Merge pull request #78 from pybay/filipeximenes_speakers
PirosB3 May 24, 2017
7cc43e2
SHOW_SPEAKERS_LIST_NAVBAR_LINK disabled for now
May 24, 2017
ca604b5
change sponsor page text
ccsv May 24, 2017
c1d4712
change footer text and color style
ccsv May 24, 2017
d255dfc
Merge pull request #81 from pybay/ccbranch
mzdaniel May 26, 2017
41f7f45
Add links with last year's talks and videos
mzdaniel May 26, 2017
a97c2c5
Add explicit 404 view to enable testing 404 template
simeonf May 30, 2017
3c6c97e
Allow FAQs to be shown on home/sponsor/registration pages
epsy May 24, 2017
c5053b5
Merge pull request #80 from epsy/faqs-everywhere
mzdaniel May 31, 2017
1b3c6fc
Make main page title color white
mzdaniel May 31, 2017
96a5464
Rename Sponsors link to Sponsors Prospectus (#84)
mzdaniel May 31, 2017
0737585
Test cases for Speaker list page
OnurOzayyy May 24, 2017
52c16a1
Update scholarship verbiage
mzdaniel Jun 1, 2017
47a4632
Add flatpage default template
simeonf Jun 1, 2017
d703877
Turn on flatpages in settings
simeonf Jun 1, 2017
1fbd521
Add django-debug-toolbar settings file
simeonf Jun 1, 2017
6a581c4
Merge branch 'master' of github.com:pybay/pybay
simeonf Jun 1, 2017
be6eeb2
Add styles and anchor links to FAQ titles
simeonf Jun 1, 2017
4414cd4
Merge pull request #87 from pybay/sfranklin/faq
simeonf Jun 1, 2017
d517651
Add categories to the faq
epsy May 25, 2017
564757d
Merge pull request #86 from mzdaniel/scholarship
PirosB3 Jun 5, 2017
625ce0d
add rollbar
May 24, 2017
3547709
Merge pull request #90 from epsy/faq-sections
simeonf Jun 6, 2017
7d26ce2
Add sponsor contact us to sponsors prospectus page
mzdaniel Jun 6, 2017
ac8e3b8
Implement talk email confirmation
mzdaniel Jun 7, 2017
6ea224d
Add UCSF Mission Bay Conference Center link
mzdaniel Jun 7, 2017
caa623d
Initial commit of list api
sesas Jun 7, 2017
495b19d
Added proposal detail api
sesas Jun 7, 2017
7fe5f22
to lowr
Jun 7, 2017
9e60efe
implemented token
Jun 7, 2017
bfc888d
Merge pull request #93 from pybay/api
sesas Jun 7, 2017
ef1de95
our-sponsors: Update to match specs with actual data from DB
ccsv May 26, 2017
b5f289b
FAQ: always order using the 'ordering' field
epsy Jun 8, 2017
f257191
Add code of conduct in menu bar
mzdaniel Jun 9, 2017
01f038c
Update CFP close date
mzdaniel Jun 9, 2017
1858c23
Rename sponsors related urls
mzdaniel Jun 9, 2017
137315a
Properly redirect CFP links
mzdaniel Jun 9, 2017
fd5937b
Fixed 500 page when speker already exists in User table
sesas Jun 9, 2017
d07f46d
Merge pull request #96 from pybay/fix_500_cfp
simeonf Jun 9, 2017
bd3a8e4
Add better logging based config
simeonf Jun 9, 2017
7354567
Add speaker in talk proposal admin list
mzdaniel Jun 10, 2017
2f7ad22
Added fields to detail_proposal api call
sesas Jun 10, 2017
17cc7a9
Made audience_level human readable
sesas Jun 10, 2017
81be24c
Merge branch 'fix_500_cfp'
sesas Jun 10, 2017
a18f68d
Fixed -1 error
sesas Jun 10, 2017
87ee00b
Fixed email template verbiage
sesas Jun 11, 2017
a145971
Fixed meetup choices for admin/proposal
sesas Jun 11, 2017
696f764
Added sponsors url redirect + fixed slash endings
sesas Jun 11, 2017
a52e3d0
Update test setup data to account for model changes in a1459712ee12f8…
simeonf Jun 12, 2017
2297221
Merge pull request #100 from pybay/sfranklin/testfailures
simeonf Jun 12, 2017
fb2e956
Add countdown timer to Jun 17th 2017 at 1150pm
superglu Jun 11, 2017
69b67cd
countdown: move to below video
epsy Jun 11, 2017
a628df3
Add a model to upload arbitrary pictures
epsy Jun 12, 2017
d5300a1
Two logos
ccsv Jun 14, 2017
0b45da0
Change table and homepage text per grace
ccsv Jun 14, 2017
2ecbfd7
Merge pull request #103 from ccsv/ccbranch
sesas Jun 18, 2017
d7a5e4a
remove the countdown and leave room to add code for the backend to en…
epsy Jun 18, 2017
071fd82
Merge pull request #105 from epsy/countdown
PirosB3 Jun 18, 2017
36c034d
Updated readme with instructions for Windows users when loading fixtu…
asweigart Jun 18, 2017
2c012a9
Merge pull request #106 from asweigart/master
sesas Jun 18, 2017
117a20c
Fixed admin for category to be a dropdown
sesas Jun 18, 2017
55c5b59
Merge pull request #107 from pybay/fix-admin-category
PirosB3 Jun 18, 2017
3d40e2a
Implemented speaker detail page and enchanced model
Jun 14, 2017
01686d1
logos for registration
ccsv Jun 21, 2017
8f594d8
Merge pull request #112 from ccsv/ccbranch
PirosB3 Jun 21, 2017
70c4d7d
addressed comments
Jun 21, 2017
25ac296
Merge pull request #108 from pybay/details_page_2
PirosB3 Jun 21, 2017
2c96cdc
pybay/views: stop importing all views by name to avoid conflicts on m…
epsy Jun 21, 2017
ada373b
Added proposal.speaker_and_talk_history to api call
sesas Jun 21, 2017
09d5b83
Merge pull request #118 from epsy/urlspy
sesas Jun 21, 2017
7fc5ad0
Merge pull request #119 from pybay/speaker-talk-hisotry
sesas Jun 21, 2017
f192b7d
Fixing undecided_proposals api call
sesas Jun 21, 2017
2d800d0
Merge pull request #120 from pybay/speaker-talk-hisotry
sesas Jun 21, 2017
d6db1dc
Listen for https traffic in prod nginx config
simeonf Jun 22, 2017
766fe27
fix unclosed <strong> tag on registration (#122)
epsy Jun 22, 2017
2d26696
add photo fallback for speakers
Jun 21, 2017
65210b5
404 page styling, remove unused 404 page
ccsv Jun 21, 2017
666634d
Underline get in touch link on home page
ccsv Jun 21, 2017
1586c84
Remove CFP link from menu bar (#129)
epsy Jun 22, 2017
2cc199b
add Scholarships to menu bar
epsy Jun 22, 2017
4346e1a
Allow HTML in FAQ excerpts
epsy Jun 21, 2017
5889ca9
Show the schedule (#109)
epsy Jun 25, 2017
9ac0d6f
Sfranklin/featured speakers (#133)
PirosB3 Jun 26, 2017
edd4f35
Revert "Sfranklin/featured speakers (#133)"
epsy Jun 26, 2017
08482d5
Verbiage changes on sponsorship-prospectus page (#138)
j-driller Jun 26, 2017
85525ce
Restyle the tagline to highlight tutorial/talk days
epsy Jun 28, 2017
6da808a
Color the tito widget appropriately
epsy Jun 26, 2017
dc0a3e5
Reveal talk descriptions on the schedule on hover
Jun 25, 2017
4be6d28
interlink speaker and schedule pages (#140)
epsy Jun 28, 2017
b617abf
use bootstrap containers in the sponsor list and fix the image size (…
epsy Jun 30, 2017
e0407e2
Fix google fonts being loaded unsecurly over https (#146)
epsy Jun 30, 2017
3af0cc6
Fix jquery.min.js being fetched insecurely (#147)
epsy Jun 30, 2017
c007312
Add email and phone to admin talk listing
mzdaniel Jul 2, 2017
fa1db58
schedule: always order rooms the same way (#144)
epsy Jul 4, 2017
ab6608b
Adding featured speakers app
simeonf Jun 21, 2017
52669e8
Add featured_speakers and dependency to INSTALLED_APPS
simeonf Jun 21, 2017
5c33761
Add featured speakers to frontpage template
simeonf Jun 21, 2017
36e6955
Use name in admin dropdown list
simeonf Jun 21, 2017
cf8e0e3
One row, many speakers
simeonf Jun 21, 2017
60863fc
Many hoops to customize the string display of Speaker model in admin
simeonf Jun 21, 2017
0073cfd
Use default speaker image
simeonf Jun 23, 2017
936120f
just make the page background white
epsy Jun 26, 2017
e62351c
Improve the featured speakers heading style
Jun 25, 2017
f4156ce
Use a dedicated field for featured speaker bio. Delete featured speak…
epsy Jun 26, 2017
b88afc3
fix social block clipping and appearing when useless
epsy Jun 26, 2017
edfd7b5
Match the size of featured speaker description and picture
epsy Jul 4, 2017
40efa91
Various style fixes (#150)
epsy Jul 6, 2017
4cb3810
Allow talk.abstract to have linebreaks in speakers_detail.html (#151)
fjsj Jul 6, 2017
d3f12bd
Remove loader (#149)
epsy Jul 6, 2017
b96f8e8
schedule: collapse the time and special slots together (#145)
epsy Jul 6, 2017
8ec4912
Style fixes for the schedule on mobile (#143)
epsy Jul 6, 2017
53fef8d
Schedule header style fixes (#152)
epsy Jul 8, 2017
c1e7330
Chunk speaker list (#154)
PirosB3 Jul 9, 2017
f8523b2
submenus in navbar
epsy Jul 9, 2017
168e07e
remove the desktop sidebar
epsy Jul 9, 2017
146576e
add link to blog
epsy Jul 9, 2017
d4303aa
Improve the sponsor footer
epsy Jul 9, 2017
934bb74
fix crash when a sponsor has no picture
epsy Jul 9, 2017
64c611b
Replace default speaker photo
epsy Jul 10, 2017
f8af47e
Add SVG source for default speaker photo
epsy Jul 10, 2017
cf35097
Fill the canvas with the speaker graphic
epsy Jul 10, 2017
ecdfd9a
Update schedule filters (#160)
epsy Jul 10, 2017
730ce8c
add schedule and speakers to menu
epsy Jul 10, 2017
3280d13
Fix schedule links in menubar (#162)
epsy Jul 10, 2017
6845fab
Fix clipping of new speaker photo
epsy Jul 10, 2017
8ba405e
schedule: fix multiple-category filter not working (#163)
epsy Jul 10, 2017
458e222
add lightbox images
epsy Jul 10, 2017
d71870d
fix glyphicon font urls
epsy Jul 10, 2017
b14df81
use {% static %} tag from staticfiles
epsy Jul 10, 2017
ffa6a31
Have travis run collectstatic before running tests
epsy Jul 10, 2017
5970de7
Use ManifestStaticFilesStorage so that browser caches get busted
epsy Jul 10, 2017
9ce8342
parse schedule description (#168)
epsy Jul 12, 2017
0ad1702
add CANONICAL_HOST to template context
epsy Jul 12, 2017
0b24003
add meta tags for card previews
epsy Jul 12, 2017
e49e70c
Tweak to description text
lpatmo Jul 12, 2017
5b3c3a8
Added address for Pre-conference workshop venue on registration page
arturolei Jul 13, 2017
cf3d54c
use markdown in talk description on speaker abstract page
epsy Jul 12, 2017
be1b9f7
use markdown in speaker biographies
epsy Jul 12, 2017
127b754
add new nerdwallet image and anchor tag
lpatmo Jul 15, 2017
a0b3960
Added rel="noopener noreferrer"
lpatmo Jul 15, 2017
c1bd44c
Fix the address for main conference location
grace-law Jul 16, 2017
498ed89
remove width constraint on flatpages
epsy Jul 16, 2017
18d06d1
tito-widget: let the ticket descriptions span a larger part of the line
epsy Jul 16, 2017
1bc1edd
Background is gray (again)
epsy Jul 16, 2017
d87e130
Remove white background from featured speakers
epsy Jul 16, 2017
bf88644
add unregistered db migration
epsy Jul 15, 2017
c36ba21
load tito synchronously and only on the registration page
epsy Jul 16, 2017
23d3548
display both tutorials and talks on speaker page
epsy Jul 15, 2017
bdacda2
display speakers who only have accepted tutorials on the speaker list…
epsy Jul 16, 2017
6a3d421
display ticket link for workshops on speaker page
epsy Jul 16, 2017
f4aab01
Add a location override for tutorials
epsy Jul 16, 2017
72179ff
fix the featured_speakers heading being too close to its bounding box
epsy Jul 16, 2017
4a8c67a
Use markdown in featured speakers
epsy Jul 16, 2017
6a51069
fix target=_blank urls exposing the page's context to external sites
epsy Jul 10, 2017
403aa3b
add target=_blank on external links
epsy Jul 10, 2017
0c99177
fix the color of the tito link in the widget
epsy Jul 16, 2017
7d039ca
Display category in the schedule cards (#189)
epsy Jul 19, 2017
55137a4
improve the layout of featured speakers (#188)
epsy Jul 19, 2017
7298f14
make the gray background appear behind headings in the sponsor list p…
epsy Jul 19, 2017
e720f8e
Gray faq boxes (#186)
epsy Jul 19, 2017
574c4b4
make parts of the sponsorship page gray (#185)
epsy Jul 19, 2017
e2fb225
center the companies' logos in "Committed to your education" on regis…
epsy Jul 19, 2017
e20ec05
add pre-conference workshops to the menu
epsy Jul 16, 2017
0741adb
Move pre-conf workshops menu to the right place
epsy Jul 19, 2017
e343749
schedule: description appears without warping layout
epsy Jul 9, 2017
69fd9bc
Add id to each talk
simeonf Jul 20, 2017
699e210
Add custom admin for tutorials
simeonf Jul 20, 2017
3642c6f
Add django-columns
simeonf Jul 20, 2017
006a9ab
Add columns to INSTALLED_APPS
simeonf Jul 20, 2017
c8fdee1
Add custom template and templatetags for use with tutorials flatpage
simeonf Jul 20, 2017
203b39b
Fix problem with ul on speakers page
simeonf Jul 20, 2017
42825cf
updated continuing education company blurb and link to faq
jttyeung Jul 24, 2017
7cb33f4
also fix ordered list styling on speaker pages
epsy Jul 19, 2017
d03824b
Change timezone to pacific in development mode to match other envs (#…
epsy Jul 25, 2017
8d42b6f
Reimplement the countdown
epsy Jul 24, 2017
b4d5373
improve the admin and debug displays for countdowns
epsy Jul 25, 2017
8dfc650
potential styling
jttyeung Jul 25, 2017
da92901
revised venue locations and images
jttyeung Jul 26, 2017
4d6b7c1
add conference location menubar link and page anchor
jttyeung Jul 26, 2017
17d0979
undo template changes
jttyeung Jul 26, 2017
866d7a7
added google maps
jttyeung Jul 26, 2017
8d6115f
revise navbar menu naming for registration
jttyeung Jul 26, 2017
2c8d99f
renamed navbar menu item
jttyeung Jul 26, 2017
0fdd974
added analytics script to base.html
arturolei Jul 31, 2017
c024501
Updated navbar links and speaker page headers (#198)
jttyeung Aug 2, 2017
dc860b6
schedule: allow html in slots' content_override
epsy Aug 4, 2017
16ea33f
Update Bloomberg workshop address
mzdaniel Aug 8, 2017
61d8940
Delete duplicated content
simeonf Aug 11, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,7 @@ ENV/

# Rope project settings
.ropeproject

dev.db

pybay/site_media/*
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: python
python:
- 3.5
- 3.6
install:
- pip install -r requirements.txt
script: ./manage.py collectstatic --no-input && ./manage.py test
env:
- TRAVIS=true
47 changes: 44 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
# pybay

[![Build Status](https://travis-ci.org/pybay/pybay.svg)](https://travis-ci.org/pybay)

The website for PyBay - the Bay Area Python Conference.

To work on this you'll need Python 3. Then:

1. Fork the repo to your own personal github.
- also clone the symposion repository, take note of the path to symposion/
2. Clone the repo to your local environment.
3. Create a virtualenv and activate it
4. `pip install` the requirements
5. start the management server
5. `pip install -e` the symposion repository
6. start the management server

Try:

$ git clone git@github.com:YOURUSERNAME/pybay
$ git clone git@github.com:pybay/symposion.git
$ cd pybay
$ python3 -m venv ENV
$ source ENV/bin/activate
(ENV)$ pip install -r requirements.txt
(ENV)$ pip install -e YOUR/PATH/TO/symposion/ # this installs our symposion fork to ENV!
(ENV)$ ./manage.py migrate
(ENV)$ ./manage.py loaddata fixtures/*
(ENV)$ ./manage.py loaddata fixtures/* # doesn't work on Windows, see "Windows instructions" below
(ENV)$ ./manage.py runserver

The default admin user is test and password is test
Expand All @@ -29,4 +35,39 @@ disk. Eg:

$ cd ~/workspace/pybay/ENV/lib/python3.6/site-packages/
$ rm -rf symposion
$ ln -s /Users/sfranklin/workspace/symposion/symposion .
$ ln -s ~/workspace/symposion/symposion .

### Windows Instructions

For some reason, running `manage.py loaddata fixtures/*` gives a `No fixture named '*' found` error on Windows. You'll have to load each fixture file individually:

(ENV)$ python manage.py loaddata fixtures/auth.json
(ENV)$ python manage.py loaddata fixtures/conference.json
(ENV)$ python manage.py loaddata fixtures/proposal_base.json
(ENV)$ python manage.py loaddata fixtures/sites.json
(ENV)$ python manage.py loaddata fixtures/sponsor_benefits.json
(ENV)$ python manage.py loaddata fixtures/sponsor_levels.json

(You can ignore the "invalid foreign keys" warnings you get. The foreign keys will become valid once you've loaded all the fixture files.)

## Deploying

Install fabric. Then use the `fab` command to run the deploy
task. You'll need the ssh login password for this.

$ pip install fabric3
$ fab deploy
[pyconsf.com] Executing task 'deploy'
Start with a git checkout.
[pyconsf.com] Passphrase for private key:
... much output...
Successfully completed

By default the deploy task deploys to staging.pyconsf.com using pybay's
staging branch. To deploy master branch to production (same server but
virtualhost pyconsf.com) run it with the prod target as an argument.

$ fab deploy:prod
[pyconsf.com] Executing task 'deploy'
... much output...
Successfully completed
66 changes: 66 additions & 0 deletions fabfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
from __future__ import print_function
from datetime import datetime as dt
from os.path import join

from fabric.api import cd, env, hide, local, run, sudo
from fabric.contrib import files

env.hosts = ['pyconsf.com']
env.user = 'pybay'

BASE = "/data/websites"
CHECKOUTS = "/data/websites/checkouts"

def checkout(prod=False):
"""Git clone pybay project to unique folder"""
path = "prod" if prod else "staging"
ts = dt.now().strftime("%Y-%m-%d.%H.%M.%S")
dirname = join(CHECKOUTS, path, ts)
run("mkdir %s" % dirname)
with cd(dirname):
with hide('running', 'stdout'):
clone_args = '' if prod else ' -b staging'
run("git clone https://github.com/pybay/pybay.git%s" % clone_args)
return dirname

def virtualenv(checkout):
"""Create virtualenv in checkout directory."""
with cd(checkout):
run("virtualenv ENV")
with hide('running', 'stdout'):
run("ENV/bin/pip3 install -r pybay/requirements.txt")
run("ENV/bin/pip3 install -r pybay/requirements-server.txt")

def migrate(checkout, prod=False):
"""Run migrations in checkout."""
settings = "pybay.prod_settings" if prod else "pybay.staging_settings"
with cd(checkout):
run("ENV/bin/python3 pybay/manage.py migrate --settings=%s" % settings)
run("ENV/bin/python3 pybay/manage.py collectstatic --noinput --settings=%s" % settings)

def relink(checkout, prod=False):
"""Move symlink to point to current checkout."""
dir = "prod" if prod else "staging"
with cd(BASE):
run("ln -s %s new && mv -Tf new %s" % (checkout, dir))

def touch(prod):
"""Touch symlinks to reload uwsgi config."""
dir = "prod" if prod else "staging"
run("touch /etc/uwsgi-emperor/vassals/%s_uwsgi.ini" % dir)


def deploy(version="staging"):
"""Run this to redeploy site from github master. Run `fab deploy:prod` to deploy main site."""
prod = True if version == 'prod' else False
print("Start with a git checkout.")
dir = checkout(prod)
print("Created %s" % dir)
print("Now create the virtualenv")
virtualenv(dir)
print("Run migrations and collectstatic")
migrate(dir, prod)
print("Update the active version")
relink(dir, prod)
touch(prod)
print("Successfully completed")
1 change: 1 addition & 0 deletions fixtures/schedule_slots.json

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions infrastructure/prod_nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# the upstream component nginx needs to connect to
upstream django_prod {
server unix:////data/websites/prod.sock; }

server {
listen 80;
listen 443 ssl;
server_name .pyconsf.com
.pybay.com;


location /site_media {
alias /data/websites/prod_site_media; }

location / {
uwsgi_pass django_prod;
include /data/websites/prod/pybay/infrastructure/uwsgi_params; }

charset utf-8;
client_max_body_size 75M;
}
12 changes: 12 additions & 0 deletions infrastructure/prod_uwsgi.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[uwsgi]
pybay_path = /data/websites/prod/pybay
chdir = %(pybay_path)
module = pybay.prod_wsgi
home = /data/websites/prod/ENV
master = true
processes = 5
socket = /data/websites/prod.sock
uid = www-data
gid = www-data
chmod-socket = 777
vacuum = true
19 changes: 19 additions & 0 deletions infrastructure/staging_nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# the upstream component nginx needs to connect to
upstream django_staging {
server unix:////data/websites/staging.sock; }

server {
listen 80;
server_name staging.pyconsf.com
staging.pybay.com;

location /site_media {
alias /data/websites/staging_site_media; }

location / {
uwsgi_pass django_staging;
include /data/websites/staging/pybay/infrastructure/uwsgi_params; }

charset utf-8;
client_max_body_size 75M;
}
12 changes: 12 additions & 0 deletions infrastructure/staging_uwsgi.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[uwsgi]
pybay_path = /data/websites/staging/pybay
chdir = %(pybay_path)
module = pybay.staging_wsgi
home = /data/websites/staging/ENV
master = true
processes = 5
socket = /data/websites/staging.sock
uid = www-data
gid = www-data
chmod-socket = 777
vacuum = true
17 changes: 17 additions & 0 deletions infrastructure/uwsgi_params
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
uwsgi_param CONTENT_TYPE $content_type;
uwsgi_param CONTENT_LENGTH $content_length;

uwsgi_param REQUEST_URI $request_uri;
uwsgi_param PATH_INFO $document_uri;
uwsgi_param DOCUMENT_ROOT $document_root;
uwsgi_param SERVER_PROTOCOL $server_protocol;
uwsgi_param REQUEST_SCHEME $scheme;
uwsgi_param HTTPS $https if_not_empty;

uwsgi_param REMOTE_ADDR $remote_addr;
uwsgi_param REMOTE_PORT $remote_port;
uwsgi_param SERVER_PORT $server_port;
uwsgi_param SERVER_NAME $server_name;
2 changes: 1 addition & 1 deletion pybay/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ class AppConfig(BaseAppConfig):
name = "pybay"

def ready(self):
import_module("pybay\.receivers")
import_module("pybay.receivers")
8 changes: 8 additions & 0 deletions pybay/context_processors.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django.conf import settings


def settings_variables(request):
return {
'SHOW_SPEAKERS_LIST_NAVBAR_LINK': getattr(settings, 'SHOW_SPEAKERS_LIST_NAVBAR_LINK', False),
'CANONICAL_HOST': settings.CANONICAL_HOST,
}
Empty file added pybay/countdowns/__init__.py
Empty file.
10 changes: 10 additions & 0 deletions pybay/countdowns/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from django.contrib import admin

from . import models


class CountdownAdmin(admin.ModelAdmin):
list_display = 'title', 'date'


admin.site.register(models.Countdown, CountdownAdmin)
5 changes: 5 additions & 0 deletions pybay/countdowns/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class PybayCountdownsConfig(AppConfig):
name = 'pybay_countdowns'
26 changes: 26 additions & 0 deletions pybay/countdowns/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2017-07-24 00:04
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='Countdown',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.TextField(help_text='Text above the countdown')),
('date', models.DateTimeField(help_text='The date the countdown counts to')),
('cta', models.TextField(help_text='Text on the button below the countdown', verbose_name="Call to action")),
('link', models.TextField(help_text='Target of the button below the countdown')),
],
),
]
Empty file.
17 changes: 17 additions & 0 deletions pybay/countdowns/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from django.db import models
from django.utils import timezone


class Countdown(models.Model):
title = models.TextField(help_text="Text above the countdown")
date = models.DateTimeField(help_text="The date the countdown counts to")
cta = models.TextField(help_text="Text on the button below the countdown", verbose_name='Call to action')
link = models.TextField(help_text="Target of the button below the countdown")

def context_for_template(self):
ret = dict(self.__dict__, reference=timezone.now().timestamp())
ret['date'] = ret['date'].timestamp()
return ret

def __str__(self):
return '{0.title}: {0.date}'.format(self)
9 changes: 9 additions & 0 deletions pybay/dbg_settings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from pybay.settings import *

INSTALLED_APPS += ['debug_toolbar']

MIDDLEWARE_CLASSES = ['debug_toolbar.middleware.DebugToolbarMiddleware'] + MIDDLEWARE_CLASSES

DEBUG_TOOLBAR = True

INTERNAL_IPS = ['127.0.0.1']
Empty file added pybay/faqs/__init__.py
Empty file.
10 changes: 10 additions & 0 deletions pybay/faqs/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from django.contrib import admin
from .models import Category, Faq


class CategoryAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("title",)}


admin.site.register(Faq)
admin.site.register(Category, CategoryAdmin)
5 changes: 5 additions & 0 deletions pybay/faqs/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.apps import AppConfig


class FaqsConfig(AppConfig):
name = 'faqs'
24 changes: 24 additions & 0 deletions pybay/faqs/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2017-05-07 22:06
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

initial = True

dependencies = [
]

operations = [
migrations.CreateModel(
name='Faq',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('title', models.CharField(max_length=200)),
('body', models.TextField()),
],
),
]
21 changes: 21 additions & 0 deletions pybay/faqs/migrations/0002_faq_ordering.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2017-05-07 22:42
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('faqs', '0001_initial'),
]

operations = [
migrations.AddField(
model_name='faq',
name='ordering',
field=models.IntegerField(default=0),
preserve_default=False,
),
]
Loading