stefanfoulis/django-filer — pull request #322 by gavinwahl (2013-06-21 18:27:56+00:00)
Title: Turn the admin filter_* functions into methods

These `filter_file` and `filter_folder` functions make assumptions about the user model in use -- it must have `username`, `first_name`, and `last_name` fields. They should be implemented as methods instead of inner functions to allow overriding them when using a different user model.

Another solution for searching custom user models could be to dynamically build the query based on `get_user_model()._meta.fields`. This seems complicated and prone to error, so providing overridable methods is simpler and probably good enough.