[web2py] Re: Master-detail CRUD

2013-09-10 Thread 黄祥
perhaps this slices can give you an idea : http://www.web2pyslices.com/slice/show/1627/simple-online-invoices-with-invoice2py http://www.web2pyslices.com/slice/show/1542/manage-users-and-memebership-in-the-same-form best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Please help me to design my database structure

2013-09-10 Thread Luc Chase
You want to copy all the steps... then mark each as it is done? Or are you wanting to create each done project_step record only after it is done? On Tuesday, 10 September 2013 00:02:40 UTC+1, Andreas Wienes wrote: > > Thanks for your advice! I corrected the small error and created the new > ta

[web2py] Insert into database by list.

2013-09-10 Thread Josyula Krishna
This is my table db.define_table('user_interests', Field('user_id',db.auth_user),Field('Science','boolean'),Field("Arts",'boolean'),Field("BusinessEconomy",'boolean'),Field("ComputersTechnology",'boolean')) and a list which has boolean values in it each corresponding to the value of the field

Re: [web2py] Re: How to leverage web2py popularity and usage?

2013-09-10 Thread Julie Bouillon
No need to reinvent the wheel ;-) Maybe just "reactivate" this one... On 09/09/2013 10:21 PM, Anthony wrote: > There was one: http://www.web2py.com.ar/planet/. Looks like it's > returning an error ticket now. > > Anthony > > On Monday, September 9, 2013 12:39:48 PM UTC-4, Julie Bouillon wrote: > >

[web2py] Re: Master-detail CRUD

2013-09-10 Thread Luc Chase
Thank you ... just what I'm looking for. @massimo - would be great if this could be out-of-the-box functionality of the wizard. On Tuesday, 10 September 2013 08:28:36 UTC+1, 黄祥 wrote: > > perhaps this slices can give you an idea : > > http://www.web2pyslices.com/slice/show/1627/simple-online-inv

[web2py] Re: Master-detail CRUD

2013-09-10 Thread 黄祥
btw there is written in the book : http://web2py.com/books/default/chapter/29/07/forms-and-validators#One-form-for-multiple-tables but not sure if you can implement in header n detail, because i think detail table will include many records for example in the case of invoice : product1 with quanti

[web2py] Re: Insert into database by list.

