[web2py] Re: unknown ticket on server for all sites

2016-05-14 Thread Alfonso Serra
Still, what operating system are you running? Does it have bitlocker or similar enabled? I dont know how bitlocker works but you could be uploading an encrypted file to your server. Easy to check If you try any other text file and it works. -- Resources: - http://web2py.com -

[web2py] Re: Is there any way to inherit from Row?

2016-05-14 Thread Alfonso Serra
Thanks for the advise. Yes you are right i didnt need the join, was just following the same pattern as other queries which does need them, not this case. Also right with virtual fields, they are easy to use but i dont think i should write tens lines of code within a lambda. My webapp is getting

[web2py] Is there any way to inherit from Row?

2016-05-14 Thread Anthony
First, looks like you are just re-implementing the recursive selects functionality: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#Recursive-selects Also, why bother with the join if you are only selecting fields from one table? Finally, before continuing down

[web2py] Re: Is there any way to inherit from Row?

2016-05-14 Thread Alfonso Serra
Sry i got it. super(Hotel, self).__init__(db.hotels[id]) -- 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 this message because you are

[web2py] Is there any way to inherit from Row?

2016-05-14 Thread Alfonso Serra
I would like to subclass a Row object but cant get it right. What would be the way? from pydal.objects import Row class Hotel(Row): _room_types = None _regimen_types = None _agencies = None _countries = None def __init__(self, db, id): super(Hotel, self).__init__()

[web2py] Re: Problem with routes

2016-05-14 Thread rajjmatthur
I just looped through the entire array and added those strings with ',' and displayed. Works fine. Thank you Anthony. On Saturday, May 14, 2016 at 2:17:47 PM UTC-4, Anthony wrote: > > > > On Saturday, May 14, 2016 at 12:06:11 PM UTC-4, rajjm...@gmail.com > wrote: >> >> Yes. in my case with

[web2py] Re: I tried learning scheduler but got messed up. Can someone help me with this?

2016-05-14 Thread Anthony
>From the book: *Remember to call db.commit() at the end of every task if it involves inserts/updates to the database. web2py commits by default at the end of a successful action but the scheduler tasks are not actions.* Anthony On Saturday, May 14, 2016 at 3:30:18 PM UTC-4, Steve Joe wrote:

[web2py] Re: unknown ticket on server for all sites

2016-05-14 Thread BlueShadow
I tried accessing my database from my backup on my local pc. it opens just fine with the firefox extension no password or anything. I checked a couple tables and they look fine. On Saturday, May 14, 2016 at 8:28:14 PM UTC+2, Alfonso Serra wrote: > > Hmm looks bad, ransomware

[web2py] Re: Problem with routes

2016-05-14 Thread Alfonso Serra
Finally i got it right. Its so cool, ive corrected something that happens when you are logged in, if you visit /myapp/default/user it takes you to the login page, i was able to redirect to the profile page. If the url ends with numbers it converts them into args regardless the url you are in.

[web2py] Re: Dropdown doesn't show on response.menu

2016-05-14 Thread 'DenesL' via web2py-users
Bootstrap 3 does not support menu depths beyond level 2. See https://groups.google.com/forum/#!searchin/web2py/menu|sort:relevance/web2py/UkIV84MuE6w/QtJtfQkyAwAJ On Saturday, May 14, 2016 at 4:45:34 PM UTC-4, anamarie06...@gmail.com wrote: > > Question from a new user. I defined the

[web2py] Re: I tried learning scheduler but got messed up. Can someone help me with this?

2016-05-14 Thread Alfonso Serra
Making the scheduler work wasnt easy for me either. You said earlier the db was being flooded which is a good sign, the scheduler is working. As for the parameters take a look here: http://web2py.com/books/default/chapter/29/04#Complete-Scheduler-signature And here:

[web2py] Flicker when switching between pages on Web2py apps

2016-05-14 Thread Daniel Libonati
Hi, noob question here... I'm trying to create an admin interface with Web2py, with a navbar on top and / or a sidebar. I'm seeing that even without adding too much logic to the app, screen needs to go blank every time a link is clicked for then reloading all components back again. I've been

[web2py] Dropdown doesn't show on response.menu

