Browse Source

"MaJ config + details"

master
Doug Le Tough 4 years ago
parent
commit
c6c4a75354
5 changed files with 9 additions and 9 deletions
  1. +0
    -3
      ref.tetalab.org.wsgi
  2. +1
    -1
      stock.sql
  3. +1
    -1
      templates/login.html
  4. +4
    -4
      tetastock.py
  5. +3
    -0
      tetastock.tetalab.org.wsgi

+ 0
- 3
ref.tetalab.org.wsgi View File

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

+ 1
- 1
stock.sql View File

@ -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');

+ 1
- 1
templates/login.html View File

@ -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 %}


+ 4
- 4
tetastock.py View File

@ -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 """


+ 3
- 0
tetastock.tetalab.org.wsgi View File

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

Loading…
Cancel
Save