django-cprofile-middleware
django-cprofile-middleware copied to clipboard
[Core] Add a configuration file.
Give the possiblity to configure if the user must be staff.
Fixes: #17
Did you agree with that ? Or did you want I make some modifications
Nice, I think it's great so far, but we could probably simplify it a little bit by:
- Move the contents of
conf.py
into django'ssettings.py
module. - Update the main middleware file to check if
settings.py
hasattr
CPROFILE_MIDDLEWARE_REQUIRE_STAFF
, and default to True. That way we won't have to keep a separateconf.py
file in the repository, and a user can update the library to not require staff by defining an option in settings.py.
Does that make sense? Thoughts?
I prefer to have a separate file, but I'm going to make what you said.
I made the modification.