2016-05-14 Thread anamarie06431
Question from a new user. I defined the response.menu as following and the dropdown doesn't show in inventory response.menu = [ (T('Home'), False, URL('default', 'index'), [ (T('shopping'),False,URL('default','make_list')), (T('List'),False,URL('default','store_item')),

[web2py] Re: DAL sql generated from query for db2 sql

2016-05-14 Thread massimo fantin
Sorry was my error on the real query non in this example i posted that instead work , what i do wrong is like this : rows = db( (db.table.num==value) | (not_a_field==0)).select() that is a no sense ... Closed. Il giorno sabato 14 maggio 2016 17:30:14 UTC+2, massimo fantin ha scritto: > >

[web2py] Re: I tried learning scheduler but got messed up. Can someone help me with this?

2016-05-14 Thread Steve Joe
No it didn't add anything to the db checker. I made a few edits. I am not sure how they are working but they still don't work. scheduler.queue_task(adder, start_time=request.now, #datetime stop_time = None, #datetime timeout = 60, #seconds prevent_drift=False, period=60, #seconds

[web2py] Re: I tried learning scheduler but got messed up. Can someone help me with this?

2016-05-14 Thread Alfonso Serra
Its just doing what you told it. Inserting a record each time it runs. So ye, its working. Just make sure to tell it how long it should pass between executions. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: I tried learning scheduler but got messed up. Can someone help me with this?

2016-05-14 Thread Steve Joe
in my db1.py: db.define_table('checker', Field('name'), Field('timenow', default=request.now.time()) ) def adder(): db.checker.insert(name="gobo") from gluon.scheduler import Scheduler scheduler=Scheduler(db) somewhere in my controller: if

[web2py] Re: I tried learning scheduler but got messed up. Can someone help me with this?

2016-05-14 Thread Steve Joe
in my db1.py: db.define_table('checker', Field('name'), Field('timenow', default=request.now.time()) ) def adder(): db.checker.insert(name="gobo") from gluon.scheduler import Scheduler scheduler=Scheduler(db) task=scheduler.queue_task(adder) I

[web2py] Re: unknown ticket on server for all sites

2016-05-14 Thread Alfonso Serra
Hmm looks bad, ransomware on your server? Do you have a copy of your database? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: Print break not working

2016-05-14 Thread Anthony
Since this is not web2py specific, you might get better answers in a form dedicated to HTML/CSS (e.g., maybe Stack Overflow with the appropriate tags selected). Anthony On Saturday, May 14, 2016 at 6:27:37 AM UTC-4, Alessio Varalta wrote: > > Hi, I have completed a web2py application for a

[web2py] Re: I tried learning scheduler but got messed up. Can someone help me with this?

2016-05-14 Thread Anthony
Always helps to show what you have tried so far, and explain what happened. On Saturday, May 14, 2016 at 5:38:57 AM UTC-4, Steve Joe wrote: > > how to write a scheduler function that will send me an email with subject > "hello" every night at 12 am? > -- Resources: - http://web2py.com -

[web2py] Re: Problem with routes

2016-05-14 Thread Alfonso Serra
Thanks Anthony ill give it a try but i dont quite understand how it works. Anyway the pattern routes are working but Auth doesnt realise the routes are mapped resulting in wrong _next and logout redirections. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Problem with routes

2016-05-14 Thread Anthony
On Saturday, May 14, 2016 at 12:06:11 PM UTC-4, rajjmatt...@gmail.com wrote: > > Yes. in my case with request.args(0) into db.Post is a row object but > since its list:string I see a bracket around. So, question Anthony. How do > we take the html tag element out of row object. There are no

[web2py] Re: Problem with routes

2016-05-14 Thread Anthony
If you just want to hide application, default controller, and default functions, you can do things much more simply with the parameter based rewrite system -- further documented in the example file

[web2py] Re: db.import_from_csv_file

2016-05-14 Thread Alfonso Serra
I dont think its the constraints but it looks you are trying to import that csv to the user's table, and the user's table doesnt have a field called created_by. if thats what you want remove the columns its asking like created_by from the file If its not the user's table you are trying to

[web2py] Re: Problem with routes

2016-05-14 Thread Alfonso Serra
Another problem. Since i want to get rid of the app name and index actions in the url i have added these to routes_in routes_in ... , ('/myapp/default/user/$anything', '/user/$anything') routes_out ... , ('/myapp/default/user/$anything', '/user/$anything') It works but redirecting to the login

[web2py] Re: IDX (internet data exchange) plugin in web2py

2016-05-14 Thread Alfonso Serra
What is IDX? a php wordpress plugin? -- 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 this message because you are subscribed to the Google

[web2py] Re: Thread with own db connection

2016-05-14 Thread Alfonso Serra
Thanks for your answer massimo. The problem is that the thread im creating "use to" last longer than the request dispatch, and it needs its own connection opened until is done (importing bulk data into the database). Thats why i cannot .join the thread, i let the request finish, and the

[web2py] Re: How to take HTML tag out out of list string, in set

2016-05-14 Thread rajjmatthur
Yes. in my case with request.args(0) into db.Post is a row object but since its list:string I see a bracket around. So, question Anthony. How do we take the html tag element out of row object. There are no examples in the book about how to do that. We have to live with it? On Thursday, May 12,

[web2py] unknown ticket on server for all sites

2016-05-14 Thread BlueShadow
Hi all my sites show an unknown ticket on my production site. So I got my backup and it worked for 2-3days. than it started again ... repeat about 3 times. So I reinstalled my entire server new ubuntu 14.04 ngninx uswgi web2py my coppied app (I use sqlite as db so it should work) and now I get the

[web2py] IDX (internet data exchange) plugin in web2py

2016-05-14 Thread christopher . lugos
Hello, I would like to ask for help where to look for examples on integrating IDX plugins in a web2py project. Is it possible for this framework? Most of what I got from my searches was related to word press integration of IDX. Thanks, Chris -- Resources: - http://web2py.com -

[web2py] DAL sql generated from query for db2 sql

2016-05-14 Thread massimo fantin
I all, i have this kind of query : value=5 rows = db( (db.table.num==value) | (db.table.num==0)).select() the DAL translate this in the SQL query : "select * from table where ((num=5) or 0)" that is a format the is non compatible with DB2 that i use as database. i can configurate DAL for

[web2py] Re: Thread with own db connection

2016-05-14 Thread Massimo Di Pierro
My advice would be do not mess with the internals. I cannot tell myself what is does because depends on many circumstances. You have connection pools for examples and DAL can act as singleton in some cases. If you want to use db in multiple threads, just make sure the function that creates the

[web2py] Re: Problem with routes

2016-05-14 Thread Alfonso Serra
No problem i got it. I dont need to type the app name or the index action at the url and numeric params works. routes.py default_application = "myapp" default_controller = "default" #no need to declare the default action routes_in = ( #... include the same routes as the example file ,

[web2py] Re: What is the difference between these two in relation with working of script?

2016-05-14 Thread Alfonso Serra
This is not web2py related but geolocation is disabled on all browsers by default. You have to enable it. -- 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) ---

