Skip to content

Add status query managers that inherit methods of a custom queryset - #487

Open
EliasCampos wants to merge 1 commit into
jazzband:masterfrom
EliasCampos:status-manager-with-custom-qs-methods
Open

EliasCampos wants to merge 1 commit into
jazzband:masterfrom
EliasCampos:status-manager-with-custom-qs-methods

Conversation

@EliasCampos

Copy link
Copy Markdown

Problem

Please see #486

Solution

In add_status_query_managers signal handler, add creation of manager class, that inherits QueryManager and takes methods of a queryset, returned by .get_queryset() method of a default manager. Status managers, added to a model, are instances of the created manager.

Commandments

  • Write PEP8 compliant code.
  • Cover it with tests.
  • Update CHANGES.rst file to describe the changes, and quote according issue with GH-<issue_number>.
  • Pay attention to backward compatibility, or if it breaks it, explain why.
  • Update documentation (if relevant).

@codecov

codecov Bot commented Apr 18, 2021

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@57d26ee). Click here to learn what that means.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #487   +/-   ##
=========================================
  Coverage          ?   94.58%           
=========================================
  Files             ?        6           
  Lines             ?      757           
  Branches          ?        0           
=========================================
  Hits              ?      716           
  Misses            ?       41           
  Partials          ?        0           
Impacted Files Coverage Δ
model_utils/models.py 98.93% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 57d26ee...1141d99. Read the comment docs.

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