passage pyramid 1.10
This commit is contained in:
@@ -11,7 +11,7 @@ from zope.sqlalchemy import ZopeTransactionExtension, mark_changed
|
||||
from datetime import *
|
||||
import transaction
|
||||
from bs4 import BeautifulSoup
|
||||
import urllib2
|
||||
from urllib.request import urlopen
|
||||
|
||||
from .default import (
|
||||
execute_query,
|
||||
@@ -146,7 +146,7 @@ def getCurrencyRate(currency):
|
||||
quote_page = 'https://markets.ft.com/data/currencies/tearsheet/summary?s=%seur' % currency
|
||||
|
||||
# query & parse the html using beautiful soap and store in variable `soup`
|
||||
soup = BeautifulSoup(urllib2.urlopen(quote_page), 'html.parser')
|
||||
soup = BeautifulSoup(urlopen(quote_page), 'html.parser')
|
||||
data_list = soup.find_all("span", class_="mod-ui-data-list__value")
|
||||
if data_list:
|
||||
# get the rate price in EUR
|
||||
@@ -161,7 +161,7 @@ def getFTQuote(ticker):
|
||||
quote_page = 'https://markets.ft.com/data/funds/tearsheet/historical?s=%s' % ticker
|
||||
|
||||
# query & parse the html using beautiful soap and store in variable `soup`
|
||||
soup = BeautifulSoup(urllib2.urlopen(quote_page), 'html.parser')
|
||||
soup = BeautifulSoup(urlopen(quote_page), 'html.parser')
|
||||
data_list = soup.find_all("span", class_="mod-ui-data-list__value")
|
||||
if data_list:
|
||||
# get the quote price
|
||||
|
||||
@@ -141,7 +141,7 @@ def login(request):
|
||||
record = get_member_by_email(request, login)
|
||||
if record :
|
||||
# mot de passe hash valide ?
|
||||
if record.mdp == to_sha1(old_password):
|
||||
if record.mdp == to_sha1(password):
|
||||
update_last_connection(request, login)
|
||||
# force le commit car il ne se fait pas automatiquement après l'update
|
||||
transaction.commit()
|
||||
|
||||
Reference in New Issue
Block a user