django-adminrestrict
django-adminrestrict copied to clipboard
Added Custom HTML Template
Middleware Changes:
- Import render
- Create self.denied_template = getattr(settings, 'ADMINRESTRICT_TEMPLATE', '')
- Add condition statement under GET to check if denied_template is configured
- Change condition statement under POST to check if denied_template is configured
Test Changes:
- Created test for custom template: LINE 93
README Changes:
- Added Line 148 and 149 to describe new feature
SETUP Changes:
- Changed from version 3.0 to 3.0.1
Sorry for taking so long to get to this. This is a great idea!
Seeing some build failures (just migrated from Travis CI to Github Actions). Please take a look if you are still working on this and have time.
Many thanks,
Sorry for taking so long to get to this. This is a great idea!
Seeing some build failures (just migrated from Travis CI to Github Actions). Please take a look if you are still working on this and have time.
Many thanks,
I am having issues with testing. When can we collaborate on this via WebEx?
I had to enable running the build for this PR.
Looks like you should be able to view the build failures and debug now.
Current failure: https://github.com/robromano/django-adminrestrict/actions/runs/3237830528/jobs/5328097274
I am having issues with testing. When can we collaborate on this via WebEx?
Let me know if the build output I posted is helping you test. Even if you can't run test locally each push you do should trigger a build and you can see if your fixes work.
If that doesn't work let me know a time we can setup a call.
I believe the testing should pass now. By default, I was returning the resp.content as DENIED_MSG instead of the DENIED_Template.
Codecov Report
Base: 93.38% // Head: 93.36% // Decreases project coverage by -0.01%
:warning:
Coverage data is based on head (
2240790
) compared to base (f9d0ef8
). Patch coverage: 93.75% of modified lines in pull request are covered.
:exclamation: Current head 2240790 differs from pull request most recent head 0c134fa. Consider uploading reports for the commit 0c134fa to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #22 +/- ##
==========================================
- Coverage 93.38% 93.36% -0.02%
==========================================
Files 11 11
Lines 408 422 +14
==========================================
+ Hits 381 394 +13
- Misses 27 28 +1
Impacted Files | Coverage Δ | |
---|---|---|
adminrestrict/middleware.py | 85.43% <87.50%> (-0.09%) |
:arrow_down: |
adminrestrict/tests.py | 99.43% <100.00%> (+0.02%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
There are some failures:
https://github.com/robromano/django-adminrestrict/actions/runs/3301836464
There are some failures:
https://github.com/robromano/django-adminrestrict/actions/runs/3301836464
Thanks! I fixed what I did wrong. Hopefully this time is the charm. 🤞
There are some failures:
https://github.com/robromano/django-adminrestrict/actions/runs/3301836464
Thanks!
I fixed what I did wrong.
Hopefully this time is the charm. 🤞
Some errors still - https://github.com/robromano/django-adminrestrict/actions/runs/3305906123/jobs/5456449947