[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 (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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 
 table. Now I'm trying to copy the steps for a specific project_type to a 
 new created project.

 I tried the following:

 def start():
 form = SQLFORM(db.project).process()
 if form.accepted:
 project_type = form.vars.project_type
 for row in db(db.step.project_type_id==project_type).select():
 # copy each step to the project_step table

 redirect(URL('index', args=form.vars.project_type))
 return locals()

 But I don't know how to copy from one table to another. Any ideas?



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 in the table

interests = [True, False, True, True]

Is there a way to insert this list directly into the table like

db.user_interests.insert(user_id = auth.user_id, #interests go in here ) 

How can i do it? Are there any other ways i can do it?  Any help is 
appreciated.

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


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:

 If there's enough enough bloggers out there writing about web2py,
 I'll be happy to put a planet web2py in place.
 Just let me know if there's an interest for that.

 Julie

 On 09/07/2013 06:01 PM, Massimo Di Pierro wrote:
 yes the number time distance between releases has increased,
 mostly because the new features we are adding are more complex
 (or would have done it before).

 I do not know about the number of users.

 I definitively think we need more people to blog about web2py.

 massimo

 On Saturday, 7 September 2013 05:07:53 UTC-5, LightDot wrote:

 I'm always sorry to see a good open source project with
 little or no documentation and a myriad of them are in this
 sad state. Luckily, web2py doesn't have this problem.

 The existence of the documentation is this fairly complete
 form is one of the reasons I chose web2py over other python
 frameworks. I don't think having 40 pages more or less would
 make me consider web2py faster or slower. But a lack of a
 chapter in the book might have made me choose another framework.

 I agree that new users need simple examples, but not at the
 expense of an in depth manual. If there is a consensus that
 web2py book can be intimidating for a complete begginer,
 perhaps someone can write a short My first web2py project
 in a book form, or something similar? I personally think this
 can be better served with blog articles and publishing of slices.

 Perhaps the growh of web2py userbase has slowed a bit..? I'm
 not sure that it did though. I don't have any insight into
 statistics to think one way or another and I don't trust my
 perception with this.

 What did slow down is the pace of web2py releases, hasn't it?
 The period between releases is longer than it used to be.


 On Saturday, September 7, 2013 9:54:45 AM UTC+2, webpypy wrote:


 As Massimo said,  the main advantage/objective of web2py
 framework is to be the easiest and fastest to develop web
 applications.

 I think the rate of growing popularity/interest was high
 for versions  2.0 , compared with versions = 2.0 .
 Maybe because of the big size of manual for versions 2.0
 , The big manual means it is not expected to be the
 easiest and fastest anymore.

 I suggest explaining the features through well documented
 examples/appliances, keeping the manual small... 

 -- 
  
 ---
 You received this message because you are subscribed to the
 Google Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it,
 send an email to web2py+un...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out
 https://groups.google.com/groups/opt_out.

 -- 
 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
 Groups web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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-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 (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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 quantity and price, product2 with quantity and price, etc. 
imho, it's so difference with others framework (php), that have a lot 
example that can achieve this.

pls correct me if i'm wrong

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 subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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','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 in the table

 interests = [True, False, True, True]

 Is there a way to insert this list directly into the table like

 db.user_interests.insert(user_id = auth.user_id, #interests go in here ) 

 How can i do it? Are there any other ways i can do it?  Any help is 
 appreciated.


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 page of the grid, you won't be able to load 
additional pages or do any sorting because in the controller, the grid is 
only created within the if searchform.accepts(...) condition, which only 
happens when the search form is submitted (not on other clicks within the 
grid).

Finally, even if the grid could be navigated, your code is re-filling the 
temp db with the same data on every request, which is inefficient.

Anthony

On Tuesday, September 10, 2013 12:28:47 AM UTC-4, Gliese 581 g wrote:

 Hi Massimo,
 Thanks for suggesting this solution. I am now able to display a gird on my 
 page with pagination and sorting options available. But whenever I click on 
 page number or try to sort a column by clicking on its header, nothing 
 happens. I get a blank page. I tried to debug it and found that when I 
 click on any page number, post back takes place but form doesnt get 
 validated(validation fails) and I do not get to see any grid. I am posting 
 my code here. Please correct me if I have done anything wrong in it.
  
 def index():
 result=None
 x=None
 searchform=SQLFORM.factory(
 Field('id', 'unicode',requires=empty_to_none),
 Field('account','unicode',requires=empty_to_none),
 Field('fromdate','unicode',requires=empty_to_none),
 Field('todate','unicode',requires=empty_to_none),
 Field('name','unicode',requires=empty_to_none),
 Field('status','integer'),
 
 Field('method',requires=IS_EMPTY_OR(IS_IN_SET(['Method1','Method2','Method3'],
  
 sort=True, zero='Select'))), 
 
 Field('type','unicode',requires=IS_EMPTY_OR(IS_IN_SET(['Type1','Type2',], 
 sort=True, zero='Select'))), 
 Field('altname','unicode',requires=empty_to_none),
 
 Field('group','unicode',requires=IS_EMPTY_OR(IS_IN_SET(['Group1','Group2',], 
 sort=True, zero='Select'))), 
 Field('assignee','unicode',requires=empty_to_none),
 submit_button = 'Search'
 )
  
 ##THIS CONDITION FAILS DURING POSTBACK(WHEN I CLICK ON PAGE NUMBERS OR 
 COLUMN HEADERS FOR SORTING)
 if searchform.accepts(request.vars,keepvalues=True):
 searchform.process()
 id=searchform.vars.id
 status=searchform.vars.status
 method=searchform.vars.method
 name=searchform.vars.name 
 account=searchform.vars.account 
 fromdate=searchform.vars.fromdate 
 todate=searchform.vars.todate 
 type=searchform.vars.type
 altname=searchform.vars.altname
 assignee=searchform.vars.assignee 
 group=searchform.vars.group
 ##THIS METHOD RETURNS A LIST OF OBJECTS
 result=__get_objects(id, status, method, name, 
   account, fromdate, todate, type, altname,
   assignee, group)
 ##THIS IS CODE TO CREATE IN MEMORY TEMPORARY DATABASE
 fields = [Field('ID'), Field('Method'), Field('Date'), 
   Field('Status'), Field('Account'), Field('Name'),
   Field('Amount1'), Field('Amount2'), Field('Type') 
 ]

 temp_db = cache.ram('tmp_db',lambda: 
 DAL('sqlite:memory').define_table('mytable',*fields)._db, None)   
 temp_db.mytable.truncate()   
 for obj in result['output']:
 temp_db.mytable.insert(ID=obj['id'],
 Method=obj['method'],
 Date=obj['date'],
 Status=obj['status'],
 Account=obj['account'],
 Name=obj['name'],
 Amount1=obj['amount1'],
 Amount2=obj['amount2'],
 Type=obj['type'])

 x = SQLFORM.grid(temp_db.mytable,create=False, deletable=False, 
  editable=False, maxtextlength=64, 
 paginate=2,searchable=False,details=False)
 else:
 response.flash = 'please fill the form' 
 return dict(form=searchform,result=result,x=x)
  
  
 When postback happens due to any sorting or paging action, 
 *searchform.accepts(request.vars,keepvalues=True) 
 *fails and no grid gets displayed. Please help me to fix this.
  
 Thank you

 On Sunday, 8 September 2013 19:17:03 UTC+5:30, Massimo Di Pierro wrote:

 You cannot unless you first load the data in a database. You can use a 
 temporary in memory database like this:

 fields = [Field('one'), Field('two'), Field('three'), ...]
 temp_db = cache.ram('tmp_db',lambda: 
 DAL('sqlite:memory').define_table('mytable',*fields)._db, None)

 temp_db.mytable.truncate()
 temp_db.mytable.insert()
 form = SQLFORM.grid(temp_db.mytable)


 On Sunday, 8 

[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 ''   
end script

The above script is used to run the app. Upon running it , it doesnt 
generate error, but the worker is not created in the scheduler_worker 
table. So none of my task gets executed.

Where am I getting wrong with the parameters

Thanks and regards
Ajith

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 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 
 table. Now I'm trying to copy the steps for a specific project_type to a 
 new created project.

 I tried the following:

 def start():
 form = SQLFORM(db.project).process()
 if form.accepted:
 project_type = form.vars.project_type
 for row in db(db.step.project_type_id==project_type).select():
 # copy each step to the project_step table

 redirect(URL('index', args=form.vars.project_type))
 return locals()

 But I don't know how to copy from one table to another. Any ideas?



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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?
Could you please suggest any solution to achieve sorting and paging in this 
scenario?
 
Thank you.
 

On Tuesday, 10 September 2013 16:43:22 UTC+5:30, Anthony wrote:

 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 page of the grid, you won't be able to load 
 additional pages or do any sorting because in the controller, the grid is 
 only created within the if searchform.accepts(...) condition, which only 
 happens when the search form is submitted (not on other clicks within the 
 grid).

 Finally, even if the grid could be navigated, your code is re-filling the 
 temp db with the same data on every request, which is inefficient.

 Anthony

 On Tuesday, September 10, 2013 12:28:47 AM UTC-4, Gliese 581 g wrote:

 Hi Massimo,
 Thanks for suggesting this solution. I am now able to display a gird on 
 my page with pagination and sorting options available. But whenever I click 
 on page number or try to sort a column by clicking on its header, nothing 
 happens. I get a blank page. I tried to debug it and found that when I 
 click on any page number, post back takes place but form doesnt get 
 validated(validation fails) and I do not get to see any grid. I am posting 
 my code here. Please correct me if I have done anything wrong in it.
  
 def index():
 result=None
 x=None
 searchform=SQLFORM.factory(
 Field('id', 'unicode',requires=empty_to_none),
 Field('account','unicode',requires=empty_to_none),
 Field('fromdate','unicode',requires=empty_to_none),
 Field('todate','unicode',requires=empty_to_none),
 Field('name','unicode',requires=empty_to_none),
 Field('status','integer'),
 
 Field('method',requires=IS_EMPTY_OR(IS_IN_SET(['Method1','Method2','Method3'],
  
 sort=True, zero='Select'))), 
 
 Field('type','unicode',requires=IS_EMPTY_OR(IS_IN_SET(['Type1','Type2',], 
 sort=True, zero='Select'))), 
 Field('altname','unicode',requires=empty_to_none),
 
 Field('group','unicode',requires=IS_EMPTY_OR(IS_IN_SET(['Group1','Group2',], 
 sort=True, zero='Select'))), 
 Field('assignee','unicode',requires=empty_to_none),
 submit_button = 'Search'
 )
  
 ##THIS CONDITION FAILS DURING POSTBACK(WHEN I CLICK ON PAGE NUMBERS OR 
 COLUMN HEADERS FOR SORTING)
 if searchform.accepts(request.vars,keepvalues=True):
 searchform.process()
 id=searchform.vars.id
 status=searchform.vars.status
 method=searchform.vars.method
 name=searchform.vars.name 
 account=searchform.vars.account 
 fromdate=searchform.vars.fromdate 
 todate=searchform.vars.todate 
 type=searchform.vars.type
 altname=searchform.vars.altname
 assignee=searchform.vars.assignee 
 group=searchform.vars.group
 ##THIS METHOD RETURNS A LIST OF OBJECTS
 result=__get_objects(id, status, method, name, 
   account, fromdate, todate, type, altname,
   assignee, group)
 ##THIS IS CODE TO CREATE IN MEMORY TEMPORARY DATABASE
 fields = [Field('ID'), Field('Method'), Field('Date'), 
   Field('Status'), Field('Account'), Field('Name'),
   Field('Amount1'), Field('Amount2'), Field('Type') 
 ]

 temp_db = cache.ram('tmp_db',lambda: 
 DAL('sqlite:memory').define_table('mytable',*fields)._db, None)   
 temp_db.mytable.truncate()   
 for obj in result['output']:
 temp_db.mytable.insert(ID=obj['id'],
 Method=obj['method'],
 Date=obj['date'],
 Status=obj['status'],
 Account=obj['account'],
 Name=obj['name'],
 Amount1=obj['amount1'],
 Amount2=obj['amount2'],
 Type=obj['type'])

 x = SQLFORM.grid(temp_db.mytable,create=False, deletable=False, 
  editable=False, maxtextlength=64, 
 paginate=2,searchable=False,details=False)
 else:
 response.flash = 'please fill the form' 
 return dict(form=searchform,result=result,x=x)
  
  
 When postback happens due to any sorting or paging action, 
 *searchform.accepts(request.vars,keepvalues=True) 
 *fails and no grid gets displayed. Please help me to fix this.
  
 

[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 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 ''   
 end script

 The above script is used to run the app. Upon running it , it doesnt 
 generate error, but the worker is not created in the scheduler_worker 
 table. So none of my task gets executed.

 Where am I getting wrong with the parameters

 Thanks and regards
 Ajith



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


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

 quote

 The Python logo is obviously a snake. The name of the language, however,
 was based on Monty Python. So what this means is that you are going to have
 good laughs when the python bytes you. Specially when the code is too long
 to debug or understand.

 The Java logo is a cup of coffee. What this means is that you are going to
 need coffee when programming in Java or you will fall asleep. In fact you
 are going to need loads of coffee when your code is near production stage.
 BTW I don’t drink coffee, so my job is twice as hard.

 Jython is when you give coffee to a snake. Jython users are people that
 drank toomuch coffee and over time it doesn’t have any effect anymore.
 Since the python needs to sleep, the solution is giving coffee so that Java
 programmers can also have laughs at late hours of the day.

 /quote

 --
 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 Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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-as-binaries

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 subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 NULL value. 

I am using nginx, when I remove the -X parameter it results in a bad 
gateway,



On Tuesday, 10 September 2013 18:21:36 UTC+5:30, Niphlod wrote:

 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 
 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 ''   
 end script

 The above script is used to run the app. Upon running it , it doesnt 
 generate error, but the worker is not created in the scheduler_worker 
 table. So none of my task gets executed.

 Where am I getting wrong with the parameters

 Thanks and regards
 Ajith



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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-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 quantity and price, product2 with quantity and price, etc. 
 imho, it's so difference with others framework (php), that have a lot 
 example that can achieve this.

 pls correct me if i'm wrong

 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 subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 behave as expected.

Sorry for the wasted bandwidth.

Thanks for the help,
Chris


On Monday, September 9, 2013 4:12:13 PM UTC-5, Anthony wrote:

 On Monday, September 9, 2013 4:40:43 PM UTC-4, Christopher Morlier wrote:

 Okay, that is what I what I was anticipating when I asked, Do the 
 validators not check required fields?

 The behavior is still a little surprising to me, since 
 validate_and_insert() is part of the DAL, and it has an explicit method of 
 reporting errors.


 The validators are the things you put in the requires attribute of a 
 field, typically for use with forms. The .validate_and_insert() method was 
 added to enable manual (i.e., non-form) inserts that still run the 
 validators. The required attribute is not a validator in this sense -- it 
 is enforced directly by the DAL on any insert. The intention of 
 .validate_and_insert() is to behave as form validation would -- that is why 
 it doesn't do anything special with the required attribute. The 
 required attribute is still processed as usual, but by the .insert() 
 method that gets called by .validate_and_insert(). If your goal is to use 
 validators to require values, simply use the IS_NOT_EMPTY() validator.
  

  It is also surprising to me that an error returns a 200 code on an 
 error, but maybe that is just a problem for my use case.


 That does seem odd -- can you show the full code and how you are making 
 the call?

 Anthony


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 Program
*Overview* 
A 5-week program focusing on agile development of database-driven web 
applications using the web2pyTM framework. The program 
covers Model-View-Controller architecture; the Database Abstraction Layer; 
the template language; internationalization; authentication and access 
control; integration with client-side libraries (including jQuery and 
Twitter Bootstrap); deployment on GoogleTMApp Engine and other platforms; 
and general performance and configuration issues.

*Admissions requirements:* The program is designed for application 
developers, system analysts, database administrators, and technical support 
professionals. Applicants should have a solid programming background as 
well as knowledge of HTML and CSS. 

*Dates  Location: Autumn Quarter 2013 *
Application deadline: Aug. 30, 2013 *Still taking applications*
Tuition deadline: Sept. 5, 2013
Classes begin: Sept. 25, 2013
Classes end: Oct. 23, 2013
*Only an online section will be conducted this quarter.*  There will be one 
lecture posted each week, beginning September 25, 2013.  Some of the 
material will be pre-recorded as of the program start date.

DePaul University reserves the right to cancel any program prior to that 
program's first class meeting.

*Course Credit:* 
The Web Development with Python Program is an accredited course of DePaul 
University, which follows the quarter system (as opposed to the semester 
system). 

Course #: IPD 359
Credit hours: 2.5 undergraduate

The credit hours are awarded to those who successfully complete the 
program's academic requirements. Course requirements include programming 
assignments.

Course credit and final grade information will be available through the 
Institute for Professional office upon the program's completion, and will 
be reflected on the university's system at the end of the university's 
regular academic quarter.

*Textbooks:* 
Reading materials for certificate programs consist of textbooks and 
supplementary handouts. Textbook readings are considered preparatory in 
nature and are typically assigned prior to lectures; supplementary handouts 
are frequently distributed in class to provide additional information.

Textbooks for Autumn Quarter 2013: There are no textbooks for this session.

*Fees: Autumn Quarter 2013 *
Tuition fee: $1,225.00 
Application fee: $40.00 (non-refundable) 

Textbooks are a separate purchase to be made by students.

Full payment of tuition must be received by the Institute for Professional 
Development office before the start of the program. The tuition fee for 
this program is not included in the university's tuition package for 
full-time undergraduate students. The university's refund policy allows a 
return of 100% of tuition (minus a separate $25 registration fee) if the 
student drops the Web Development with Python Program by Tuesday, October 
1, 2013.

Fees are payable by check made out to DePaul University, or by credit card. 
For credit card payment, print out and complete the Payment by Credit Card 
Form http://ipd.cdm.depaul.edu/paybycreditcard.pdf.

*Application  Registration Procedure* 
The first step is to apply for admission using the Institute for 
Professional Development's online 
applicationhttps://ipdapp.cdm.depaul.edu/onlineapp/; 
or, to apply via fax, mail, or in person, print out and complete the 
Application 
Form http://www.cdm.depaul.edu/ipd/Documents/WDPApp.pdf. Upon admission, 
the Institute office will contact the prospective student with registration 
information and instructions.

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 into my db field
but when I use {{=URL('download', args=record.image)}}

it gives me a 404 error

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 be used only in development.

Usually you'd have uwsgi serving the web part and a script to run the 
scheduler (hence, just web2py.py -K appname) .
BTW, upstart creates logs by default that are named after the servicename, 
so something like /var/log/upstart/yourservicename.log gets created: you 
may inspect that to see what is going on your server.

On Tuesday, September 10, 2013 3:28:13 PM UTC+2, ajith c t wrote:

 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 NULL value. 

 I am using nginx, when I remove the -X parameter it results in a bad 
 gateway,



 On Tuesday, 10 September 2013 18:21:36 UTC+5:30, Niphlod wrote:

 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 
 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 ''   
 end script

 The above script is used to run the app. Upon running it , it doesnt 
 generate error, but the worker is not created in the scheduler_worker 
 table. So none of my task gets executed.

 Where am I getting wrong with the parameters

 Thanks and regards
 Ajith



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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.4.1


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 written in the book, it not work

 ref:

 http://web2py.com/books/default/chapter/29/14/other-recipes#How-to-distribute-your-applications-as-binaries

 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 subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 you have a console log stanza all 
of the console output will go to /var/log/upstart/-jobname-.log... this can 
be helpful.
3.   You don't have any environment variables unless you set them with env 
VAR=x etc this includes HOME and PATH etc.

It seems rather counterintuitive to not run your daemon as a daemon... but 
it solved a lot of the issues I was having with jobs that just wouldn't 
start.  Hope it helps.

On Tuesday, September 10, 2013 6:28:13 AM UTC-7, ajith c t wrote:

 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 NULL value. 

 I am using nginx, when I remove the -X parameter it results in a bad 
 gateway,



 On Tuesday, 10 September 2013 18:21:36 UTC+5:30, Niphlod wrote:

 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 
 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 ''   
 end script

 The above script is used to run the app. Upon running it , it doesnt 
 generate error, but the worker is not created in the scheduler_worker 
 table. So none of my task gets executed.

 Where am I getting wrong with the parameters

 Thanks and regards
 Ajith



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


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 massimo.dipie...@gmail.com

 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 Program
 *Overview*
 A 5-week program focusing on agile development of database-driven web
 applications using the web2pyTM framework. The program
 covers Model-View-Controller architecture; the Database Abstraction Layer;
 the template language; internationalization; authentication and access
 control; integration with client-side libraries (including jQuery and
 Twitter Bootstrap); deployment on GoogleTMApp Engine and other platforms;
 and general performance and configuration issues.

 *Admissions requirements:* The program is designed for application
 developers, system analysts, database administrators, and technical support
 professionals. Applicants should have a solid programming background as
 well as knowledge of HTML and CSS.

 *Dates  Location: Autumn Quarter 2013 *
 Application deadline: Aug. 30, 2013 *Still taking applications*
 Tuition deadline: Sept. 5, 2013
 Classes begin: Sept. 25, 2013
 Classes end: Oct. 23, 2013
 *Only an online section will be conducted this quarter.*  There will be
 one lecture posted each week, beginning September 25, 2013.  Some of the
 material will be pre-recorded as of the program start date.

 DePaul University reserves the right to cancel any program prior to that
 program's first class meeting.

 *Course Credit:*
 The Web Development with Python Program is an accredited course of DePaul
 University, which follows the quarter system (as opposed to the semester
 system).

 Course #: IPD 359
 Credit hours: 2.5 undergraduate

 The credit hours are awarded to those who successfully complete the
 program's academic requirements. Course requirements include programming
 assignments.

 Course credit and final grade information will be available through the
 Institute for Professional office upon the program's completion, and will
 be reflected on the university's system at the end of the university's
 regular academic quarter.

 *Textbooks:*
 Reading materials for certificate programs consist of textbooks and
 supplementary handouts. Textbook readings are considered preparatory in
 nature and are typically assigned prior to lectures; supplementary handouts
 are frequently distributed in class to provide additional information.

 Textbooks for Autumn Quarter 2013: There are no textbooks for this session.

 *Fees: Autumn Quarter 2013 *
 Tuition fee: $1,225.00
 Application fee: $40.00 (non-refundable)

 Textbooks are a separate purchase to be made by students.

 Full payment of tuition must be received by the Institute for Professional
 Development office before the start of the program. The tuition fee for
 this program is not included in the university's tuition package for
 full-time undergraduate students. The university's refund policy allows a
 return of 100% of tuition (minus a separate $25 registration fee) if the
 student drops the Web Development with Python Program by Tuesday, October
 1, 2013.

 Fees are payable by check made out to DePaul University, or by credit
 card. For credit card payment, print out and complete the Payment by
 Credit Card Form http://ipd.cdm.depaul.edu/paybycreditcard.pdf.

 *Application  Registration Procedure*
 The first step is to apply for admission using the Institute for
 Professional Development's online 
 applicationhttps://ipdapp.cdm.depaul.edu/onlineapp/;
 or, to apply via fax, mail, or in person, print out and complete the 
 Application
 Form http://www.cdm.depaul.edu/ipd/Documents/WDPApp.pdf. Upon
 admission, the Institute office will contact the prospective student with
 registration information and instructions.

 --
 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 Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 for 
 another week.

 It is fully online but not pre-recorded.

 Web Development with Python Program
 *Overview* 
 A 5-week program focusing on agile development of database-driven web 
 applications using the web2pyTM framework. The program 
 covers Model-View-Controller architecture; the Database Abstraction Layer; 
 the template language; internationalization; authentication and access 
 control; integration with client-side libraries (including jQuery and 
 Twitter Bootstrap); deployment on GoogleTMApp Engine and other platforms; 
 and general performance and configuration issues.

 *Admissions requirements:* The program is designed for application 
 developers, system analysts, database administrators, and technical support 
 professionals. Applicants should have a solid programming background as 
 well as knowledge of HTML and CSS. 

 *Dates  Location: Autumn Quarter 2013 *
 Application deadline: Aug. 30, 2013 *Still taking applications*
 Tuition deadline: Sept. 5, 2013
 Classes begin: Sept. 25, 2013
 Classes end: Oct. 23, 2013
 *Only an online section will be conducted this quarter.*  There will be 
 one lecture posted each week, beginning September 25, 2013.  Some of the 
 material will be pre-recorded as of the program start date.

 DePaul University reserves the right to cancel any program prior to that 
 program's first class meeting.

 *Course Credit:* 
 The Web Development with Python Program is an accredited course of DePaul 
 University, which follows the quarter system (as opposed to the semester 
 system). 

 Course #: IPD 359
 Credit hours: 2.5 undergraduate

 The credit hours are awarded to those who successfully complete the 
 program's academic requirements. Course requirements include programming 
 assignments.

 Course credit and final grade information will be available through the 
 Institute for Professional office upon the program's completion, and will 
 be reflected on the university's system at the end of the university's 
 regular academic quarter.

 *Textbooks:* 
 Reading materials for certificate programs consist of textbooks and 
 supplementary handouts. Textbook readings are considered preparatory in 
 nature and are typically assigned prior to lectures; supplementary handouts 
 are frequently distributed in class to provide additional information.

 Textbooks for Autumn Quarter 2013: There are no textbooks for this session.

 *Fees: Autumn Quarter 2013 *
 Tuition fee: $1,225.00 
 Application fee: $40.00 (non-refundable) 

 Textbooks are a separate purchase to be made by students.

 Full payment of tuition must be received by the Institute for Professional 
 Development office before the start of the program. The tuition fee for 
 this program is not included in the university's tuition package for 
 full-time undergraduate students. The university's refund policy allows a 
 return of 100% of tuition (minus a separate $25 registration fee) if the 
 student drops the Web Development with Python Program by Tuesday, October 
 1, 2013.

 Fees are payable by check made out to DePaul University, or by credit 
 card. For credit card payment, print out and complete the Payment by 
 Credit Card Form http://ipd.cdm.depaul.edu/paybycreditcard.pdf.

 *Application  Registration Procedure* 
 The first step is to apply for admission using the Institute for 
 Professional Development's online 
 applicationhttps://ipdapp.cdm.depaul.edu/onlineapp/; 
 or, to apply via fax, mail, or in person, print out and complete the 
 Application 
 Form http://www.cdm.depaul.edu/ipd/Documents/WDPApp.pdf. Upon 
 admission, the Institute office will contact the prospective student with 
 registration information and instructions.


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


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 melizc...@gmail.com


 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 Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 errors).

I'm not a web developer, but I've been reading about MVC design and going 
through Python the Hard Way. I'm learning, but am far from the promised 
land.

Can anyone give me a quick and dirty way to do this? Or am I in WAY over my 
head? Cuz that's how I feel right now.

thanks!

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 more, and implement web2py in some home 
automation, but right now my boss just wants a quick proof of concept.

I've been reading a lot about model-view-controller, and going through 
Python the Hard Way so I'm on my way to the promised land of python web 
development, but I'm a far cry from having a handle on web2py.

Please help me. :P

Thanks!

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 
associated with db upload fields. Use response.stream (see below) for other 
types of file downloads and streaming ...
 
http://www.web2py.com/books/default/chapter/29/04/the-core?search=response.stream%28#response

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


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 zburro...@gmail.com 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 for a quick and dirty way to get this done. I'd eventually like
 to learn about web development more, and implement web2py in some home
 automation, but right now my boss just wants a quick proof of concept.

 I've been reading a lot about model-view-controller, and going through
 Python the Hard Way so I'm on my way to the promised land of python web
 development, but I'm a far cry from having a handle on web2py.

 Please help me. :P

 Thanks!

 --
 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 Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


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 zburro...@gmail.com 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 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 errors).

 I'm not a web developer, but I've been reading about MVC design and going
 through Python the Hard Way. I'm learning, but am far from the promised
 land.

 Can anyone give me a quick and dirty way to do this? Or am I in WAY over my
 head? Cuz that's how I feel right now.

 thanks!

 --
 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 Groups
 web2py-users group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to web2py+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


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/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 subscribed to the Google Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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 he is logged in on one machine with ip A, and he tries to 
 login on another machine with ip B, either his A's session should be 
 expired or his attempt on B should fail. this did not work with 
 check_client... isnt this what check_client is supposed to do? My app as 
 well as welcome app allowed me to login from different machines despite the 
 presence of check_client.




-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[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.download to identify the db table/field and find the file. If you 
need to store a file manually, see 
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#More-on-uploads
.

Anthony

On Tuesday, September 10, 2013 6:37:28 AM UTC-4, Tushar Tuteja wrote:

 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 into my db field
 but when I use {{=URL('download', args=record.image)}}

 it gives me a 404 error



-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


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 Tue, Sep 10, 2013 at 5:33 PM, Zachary Burrows 
 zbur...@gmail.comjavascript: 
 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 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 errors). 
  
  I'm not a web developer, but I've been reading about MVC design and 
 going 
  through Python the Hard Way. I'm learning, but am far from the 
 promised 
  land. 
  
  Can anyone give me a quick and dirty way to do this? Or am I in WAY over 
 my 
  head? Cuz that's how I feel right now. 
  
  thanks! 
  
  -- 
  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 
 Groups 
  web2py-users group. 
  To unsubscribe from this group and stop receiving emails from it, send 
 an 
  email to web2py+un...@googlegroups.com javascript:. 
  For more options, visit https://groups.google.com/groups/opt_out. 


-- 
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 Groups 
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.