Last active
June 21, 2017 18:45
-
-
Save dimkoug/bc7f5fdf090fd929dded7a523328612e to your computer and use it in GitHub Desktop.
Process ulr patterns django for kwargs arguments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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