2013-09-10 Thread Anthony
db.user_interests.insert(user_id = auth.user_id, **dict(zip(db.user_interests.fields[2:], interests))) Anthony On Tuesday, September 10, 2013 4:36:03 AM UTC-4, Josyula Krishna wrote: > > This is my table > > db.define_table('user_interests', > Field('user_id',db.auth_user),Field('Science','b

[web2py] Re: SQLFORM.grid - Create from list of objects

2013-09-10 Thread Anthony
You are processing the form twice: if searchform.accepts(request.vars,keepvalues=True): searchform.process() searchform.process() ultimately calls .accepts() -- no need to call both. The preferred method is now: if searchform.process(keepvalues=True).accepted: Also, once you load the first

[web2py] Scheduler as upstart job

2013-09-10 Thread ajith c t
Hi All, I have a scheduler in my app in the models folder with some specific task. I need to run the app as a service in the server. I cant figure out how to run start the web2py with the arguments. script exec python -- /srv/tv-fe/web2py.py -K app -X --nogui -p 8000 -i 0.0.0.0 -a

[web2py] Re: Please help me to design my database structure

2013-09-10 Thread Andreas Wienes
Each steps from table project_type_step should be copied to table project_step, after creating a new project through the form. Am Dienstag, 10. September 2013 11:16:33 UTC+2 schrieb Luc Chase: > > You want to copy all the steps... then mark each as it is done? Or are you > wanting to create each

[web2py] Re: SQLFORM.grid - Create from list of objects

2013-09-10 Thread Gliese 581 g
Hi Anthony, Thanks for this useful information. I tried searchform.process(keepvalues=True).accepted But it evaluates to False. While below given line evaluates to True. if searchform.accepts(request.vars,keepvalues=True): I dont know why does it happens. Have I done anything wrong over here?

[web2py] Re: Scheduler as upstart job

2013-09-10 Thread Niphlod
why don't you schedule two separate services (the webserver and the scheduler), so the issues will be easier to track down ? what's in the logs ? On Tuesday, September 10, 2013 1:42:11 PM UTC+2, ajith c t wrote: > > Hi All, > > I have a scheduler in my app in the models folder with some sp

Re: [web2py] About Python Logo

2013-09-10 Thread Richard Vézina
very funny! Richard On Mon, Sep 9, 2013 at 5:52 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > Quote from: > http://pythonconquerstheuniverse.wordpress.com/2009/10/03/python-java-a-side-by-side-comparison/#comment-2495 > > > > The Python logo is obviously a snake. The name of the

[web2py] from book How to distribute your applications as binaries create start.bat

2013-09-10 Thread 黄祥
hi, from book How to distribute your applications as binaries create start.bat it written : cd web2py; web2py.exe should be: web2py\web2py.exe when i test what's written in the book, it not work ref: http://web2py.com/books/default/chapter/29/14/other-recipes#How-to-distribute-your-applications

[web2py] Re: Scheduler as upstart job

2013-09-10 Thread ajith c t
ok i will try making two separate services. and which log are you checking out, I maintain my custom logging mechanism. The only thing that comes in it is DEBUG - web2py.scheduler - defining tables (migrate=True) the app doesnt assign a worker in the scheduler_task table. The column shows a N

[web2py] Re: Master-detail CRUD

2013-09-10 Thread Luc Chase
Thanks again Stifan, this one-to-many structure is needed in many situations. Surprising it isn't mentioned more often. On Tuesday, 10 September 2013 11:46:24 UTC+1, 黄祥 wrote: > > btw there is written in the book : > > http://web2py.com/books/default/chapter/29/07/forms-and-validators#One-form

[web2py] Re: Why doesn't validate_and_insert() return on error?

2013-09-10 Thread Christopher Morlier
Hi Anthony, I discovered the problem with the 200 code. It was a basically a cut and paste error. The code I was using had a try-except block wrapping the body of the POST handler method, which looks like: try: ... except Exception as e: return str(e) I removed the exception and things

[web2py] http://www.web2py.com/examples/default/examples -> 502 Bad Gateway

2013-09-10 Thread Martin Zach
Hi, the http://www.web2py.com/examples/default/examples does not work, the is the error message: 502 Bad Gateway -- nginx/1.4.1 -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.go

[web2py] web2py course

2013-09-10 Thread Massimo Di Pierro
Shameless advertisement! I am teaching this certficate course: http://www.cdm.depaul.edu/ipd/Programs/Pages/WebDevelopmentwithPython.aspx The deadline for sign up is passed but we will take application for another week. It is fully online but not pre-recorded. Web Development with Python Progra

[web2py] Uploads not working when file is uploaded using SLQFORM.factory

2013-09-10 Thread Tushar Tuteja
I have created a form using SQLFORM.factory import os form=SQLFORM.factory( Field('image','upload',uploadfolder=os.path.join(request.folder,'uploads/')) ) I am using form.vars.image to populate a db table the file is being uploaded with a changed name. that changed name is populated

[web2py] Re: Scheduler as upstart job

2013-09-10 Thread Niphlod
you may be missing some bits. on production nginx acts as a proxy between uwsgi and the webyou don't need (again, usually) web2py to start its own webserver the -X switch is only useful if you want a single commandline to start BOTH the scheduler and the webserver, and it's meant to

[web2py] Re: http://www.web2py.com/examples/default/examples -> 502 Bad Gateway

2013-09-10 Thread Niphlod
probably @massimo was updating. the error isn't there anymore. On Tuesday, September 10, 2013 4:22:10 PM UTC+2, Martin Zach wrote: > > Hi, > > the http://www.web2py.com/examples/default/examples > does not work, the is the error message: > 502 Bad Gateway > -- > nginx/1

[web2py] Re: from book How to distribute your applications as binaries create start.bat

2013-09-10 Thread Niphlod
did you try simply doing cd web2py web2py.exe ? On Tuesday, September 10, 2013 3:23:49 PM UTC+2, 黄祥 wrote: > > hi, > > from book How to distribute your applications as binaries create start.bat > it written : > cd web2py; web2py.exe > should be: > web2py\web2py.exe > > when i test what's writt

[web2py] Re: Scheduler as upstart job

2013-09-10 Thread David
Few suggestions... 1. Try running the job in the foreground. Upstart docs. recommend this wherever its an option.. If you do run the job in the background, be sure you have an "expect fork" or "expect daemon" stanza so Upstart can follow the process. 2. When running in the foreground, if y

Re: [web2py] web2py course

2013-09-10 Thread Michele Comitini
Massimo, Having a "web2py Courses" area on web2py.com could be even better for advertising! 2013/9/10 Massimo Di Pierro > Shameless advertisement! > > I am teaching this certficate course: > http://www.cdm.depaul.edu/ipd/Programs/Pages/WebDevelopmentwithPython.aspx > The deadline for sign up

[web2py] Re: web2py course

2013-09-10 Thread samuel bonill
+1 El martes, 10 de septiembre de 2013 09:45:56 UTC-5, Massimo Di Pierro escribió: > > Shameless advertisement! > > I am teaching this certficate course: > http://www.cdm.depaul.edu/ipd/Programs/Pages/WebDevelopmentwithPython.aspx > The deadline for sign up is passed but we will take application

[web2py] Re: Cannot run web2py on Cygwin

2013-09-10 Thread Melissa Grenier
Yes, where do I go to open the ticket? -- 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

Re: [web2py] Re: Cannot run web2py on Cygwin

2013-09-10 Thread Michele Comitini
Look at the end of the mail body Resources: . . . - https://code.google.com/p/web2py/issues/list (Report Issues) 2013/9/10 Melissa Grenier > > Yes, where do I go to open the ticket? > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2

[web2py] Python Module, USB device, web2py

2013-09-10 Thread Zachary Burrows
Hello all! My boss wants me to use web2py to call a script that reads a value from a multimeter. He wants that value put onto a web2py page. I have written the script, but am not getting anywhere in trying to call it and display its result on my web2py page. I just keep breaking stuff (getting

[web2py] Run Python Script and Display Result

2013-09-10 Thread Zachary Burrows
Hello everyone! I am working on a project, and want to use web2py to display the result of a python module I have written (which reads some data from a multimeter and returns a value). I am looking for a quick and dirty way to get this done. I'd eventually like to learn about web development m

[web2py] Re: Uploads not working when file is uploaded using SLQFORM.factory

2013-09-10 Thread Alan Etkin
> > I am using form.vars.image to populate a db table > the file is being uploaded with a changed name. that changed name is > populated into my db field > but when I use "{{=URL('download', args=record.image)}}" > Hi "... Note, response.download is specifically for downloading files associate

Re: [web2py] Run Python Script and Display Result

2013-09-10 Thread Vinicius Assef
Touched it in another thread. On Tue, Sep 10, 2013 at 5:26 PM, Zachary Burrows wrote: > Hello everyone! > > I am working on a project, and want to use web2py to display the result of a > python module I have written (which reads some data from a multimeter and > returns a value). > > I am looking

Re: [web2py] Python Module, USB device, web2py

2013-09-10 Thread Vinicius Assef
It depends. Is you multimeter in the same computer your web2py instance is running? On Tue, Sep 10, 2013 at 5:33 PM, Zachary Burrows wrote: > Hello all! > > My boss wants me to use web2py to call a script that reads a value from a > multimeter. He wants that value put onto a web2py page. I have

Re: [web2py] web2py course

2013-09-10 Thread Marco Mansilla
+1 that would be really cool > Massimo, > > Having a "web2py Courses" area on web2py.com could be even better for > advertising! > > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/is

[web2py] Re: from book How to distribute your applications as binaries create start.bat

2013-09-10 Thread 黄祥
yes, it works well too. thank you so much. best regards, stifan -- 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] Re: check_client=True

2013-09-10 Thread ranjith
Hi Vikas, Are you able to disable multiple logins for a user in web2py. Could you please share the information. I too wanna know that On Wednesday, 31 July 2013 17:29:02 UTC+5:30, Vikas Gupta wrote: > > I need to disable the user from logging in multiple times from different > machines... If h

[web2py] Re: Uploads not working when file is uploaded using SLQFORM.factory

2013-09-10 Thread Anthony
Note, response.download gets the table and field name from the filename -- it then uses that information to find the file. If you use SQLFORM.factory to upload the file and use its default naming or create a custom name for the file, then it will not have the proper name structure for response.

Re: [web2py] Python Module, USB device, web2py

2013-09-10 Thread Rufus
Where did the thread go? A general comment: If you can do it in Python, you can do it in web2py. (in my limited experience.) On Tuesday, September 10, 2013 7:58:41 PM UTC-4, viniciusban wrote: > > It depends. > > Is you multimeter in the same computer your web2py instance is running? > > On T