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

Commit

Permalink
Merge pull request #306 from PyGotham/api-subdomain-support
Browse files Browse the repository at this point in the history
Add subdomain support to the API
  • Loading branch information
dirn authored Jun 15, 2016
2 parents 8ecff61 + 1535b40 commit 840cb57
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 840cb57

Please sign in to comment.