[web2py] Re: Using DAL inside a thread

2014-07-09 Thread Wonton
ypka wrote: > > Perhaps the Scheduler can help. > > On Saturday, July 5, 2014 11:47:39 AM UTC-5, Wonton wrote: >> >> Hello! >> >> As I commented in other post ( >> https://groups.google.com/forum/#!topic/web2py/ZbEndj2H-fk) I have >> problems using APNSWrappe

[web2py] Re: APNSFeedbackWrapper receive method freezes

2014-07-07 Thread Wonton
d stop the task whenever I want? It seems that I have to insert the task in my db but I don't now when this task will be called because it depend on a certain event and maybe it never happens or it happens 500 times an hour. Thank you again! On Monday, July 7, 2014 3:51:34 PM UTC+2, Wonton

[web2py] Re: APNSFeedbackWrapper receive method freezes

2014-07-07 Thread Wonton
Oks, then I will study the scheduler and I will try to implement it. Thank you very much for the suggestion. On Monday, July 7, 2014 1:39:57 PM UTC+2, Leonel Câmara wrote: > > Yes you can use the DAL inside the scheduler without any problem, the only > thing you need to pay attention to is to do

[web2py] Re: APNSFeedbackWrapper receive method freezes

2014-07-06 Thread Wonton
I'll study this. But, could I use DAL inside the scheduler and work with my database without errors as I have working with threads? Thank you! On Sunday, July 6, 2014 11:47:02 PM UTC+2, Leonel Câmara wrote: > > You can use the included web2py scheduler instead of using your own > threads to do

[web2py] Re: APNSFeedbackWrapper receive method freezes

2014-07-06 Thread Wonton
Hi Leonel, Thank you for your answer. While I was waiting for an answer to my problem I implemented a solution very similar to yours. But I have that code (similar to yours) inside a thread to avoid its slow performance. The problem is, as I tell here, in other post (https://groups.google.com

[web2py] Using DAL inside a thread

2014-07-05 Thread Wonton
Hello! As I commented in other post (https://groups.google.com/forum/#!topic/web2py/ZbEndj2H-fk) I have problems using APNSWrapper feedback service sending push notifications. While I wait for an answer I've thought a possible solution to my problem. This solution consists in: 1. I'm going to

[web2py] APNSFeedbackWrapper receive method freezes

2014-07-05 Thread Wonton
Hello! I'm developing a backend with web2py. This backend sends iOS push notifications under certain circumstances. To do this I'm using the library APNSWrapper (https://code.google.com/p/apns-python-wrapper/). This library fails sending multiple push notifications if one of the token is incor

[web2py] Re: cannot operate on a closed database

2014-05-10 Thread Wonton
Hello Jc, Yes, I forgot to say that, but I read and tried all posts related to this issue, but none of them seems to be the cause of my problem. Anyway, since this morning everything is working again and *I haven't changed anything*!! But, it seems that the server has started to work again once

[web2py] Re: cannot operate on a closed database

2014-05-09 Thread Wonton
Hello aleonserra, Thank you very much for your answer. The problem is that I have no admin access to the server so I cannot execute that command, and in my local server everything works fine, so I cannot replicate the error. On the other hand I've searched through all my code and I never close

[web2py] Re: Broken migration

2014-04-14 Thread Wonton
Oks, it's clear to me now. I'll change this. Thank you very much again! On Monday, April 14, 2014 10:47:49 PM UTC+2, 黄祥 wrote: > > the the migrate settings is about the define_table affect on the database > side (migrate = True) and on the *.table files (fake_migrate=True). > there will be a lit

[web2py] Re: Broken migration

2014-04-14 Thread Wonton
te the table definition file. Now, you can change your models > and set fake_migrate to False, and migrate to True. > > On Sunday, April 13, 2014 5:49:17 PM UTC-4, Wonton wrote: >> >> Hello! >> >> I have a web2py application with a sqlite database. The structure of my &

[web2py] Re: Broken migration

2014-04-13 Thread Wonton
Wow, sorry for answering myself, but I managed to get it working. I've tried to add c8b1837fhj47blahblahblah_ before newtable.table file and now everything is working. Could it be a problem add this to my table file? On Sunday, April 13, 2014 11:49:17 PM UTC+2, Wonton wrote: > > H

[web2py] Broken migration

2014-04-13 Thread Wonton
Hello! I have a web2py application with a sqlite database. The structure of my db.py file is something like this: db = DAL('sqlite://storage.sqlite', migrate=False) ... db.define_table('table1', Field('field1'), Field('field2')) db.executesql('CREATE INDEX IF NOT EXISTS table1_field1 ON table1 (

[web2py] Re: DAL ignoring accents

2014-03-05 Thread Wonton
Thank you Massimo, I'll do that. On Monday, March 3, 2014 1:19:08 AM UTC+1, Massimo Di Pierro wrote: > > Not really. you have to create a computed filed that discards accents and > search the computed field instead of the original field. > > > On Saturday, 1 March 2014

[web2py] DAL ignoring accents

2014-03-01 Thread Wonton
Hello! Is there any way to do searches with DAL (sqlite database) ignoring accents? Thank you very much in advance! Wonton. -- 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] Login with username only

2014-02-13 Thread Wonton
Hello, I have a web2py server that provides a backend for a mobile app. Users have been logging using their username and password so far. I use basic auth and every api call is authenticated through the cookie. But now I need a new login method so the user can login using its username only (n

[web2py] Send image attached to email

2014-02-03 Thread Wonton
Hello, I have a (POST) web service to upload an image, store it in uploads directory and insert it in its correspondent table in my database (a typical functionality), and it's working correctly. Now I would like to have a similar web service but, instead of store the image and insert it in the

[web2py] Re: Uploading application to server

2014-01-28 Thread Wonton
On Tuesday, January 28, 2014 3:31:18 AM UTC+1, Dave S wrote: > > > > On Sunday, January 26, 2014 10:40:16 AM UTC-8, Wonton wrote: > > >> Looking at this and seeing that it tries to access admin.py, maybe it was >> a bad decision to remove the admin applic

[web2py] Uploading application to server

2014-01-26 Thread Wonton
Hello, I have an application (I'll call it myapplication) installed on a server. In this server, admin is disabled and admin application has been removed for security reasons. Now I would like to have in this same server a development version of my application to test my modifications. To do t

Re: [web2py] Compile app from command line

2014-01-14 Thread Wonton
his solution also has virtualenv available. > > Regards > > > On Tuesday, January 14, 2014 1:08:23 AM UTC+1, Wonton wrote: >> >> That must be the problem. Both versions are very different. My local >> version is 2.7.5 (default, Aug 25 2013, 00:04:04) and the server

Re: [web2py] Compile app from command line

2014-01-13 Thread Wonton
, 2014 12:52:02 AM UTC+1, Ricardo Pedroso wrote: > > On Mon, Jan 13, 2014 at 11:08 PM, Wonton > > wrote: > > Hello everyone, > > > > I'm compiling my local apps with this command: > > > > python -c "import gluon.compileapp; &g

[web2py] Compile app from command line

2014-01-13 Thread Wonton
Hello everyone, I'm compiling my local apps with this command: python -c "import gluon.compileapp; gluon.compileapp.compile_application('applications/')" And everything is working well. But when I try to do the same thing in the server (as admin), in the production environment I get this error

[web2py] Re: Best practices with sessions

2014-01-11 Thread Wonton
Thank you very much Niphlod, a perfect explanation. On Thursday, January 9, 2014 9:29:25 PM UTC+1, Niphlod wrote: > > > > On Wednesday, January 8, 2014 10:41:49 PM UTC+1, Wonton wrote: >> >> Hello everyone, >> >> I'm trying to implement the web

[web2py] Best practices with sessions

2014-01-08 Thread Wonton
Hello everyone, I'm trying to implement the web2py recipes to improve the efficiency and security of my backend. I'm beggining with sessions and I have a couple of doubts: - My site is over SSL and has user authentication, so I guess I should secure my sessions. The recipe sais "In your appli

[web2py] Re: sessions and logout

2014-01-05 Thread Wonton
Thank you very much! Everything is clear to me now. On Saturday, January 4, 2014 7:48:34 PM UTC+1, Anthony wrote: > > - A session file is created associated to a user each time that user logs >> in. Is this ok? >> > > Yes, it is OK. > > >> - My users make a login through auth.login_bare(user, p

[web2py] Re: sessions and logout

2014-01-04 Thread Wonton
wrote: > > Try: > > auth.logout(onlogout=lambda user: session.update({'auth':None})) > > > On Saturday, 4 January 2014 05:56:23 UTC-6, Wonton wrote: >> >> Hello Massimo, >> >> Thank you very much for your answer. >> >> I'v

[web2py] Re: sessions and logout

2014-01-04 Thread Wonton
defaults to auth.settings.logout_next which is set to URL('index') > > What you want is: > > def logout(): > auth.logout(logout_onlogout=lambda user: session.auth=None) > > On Friday, 3 January 2014 19:44:43 UTC-6, Wonton wrote: >> >> Hello everyon

[web2py] sessions and logout

2014-01-03 Thread Wonton
Hello everyone, Recently I suffered the problem with the number of session files growing very fast in my server. This worried me a lot because the server is a development environment with only 4 or 5 testers, so when the number of users is higher I guess I will have a big problem with this issu

[web2py] Re: Sending data from view form to controller

2013-10-19 Thread Wonton
list (something like a drop-down list) for each row or I have to use the "Update" button for each one? Kind regards! On Friday, October 18, 2013 10:28:47 PM UTC+2, Wonton wrote: > > Thank you very much Tim!! > > I didn't even consider this posibility. It seems that i

[web2py] Re: Sending data from view form to controller

2013-10-18 Thread Wonton
ch rows to edit. It then automatically generates an SQLFORM for > that row. Still only one line :) > > > > > > > On Friday, 18 October 2013 10:22:40 UTC+11, Wonton wrote: >> >> Hello, >> >> I've been working with web2py controllers to c

[web2py] Sending data from view form to controller

2013-10-17 Thread Wonton
Hello, I've been working with web2py controllers to connect with my database and I haven't use views so far, so I don't know if what I'm trying to do is very wrong. In that case, please, tell me ;-). Suppose I have this: controllers/mycontroller.py: def show_matches(): matches = db(db.mat

Re: [web2py] Invalid request with special chars in URL

2013-09-11 Thread Wonton
int var1 print var2 ... But the output in both cases is None None None and None None What am I doing wrong?? On Thursday, September 5, 2013 9:54:09 PM UTC+2, Wonton wrote: > > > Arrgh! I must be missing something, I'm very sorry :-(. > > I've tried this: >

Re: [web2py] Invalid request with special chars in URL

2013-09-05 Thread Wonton
y much again! On Thursday, September 5, 2013 4:45:11 PM UTC+2, Jonathan Lundell wrote: > > On 5 Sep 2013, at 12:11 AM, Wonton > > wrote: > > Hello Marcio, > > First of all, thank you so much for your answer, I haven thought on that > possibility and it's very

[web2py] Re: Invalid request with special chars in URL

2013-09-05 Thread Wonton
gt; them inside the methods? > > Regards. > > On Wednesday, September 4, 2013 8:24:26 PM UTC-3, Wonton wrote: >> >> Hello everyone! >> >> I've developed a web2py backend which is given me problems with special >> chars in URLs. I'm a newbie with we

[web2py] Invalid request with special chars in URL

2013-09-04 Thread Wonton
Hello everyone! I've developed a web2py backend which is given me problems with special chars in URLs. I'm a newbie with web2py so maybe I'm missing something very easy, sorry if that is the case ;-). These are the details of my app. - I have no routes.py file. - In controllers/default.py I h

Re: [web2py] Debugging in a server

2013-02-01 Thread Wonton
s, > > Mariano Reingart > http://www.sistemasagiles.com.ar > http://reingart.blogspot.com > > > On Wed, Jan 30, 2013 at 4:09 PM, Wonton > > wrote: > > Hello everyone, > > > > Finally I have my project working in my local server so I've uploaded it &g

[web2py] Modules not detecting functions

2013-01-31 Thread Wonton
Hello everyone! I have a project in a server without admin access so it's difficult for me to debug it, I have a strange problem and I'm lost with it. Basically my default.py has something like this: import mymodule def index(): value = mymodule.function() return value And inside modul

[web2py] Debugging in a server

2013-01-30 Thread Wonton
Hello everyone, Finally I have my project working in my local server so I've uploaded it to the real server (via FTP to the applications directory). It's working almost perfctly, but some features are giving errors and other are simply not working (they return incorrect data). My problem, I hav

[web2py] Re: Re-enable admin interface

2013-01-23 Thread Wonton
About upload a packed project to the server without admin access I guess is ok just uploading via FTP the project (application) directory to web2py applications subdirectory, am I wright? On Tuesday, January 22, 2013 5:56:13 PM UTC+1, Wonton wrote: > > Thanks, I will try this. > >

[web2py] Re: Re-enable admin interface

2013-01-22 Thread Wonton
eting the applications/admin/sessions/* files. > > On Monday, January 21, 2013 7:18:01 PM UTC+1, Wonton wrote: >> >> Hello, >> >> Trying to upload my web2py project to the server I failed to enter the >> admin password (4 times :-S) so the admin interface was au

[web2py] Re-enable admin interface

2013-01-21 Thread Wonton
Hello, Trying to upload my web2py project to the server I failed to enter the admin password (4 times :-S) so the admin interface was automatically disabled. Since I have no access to my server and I have to request all things to the server administrators I asked them to re-enable the admin in

Re: [web2py] Update and Delete row issue

2013-01-10 Thread Wonton
it is not called. If I fix the global variable line, everything works without the db.commit. El jueves, 10 de enero de 2013 14:31:54 UTC+1, Wonton escribió: > > Hello, > > I've checked that from a fresh installation all inserts, updates and > deletes of the database work pe

Re: [web2py] Update and Delete row issue

2013-01-10 Thread Wonton
official data, so do you know what could be the possible problems for a delete action in a database? Or how could I trace the problem (it doesn't give me any errors). Thank you very much! El domingo, 30 de diciembre de 2012 21:08:40 UTC+1, Wonton escribió: > > I will try to do

[web2py] Re: Uploading images

2013-01-07 Thread Wonton
Hello Alan, Thank you very much for your answer. Finally, based on your note ( "... renames uploaded files (to prevent directory traversal attacks) ..."), in the difficulty of the changes, and taking into account that the rename is not very necessary in fact, I've decided not to change the nam

[web2py] Re: Uploading images

2013-01-06 Thread Wonton
s normal that my image is stored with a strange name, it's its temp name. This makes me think, is there any way so the stored file is accessed directly via URL, something like http://mysite.com/myapp/uploads/myfilename.jpg? El lunes, 7 de enero de 2013 00:36:00 UTC+1, Wonton escribió: >

[web2py] Re: Uploading images

2013-01-06 Thread Wonton
Regarding to my second question, I've found the image file stored in my server under applications/myapp/uploads, but its name is not myuser.jpg but auth_user.avatar.8d275a959267dd9b.612e6a7067.jpg. El lunes, 7 de enero de 2013 00:26:03 UTC+1, Wonton escribió: > > Hello Massimo, >

[web2py] Re: Uploading images

2013-01-06 Thread Wonton
gt; > row.update(avatar=db.tablename.avatar.store(request.post_vars[ > 'upload_field'],filename='yourname.ext')) > > On Friday, 4 January 2013 00:36:31 UTC-6, Wonton wrote: >> >> Hello Massimo! >> >> I bypass the form.proccess because this i

[web2py] Re: Uploading images

2013-01-03 Thread Wonton
, Massimo Di Pierro escribió: > > You can do > > row.update(avatar=db.tablename.avatar.store(request.post_vars[ > 'upload_field'])) > > by why bypess form.process()? it does it for you. > > On Thursday, 3 January 2013 15:57:24 UTC-6, Wonton wrote: >> >&g

[web2py] Uploading images

2013-01-03 Thread Wonton
Hello! I'm trying to implement uploading user's avatar. I've tried to follow the image blog example from the book and some of the posts related to this issue in this forum and I'm still a bit confused and I don't know if I could do certain things or how to do them. What I would like to achieve

[web2py] Re: Searching in the database

2013-01-02 Thread Wonton
Sorry for answering myself, but I think I've found the solution after a long search. My problem was use "and" instead of "&" in the query conditions. With the &, everything goes well now. On Wednesday, January 2, 2013 9:57:51 PM UTC+1, Wonton wrote: > >

[web2py] Searching in the database

2013-01-02 Thread Wonton
Hello, I have a problem looking for rows in my database. I have a method like this: def getBoughtItems(): for item in self.allItems: _itemId = item['itemId'] rowsItems = self.db(self.db.tableItems.itemId==_itemId) if rowsItems.count() > 0:

Re: [web2py] Update and Delete row issue

2012-12-30 Thread Wonton
I will try to do it, but, since I have confidential data I don't know if I will be able do it. Meanwhile I will try to make a fresh app and go step by step. El domingo, 30 de diciembre de 2012 18:19:42 UTC+1, Niphlod escribió: > > > > On Sunday, December 30, 2012 2:33:42 PM UT

Re: [web2py] Update and Delete row issue

2012-12-30 Thread Wonton
gt; query = db(db.table.field1=='What I am looking for') > deletedRow = query.delete() > > works fine also. > > > On Sunday, December 30, 2012 11:49:05 AM UTC+1, Wonton wrote: >> >> Hello viniciusban! >> >> The line "db.commit()" solved these 2

Re: [web2py] Update and Delete row issue

2012-12-30 Thread Wonton
Thank you very much again! El domingo, 30 de diciembre de 2012 01:57:15 UTC+1, viniciusban escribió: > > On Sat, Dec 29, 2012 at 10:19 PM, Wonton > > wrote: > > Hello everyone and happy new year! > > Hi. > > > > > I'm having an issue regarding the u

[web2py] Update and Delete row issue

2012-12-29 Thread Wonton
Hello everyone and happy new year! I'm having an issue regarding the updating and deletion of a row in my tables and I can't find any solution, so I hope you can help me. 1) Regarding to the update: As far as I know, to update a row I should do something like this: query = db(db.table.field1=

[web2py] Re: Login manually

2012-12-24 Thread Wonton
]) El lunes, 24 de diciembre de 2012 10:42:13 UTC+1, Wonton escribió: > > Hello, Massimo gave me some clues and I think I've found the solution: > > I was debugging my code and saw that this line: > db.auth_user.password.validate(password) > returns a 2-tupla: (crypter pas

[web2py] Re: Login manually

2012-12-24 Thread Wonton
assword only: pbkdf2(1000,20,sha512)$90718911d716ab40$9ab041ebf5432bb9432cef16165865d320123e0a and the log in works perfectly. Kind regards! El jueves, 20 de diciembre de 2012 20:10:41 UTC+1, Wonton escribió: > > If you don't mind I could send you my project to your email directly. > &g

[web2py] Re: Login manually

2012-12-20 Thread Wonton
atabase as if the password field > was at some pointed treated as type='list:string' and than changed back to > type='password'. Is it possible? > > Massimo > > On Wednesday, 19 December 2012 11:28:15 UTC-6, Wonton wrote: >> >> Yes, of cours

[web2py] Re: Login manually

2012-12-19 Thread Wonton
tarde' return respuesta #@servicios_privados.json #def metodo_privado(): #return 'private' response <https://127.0.0.1:8000/examples/global/vars/response>._vars=response <https://127.0.0.1:8000/examples/global/vars/response>._caller(public_call) E

[web2py] Re: Login manually

2012-12-18 Thread Wonton
me -M > >>> rows = db(db.auth_user).select(db.auth_user.password) > >>> print 'check:', any(r.passwords.startswith('|') for r in rows): > > does it print check: true or check: false? > > Massimo > > > On Tuesday, 18 December 20

[web2py] Re: Login manually

2012-12-18 Thread Wonton
omething for me: > > python web2py.py -S yourappname -M > >>> rows = db(db.auth_user).select(db.auth_user.password) > >>> print 'check:', any(r.passwords.startswith('|') for r in rows): > > does it print check: true or check: false? > > Massimo >

[web2py] Re: Login manually

2012-12-18 Thread Wonton
'check:', any(r.passwords.startswith('|') for r in rows): > > does it print check: true or check: false? > > Massimo > > > On Tuesday, 18 December 2012 13:40:41 UTC-6, Wonton wrote: >> >> Hi again Massimo! >> >> Since I've changed

[web2py] Re: Login manually

2012-12-18 Thread Wonton
te3), MySQL(pymysql), PostgreSQL(pg8000), IMAP(imaplib) El martes, 18 de diciembre de 2012 18:11:51 UTC+1, Massimo Di Pierro escribió: > > Can I see you models? Are you changing the validator for > db.auth_user.password? > Your error says: > > unsupported hash type > |p

[web2py] Re: Login manually

2012-12-18 Thread Wonton
ed database of records. > > Massimo > > On Monday, 17 December 2012 14:59:02 UTC-6, Wonton wrote: >> >> Hello everyone, >> >> I'm developing a backend site with web2py. I have 2 web services, one to >> register a user and a second one to login the u

[web2py] Re: help with login

2012-12-18 Thread Wonton
Hello Derek! I have this problem too but I have OpenSSL installed, in fact, I've used OpenSSL to build server.crt and server.key files so I can gain access to my web2py site using https. If it helps, I'm nowadays working on localhost, using web2py from source code (not the binary), and I'm usi

[web2py] Login manually

2012-12-17 Thread Wonton
ssage = 'OK' return message With this service I have the following error: unsupported hash type |pbkdf2(1000,20,sha512) I've tried to find any solution to this problem without success. Any of you has any idea of what is happening? Thank you very much and kind regards! Wonton --