passage pyramid 1.10

This commit is contained in:
2018-12-22 10:33:44 +01:00
parent 0b6cbcebd5
commit 7ef84bada2
4 changed files with 11 additions and 12 deletions

View File

@@ -1,12 +1,11 @@
Metadata-Version: 1.1 Metadata-Version: 2.1
Name: caotek-mesavoirs Name: caotek-mesavoirs
Version: 0.1 Version: 0.1
Summary: caotek_mesavoirs Summary: caotek_mesavoirs
Home-page: UNKNOWN Home-page: UNKNOWN
Author: UNKNOWN Author:
Author-email: UNKNOWN Author-email:
License: UNKNOWN License: UNKNOWN
Description-Content-Type: UNKNOWN
Description: # README # Description: # README #
@@ -14,12 +13,12 @@ Description: # README #
Développé avec : Développé avec :
- Pyramid Framework - Pyramid Framework
- MySQL - MySQL
- Chameleon - Chameleon
* [Exemple d'une comptabilité simple] (http://perso.numericable.fr/assoc1901/droit/comptabilite1.htm) * [Exemple d'une comptabilité simple] (http://perso.numericable.fr/assoc1901/droit/comptabilite1.htm)
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo) * [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
@@ -36,3 +35,4 @@ Classifier: Programming Language :: Python
Classifier: Framework :: Pyramid Classifier: Framework :: Pyramid
Classifier: Topic :: Internet :: WWW/HTTP Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Provides-Extra: testing

View File

@@ -11,7 +11,7 @@ from zope.sqlalchemy import ZopeTransactionExtension, mark_changed
from datetime import * from datetime import *
import transaction import transaction
from bs4 import BeautifulSoup from bs4 import BeautifulSoup
import urllib2 from urllib.request import urlopen
from .default import ( from .default import (
execute_query, execute_query,
@@ -146,7 +146,7 @@ def getCurrencyRate(currency):
quote_page = 'https://markets.ft.com/data/currencies/tearsheet/summary?s=%seur' % 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` # 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") data_list = soup.find_all("span", class_="mod-ui-data-list__value")
if data_list: if data_list:
# get the rate price in EUR # 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 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` # 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") data_list = soup.find_all("span", class_="mod-ui-data-list__value")
if data_list: if data_list:
# get the quote price # get the quote price

View File

@@ -141,7 +141,7 @@ def login(request):
record = get_member_by_email(request, login) record = get_member_by_email(request, login)
if record : if record :
# mot de passe hash valide ? # mot de passe hash valide ?
if record.mdp == to_sha1(old_password): if record.mdp == to_sha1(password):
update_last_connection(request, login) update_last_connection(request, login)
# force le commit car il ne se fait pas automatiquement après l'update # force le commit car il ne se fait pas automatiquement après l'update
transaction.commit() transaction.commit()

View File

@@ -18,8 +18,7 @@ pyramid.includes =
pyramid_mailer pyramid_mailer
pyramid_tm pyramid_tm
sqlalchemy.url = mysql://root:phuoc@localhost/bd_mesavoirs?charset=utf8 sqlalchemy.url = mysql://phuoc:phuoc!@localhost/bd_mesavoirs?charset=utf8
# sqlalchemy.url = mysql+mysqlconnector://root:phuoc@localhost/bd_mesavoirs?charset=utf8
caotek_mesavoirs.admin_email = cao.thienphuoc@bbox.fr caotek_mesavoirs.admin_email = cao.thienphuoc@bbox.fr