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

New PyATL website with addtional functionality. #57

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ podium/lib
podium/pip-selfcheck.json
podium/pyvenv.cfg
db.sqlite3
.venv
8 changes: 6 additions & 2 deletions BEGINNERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ practices used throughout the open source community. While these instructions
are intended to be specific to *this* project, they should be applicable to
many other projects, both open source and private.

The podium code is inside the `podium` directory. There is also
code for the PyATL website in the `pyatl` directory. They are both separate.
Changes in one should not affect the other.

## What You Need ##
Before you can begin coding and contributing, you'll need the following:
- A Github account. You can sign up for a free account [here](
Expand Down Expand Up @@ -67,8 +71,8 @@ something unrelated to your own changes.
- **(Optional)** Set up a [virtualenv](https://virtualenv.pypa.io/en/stable/)
for the project. This will help avoid any unwanted interaction with any other
projects you may have on your development machine.
- Create the virtualenv. You can call it whatever you like and keep it
in whatever directory you like.
- Create the virtualenv. You can call it whatever you like (except `.env`) and keep it
in whatever directory you like. Not sure what to call it? `.venv` is commonly used.
```
python3 -m venv <virtualenv directory>
```
Expand Down
37 changes: 37 additions & 0 deletions DEVELOPER-NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
On the `pyatl` website:

### Location Maps

The Location model has a field called `map_embed_code`.
The purpose of this field is to store the embed code of open street maps.
These embed codes are generated from the open street maps page. [Example](https://www.openstreetmap.org/export#map=19/33.77077/-84.35373)

Important!

The open street maps embed code is provided as an iframe.
Example:

```
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.openstreetmap.org/export/embed.html?bbox=-84.35519188642503%2C33.76984792852217%2C-84.35227632522583%2C33.771691836631966&amp;layer=mapnik&amp;marker=33.77076988753727%2C-84.35373410582542" style="border: 1px solid black"></iframe><br/><small><a href="https://www.openstreetmap.org/?mlat=33.77077&amp;mlon=-84.35373#map=19/33.77077/-84.35373">View Larger Map</a></small>
```

You need to change the iframe width and height values to `auto` like so:

```
<iframe width="auto" height="auto" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.openstreetmap.org/export/embed.html?bbox=-84.35519188642503%2C33.76984792852217%2C-84.35227632522583%2C33.771691836631966&amp;layer=mapnik&amp;marker=33.77076988753727%2C-84.35373410582542" style="border: 1px solid black"></iframe><br/><small><a href="https://www.openstreetmap.org/?mlat=33.77077&amp;mlon=-84.35373#map=19/33.77077/-84.35373">View Larger Map</a></small>
```

Otherwise it breaks the responsive layout.


### WYSIWYG

The app now has the `django-tinymce` installed. It allows to convert textareas into WYSIWYG editors.
This also includes those im the admin site. Read the docs!
[django-tinymce documentation](https://django-tinymce.readthedocs.io/en/latest/usage.html)

### Bootstrap versions

The podium side of things uses Bootstrap 3.
The pyatl website side uses Bootstrap 4.
The apps do not share templates.
100 changes: 100 additions & 0 deletions PYATL-USER-GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
This user guide is meant for the functionality of the pyatl website (in the `pyatl` directory).

All content is meant to be created through the django admin.
The page design is mobile first.

## Events

An `Event` represents a date and time when the group has scheduled to meet.
Events can be online and offline.

**Important**

When creating events through the django admin:

- Know that the backend is setup to be timezone aware.
- Note that the datetimes in the admin are in `UTC`.
- The datetime widget will tell you how many hours from `UTC` you are. The info is displayed under the widget.
- Make sure to enter all event datetimes in UTC

Examples:

You are creating an event for the 14th of November at 7:00 PM.
Count how many hours from UTC that would be.
Atlanta falls under the `America/New_York` timezone which is -4:00 (-5:00 during Daylight Savings Time) from UTC.
That means that you should create the event in the future: 7:00 PM plus whatever hours the UTC offset will be.
When this guide was created, Daylight Savings Time was happening. So it would be 7:00 PM plus 5 hours difference. Meaning that you would
create the event for the 15th of November at 00:00:00 hours.

The templates are timezone aware and will display the datetimes as the `America/New_York` timezone.


The event admin allows you to provide two types of event descriptions:

- Short description
- Description

#### Short description

The short description is the event's description, but in tweetable form.
It is limited to 280 characters and must be plain text (no HTML).
It is also used for the twitter cards and event invites
This is an important field.

#### Description

The event description is simply what the event is about and what will happen.
Please include the talks schedule or any detail deemed important.
The description uses a TinyMCE WYSIWYG as the widget.


## Invites

Event calendar invites (in .ics format) can be downloaded from the event page.
The invite will include:

- The event start time (with date)
- The event end time (with date)
- Whatever was written in the `short_description` field
- A link to the event page on the pyatl website
- A link to the event's location page on the pyatl website


## Locations

A `location` represents a place where an event takes place. It can be online or offline.
An example of an offline location is Manuel's Tavern.
The locations description provides WISIWYG funcitonality.

The Location has a field called `map_embed_code` for offline locations. Online locations can simply have their URL posted in the description.
The purpose of this field is to store the embed code of open street maps.
These embed codes are generated from the open street maps page. [Example](https://www.openstreetmap.org/export#map=19/33.77077/-84.35373)

Important!

The open street maps embed code is provided as an iframe.
Example:

```
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.openstreetmap.org/export/embed.html?bbox=-84.35519188642503%2C33.76984792852217%2C-84.35227632522583%2C33.771691836631966&amp;layer=mapnik&amp;marker=33.77076988753727%2C-84.35373410582542" style="border: 1px solid black"></iframe><br/><small><a href="https://www.openstreetmap.org/?mlat=33.77077&amp;mlon=-84.35373#map=19/33.77077/-84.35373">View Larger Map</a></small>
```

You need to change the iframe width and height values to `auto` like so:

```
<iframe width="auto" height="auto" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.openstreetmap.org/export/embed.html?bbox=-84.35519188642503%2C33.76984792852217%2C-84.35227632522583%2C33.771691836631966&amp;layer=mapnik&amp;marker=33.77076988753727%2C-84.35373410582542" style="border: 1px solid black"></iframe><br/><small><a href="https://www.openstreetmap.org/?mlat=33.77077&amp;mlon=-84.35373#map=19/33.77077/-84.35373">View Larger Map</a></small>
```

Otherwise it breaks the responsive layout.

## Pages

A page is a simple WISIWYG enabled content type meant to share general information
with members without the need to create new HTML template. Pages need to be published in order to be accessible.

There is no way to see all the published pages at once. This was done on purpose to avoid turning this feature
into a defacto blogging engine.

Links to published pages can be made to show in the footer by checking the `footer link` option.

A example of a page that would show in the footer would be a code of conduct page.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Podium is an application for booking and scheduling talks for meetups. This
app is being maintained by Python Atlanta Jam Session members to help schedule
talks for our Python Atlanta meetups.

Podium also has functionality for PyATL's website. This funcitonality is in the `pyatl` directory and is separate
from the rest of the codebase. It is not maintained by the Jam session members.

Python Atlanta's Podium is currently running at
https://pyatl-podium.herokuapp.com/

Expand All @@ -20,6 +23,11 @@ https://pyatl-podium.herokuapp.com/
- python-dotenv 0.6.4 - Parse environment variables from .env files
- django-crispy-forms 1.6.1- Adds bootstrap3 input styling to forms.
- django-registration-redux 1.7 - User registration.
- arrow 0.14.7 - ics dependency
- Click 7.0 - ics dependency
- ics 0.6 - Generates ics calendar invites
- TatSu 4.4.0 - ics dependency
- six 1.12.0 - Python 2 to 3 compatibility library

NOTE: Podium is designed to be run on Heroku but can be used on any platform
supporting [12 Factor Apps](https://12factor.net/).
Expand Down
2 changes: 2 additions & 0 deletions example.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ DJANGO_SECRET_KEY=<YOUR SECRET KEY HERE>
DATABASE_URL=<YOUR DATABASE URL>
# Uncomment to run DEBUG mode locally
#DJANGO_DEBUG=TRUE
# Uncomment to run locally without HTTPS
#DJANGO_DISABLE_SSL=True
6 changes: 6 additions & 0 deletions podium/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
INSTALLED_APPS = [
# Project apps
'podium.talks',
'pyatl',

# Django built-in apps
'django.contrib.admin',
Expand All @@ -61,6 +62,7 @@
# Third party apps
'registration',
'crispy_forms',
'tinymce',
]

MIDDLEWARE = [
Expand Down Expand Up @@ -174,3 +176,7 @@
SITE_ID = 1

LOGIN_REDIRECT_URL = '/talks/sessions/'

# TinyMCE

TINYMCE_DEFAULT_CONFIG = {'theme': 'advanced', }
7 changes: 2 additions & 5 deletions podium/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@
"""
from django.conf.urls import url, include
from django.contrib import admin
from . import views


urlpatterns = [

url(r'^admin/', admin.site.urls),
url(r'^accounts/', include('registration.backends.default.urls')),
url(r'^talks/', include('podium.talks.urls')),
url(r'^$', views.index, name='index'),

url(r'^tinymce/', include('tinymce.urls')),
url(r'', include('pyatl.urls')),
]
9 changes: 0 additions & 9 deletions podium/views.py

This file was deleted.

Loading