[web2py] Re: Syntax error in custom expire_sessions.py

2011-10-17 Thread annet
Jonathan, Thanks for sharing. Kind regards, Annet.

Re: [web2py] Re: input user password not work on 1.99.2 stable

2011-10-17 Thread Anthony
Note, I think this was a relatively recent change -- previously there was no minimum password length. On Monday, October 17, 2011 11:36:34 PM UTC-4, 黄祥 wrote: > > a, i see, so that's my fault part, i've already test your suggestion, and > it's work fine. > thank you so much for your explaination

Re: [web2py] Re: input user password not work on 1.99.2 stable

2011-10-17 Thread steve van christie
a, i see, so that's my fault part, i've already test your suggestion, and it's work fine. thank you so much for your explaination, anthony. On Tue, Oct 18, 2011 at 10:33 AM, Anthony wrote: > Actually, I guess the insert still works, but when the password is shorter > than the min_length, CRYPT

[web2py] Re: input user password not work on 1.99.2 stable

2011-10-17 Thread Anthony
Actually, I guess the insert still works, but when the password is shorter than the min_length, CRYPT converts it to an empty string. Try using 4-character passwords, or set auth.settings.password_min_length = 1. Anthony On Monday, October 17, 2011 11:30:58 PM UTC-4, Anthony wrote: > > auth.se

[web2py] Re: input user password not work on 1.99.2 stable

2011-10-17 Thread Anthony
auth.settings.password_min_length defaults to 4, and he's trying to insert a 1-character password, so the validation through CRYPT is failing. On Monday, October 17, 2011 11:15:35 PM UTC-4, Massimo Di Pierro wrote: > > In which way it does not work? > > On Oct 17, 9:59 pm, 黄祥 wrote: > > Hi all,

[web2py] Re: input user password not work on 1.99.2 stable

2011-10-17 Thread Massimo Di Pierro
can you print db.auth_user.password.validate('b')[0] and check the problem is not there? On Oct 17, 10:21 pm, steve van christie wrote: > during login it return invalid login, the user first name, last name and > email can be inserted but the password is blank on the database, so that i > can't

Re: [web2py] Re: input user password not work on 1.99.2 stable

2011-10-17 Thread steve van christie
during login it return invalid login, the user first name, last name and email can be inserted but the password is blank on the database, so that i can't login, according to the example script, i've already define it's password. i don't know where is my fault, i've using web2py 1.99.2 stable and py

[web2py] Re: input user password not work on 1.99.2 stable

2011-10-17 Thread Massimo Di Pierro
In which way it does not work? On Oct 17, 9:59 pm, 黄祥 wrote: > Hi all, > > i've tried using db_wizard_populate to insert the users and it's > passwords, in the previous version it's work fine. > did anyone have an idea to fixed it? > > thanks a lot before. > > ex. > > # models/db_wizard_populate.

[web2py] input user password not work on 1.99.2 stable

2011-10-17 Thread 黄祥
Hi all, i've tried using db_wizard_populate to insert the users and it's passwords, in the previous version it's work fine. did anyone have an idea to fixed it? thanks a lot before. ex. # models/db_wizard_populate.py from gluon.contrib.populate import populate if db(db.wiki).isempty(): db.a

[web2py] Re: closed issues on google code

2011-10-17 Thread Massimo Di Pierro
It just got addressed. It is possible that a comment on a closed issue gets lost if I accidentally ignore the email (and I do get lots of emails so it does happens). In this case, in the future, feel free to remind me by personal email. Massimo On Oct 17, 6:31 pm, apple wrote: > On google code

Re: [web2py] Re: image uploading and storing in web2py

2011-10-17 Thread pbreit
Have you reviewed the example in the Book? http://web2py.com/book/default/chapter/03#An-Image-Blog

[web2py] Re: lighttpd web2py init script

2011-10-17 Thread pbreit
You may not need those init scripts. Have you tried setting Web2py up with lighttpd? http://web2py.com/book/default/chapter/11#Lighttpd

[web2py] Re: Threads operating on database causing a crash

2011-10-17 Thread Harshad
*Update:* Issue has been addressed in the following thread https://groups.google.com/forum/#!topic/web2py/R8N2CRP-ifY

[web2py] Re: Design Issue

2011-10-17 Thread Harshad
Oh, I see your point. Letting the main thread do all the db interaction makes perfect sense. Also, I'll use the queue model for interaction between the main thread and the send/receive threads. Thanks Massimo - you're a good man.

[web2py] closed issues on google code

2011-10-17 Thread apple
On google code bug tracker do comments added to closed issues get read? Or is it necessary to open a new issue? e.g. issue 462 was incorrectly marked invalid. I have added a further comment to the closed issue with correction needed. But not sure if it will be noticed?

[web2py] Re: Does auth.requires() always requires login?

2011-10-17 Thread Massimo Di Pierro
ok. requires_login instead of login. Uploading to trunk. On Oct 17, 10:55 am, Jonathan Lundell wrote: > On Oct 17, 2011, at 6:21 AM, Massimo Di Pierro wrote: > > > @auth.requires(condition) > > > First checks that user is logged in then it check whether the > > condition is true or False. > > Thi

[web2py] Re: Design Issue

2011-10-17 Thread Massimo Di Pierro
I apologized I missed this thread. There is a problem with this design. The web2py db object users the driver connection object. That cannot be shared among threads without locking. You can have a backrgound process with the two threads but each of them must make its own DAL connection and db.c

[web2py] Re: mysql postgres different behaviors

2011-10-17 Thread Massimo Di Pierro
The code in this traceback has nothing to do with postgresql but is related to reading data from the socket. What is the code that causes the problem? On Oct 17, 9:30 am, Manuele wrote: > Hi *, > I cannot understand why the same function if run with mysql gives me the > subsequent error while it

Re: [web2py] OT:Latinoware 2011

2011-10-17 Thread Ovidio Marinho
postei em homenagem ao desenvolvimento python na america do sul https://ovidiomfalcao.wordpress.com/2011/10/17/centro-open-source-cos-cursos-python/ , que sempre continuem e com muito prazer em divulgar estes eventos. Ovidio Marinho Falcao Neto ovidio...@gmail.com

[web2py] init script for lightpd with web2py

2011-10-17 Thread keiser1080
Hello, i find a init script for ubuntu with apache http://www.web2py.com/book/default/chapter/11#Start-as-Linux-Daemon But i don't find a script for lighttpd. I read this slice http://www.web2pyslices.com/main/slices/take_slice/57, But i don't understand how to change the ubuntu init script to hav

Re: [web2py] How to share a function between controllers

2011-10-17 Thread Jonathan Lundell
On Oct 17, 2011, at 2:04 PM, Tito Garrido wrote: > I have a function that will need to be used on at least 3 controllers... This > function will need to have access to the database and doesn't need a view > since it will just return True or False. > > What is the best way to implement it? My fi

Re: [web2py] Foundation CSS Framework

2011-10-17 Thread Vasile Ermicioi
orbit and reveal are nice

Re: [web2py] Re: request.vars is not working anymore?

2011-10-17 Thread Jonathan Lundell
On Oct 17, 2011, at 1:59 PM, Tito Garrido wrote: > It's a turbogears system that has a "request" function inside of a "service" > controller... so it would change the path of the system if I change the name > of the function... maybe there is a way to circumvent this problem using > routes but

[web2py] How to share a function between controllers

2011-10-17 Thread Tito Garrido
Hi folks! I have a function that will need to be used on at least 3 controllers... This function will need to have access to the database and doesn't need a view since it will just return True or False. What is the best way to implement it? My first idea was to put this function inside the model.

Re: [web2py] Re: request.vars is not working anymore?

2011-10-17 Thread Tito Garrido
It's a turbogears system that has a "request" function inside of a "service" controller... so it would change the path of the system if I change the name of the function... maybe there is a way to circumvent this problem using routes but I don't know :-( On Sun, Oct 16, 2011 at 5:57 PM, Bruno Roch

[web2py] OT:Latinoware 2011

2011-10-17 Thread Alfonso de la Guarda
Hello, I'll be in Latinoware 2011 (Brazil) speaking and representing the foundation Bika, a user / contributor web2py will be there? It would be interesting to share experiences Saludos, Alfonso de la Guarda Centro Open Source(COS) http://www.cos-la.net http://a

[web2py] lighttpd web2py init script

2011-10-17 Thread keiser1080
Hello, i find a init script for ubuntu with apachehttp://www.web2py.com/book/default/chapter/11#Start-as-Linux-Daemon But i don't find a script for lighttpd. I read this slice http://www.web2pyslices.com/main/slices/take_slice/57 http://www.web2pyslices.com/main/slices/take_slice/57, But i don't

[web2py] Foundation CSS Framework

2011-10-17 Thread pbreit
Nice new responsive CSS framework but I suspect it's not quite what we are looking for since it is kind of "heavy". http://foundation.zurb.com/

[web2py] Re: Custom Form Action empty

2011-10-17 Thread DenesL
Looking at the source, it seems possible to add FORM **attributes to crud just like SQLFORM. Any cons?.

[web2py] Re: db modeling question regarding DAL, SQLFORM and nested items

2011-10-17 Thread DenesL
Well, self referencing list:reference fields do not get a default requires but you can add it manually and set the label to your liking: db.div.child_div.requires = IS_IN_DB(db, db.div, '%(name)s', multiple=True) On Oct 16, 1:31 pm, Erwin Pass wrote: > Hi, > > Thx! Wow, thats a pretty awesome

[web2py] Re: Menus and Selected Tab

2011-10-17 Thread ron_m
Oops sorry forgot a detail, I did this a while back I have a simple mapping of top level menu item to controller name so this works for me because of how it is organized. This allows me to remove functions from the application depending on where it is installed. Some clients don't use every pos

[web2py] Re: Menus and Selected Tab

2011-10-17 Thread Paolo Caruccio
If you're using respone.menu to build your menu and in line with http://www.web2py.com/book/default/search?search=response.menu you could replace the second item (the boolean value)in the tuple with the check (request.function=='index') where index is your active page. In this way web2py automati

Re: [web2py] Re: upload - file in custom folder

2011-10-17 Thread Anthony
I think you should be able to do something like: db.table.myupload.uploadfolder = variable_containing_path You can probably do that anywhere before the upload folder is actually needed. Try it and see what happens. On Monday, October 17, 2011 1:30:57 PM UTC-4, miroslavgojic wrote: > > Field('my

[web2py] typo book chapter 2

2011-10-17 Thread Herman
Here is a more complex class: >>> class MyClass(object): >>>z = 2 >>>def __init__(self, a, b): >>>self.x = a, self.y = b # change a, to a;

[web2py] Re: Menus and Selected Tab

2011-10-17 Thread horridohobbyist
I tried that (though I didn't bother to change the default color). Doesn't seem to work - the active menu still isn't highlighted. Regards, Richard On Oct 17, 1:09 pm, ron_m wrote: > If you are using superfish menus in views/layout.html hee is what I did. > > I changed >       >         jQuery(

Re: [web2py] Re: upload - file in custom folder

2011-10-17 Thread Miroslav Gojic
Field('myupload', 'upload', uploadfolder='path/to/your/folder') This line go to model db.py (or my model file) uploadfolder='path/to/your/folder' -* can this be*: uploadfolder='variable' I need to make variable from upload form. That variable have folder path for upload location. Can I make path

[web2py] Re: Menus and Selected Tab

2011-10-17 Thread ron_m
If you are using superfish menus in views/layout.html hee is what I did. I changed jQuery(document).ready(function(){ jQuery('ul.sf-menu').superfish();}); to be jQuery(document).ready(function(){ jQuery('ul.sf-menu').superfish({pathClass: 'web

[web2py] Re: DAL level access to GAE entities by named key

2011-10-17 Thread Wikus van de Merwe
Thanks! It works with the query using the "long" syntax: *db(db.table_name.id == key).select().first()* The short version *db.table_name(key)* does returns *None* as it performs a check if key is an integer first. However, using a query instead of a key also works: *db.table_name(db.table_name.i

[web2py] Some quick help with w2p plugin sortable

2011-10-17 Thread Nate Atkinson
Hi, I'm trying to organize several places defined in a table called db.plads into ordered routes. I'm trying to use the sortable plugin (http://web2py.com/plugins/default/sortable) to allow me to order the route. The places on the route are showing up correctly, but when I click to drag and re-or

[web2py] web2py version 1.98.2 easy_install fails (Debian Linux 6.0)

2011-10-17 Thread David Michael Pennington
Hi, This is an FYI, perhaps it happens by design, but I thought I should at least highlight the problem. Previously I had web2py version 1.95.1 installed (via easy_install), and I decided to upgrade to the latest web2py. When I ran the easy_install script, I hit the problem highlighted below (w

Re: [web2py] Re: Syntax error in custom expire_sessions.py

2011-10-17 Thread Jonathan Lundell
On Oct 17, 2011, at 8:19 AM, Anthony wrote: > Missing the : at the end of the line (before the comment). I'm getting bitten by that a lot these days, since I've spent the last few months writing a lot of Objective-C and not so much Python (your condolences are much appreciated; thank you). I

Re: [web2py] Re: Does auth.requires() always requires login?

2011-10-17 Thread Jonathan Lundell
On Oct 17, 2011, at 6:21 AM, Massimo Di Pierro wrote: > @auth.requires(condition) > > First checks that user is logged in then it check whether the > condition is true or False. > This behavior has changed but it was undocumented. > > I guess next question is how do you do what you need to do. I

[web2py] Re: Syntax error in custom expire_sessions.py

2011-10-17 Thread annet
Hi Anthony, Thanks, I have been staring at this for more than an hour ... and just didn't notice the : was missing Kind regards, Annet.

[web2py] Re: Threads operating on database causing a crash

2011-10-17 Thread Harshad
Seriously, no one?

[web2py] Re: Syntax error in custom expire_sessions.py

2011-10-17 Thread Anthony
Missing the : at the end of the line (before the comment). On Monday, October 17, 2011 11:15:31 AM UTC-4, annet wrote: > > I adjusted the expire_sessions.py file. > > EXPIRATION_MINUTES=60 > DIGITS=('0','1','2','3','4','5','6','7','8','9') > import os, time, stat, logging > for app in ['admin'

[web2py] Syntax error in custom expire_sessions.py

2011-10-17 Thread annet
I adjusted the expire_sessions.py file. EXPIRATION_MINUTES=60 DIGITS=('0','1','2','3','4','5','6','7','8','9') import os, time, stat, logging for app in ['admin','init'] # add your apps path=os.path.join(request.folder,'sessions') if not os.path.exists(path): os.mkdir(path) now

[web2py] Re: web2py 1.99.2: import of 3rd party module

2011-10-17 Thread Vineet
Thank you very much. --- Vineet On Oct 17, 7:54 pm, Anthony wrote: > A change was made that disables generic views by default due to a potential > security vulnerability. To enable generic views, > seehttp://web2py.com/book/default/chapter/09#Generic-Views. You should > enable only the generic v

[web2py] Re: web2py 1.99.2: import of 3rd party module

2011-10-17 Thread Anthony
A change was made that disables generic views by default due to a potential security vulnerability. To enable generic views, see http://web2py.com/book/default/chapter/09#Generic-Views. You should enable only the generic views you need for the actions that need them, or create specific views.

[web2py] mysql postgres different behaviors

2011-10-17 Thread Manuele
Hi *, I cannot understand why the same function if run with mysql gives me the subsequent error while it works fine with postgres. The controller function uploads in db from an xls file a huge numbre of record. Heve you got something to suggest maybe about the db connection options to use? Tr

[web2py] Re: web2py 1.99.2: import of 3rd party module

2011-10-17 Thread Vineet
Thanks Anthony. Your tip worked. One more thing-- In 1.92.1, I have a controller "a2/mnpg.py" without any View file associated it. That used to work. In 1.99.2, it says "Invalid Controller a2/mnpg.html". Do I need to create a View compulsorily for any controller in 1.99.2? Vineet On Oct 17,

[web2py] Re: web2py 1.99.2: import of 3rd party module

2011-10-17 Thread Anthony
Conditional models were introduced in 1.96.1. Subfolders in the /models folder weren't officially supported prior to that, but if you had subfolders, the model files in them were not executed conditionally. If you want the import executed for every request, you have to put it in a non-condition

[web2py] Re: web2py 1.99.2: import of 3rd party module

2011-10-17 Thread Vineet
Yes. I am using conditional model. But whatever the case, same setup is working in web2py 1.92.1 I copied the apps within "applications" folder to web2py 1.99.2 It is not working there. No change at all is made. Then what may be the reason behind this? (earlier imported module in "model" file not

[web2py] Re: HOW TO RETRIEVE IMAGE FROM DATABASE

2011-10-17 Thread Massimo Di Pierro
What is the model? On Oct 17, 5:02 am, Saurabh S wrote: > Hi ,  i am developing an online booking system using web2py ...i have > come across a requiremnt where i need to store the clients photo into > the database(< 2MB)...how should i proceed with this .i > have achieved the functi

Re: [web2py] HOW TO RETRIEVE IMAGE FROM DATABASE.....

2011-10-17 Thread Jose Luna
Hi you can try this in the view: http://127.0.0.1:8000/examples/global/vars/URL>('download',args=db.table[ID].image)}}" /> Where table is the table qjere you have the client data, and ID is cliente you whant the photo. 2011/10/17 Saurabh S > Hi , i am developing an online booking system us

[web2py] Re: Does auth.requires() always requires login?

2011-10-17 Thread Massimo Di Pierro
@auth.requires(condition) First checks that user is logged in then it check whether the condition is true or False. This behavior has changed but it was undocumented. I guess next question is how do you do what you need to do. I thought about it and I pushed this to trunk: @auth.requires(request

Re: [web2py] Re: Custom Form Action empty

2011-10-17 Thread Anthony
On Monday, October 17, 2011 2:25:02 AM UTC-4, miroslavgojic wrote: > > > If I use HTML form or mentioned my example result is same. > *But how in HTML form get hidden fields, and ** > value="e0b5af7b-0cad-483b-979d-4f8b014e1d3a"** - and this value it is > changed after every form submit?* > Yo

[web2py] Re: web2py 1.99.2: import of 3rd party module

2011-10-17 Thread Anthony
Are you using conditional models (i.e., is your aa1.py model file inside /models/aa1/)? On Monday, October 17, 2011 7:06:16 AM UTC-4, Vineet wrote: > > I downloaded dabo windows ver 1.99.2 > OS: Win7 64bit > > In old version: 1.92.1, I used to keep a 3rd party module named "dabo" > in "site-pa

[web2py] Re: upload - file in custom folder

2011-10-17 Thread Anthony
Field('myupload', 'upload', uploadfolder='path/to/your/folder') See the 'uploadfolder' argument at http://web2py.com/book/default/chapter/06#Record-Representation. Anthony On Monday, October 17, 2011 7:08:27 AM UTC-4, miroslavgojic wrote: > > I have upload form and my files go to default upload

Re: [web2py] Re: image uploading and storing in web2py

2011-10-17 Thread Saurabh S
Hi , i am developing an online booking system using web2py ...i have come across a requiremnt where i need to store the clients photo into the database(< 2MB)...how should i proceed with this .i have achieved the functionality to store a image into the database when i create a perticu

Re: [web2py] Re: image uploading and storing in web2py

2011-10-17 Thread Saurabh S
hi thanks for you reply...please tell me how can i store the path of image into the databse and actuall image image on the file system ?...i mean what would the field in database.if i go with this approach will i be able to view the same image when i edit a perticuler client...please reply On

[web2py] upload - file in custom folder

2011-10-17 Thread miroslavgojic
I have upload form and my files go to default uploads folder. Can I have more than one upload folder I have need to chose folder folder where I need to store file Is this possible

[web2py] web2py 1.99.2: import of 3rd party module

2011-10-17 Thread Vineet
I downloaded dabo windows ver 1.99.2 OS: Win7 64bit In old version: 1.92.1, I used to keep a 3rd party module named "dabo" in "site-packages" dir (within web2py dir) & import them in the 1st model file (named "aa1.py"). Upon starting the app, this aa1.py is executed first, so that it was available

[web2py] Re: image uploading and storing in web2py

2011-10-17 Thread Gour
On Mon, 17 Oct 2011 08:13:38 -0200 Bruno Rocha wrote: > The recommended is: > > Store the pictures on the file system and picture locations in the > database. OK. > But if it is a requirement to store in database there is not to do > about. I should be more clear saying that I was thinking ab

Re: [web2py] Re: image uploading and storing in web2py

2011-10-17 Thread Bruno Rocha
The recommended is: Store the pictures on the file system and picture locations in the database. > > > Why? Because... > >1. You will be able to serve the pictures as static files. >2. No database access or application code will be required to fetch the >pictures. >3. The images co

[web2py] HOW TO RETRIEVE IMAGE FROM DATABASE.....

2011-10-17 Thread Saurabh S
Hi , i am developing an online booking system using web2py ...i have come across a requiremnt where i need to store the clients photo into the database(< 2MB)...how should i proceed with this .i have achieved the functionality to store a image into the database when i create a perticu

[web2py] HOW TO RETRIEVE IMAGE FROM DATABASE

2011-10-17 Thread Saurabh S
Hi , i am developing an online booking system using web2py ...i have come across a requiremnt where i need to store the clients photo into the database(< 2MB)...how should i proceed with this .i have achieved the functionality to store a image into the database when i create a perticu

[web2py] HOW TO RETRIEVE IMAGE FROM DATABASE

2011-10-17 Thread Saurabh S
Hi , i am developing an online booking system using web2py ...i have come across a requiremnt where i need to store the clients photo into the database(< 2MB)...how should i proceed with this .i have achieved the functionality to store a image into the database when i create a perticu

[web2py] Re: image uploading and storing in web2py

2011-10-17 Thread Gour
On Mon, 17 Oct 2011 05:57:32 -0200 Bruno Rocha wrote: > If your image needs to be stored in database (not in filesystem) do: Is it, in general, recommended to store image (blob) of such size in the {sqlite3,postgresql} database? Sincerely, Gour -- When your intelligence has passed out of th

Re: [web2py] image uploading and storing in web2py

2011-10-17 Thread Bruno Rocha
If your image needs to be stored in database (not in filesystem) do: Field('name','upload',uploadfield="myblob"),Field('myblob','blob',default='')