ajout website dans table actifs

This commit is contained in:
2017-12-23 09:46:45 +01:00
parent 1909ee7245
commit 22f35dee86
3 changed files with 12 additions and 0 deletions

View File

@@ -94,6 +94,13 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group">
<label class="col-xs-2 control-label">Web site</label>
<div class="col-xs-8">
<input class="form-control" type="text" name="website"
value="${actif.website}" placeholder="100 caractères maximum" />
</div>
</div>
<br /> <br />
<div class="form-group"> <div class="form-group">
<div class="col-xs-offset-2 col-xs-10"> <div class="col-xs-offset-2 col-xs-10">

View File

@@ -27,6 +27,7 @@
<th class="text-right">+/- Valeur</th> <th class="text-right">+/- Valeur</th>
<th class="text-right">% de +/-</th> <th class="text-right">% de +/-</th>
<th class="text-right">% PF</th> <th class="text-right">% PF</th>
<th class="text-right"></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@@ -44,6 +45,8 @@
<td tal:condition="ligne.pc_plusvalue>=0" class="text-right" style="color: green;">${layout.to_percent(ligne.pc_plusvalue, 1)}</td> <td tal:condition="ligne.pc_plusvalue>=0" class="text-right" style="color: green;">${layout.to_percent(ligne.pc_plusvalue, 1)}</td>
<td tal:condition="ligne.pc_plusvalue <0" class="text-right" style="color: red;">${layout.to_percent(ligne.pc_plusvalue, 1)}</td> <td tal:condition="ligne.pc_plusvalue <0" class="text-right" style="color: red;">${layout.to_percent(ligne.pc_plusvalue, 1)}</td>
<td class="text-right">${ligne.pc_allocation} %</td> <td class="text-right">${ligne.pc_allocation} %</td>
<td tal:condition="ligne.website"><a href="${ligne.website}" target="__blank"><span class="glyphicon glyphicon-search"></span></td>
<td tal:condition="not ligne.website"></td>
</tr> </tr>
<tr> <tr>
<td class="text-right" colspan="6"><b>Total</b></td> <td class="text-right" colspan="6"><b>Total</b></td>

View File

@@ -53,6 +53,8 @@ def getYahooQuote(ticker):
if divs[1].span.text != 'Dividend': #Ignore this row in the table if divs[1].span.text != 'Dividend': #Ignore this row in the table
#I'm only interested in 'Close' price; #I'm only interested in 'Close' price;
data.append({'Date': divs[0].span.text, 'Close': float(divs[5].span.text.replace(',',''))}) data.append({'Date': divs[0].span.text, 'Close': float(divs[5].span.text.replace(',',''))})
break
# retourne la prière ligne # retourne la prière ligne
return data[0] return data[0]