"MaJ config + details"

This commit is contained in:
Doug Le Tough 2017-10-29 10:01:37 +01:00
vanhempi 00cb34d71b
commit c6c4a75354
5 muutettua tiedostoa jossa 9 lisäystä ja 9 poistoa

Näytä tiedosto

@ -1,3 +0,0 @@
import sys
sys.path.insert(0, '/var/www/stock.tetalab.org')
from stock_tetalab import app as application

Näytä tiedosto

@ -66,4 +66,4 @@ alter table stock_kit_compositions owner to tetastock;
alter table stock_orders owner to tetastock;
alter database tetastock owner to tetastock;
insert into stock_users (mail, password, name) values ('test', '$2b$08$OkfihuGRyLdpftBpGhnpeeeUhUTQS0oXvR2NFByC.65XCKKvPBWHS');
insert into stock_users (mail, password, name) values ('test', '$2b$08$OkfihuGRyLdpftBpGhnpeeeUhUTQS0oXvR2NFByC.65XCKKvPBWHS', 'test');

Näytä tiedosto

@ -1,5 +1,5 @@
{% extends "index.html" %}
{% block title %}Éditer un fournisseur{% endblock %}
{% block title %}Se connecter{% endblock %}
{% block top_menu %}
<span class='top_menu_item_selected'>Authentification</span>
{% endblock %}

Näytä tiedosto

@ -104,8 +104,8 @@ def sync_cookies(response, session):
""" Sync cookies with session """
for key in session:
response.set_cookie(key, value=str(session[key]))
if key != u'session':
print '[c]', key, session[key]
#~ if key != u'session':
#~ print '[c]', key, session[key]
def sync_session(request, session):
""" Sync session with cookies"""
@ -123,8 +123,8 @@ def sync_session(request, session):
except ValueError:
# Value is not an int, will be treated as string
session[key] = str(request.cookies[key].encode('utf8'))
if key != u'session':
print '[s]', key, request.cookies[key]
#~ if key != u'session':
#~ print '[s]', key, request.cookies[key]
def check_user(request, session):
""" Check user credentials """

Näytä tiedosto

@ -0,0 +1,3 @@
import sys
sys.path.insert(0, '/var/www/tetastock.tetalab.org')
from tetastock import app as application