[web2py] Re: I tried learning scheduler but got messed up. Can someone help me with this?

2016-05-14 Thread Alfonso Serra
On Saturday, 14 May 2016 08:38:57 UTC-1, Steve Joe wrote: > > how to write a scheduler function that will send me an email with subject > "hello" every night at 12 am? > Yep, 1-Launch the scheduler on a command prompt run cmd.exe or any terminal on your computer and type python web2py.py -K

[web2py] Problem with routes

2016-05-14 Thread Alfonso Serra
Hi. Im trying to map some routes using patterns but i cant get it right. I want to get rid of the app name and index actions so: http://mydom.com/anycontr/123 maps to http://mydom.com/myapp/anycontr/index/123 and be able to use numeric parameters on the default controller as

[web2py] Print break not working

2016-05-14 Thread Alessio Varalta
Hi, I have completed a web2py application for a customer..I have only one finish problem..I have a page where i have the landing page where i have a main-container and inside this there were 5 div..I want to call window.print(); for print these 5 div...So i have created media print css file

[web2py] I tried learning scheduler but got messed up. Can someone help me with this?

2016-05-14 Thread Steve Joe
how to write a scheduler function that will send me a message with subject "hello" every night at 12 am? -- 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) ---

[web2py] Mercurial and Windows 10

2016-05-14 Thread Martin Weissenboeck
I have tried to use the Mercurial Version Control System. There is the same web2py version (2.14.6) on a Linux Ubuntu server and on a Windows 10 server. No problem on the Linux server. But the Windows server produced an error message. Mercurial on the Windows server: