Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Commit

Permalink
Add subdomain support to the API
Browse files Browse the repository at this point in the history
Because of the `SERVER_NAME`, the API currently does not work. As a
short term hot fix, this change gets the API back into a working state.
In the long term, we should either use the event identified by the
subdomain in all API requests or split the API application out into a
separately deployed application (e.g. `https://api.pygotham.org/`).
  • Loading branch information
jonafato committed Jun 15, 2016
1 parent 8ecff61 commit 1535b40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion pygotham/api/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
from .fields import event_fields


blueprint = Blueprint('events', __name__, url_prefix='/events')
blueprint = Blueprint(
'events', __name__, subdomain='<event_slug>', url_prefix='/events')
api = Api(blueprint)


Expand Down
6 changes: 5 additions & 1 deletion pygotham/api/schedule.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@
from .fields import talk_fields

blueprint = Blueprint(
'schedule', __name__, url_prefix='/events/<int:event_id>/schedule')
'schedule',
__name__,
subdomain='<event_slug>',
url_prefix='/events/<int:event_id>/schedule',
)
api = Api(blueprint)


Expand Down

0 comments on commit 1535b40

Please sign in to comment.