Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support to built-in django-admin command #16

Merged
merged 1 commit into from
Dec 22, 2024
Merged

Conversation

ryanhiebert
Copy link
Owner

@ryanhiebert ryanhiebert commented Dec 21, 2024

Use hatch-autorun to hook into the django management command before it is run.

Notably, this monkeypatching requires that the module always be loaded, even if django itself isn't being loaded by a script. It may not be the biggest problem, but it is more heavy-handed than I'd like. I'd rather have the implementation only add a hook so that when the module is imported it will be monkeypatched before it is fully imported.

@ryanhiebert ryanhiebert force-pushed the monkeypatch branch 4 times, most recently from 1ca771f to 9255cf1 Compare December 21, 2024 13:06
Copy link

codecov bot commented Dec 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (73e6cd1) to head (cb357bd).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #16   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           26        34    +8     
  Branches         5         5           
=========================================
+ Hits            26        34    +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ryanhiebert ryanhiebert force-pushed the monkeypatch branch 8 times, most recently from 4e94c03 to cb357bd Compare December 22, 2024 12:43
@ryanhiebert ryanhiebert merged commit eefc0dc into main Dec 22, 2024
31 checks passed
@ryanhiebert ryanhiebert deleted the monkeypatch branch December 22, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant