django-cprofile-middleware icon indicating copy to clipboard operation
django-cprofile-middleware copied to clipboard

[Core] Add a configuration file.

Open hobbestigrou opened this issue 6 years ago • 4 comments

Give the possiblity to configure if the user must be staff.

Fixes: #17

hobbestigrou avatar Mar 23 '18 16:03 hobbestigrou

Did you agree with that ? Or did you want I make some modifications

hobbestigrou avatar Mar 30 '18 14:03 hobbestigrou

Nice, I think it's great so far, but we could probably simplify it a little bit by:

  1. Move the contents of conf.py into django's settings.py module.
  2. 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 separate conf.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?

omarish avatar Mar 30 '18 18:03 omarish

I prefer to have a separate file, but I'm going to make what you said.

hobbestigrou avatar Apr 03 '18 09:04 hobbestigrou

I made the modification.

hobbestigrou avatar Apr 03 '18 10:04 hobbestigrou