diff --git a/allocation.sql b/allocation.sql deleted file mode 100644 index 7cb9787..0000000 --- a/allocation.sql +++ /dev/null @@ -1,7 +0,0 @@ -INSERT INTO "allocation" (no_cat, classe, pc_cible, pc_atteint, valeur, type, ordre, bg_color, pc_ecart) VALUES(5,'Obligations',22,28.30000000000000071,74481.0,'AUTRE',40,'success',6.3000000000000007105); -INSERT INTO "allocation" (no_cat, classe, pc_cible, pc_atteint, valeur, type, ordre, bg_color, pc_ecart) VALUES(10,'Actions World',60,54.200000000000002841,142781.26000000000931,'ACTION',30,'warning',-5.7999999999999971578); -INSERT INTO "allocation" (no_cat, classe, pc_cible, pc_atteint, valeur, type, ordre, bg_color, pc_ecart) VALUES(12,'Cash',2,2.1000000000000000888,5591.0000000000000001,'AUTRE',60,'success',0.10000000000000008881); -INSERT INTO "allocation" (no_cat, classe, pc_cible, pc_atteint, valeur, type, ordre, bg_color, pc_ecart) VALUES(16,'Actions REITS',5,6.2999999999999998223,16690.799999999999273,'ACTION',12,'danger',1.2999999999999998223); -INSERT INTO "allocation" (no_cat, classe, pc_cible, pc_atteint, valeur, type, ordre, bg_color, pc_ecart) VALUES(17,'Actions Moment',10,8.5,22332.240000000001601,'ACTION',5,'danger',-1.5); -INSERT INTO "allocation" (no_cat, classe, pc_cible, pc_atteint, valeur, type, ordre, bg_color, pc_ecart) VALUES(19,'Crypto',1,0.59999999999999997779,1700.6400000000001,'ACTION',31,'warning',-0.4000000000000000222); - diff --git a/cao_blogr - Copie.sqlite b/cao_blogr - Copie.sqlite deleted file mode 100644 index 5192488..0000000 Binary files a/cao_blogr - Copie.sqlite and /dev/null differ diff --git a/cao_blogr.sqlite b/cao_blogr.sqlite index 123e574..87fac92 100644 Binary files a/cao_blogr.sqlite and b/cao_blogr.sqlite differ diff --git a/cao_blogr/__init__.py b/cao_blogr/__init__.py index 24c5693..d1a1b48 100644 --- a/cao_blogr/__init__.py +++ b/cao_blogr/__init__.py @@ -12,7 +12,7 @@ def main(global_config, **settings): # session factory my_session_factory = SignedCookieSessionFactory('mGcAJn2HmNH6Hc') - authentication_policy = AuthTktAuthenticationPolicy('wMWvAWMZnp6Lch', + authentication_policy = AuthTktAuthenticationPolicy('J2wv322aL5DTn2', callback=groupfinder, hashalg='sha512', timeout=36000) authorization_policy = ACLAuthorizationPolicy() with Configurator(settings=settings, diff --git a/cao_blogr/templates/login.jinja2 b/cao_blogr/templates/login.jinja2 index 704dc22..483bdbe 100644 --- a/cao_blogr/templates/login.jinja2 +++ b/cao_blogr/templates/login.jinja2 @@ -7,6 +7,8 @@

Se connecter

+ +
@@ -14,7 +16,7 @@
- +
diff --git a/cao_blogr/views/default.py b/cao_blogr/views/default.py index d14ad14..25a8f11 100644 --- a/cao_blogr/views/default.py +++ b/cao_blogr/views/default.py @@ -33,7 +33,6 @@ def apropos(request): @view_config(route_name='login', renderer='cao_blogr:templates/login.jinja2') @forbidden_view_config(renderer='cao_blogr:templates/login.jinja2') def login(request): - username = '' login_url = request.route_url('login') referrer = request.url @@ -41,9 +40,11 @@ def login(request): referrer = '/' # never use the login form itself as came_from came_from = request.params.get('came_from', referrer) - username = request.POST.get('username') - userpwd = request.POST.get('password') - if username: + username = '' + userpwd = '' + if 'form.submitted' in request.params: + username = request.POST.get('username') + userpwd = request.POST.get('password') user = UserService.by_name(request, username) if user and user.verify_password(userpwd): headers = remember(request, username)