Skip to content

Instantly share code, notes, and snippets.

@tomchristie
Created June 18, 2013 15:50
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 tomchristie/5806521 to your computer and use it in GitHub Desktop.
Save tomchristie/5806521 to your computer and use it in GitHub Desktop.
class ExtendedRouter(SimpleRouter):
routes = SimpleRouter.routes + [
Route(
url=r'^{prefix}/{lookup}/{methodname}/(?P<slug>[^/]+){trailing_slash}$',
mapping={
'{httpmethod}': '{methodname}',
},
name='{basename}-{methodnamehyphen}-slug',
initkwargs={}
),
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment