[web2py] Question about views syntax

2012-03-02 Thread davidkw
I've looked through the views chapter, but I'm not sure what these brackets [ ] are doing in this line. [ {{=A('search', _href=URL('search'))}} ] What do the brackets around the link syntax do? Thanks.

[web2py] Using SQLFORM.grid()

2012-03-01 Thread davidkw
Hi, I'm a little confused about this line of code in the book that uses SQLFORM.grid(). grid = SQLFORM.grid(db.document.page_id==page.id, args=[page.id]) It seems to pass a boolean value (db.document.page_id==page.id) and a list (args = [page.id]) to grid. What arguments of grid do these passed

[web2py] Using the epydoc

2012-02-28 Thread davidkw
I'm fairly new to programming and haven't used documentation extensively before. I'm having some trouble finding information. For example, I want to know the arguments that can be passed to db().select(...) and what the arguments for select() do. However, when I looked under web2py.gluon.dal, I

[web2py] Auth exposes login.html, logout.html..?

2012-02-24 Thread davidkw
Hi, not sure if this is a silly question. The documentation says that Auth exposes login.html, logout.html.. What does this mean exactly? I looked through my views, but can't find a login.html or logout.html. Are these hidden from me? Thanks

[web2py] Re: Auth exposes login.html, logout.html..?

2012-02-24 Thread davidkw
Thanks, I misread the epydoc. I think I'm slowly getting an idea of how auth works. On Feb 24, 3:17 pm, Anthony abasta...@gmail.com wrote: Hi, not sure if this is a silly question. The documentation says that Auth exposes login.html, logout.html.. Where does it say that? In the Access

[web2py] How Auth works

2012-02-23 Thread davidkw
I'm reading through the tutorial and just came across the part that adds the code: from gluon.tools import Auth auth = Auth(db) auth.define_tables() def user(): return dict(form=auth()) And suddenly login, register, etc were enabled. This is the first magic I've come across in web2py that I

[web2py] Re: How Auth works

2012-02-23 Thread davidkw
, February 23, 2012 8:34:47 PM UTC-5, davidkw wrote: I'm reading through the tutorial and just came across the part that adds the code: from gluon.tools import Auth auth = Auth(db) auth.define_tables() def user():     return dict(form=auth()) And suddenly login, register, etc were enabled

[web2py] Re: How Auth works

2012-02-23 Thread davidkw
: On Thursday, February 23, 2012 10:00:37 PM UTC-5, davidkw wrote: Thanks. I'm also wondering where the exposed URL's are located (/user/ login, /user/register, etc.). Can I customize these views? The welcome app includes a /default/user.html view, which you can edit. You can also create separate views

[web2py] Re: How Auth works

2012-02-23 Thread davidkw
, February 23, 2012 11:57:49 PM UTC-5, davidkw wrote: Hmm, I'm still having trouble creating separate actions and views for auth. The ones I create don't seem to override the default ones. Is there any way I can expose auth as a controller? And rewrite the methods in there? No need to do

[web2py] Re: Question about web2py syntax

2012-02-19 Thread davidkw
in the db.image table. It is equivalent to: db(db.image.id 0).select(db.image.ALL, orderby=db.image.title) Seehttp://web2py.com/books/default/chapter/29/6#select. Anthony On Friday, February 17, 2012 8:34:54 PM UTC-5, davidkw wrote: For the line: db().select(db.image.ALL, orderby

[web2py] Method to interactively experiment with web2py

2012-02-19 Thread davidkw
I'm wondering if there's some kind of way to use a shell or other IDE to quickly run lines of web2py code and see the result. For example, just entering db(query).select().first() and being able to see the result. I'm learning right now, and it's a little difficult to pick up the syntax without

[web2py] Need help understanding a line of code

2012-02-17 Thread davidkw
Hi, I'm going through the web2py tutorial and I don't understand part of this line: db.comment.image_id.requires = IS_IN_DB(db, db.image.id, '%(title)s') I understand that this requires that the image ID of the image the comment is under should be in the database. However, I don't understand

[web2py] Question about web2py syntax

2012-02-17 Thread davidkw
For the line: db().select(db.image.ALL, orderby=db.image.title) Why is there a () after the db and before the select? Is db() a method call of some kind? Thanks for any clarification.

[web2py] Re: Need help understanding a line of code

2012-02-17 Thread davidkw
Thank you! On Feb 17, 8:08 pm, Anthony abasta...@gmail.com wrote: Hi, I'm going through the web2py tutorial and I don't understand part of this line: db.comment.image_id.requires = IS_IN_DB(db, db.image.id, '%(title)s') I understand that this requires that the image ID of the image the