[web2py] Re: How do I make user redirect to a different page you/index instead of predefined on clicking PROFILE?

2016-08-17 Thread Dave S
On Wednesday, August 17, 2016 at 4:57:57 PM UTC-7, Ron Chatterjee wrote: > > Here is an option. > > In db.py > auth.settings.profile_onaccept = lambda form: after_profile(form) > > > in default.py > > def after_profile(): > > #where ever I want to redirect to. > > return locals() > > I

Re: [web2py] Re: web3py status

2016-08-17 Thread Jason Solack
I saw a post on the developer forum that the newer version of web2py was mostly Python 3 compatible... Is it possible that there won't be a need for web3py? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.g

[web2py] Re: How do I make user redirect to a different page you/index instead of predefined on clicking PROFILE?

2016-08-17 Thread Ron Chatterjee
Here is an option. In db.py auth.settings.profile_onaccept = lambda form: after_profile(form) in default.py def after_profile(): #where ever I want to redirect to. return locals() On Wednesday, August 17, 2016 at 2:28:55 PM UTC-4, Anthony wrote: > > I wouldn't do a redirect -- tha

[web2py] Downloading a CSV without first saving it to disk: change downloaded filename

2016-08-17 Thread Ben Lawrence
I modified https://groups.google.com/forum/#!msg/web2py/HQU5kD0tGag/LGtjlikzWdsJ to download csv file without having to first save it to disk: In View, there is a button 'download' so that when clicked, the view doesn't change, but a file is downloaded: {{=A(T('Download'), _type='button', _onc

Re: [web2py] Re: Deployment question

2016-08-17 Thread Jim Steil
Thanks Dave While my stated question was specific to haproxy, I'm really speaking in more general terms as to whether or not the rocket server would be sufficient behind ANY load balancer. I know I could have setup nginx as the load balancer, but haproxy was really quite simple. I'm going to rea

Re: [web2py] Re: Deployment question

2016-08-17 Thread Dave S
On Wednesday, August 17, 2016 at 1:15:58 PM UTC-7, Jim S wrote: > > Anyone else have thoughts on why I shouldn't use the rocket webserver > behind haproxy? > > Well, before today I didn't know anything about haproxy, but it seems to have a good reputation as a load balancer. So it should take

Re: [web2py] Re: Deployment question

2016-08-17 Thread Jim S
Anyone else have thoughts on why I shouldn't use the rocket webserver behind haproxy? -Jim -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received

Re: [web2py] Re: Setting process title at web2py startup

2016-08-17 Thread Michael Ellis
Thanks, Massimo. I'm using web2py as an interface to an industrial process controller. The default rocket server and sqlite3 db are fine for this app as it will never be serving pages to more than 2 or 3 clients at time (usually just one via localhost). The process I want to label needs to be th

[web2py] High worker count in scheduler_worker table

2016-08-17 Thread Jason Solack
Hello all, this may be typical, but i'm trying to determine if there is an issue with the frequency of my workers dropping out of my scheduler_worker table. At this point my app has been in development for about 2 week and the ids of my workers are abou 550,000. Meaning that these rows have be

[web2py] Re: How do I make user redirect to a different page you/index instead of predefined on clicking PROFILE?

2016-08-17 Thread Anthony
I wouldn't do a redirect -- that's just an unnecessary additional request every time that route is requested. Better to handle it in the user() function or alter the link in the navbar. Anthony On Wednesday, August 17, 2016 at 1:01:55 PM UTC-4, Jim S wrote: > > I took a different approach - ins

[web2py] Re: How do I make user redirect to a different page you/index instead of predefined on clicking PROFILE?

2016-08-17 Thread Dave S
On Wednesday, August 17, 2016 at 9:39:45 AM UTC-7, Steve Joe wrote: > > Please look at the attached image above. I want to go to page you/index > upon clicking "Profile'. > Perhaps you want to take a look at menu.py to learn about navbar construction, and then head over to layout.html as Massi

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-17 Thread Jason Solack
Something else i am seeing, my workers are disappearing / reappearing in the scheduler_worker table. could it be that a worker drops off and when new workers appear they are then assigned? any ideas why my worker list would drop / add so frequently? On Wednesday, August 17, 2016 at 12:25:41

[web2py] Re: How do I make user redirect to a different page you/index instead of predefined on clicking PROFILE?

