mirumee / django-prices

Django fields for the prices module
158 stars 52 forks source link

Set TaxedMoneyField's value on Model's initialization or creation #55

Closed rafalp closed 6 years ago

rafalp commented 6 years ago

This PR modifies TaxedMoneyField model field to use contribute_to_class() to register itself as field on model in same fashion that GenericForeignKey does, thus making it possible to set its value on models initialization. PR includes test and bumps lib version to beta 4.

codecov[bot] commented 6 years ago

Codecov Report

Merging #55 into master will not change coverage. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #55   +/-   ##
=======================================
  Coverage   96.15%   96.15%           
=======================================
  Files           4        4           
  Lines         104      104           
  Branches       10       10           
=======================================
  Hits          100      100           
  Misses          2        2           
  Partials        2        2
Impacted Files Coverage Δ
django_prices/widgets.py 88.23% <100%> (ø) :arrow_up:

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 b9cd87a...541816d. Read the comment docs.