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 FilterMixin(object): | |
""" | |
View mixin which provides filtering for ListView. | |
""" | |
filter_url_kwarg = 'filter' | |
default_filter_param = None | |
def get_default_filter_param(self): | |
if self.default_filter_param is None: | |
raise ImproperlyConfigured( |
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
This code is a suggested answer to question asked on Stackoverflow: | |
http://stackoverflow.com/questions/4827965/can-i-change-djangos-auth-user-username-field-to-be-100-chars-long-without-break/ |