chat.freenode.net #tryton log beginning Mon Feb 8 12:00:02 AM CET 2021 | ||
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 23:41 | |
-!- thaneor(~acer8@r167-61-8-158.dialup.adsl.anteldata.net.uy) has joined #tryton | 01:41 | |
-!- thaneor1(~ldlc6@r167-61-8-158.dialup.adsl.anteldata.net.uy) has joined #tryton | 01:41 | |
-!- htgoebel3(~hartmut@ppp-188-174-51-222.dynamic.mnet-online.de) has joined #tryton | 03:13 | |
-!- mrichez(~Maxime@2a02:a03f:c2e8:f900:ed77:85ea:af2b:ba6e) has joined #tryton | 06:13 | |
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 08:15 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 08:22 | |
-!- udono(~udono@091-057-210-188.ip-addr.inexio.net) has joined #tryton | 08:34 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 08:40 | |
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton | 10:06 | |
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton | 10:12 | |
-!- lucascastro(~lucascast@177-185-133-183.dynamic.isotelco.net.br) has joined #tryton | 10:16 | |
-!- mariomop(~quassel@181.29.189.235) has joined #tryton | 10:48 | |
-!- sharkcz(~sharkcz@19.161.broadband4.iol.cz) has joined #tryton | 12:21 | |
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 12:45 | |
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton | 13:01 | |
-!- thaneor(~acer8@r167-61-135-130.dialup.adsl.anteldata.net.uy) has joined #tryton | 13:43 | |
-!- thaneor1(~ldlc6@r167-61-135-130.dialup.adsl.anteldata.net.uy) has joined #tryton | 13:43 | |
-!- lucascastro(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton | 14:46 | |
-!- lucascastro(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton | 14:53 | |
pokoli | Hirschbeutel: back at the office :) | 14:59 |
---|---|---|
pokoli | but I did not sleep the full weekend :P | 14:59 |
Hirschbeutel | hopefully because of good things :) | 15:00 |
mrichez | hi, i'm testing routes with tryton 5.8. Got a strange behaviour: when launching trytond manually with the hello_world route it's ok. But after, i'm using systemd to launch my trytond (systemctl start trytond.service), got a 405 error (method not allowed) for my hello_world route. Any idea ? | 15:26 |
-!- amprxc(b97aa1f7@185.122.161.247) has joined #tryton | 15:28 | |
-!- lucascastro(~lucascast@177-185-133-183.dynamic.isotelco.net.br) has joined #tryton | 15:29 | |
pokoli | mrichez: as far as your systemd lauches trytond it should be no diference | 15:44 |
mrichez | pokoli: that's what i thought... it's working with tryton 5.6 . Here i'm testing with a new installation with tryton 5.8. | 15:45 |
mrichez | werkzeug 0.14.1 with tryton 5.6, werkzeug 0.15.6 with tryton 5.8 | 15:47 |
mrichez | just testing route example hello_world (https://docs.tryton.org/projects/server/en/latest/topics/user_application.html) | 15:48 |
pokoli | mrichez: did you see any error on systemct logs? | 15:48 |
mrichez | pokoli: no | 15:49 |
mrichez | another question: should i absolutely use module user_application to get access on Pool ? i try to create a route "/login" to check login with authenticate method of module web_user | 15:59 |
mrichez | I found something strange about routes (see my first question). Launching trytond with a route, trying to call route -> Error 405. If i launch a gtk client, no more error. So i need to launch once the client to have access on routes | 16:11 |
pokoli | mrichez: if you have user_application decorator you should not use web_user autentication | 16:13 |
pokoli | mrichez: user_application used a token based autentification. THe user requests an app and then allows access to it from the user prferences | 16:14 |
pokoli | mrichez: did you have the -d flag on the systemctl? It sounds like the pool is not initialized | 16:15 |
cedk | mrichez: this looks like your routes are not registered at startup | 16:15 |
mrichez | pokoli: indeed no -d flag in my systemctl :-) | 16:16 |
mrichez | for the second question, i try with an external application to have a login (using web_user module) so i don't want to use user_application | 16:17 |
pokoli | mrichez: then you can use the routes but without the user_application decorator | 16:17 |
mrichez | ok, but my question is: could i use method of a model without authentification... so i'll define a route /login with a post method (email, password) and in this route i'll call the authenticate method of the web_user module. | 16:19 |
mrichez | Can i do this as "anonymous user' | 16:20 |
-!- lucascastro(~lucascast@177-185-133-183.dynamic.isotelco.net.br) has joined #tryton | 16:21 | |
pokoli | mrichez: yes you if you do not set the app.auth_required decorator | 16:22 |
pokoli | mrichez: for example this route is allowed witouth autentication: https://hg.tryton.org/trytond/file/caadf76bf505/trytond/res/routes.py#l20 | 16:22 |
pokoli | mrichez: but the html_editor requires the user to be autenticated: https://hg.tryton.org/trytond/file/caadf76bf505/trytond/ir/routes.py#l45 | 16:23 |
mrichez | pokoli: ok thanks. Will check examples and try this way :-) | 16:23 |
Hirschbeutel | ACTION nice feature to grab some posts from discuss - a simple way to contrubute, having backlinks for the org and publishing outside without loosing the content | 17:04 |
-!- rpit(~rpit@p200300c88f0235001c42215a17f33f55.dip0.t-ipconnect.de) has joined #tryton | 17:10 | |
-!- thaneor2(~acer8@r167-61-135-130.dialup.adsl.anteldata.net.uy) has joined #tryton | 17:49 | |
-!- thaneor(~acer8@r167-61-135-130.dialup.adsl.anteldata.net.uy) has joined #tryton | 17:58 | |
mrichez | Should i use a specific header to test a route with a "POST", got a 403 Forbidden | 18:56 |
cedk | mrichez: you must allow the POST method for the route | 19:14 |
mrichez | cedk: i did this way : @app.route('/<database_name>/hello', methods=['POST']) | 19:15 |
mrichez | cedk: here's the small code (not working - Forbidden 403) : https://pastebin.com/4122aBdZ | 19:20 |
Hirschbeutel | mrichez: and how you are doing the POST? | 19:22 |
mrichez | Hirschbeutel: with a curl: curl -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -i 'http://172.16.99.30:8000/tryton_fusion/hello' --data '{"email": "test@test.com"}' | 19:23 |
cedk | mrichez: are you sure the code is imported? | 19:25 |
mrichez | cedk: yes, i first try with a 'GET', example from the doc. Which was working. So i update code to try 'POST' | 19:26 |
mrichez | back in 20 minutes... will read if any suggestion... | 19:30 |
-!- lucascastro(~lucascast@177-185-131-162.corp.isotelco.net.br) has joined #tryton | 19:42 | |
-!- htgoebel3(~hartmut@ppp-188-174-51-222.dynamic.mnet-online.de) has left #tryton | 20:05 | |
mrichez | cedk: error raise here : http://hg.tryton.org/trytond/file/tip/trytond/wsgi.py#l169 | 20:12 |
mrichez | cedk: it's a cors problem | 20:23 |
cedk | mrichez: strange you do not set any Origin in your request | 20:26 |
mrichez | cedk: no, but exception raise for this test | 20:27 |
cedk | mrichez: but it can be raised only if Origin header it set | 20:30 |
mrichez | cedk: i execute request in browser with an extension, when executing in terminal it's working | 20:30 |
mrichez | cedk: using extension RestClient in firefox, or RestER | 20:31 |
cedk | mrichez: if the url of the page is not the same as the server address, than you actually have to configure CORS | 20:32 |
mrichez | probably browser sends an Origin - i set the url of the server in the extension form | 20:34 |
mrichez | https://pasteboard.co/JNs8DUi.png | 20:34 |
mrichez | but now, i know it's working doing test in terminal :-) | 20:35 |
mrichez | i'll go. See u tomorrow. Good night! | 20:36 |
Hirschbeutel | cedk: ping | 21:15 |
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton | 21:28 | |
cedk | Hirschbeutel: pong | 22:00 |
Hirschbeutel | cedk: is jurrasic using supply_on_sale ? | 22:01 |
Hirschbeutel | cedk: sitting here on designing a module which keeps track on external warehouses which are only monitored | 22:02 |
cedk | Hirschbeutel: yes recently for https://www.jurassicfruit.com/en/category/47/farmer-box?showCart=0&page=1 | 22:03 |
cedk | but without caring of supplier stock | 22:03 |
Hirschbeutel | cedk: ok - but I think its a possible common use case ... | 22:04 |
Hirschbeutel | cedk: I startet a module - will propose a design tomorrow on discuss - but right now I think my current aproach is not straightest way to think :) | 22:07 |
Hirschbeutel | cedk: Possibly with some sleep I get the idea | 22:08 |
Hirschbeutel | cedk: one last question allowed? | 22:09 |
Hirschbeutel | cedk: tommorow :) | 22:11 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!