Skip to content

Instantly share code, notes, and snippets.

@dimkoug
Last active June 21, 2017 18:45
Show Gist options
  • Save dimkoug/bc7f5fdf090fd929dded7a523328612e to your computer and use it in GitHub Desktop.
Save dimkoug/bc7f5fdf090fd929dded7a523328612e to your computer and use it in GitHub Desktop.
Process ulr patterns django for kwargs arguments
class ProcessUrl(object):
'''
Process urls point to class based views for kwargs arguments
'''
def dispatch(self, *args, **kwargs):
for key, value in self.kwargs.items():
setattr(self, key, value)
return super(ProcessUrl, self).dispatch(*args, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment