mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-25 10:08:36 +02:00
fix: missing DCA charts
This commit is contained in:
@@ -140,11 +140,26 @@ def strategy_detail(request, strategy_id):
|
|||||||
]
|
]
|
||||||
entries_data.reverse()
|
entries_data.reverse()
|
||||||
|
|
||||||
|
# Prepare entries data with current values
|
||||||
|
# Prepare entries data with current values
|
||||||
|
entries_data = [
|
||||||
|
{
|
||||||
|
"entry": entry,
|
||||||
|
"current_value": entry.current_value(),
|
||||||
|
"profit_loss": entry.profit_loss(),
|
||||||
|
"profit_loss_percentage": entry.profit_loss_percentage(),
|
||||||
|
}
|
||||||
|
for entry in entries
|
||||||
|
]
|
||||||
|
entries_data.reverse()
|
||||||
|
|
||||||
context = {
|
context = {
|
||||||
"strategy": strategy,
|
"strategy": strategy,
|
||||||
"entries": entries,
|
"entries": entries,
|
||||||
"entries_data": entries_data,
|
"entries_data": entries_data,
|
||||||
"monthly_data": monthly_data,
|
"monthly_data": monthly_data,
|
||||||
|
"investment_frequency": strategy.investment_frequency_data(),
|
||||||
|
"price_comparison_data": strategy.price_comparison_data(),
|
||||||
}
|
}
|
||||||
|
|
||||||
return render(request, "dca/fragments/strategy/details.html", context)
|
return render(request, "dca/fragments/strategy/details.html", context)
|
||||||
|
|||||||
Reference in New Issue
Block a user