2016-08-17 Thread Jim S
I took a different approach - instead of changing the URL, I updated default.py here: def user(): """ exposes: http:///[app]/default/user/login http:///[app]/default/user/logout http:///[app]/default/user/register http:///[app]/default/user/profile http

[web2py] Re: How do I make user redirect to a different page you/index instead of predefined on clicking PROFILE?

2016-08-17 Thread Steve Joe
Please look at the attached image above. I want to go to page you/index upon clicking "Profile'. On Wednesday, August 17, 2016 at 6:26:16 PM UTC+5:30, Ron Chatterjee wrote: > > Can you elaborate the problem better? What exactly u trying to solve. Give > a url structure of before n after u want t

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-17 Thread Jason Solack
I only see the task_id in the scheduler_run table, it seems to be added as many times as it can while the run is going... a short run will add just 2 of the workers and stop adding them once the initial run is completed On Wednesday, August 17, 2016 at 11:15:52 AM UTC-4, Niphlod wrote: > > task

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-17 Thread Niphlod
task assignment is quite "beefy" (sadly, or fortunately in your case, it favours consistence vs speed) : I don't see any reason why a single task gets picked up by ALL of the 12 workers at the same time if the backend isn't lying (i.e. slaves not replicating master data), if your mssql is "

[web2py] Internalization for text containing link

2016-08-17 Thread Marko Seppälä
What is the standard way to use T helper with text containing links: Please click here my friend. Do I need to have three separate T elements, like this: {{=T('Please click ')}}{{=T('here')}}{{=T(' my friend.')}} Or is there possible better syntax to handle this kind of cases? Thanks

[web2py] Re: How do I make user redirect to a different page you/index instead of predefined on clicking PROFILE?

2016-08-17 Thread Ron Chatterjee
Can you elaborate the problem better? What exactly u trying to solve. Give a url structure of before n after u want to see? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (R

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-17 Thread Jason Solack
I'm using nginx and MSSQL for the db On Wednesday, August 17, 2016 at 3:11:11 AM UTC-4, Niphlod wrote: > > nothing in particular. what backend are you using ? > > On Tuesday, August 16, 2016 at 8:35:17 PM UTC+2, Jason Solack wrote: >> >> task = scheduler.queue_task(tab_run, >> pvars=dict(

[web2py] Re: How do I make user redirect to a different page you/index instead of predefined on clicking PROFILE?

2016-08-17 Thread Steve Joe
anyone there? On Tuesday, August 16, 2016 at 9:58:34 AM UTC+5:30, Steve Joe wrote: > > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received thi

[web2py] Re: pyDAL support for crate.io ?

2016-08-17 Thread H. Das
They are still relatively new, as are several "NewSQL " databases that promise the same things (simpler scalability of a NoSQL but with ACID guarantees). So I wouldn't say there is currently enough demand to put in all that effort, without a sponsor of cour

[web2py] static asset management

2016-08-17 Thread T.R.Rajkumar
I have in view home.html this {{ response.files.insert(0,URL('static','css/bootstrap.min.css')) response.include_files() }} In model I have response.static_version = '1.2.3' In Apache 2.4 in httpd-vhosts.conf I have ServerAdmin webmas...@dummy-host.example.com D

[web2py] Re: Strange error with cookies (to the same domain) accesed through the same router

2016-08-17 Thread Lisandro
Anthony, my first thought was about the cookies session, but I was wrong. I've just tried disabling cookies in all of my browsers (mobile and desktop), but the problem remains. I've been doing some more tests, and I think the problem isn't web2py related, but more network related. Some points t

[web2py] Re: New to web2py. Template use cases

2016-08-17 Thread Marlysson Silva
You are importing starting of gluon or just file template.py from gluon? Based in documentation you have just import standalone file template.py from gluon :| . Em terça-feira, 16 de agosto de 2016 20:51:04 UTC-3, billy...@gmail.com escreveu: > > Coming trying out different framework and really

[web2py] Re: Web2Py Navigating table records one at a time

2016-08-17 Thread Marlysson Silva
Your application works how? What the workflow them? The user don't log in at application to use them, only execute the actions ( submit , receive anwers) ? Em terça-feira, 16 de agosto de 2016 20:51:04 UTC-3, Meinolf escreveu: > > Hi > > I am new to python and web2py. I have a small sqlite tabl

[web2py] Re: Bug?: Spanish formatted dates won't store on database(english ones do)

2016-08-17 Thread Niphlod
you're overriding the default IS_DATETIME() validator attached to datetime with IS_NOT_EMPTY() ... that's the reason it's not working. On Wednesday, August 17, 2016 at 1:51:08 AM UTC+2, Luciano Laporta Podazza wrote: > > Hello, > > I'm working on a simple case file project and realized that work

[web2py] Re: db.executesql() is taking 10 times longer than it should to run a query in Web2py

2016-08-17 Thread Niphlod
sure that timings aren't affected by the first query rather than the last ? I mean rows = db(db.Word.normalform == aword.normalform).select(db.Word.id ) On Wednesday, August 17, 2016 at 1:51:08 AM UTC+2, junde...@launchpnt.com wrote: > > Greetings. db.executesql() is taki

[web2py] Re: Speeding up scheduler assignment time

2016-08-17 Thread Niphlod
redis. also, 1 second heartbeat with a moderate number of workers needs a very responsive backend. On Monday, August 15, 2016 at 4:31:44 PM UTC+2, Jason Solack wrote: > > Hell all, i'm currently leveraging the scheduler to do some data > processing and i'm finding it takes 5-10 seconds for my t

Re: [web2py] Re: Reopen a session without cookies

2016-08-17 Thread 黄祥
the purpose is, when the salesman input the sale order in the system build by web2py, it will automatically send a telegram message (using after insert callback) to the server that is run as telegram bot to immediately process their order. because the telegram bot can not send message to anothe

[web2py] Re: scheduler task_id assigned to multiple workers

2016-08-17 Thread Niphlod
nothing in particular. what backend are you using ? On Tuesday, August 16, 2016 at 8:35:17 PM UTC+2, Jason Solack wrote: > > task = scheduler.queue_task(tab_run, > pvars=dict(tab_file_name=tab_file_name, the_form_file=the_form_file), > timeout=60 * 60 * 24, sync_output=2, immediate=False