Skip to content

Instantly share code, notes, and snippets.

@grantmcconnaughey
Created January 5, 2017 01:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save grantmcconnaughey/90843495f27e5c054f97fd4dc1256af8 to your computer and use it in GitHub Desktop.
Save grantmcconnaughey/90843495f27e5c054f97fd4dc1256af8 to your computer and use it in GitHub Desktop.
# Future git services will go here
GITHUB = 'gh'
DUMMY = 'dummy'
def service(request):
services = (GITHUB, DUMMY)
the_service = None
for _service in services:
if request.path.startswith('/{}/'.format(_service)):
the_service = _service
return {'service': the_service}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment