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
def my_view_mocker(view): | |
view.request.tacos = 'Hi' | |
print "This is the viewmocker, just changed view.request.tacos to %s" % view.request.tacos | |
return view | |
class FileTree(generics.ListAPIView): | |
model = File | |
lookup_field = 'file_id' | |
paginate_by = 25 | |
paginate_by_param = 'items' |
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
from some_library import OriginalClass | |
class CustomClass(OriginalClass): | |
def original_method(*args, **kwargs): | |
# do stuff the way I want to do it instead of the way the library does it |