[web2py:38198] Look like http://www.web2py.com/ is DOWN
URL reply with: Service Temporarily Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later. Apache/2.2.9 (Ubuntu) mod_ssl/2.2.9 OpenSSL/0.9.8g Server at www.web2py.com Port 80 -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38199] Re: Scalability of Web2py
I agree. The bottleneck would likely be the DB, not web2py or Django or any other framework/language. Therefore, the key here is to use caching and smart db design (plus some ajax to break big DB load tasks down to smaller ones). On Jan 1, 6:27 pm, mdipierro wrote: > It really depends on what "Can this handle requests from 100 users > every moment?" means. > The bottleneck is probably the db. > > Before you benchmark and/or go to production make sure you: > - bytecode compile your app > - set all your models to migrate = False > > Massimo > > On Dec 31 2009, 9:00 pm, vvk wrote: > > > Hi all, > > > I've to write a portal for my college in next semester. I want to > > discuss regarding scalabilty of web2py. > > > Configuration of Deployment: > > Apache + Mod WSGI + Postgresql + https only > > > Can this handle requests from 100 users every moment? > > What might be expected load on system given that machines here are of > > server class, can they handle this load, kindly suggest minimum > > configuration for this to work ? > > My application is a small one, having ten tables and conforms to 3NF, > > any suggestions here, regarding controllers or DB ? > > I'm testing my Inventory application today for scalability on a > > machine (AMD Athlon Processor 3000+, 512 MB RAM), will post results > > today. > > > > > Varun -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38200] Re: django and web2py
On Jan 2, 12:04 am, mdipierro wrote: > I think this is what you looking for. > > http://web2py.com/examples/static/epydoc/index.html Yes, looking for something like that. BUT This doc is not complete. I could not find, that even there is a keyword arg 'format' for define_table. See http://127.0.0.1:8000/examples/static/epydoc/web2py.gluon.dal.SQLDB-class.html (This section of the site is down now - 503) And sorry to say, that a framework could be superb, but if you cannot solve problems yourself with the help of doc, it scares people away, regardless of how kindly you are. Constantly asking in the mailing list and waiting for hours would be unacceptable, if I would use this tool for real business. Gergo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38201] Re: django and web2py
On Jan 1, 6:34 pm, mdipierro wrote: > On Jan 1, 9:48 am, pihentagy wrote: > The sytnax is Field(name, type). The default type is a string. If you > want it to be a reference it has to said explicitly. You do the same > in Django. The validator is optional and, in fact, since 1.74 you get > that validator by default if web2py knows how to represent a partner. > For example > > db.define_table('partner',Field('name'),format='%(names)s') > db.define_table('whatever',Field('partner',db.partner)) Hm so getting referential integrity only when the system can _display_ some type of record? Again, I see a problem here: validator should really care about validity, and representation should be another thing. And if we are representation: if web2py renders a mandatory FK as a combobox, there is no dummy 'please select one' option. The first valid option is selected by default. This causes serious usability issues, because users will not pay any attention to select a valid option, because there is something, and it validates. Gergo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38202] SQLFORM
Good morning. Using SQLFORM I must update a row with defined values that i want push in the input tags programmatically. There is a way? Thanks. leone -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:38203] Re: rendering a Select as a Label
On Thu, Dec 31, 2009 at 3:57 PM, mdipierro wrote: > Before > > db.oppty_main.origin_account_id.writable=False > > insert > > db.oppty_main.origin_account_id.represent=lambda id: SPAN(db.account > [id].name) > Others my think differently, but I feel that the expected behavior would be for the representation set in the requirement to be honored all the way. Txs for the solution. Miguel -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38204] membership manager plugin
Hello Im working on plugin to manage group membership. Main idea is following: Some kind of view loading the manager (i guess this way): =LOAD('plugin_membershipmanager',args=Group_id,ajax=True) Plugin gets all members of group with id=Group_id, and gets all users are not in group. Im easyly show this lists by plugin. def index(): group_id=request.args(0) group=db.auth_group[group_id] # group chouse table members = db(db.auth_membership.group_id == group.id).auth_membership.select(db.auth_membership.user_id) notmembers = db(db.auth_membership.group_id != group.id).auth_membership.select(db.auth_membership.user_id) return DIV(members,notmembers).xml() In some way I need to make each users as url in both of list one with 'remove' vars and second with 'add' vars. So, clicking on names and logins will add and remove respectively. (that the plan at least), I tryed to make this by view, BUT view in plugin are ignored. Now the question: How to from members.select() result, return table of urls A(str (db.auth_user[member.user_id].first_name)+' '+str(db.auth_user [member.user_id].last_name),URL (c='plugin_membershipmanager',f='index',args=group_id, vars= {'action':'remove'}) Thank you, for advise. Sorry if this is too newbe, but I failed to find sample code or manual. Hope this code will be universal to post as a slice. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38205] Re: Blogitizor
Thanks for the links, I didn't know about planetplanet. It would be nice to have all approved blog items listed in one place. It might encourage more people to blog about Web2py if they knew that others would easily find their work. -D -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38206] Re: Custom form for auth profile
I do not know about the other error. The problem is in saving the session. >From the error it looks like there is None in response.session_file I do not see how this can happen unless it is manually set. Massimo On Jan 2, 1:07 am, weheh wrote: > Yes, indeed, if I add to the user() controller the following code: > > form=auth() > if form.errors: > response.flash=DIV(form.errors,_class='error') > > Then I would have seen immediately that one of my fields was missing > from the view. Perhaps this should be the default behavior of the auth > user controller? > > BUT, what about the other issue with the gif upload cPickle error?? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38207] Re: Look like http://www.web2py.com/ is DOWN
It is up again. Sorry. On Jan 2, 3:05 am, KMax wrote: > URL reply with: > Service Temporarily Unavailable > > The server is temporarily unable to service your request due to > maintenance downtime or capacity problems. Please try again later. > Apache/2.2.9 (Ubuntu) mod_ssl/2.2.9 OpenSSL/0.9.8g Server atwww.web2py.com > Port 80 -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38208] Re: django and web2py
The format attribute was intoduced in 1.74 so it is not yet in the official docs. It is just a shortcut really. On Jan 2, 4:27 am, pihentagy wrote: > On Jan 2, 12:04 am, mdipierro wrote: > > > I think this is what you looking for. > > >http://web2py.com/examples/static/epydoc/index.html > > Yes, looking for something like that. > > BUT > > This doc is not complete. I could not find, that even there is a > keyword arg 'format' for define_table. > > Seehttp://127.0.0.1:8000/examples/static/epydoc/web2py.gluon.dal.SQLDB-c... > (This section of the site is down now - 503) > > And sorry to say, that a framework could be superb, but if you cannot > solve problems yourself with the help of doc, it scares people away, > regardless of how kindly you are. Constantly asking in the mailing > list and waiting for hours would be unacceptable, if I would use this > tool for real business. > > Gergo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38209] Re: django and web2py
On Jan 2, 4:47 am, pihentagy wrote: > On Jan 1, 6:34 pm, mdipierro wrote: > > > On Jan 1, 9:48 am, pihentagy wrote: > > The sytnax is Field(name, type). The default type is a string. If you > > want it to be a reference it has to said explicitly. You do the same > > in Django. The validator is optional and, in fact, since 1.74 you get > > that validator by default if web2py knows how to represent a partner. > > For example > > > db.define_table('partner',Field('name'),format='%(names)s') > > db.define_table('whatever',Field('partner',db.partner)) > > Hm so getting referential integrity only when the system can _display_ > some type of record? Again, I see a problem here: validator should > really care about validity, and representation should be another > thing. I am not sure I understand. Field('partner',db.partner) defined a reference field. The reference is always implemented using the Primary Key (the ID field) and this has nothing to do with representation. The format string is used only when building a representation of the reference in forms. What you see (%(name)s) is not the key and is not what is stores in the database for whatever.partner. > And if we are representation: if web2py renders a mandatory FK as a > combobox, there is no dummy 'please select one' option. > The first valid option is selected by default. This causes serious > usability issues, because users will not pay any attention to select a > valid option, because there is something, and it validates. Please never assume that something that is not done by default cannot be done. db.whatever.partner.requires.zero="Please Select One" > > Gergo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38210] Re: SQLFORM
Sorry, I do not understand. Can you make an example? On Jan 2, 5:44 am, leone wrote: > Good morning. > > Using SQLFORM I must update a row with defined values that i want push > in the input tags programmatically. > There is a way? > > Thanks. > leone -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38211] Re: rendering a Select as a Label
Logically there is a difference. db.table.field.represent tells web2py how to represent the value of a field (it assumes there is a value) db.table.field.requires tells web2py what kind of values can be in a field and therefore "suggests" a possible representation for the input widget associated to it. You can set them to be the same but they are not always the same. On Jan 2, 7:31 am, Miguel Lopes wrote: > On Thu, Dec 31, 2009 at 3:57 PM, mdipierro wrote: > > Before > > > db.oppty_main.origin_account_id.writable=False > > > insert > > > db.oppty_main.origin_account_id.represent=lambda id: SPAN(db.account > > [id].name) > > Others my think differently, but I feel that the expected behavior > would be for the representation set in the requirement to be honored > all the way. > Txs for the solution. > Miguel -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38212] Re: membership manager plugin
I believe your code should be def index(): group_id=request.args(0) group=db.auth_group[group_id] # group chouse table members = db(db.auth_membership.group_id ==group.id).select() notmembers = db(db.auth_membership.group_id !=group.id).select() return DIV(members,notmembers) In the last line you return a DIV (a helper) not a dict. If you return a dict() instead return dict(members=members, notmembers=notmembers) the view will NOT be ignored, as with any other action. You can do what you want without a view but, as you suggest, I would use a view. On Jan 2, 8:41 am, KMax wrote: > Hello > Im working on plugin to manage group membership. Main idea is > following: > Some kind of view loading the manager (i guess this way): > =LOAD('plugin_membershipmanager',args=Group_id,ajax=True) > > Plugin gets all members of group with id=Group_id, and gets all users > are not in group. > Im easyly show this lists by plugin. > def index(): > group_id=request.args(0) > group=db.auth_group[group_id] # group chouse table > members = db(db.auth_membership.group_id == > group.id).auth_membership.select(db.auth_membership.user_id) > notmembers = db(db.auth_membership.group_id != > group.id).auth_membership.select(db.auth_membership.user_id) > return DIV(members,notmembers).xml() > > In some way I need to make each users as url in both of list one with > 'remove' vars and second with 'add' vars. > So, clicking on names and logins will add and remove respectively. > (that the plan at least), I tryed to make this by view, BUT view in > plugin are ignored. > > Now the question: > How to from members.select() result, return table of urls A(str > (db.auth_user[member.user_id].first_name)+' '+str(db.auth_user > [member.user_id].last_name),URL > (c='plugin_membershipmanager',f='index',args=group_id, vars= > {'action':'remove'}) > > Thank you, for advise. Sorry if this is too newbe, but I failed to > find sample code or manual. Hope this code will be universal to post > as a slice. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38213] Re: SQLFORM
When SQLFORM is called with record parm valorized, a row is loaded to be updated. I want set the value of a column by code BEFORE submit it so that it is visible in input field. Default doesn't work (it is not a new row...). How can I do? Is it possible? Thanks leone On 2 Gen, 16:37, mdipierro wrote: > Sorry, I do not understand. Can you make an example? > > On Jan 2, 5:44 am, leone wrote: > > > > > Good morning. > > > Using SQLFORM I must update a row with defined values that i want push > > in the input tags programmatically. > > There is a way? > > > Thanks. > > leone -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38214] Re: SQLFORM
Take a look at the highlighted lines: http://github.com/mengu/web2py-screencast/blob/master/controllers/posts.py#L23,#L28 On Jan 2, 1:44 pm, leone wrote: > Good morning. > > Using SQLFORM I must update a row with defined values that i want push > in the input tags programmatically. > There is a way? > > Thanks. > leone -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38215] Re: SQLFORM
Invece di form=crud.update(table,record_id) Try this: record=table[record_id] record.fieldname = 'newvalue' form=crud.update(table,record) On Jan 2, 9:51 am, leone wrote: > When SQLFORM is called with record parm valorized, a row is loaded to > be updated. > I want set the value of a column by code BEFORE submit it so that it > is visible in input field. > Default doesn't work (it is not a new row...). How can I do? Is it > possible? > Thanks > leone > > On 2 Gen, 16:37, mdipierro wrote: > > > Sorry, I do not understand. Can you make an example? > > > On Jan 2, 5:44 am, leone wrote: > > > > Good morning. > > > > Using SQLFORM I must update a row with defined values that i want push > > > in the input tags programmatically. > > > There is a way? > > > > Thanks. > > > leone > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38216] Where is the sidebar? Offline editing?
I downloaded web2py a couple days ago and began messing around with it using the Scribd version of the book to get started. I'm using Google Chrome on a Mac. My admin pages looked quite a bit different than the examples in the book. Thinking I might have gotten an old version (it was from Jan 2009 or something) I clicked the check for upgrades link and was told I was up-to-date. Then thinking it might have been some Chrome-specific incompatibility I tried Safari. Clicked the upgrade link and lo and behold there was a new version to download. Got that, restarted web2py and things looked better. But still not quite right. For example, at the top of p. 53 in the book it shows the What's your name? form with a left-hand sidebar having Authentication, Main Menu and Edit This App titles. I don't see any of that even though I am extending layout.html in both my first and second pages (though not in my index.html page). Am I missing something? After editing a page if I want to return to the top level I'm constantly backing up through form submission warnings or using the browser's <- menu to back up several pages in the stack. Also, is there some way to work on these files outside of the web interface? As an Emacs user I find editing using widgets abysmal. I'm sure vi users feel the same. Thanks, Skip Montanaro -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38217] Re: SQLFORM
Very simple!!! Thanks. leone On 2 Gen, 17:09, mdipierro wrote: > Invece di > > form=crud.update(table,record_id) > > Try this: > > record=table[record_id] > record.fieldname = 'newvalue' > form=crud.update(table,record) > > On Jan 2, 9:51 am, leone wrote: > > > > > When SQLFORM is called with record parm valorized, a row is loaded to > > be updated. > > I want set the value of a column by code BEFORE submit it so that it > > is visible in input field. > > Default doesn't work (it is not a new row...). How can I do? Is it > > possible? > > Thanks > > leone > > > On 2 Gen, 16:37, mdipierro wrote: > > > > Sorry, I do not understand. Can you make an example? > > > > On Jan 2, 5:44 am, leone wrote: > > > > > Good morning. > > > > > Using SQLFORM I must update a row with defined values that i want push > > > > in the input tags programmatically. > > > > There is a way? > > > > > Thanks. > > > > leone -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38219] Re: SQLFORM
A suggest for documentation: explicit that record argument can be the rowid or the row object. I had not understud it before. By and new thanks. leone On 2 Gen, 17:48, leone wrote: > Very simple!!! > Thanks. > leone > > On 2 Gen, 17:09, mdipierro wrote: > > > > > Invece di > > > form=crud.update(table,record_id) > > > Try this: > > > record=table[record_id] > > record.fieldname = 'newvalue' > > form=crud.update(table,record) > > > On Jan 2, 9:51 am, leone wrote: > > > > When SQLFORM is called with record parm valorized, a row is loaded to > > > be updated. > > > I want set the value of a column by code BEFORE submit it so that it > > > is visible in input field. > > > Default doesn't work (it is not a new row...). How can I do? Is it > > > possible? > > > Thanks > > > leone > > > > On 2 Gen, 16:37, mdipierro wrote: > > > > > Sorry, I do not understand. Can you make an example? > > > > > On Jan 2, 5:44 am, leone wrote: > > > > > > Good morning. > > > > > > Using SQLFORM I must update a row with defined values that i want push > > > > > in the input tags programmatically. > > > > > There is a way? > > > > > > Thanks. > > > > > leone -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38220] Re: Where is the sidebar? Offline editing?
The one you want to download is 1.74.5 from this page: http://www.web2py.com/examples/default/download There are trunk version in launchpad (bzr) and google code (hg) but those only for developers. We stopped updating the subversion branch some time ago since we moved to Mercurial. On Jan 2, 10:32 am, Skip Montanaro wrote: > I downloaded web2py a couple days ago and began messing around with it > using the Scribd > version of the book to get started. I'm using Google Chrome on a > Mac. My admin pages > looked quite a bit different than the examples in the book. Thinking > I might have gotten an > old version (it was from Jan 2009 or something) I clicked the check > for upgrades link and > was told I was up-to-date. Then thinking it might have been some > Chrome-specific > incompatibility I tried Safari. Clicked the upgrade link and lo and > behold there was a > new version to download. Got that, restarted web2py and things looked > better. > > But still not quite right. For example, at the top of p. 53 in the > book it shows the What's > your name? form with a left-hand sidebar having Authentication, Main > Menu and Edit This > App titles. I don't see any of that even though I am extending > layout.html in both my > first and second pages (though not in my index.html page). > > Am I missing something? After editing a page if I want to return to > the top level I'm > constantly backing up through form submission warnings or using the > browser's <- menu > to back up several pages in the stack. > > Also, is there some way to work on these files outside of the web > interface? As an Emacs > user I find editing using widgets abysmal. I'm sure vi > users feel the same. > > Thanks, > > Skip Montanaro -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38221] Re: google app engine not creating my user defined tables
Thanks, that solved it. Also, thanks for the quick responses, I am just learning the framework so getting feedback so fast was awesome. On Jan 2, 12:36 am, mdipierro wrote: > I think the problem is the following: You need to run the program with > dev_appserver, register, login and create some posts and some > comments. As you use it locally, dev_appserver will write index.yaml > for you and list the indices you need. After you have fully used the > app locally then you upload it on GAE and gae will find the list of > indices in index.yaml. > > On Jan 1, 11:06 pm, Chad wrote: > > > > > hmmm. The GAE logs say I am missing an index. > > > Below are a couple of log entries. > > > In FILE: /base/data/home/apps/mutantacct4/1.338874278338316080/ > > applications/blog/controllers/default.py > > > Traceback (most recent call last): > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > restricted.py", line 173, in restricted > > exec ccode in environment > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/ > > applications/blog/controllers/default.py:create_post", line 64, in > > > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > globals.py", line 96, in > > self._caller = lambda f: f() > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/ > > applications/blog/controllers/default.py:create_post", line 26, in > > create_post > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > tools.py", line 2114, in create > > deletable=False, > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > tools.py", line 2052, in update > > upload=self.settings.download_url, > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > sqlhtml.py", line 618, in __init__ > > inp = self.widgets.options.widget(field, default) > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > sqlhtml.py", line 194, in widget > > options = requires0.options() > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > validators.py", line 344, in options > > self.build_set() > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > validators.py", line 339, in build_set > > self.dbset.select(self.dbset._db[self.ktable].ALL, **dd) > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > contrib/gql.py", line 660, in select > > for item in items: > > File "/base/python_lib/versions/1/google/appengine/ext/db/ > > __init__.py", line 1527, in __iter__ > > return self.run() > > File "/base/python_lib/versions/1/google/appengine/ext/db/ > > __init__.py", line 1514, in run > > iterator = raw_query.Run() > > File "/base/python_lib/versions/1/google/appengine/api/ > > datastore.py", line 997, in Run > > return self._Run() > > File "/base/python_lib/versions/1/google/appengine/api/ > > datastore.py", line 1021, in _Run > > str(exc) + '\nThis query needs this index:\n' + yaml) > > NeedIndexError: no matching index found. > > This query needs this index: > > - kind: auth_user > > properties: > > - name: first_name > > - name: last_name > > > 76.84.55.217 - chad.michel [01/Jan/2010:19:20:05 -0800] "GET /blog/ > > appadmin/insert/db/post HTTP/1.1" 500 391 "https:// > > 1.latest.mutantacct4.appspot.com/blog/appadmin" "Mozilla/4.0 > > (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET > > CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC > > 6.0; .NET4.0C; .NET4.0E),gzip(gfe)" > > "1.latest.mutantacct4.appspot.com"E 01-01 07:20PM 05.980 > > In FILE: /base/data/home/apps/mutantacct4/1.338872944811925236/ > > applications/blog/controllers/appadmin.py > > > Traceback (most recent call last): > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/gluon/ > > restricted.py", line 173, in restricted > > exec ccode in environment > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/ > > applications/blog/controllers/appadmin.py:insert", line 304, in > > > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/gluon/ > > globals.py", line 96, in > > self._caller = lambda f: f() > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/ > > applications/blog/controllers/appadmin.py:insert", line 123, in insert > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/gluon/ > > sqlhtml.py", line 618, in __init__ > > inp = self.widgets.options.widget(field, default) > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/gluon/ > > sqlhtml.py", line 194, in widget > > options = requires0.options() > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/gluon/ > > validators.py", line 344, in options > > self.build_set() > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/gluon/ > > validators.py", line 339, in build_set > > self.dbset.select(self.dbset.
[web2py:38222] Re: google app engine not creating my user defined tables
No problem. We are also learning GAE as we go, it is changing fast and so is web2py. On Jan 2, 11:07 am, Chad wrote: > Thanks, that solved it. Also, thanks for the quick responses, I am > just learning the framework so getting feedback so fast was awesome. > > On Jan 2, 12:36 am, mdipierro wrote: > > > I think the problem is the following: You need to run the program with > > dev_appserver, register, login and create some posts and some > > comments. As you use it locally, dev_appserver will write index.yaml > > for you and list the indices you need. After you have fully used the > > app locally then you upload it on GAE and gae will find the list of > > indices in index.yaml. > > > On Jan 1, 11:06 pm, Chad wrote: > > > > hmmm. The GAE logs say I am missing an index. > > > > Below are a couple of log entries. > > > > In FILE: /base/data/home/apps/mutantacct4/1.338874278338316080/ > > > applications/blog/controllers/default.py > > > > Traceback (most recent call last): > > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > > restricted.py", line 173, in restricted > > > exec ccode in environment > > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/ > > > applications/blog/controllers/default.py:create_post", line 64, in > > > > > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > > globals.py", line 96, in > > > self._caller = lambda f: f() > > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/ > > > applications/blog/controllers/default.py:create_post", line 26, in > > > create_post > > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > > tools.py", line 2114, in create > > > deletable=False, > > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > > tools.py", line 2052, in update > > > upload=self.settings.download_url, > > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > > sqlhtml.py", line 618, in __init__ > > > inp = self.widgets.options.widget(field, default) > > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > > sqlhtml.py", line 194, in widget > > > options = requires0.options() > > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > > validators.py", line 344, in options > > > self.build_set() > > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > > validators.py", line 339, in build_set > > > self.dbset.select(self.dbset._db[self.ktable].ALL, **dd) > > > File "/base/data/home/apps/mutantacct4/1.338874278338316080/gluon/ > > > contrib/gql.py", line 660, in select > > > for item in items: > > > File "/base/python_lib/versions/1/google/appengine/ext/db/ > > > __init__.py", line 1527, in __iter__ > > > return self.run() > > > File "/base/python_lib/versions/1/google/appengine/ext/db/ > > > __init__.py", line 1514, in run > > > iterator = raw_query.Run() > > > File "/base/python_lib/versions/1/google/appengine/api/ > > > datastore.py", line 997, in Run > > > return self._Run() > > > File "/base/python_lib/versions/1/google/appengine/api/ > > > datastore.py", line 1021, in _Run > > > str(exc) + '\nThis query needs this index:\n' + yaml) > > > NeedIndexError: no matching index found. > > > This query needs this index: > > > - kind: auth_user > > > properties: > > > - name: first_name > > > - name: last_name > > > > 76.84.55.217 - chad.michel [01/Jan/2010:19:20:05 -0800] "GET /blog/ > > > appadmin/insert/db/post HTTP/1.1" 500 391 "https:// > > > 1.latest.mutantacct4.appspot.com/blog/appadmin" "Mozilla/4.0 > > > (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET > > > CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC > > > 6.0; .NET4.0C; .NET4.0E),gzip(gfe)" > > > "1.latest.mutantacct4.appspot.com"E 01-01 07:20PM 05.980 > > > In FILE: /base/data/home/apps/mutantacct4/1.338872944811925236/ > > > applications/blog/controllers/appadmin.py > > > > Traceback (most recent call last): > > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/gluon/ > > > restricted.py", line 173, in restricted > > > exec ccode in environment > > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/ > > > applications/blog/controllers/appadmin.py:insert", line 304, in > > > > > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/gluon/ > > > globals.py", line 96, in > > > self._caller = lambda f: f() > > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/ > > > applications/blog/controllers/appadmin.py:insert", line 123, in insert > > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/gluon/ > > > sqlhtml.py", line 618, in __init__ > > > inp = self.widgets.options.widget(field, default) > > > File "/base/data/home/apps/mutantacct4/1.338872944811925236/gluon/ > > > sqlhtml.py", line 194, in widget > > > options = requires0
[web2py:38223] Re: Where is the sidebar? Offline editing?
> This is howhttp://127.0.0.1:8000/welcomeshould look like in 1.74.5 Right, but my test1 app doesn't look like that. I thought when you created a new app it started out as a clone of the welcome app. I guess not. > Does it look different for you? The welcome app looks as you indicated. My test1 app doesn't look like your MyApp app. Does it have something to do with creating test1 before upgrading? > What is in the file web2py/VERSION? .../Resources/VERSION is: Version 1.74.5 (2009-12-30 15:44:00) > Did you download it from the official web page (web2py.com)? Yes. S -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38224] Re: Where is the sidebar? Offline editing?
> The one you want to download is 1.74.5 from this > page:http://www.web2py.com/examples/default/download > > There are trunk version in launchpad (bzr) and google code (hg) but > those only for developers. We stopped updating the subversion branch > some time ago since we moved to Mercurial. I think you misunderstood. How do I edit my app outside of the web interface? At this point I have no desire to edit web2py files, but I would like my editing experience to be a bit more productive than through- the-web editing. Tx, S -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38225] Re: Where is the sidebar? Offline editing?
If you created your test1 before upgrading, it will not change appearence after upgrading BUT, if you make a test2 after upgrading, it should look like a clone of the welcome app. If it does not (and I would not why) remove all the *.tar and *.w2p in the main web2py folder and try again. You can edit your app from the shell using any editor. It is in web2py/ applications/test1/ There is no metadata so nothing to worry about. Massimo On Jan 2, 12:13 pm, Skip Montanaro wrote: > > The one you want to download is 1.74.5 from this > > page:http://www.web2py.com/examples/default/download > > > There are trunk version in launchpad (bzr) and google code (hg) but > > those only for developers. We stopped updating the subversion branch > > some time ago since we moved to Mercurial. > > I think you misunderstood. How do I edit my app outside of the web > interface? At this point I have no desire to edit web2py files, but I > would > like my editing experience to be a bit more productive than through- > the-web > editing. > > Tx, > > S -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:38226] Re: django and web2py
>> > On Jan 1, 9:48 am, pihentagy wrote: >> > The sytnax is Field(name, type). The default type is a string. If you >> > want it to be a reference it has to said explicitly. You do the same >> > in Django. The validator is optional and, in fact, since 1.74 you get >> > that validator by default if web2py knows how to represent a partner. >> > For example >> >> > db.define_table('partner',Field('name'),format='%(names)s') >> > db.define_table('whatever',Field('partner',db.partner)) >> >> Hm so getting referential integrity only when the system can _display_ >> some type of record? Again, I see a problem here: validator should >> really care about validity, and representation should be another >> thing. > > I am not sure I understand. Field('partner',db.partner) defined a > reference field. The reference is always implemented using the Primary > Key (the ID field) and this has nothing to do with representation. The > format string is used only when building a representation of the > reference in forms. What you see (%(name)s) is not the key and is not > what is stores in the database for whatever.partner. Ah, maybe the fact, that I use sqlite for testing purposes can explain things. So, if I say: db.define_table('whatever',Field('partner',db.partner)) than, using the appadmin, I can create a record with arbitrary partner id (because no selectbox for FK selection). And since sqlite does not handle referential integrity, it can save it fine. >> And if we are representation: if web2py renders a mandatory FK as a >> combobox, there is no dummy 'please select one' option. >> The first valid option is selected by default. This causes serious >> usability issues, because users will not pay any attention to select a >> valid option, because there is something, and it validates. > > Please never assume that something that is not done by default cannot > be done. > > db.whatever.partner.requires.zero="Please Select One" Ah, thanks. (IMHO that shold be default in the appadmin). Another feature, that django's admin knows and quite useful: where you can select an FK, there is a link for creating that type of object (displays in a popup). So, when you could not find the desired value in the selectbox, you can create a new option. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38227] SQLFORM.factory or a better way for custom forms
hi, I'm new to web2py and my first experience with it is fun. It's true that I can develop fast but for now customization is pain in some places. For example, I like css over tables. And I have to add some fieldsets to my form. Form is generated from a table and using SQLForm(because many tasks are done by it, like automatic insertion, validation etc.,) You can see my site on-line at http://exodus-fest.appspot.com/ (It uses css3, best viewed on a latest chrome/firefox or any other css3 supported browser) at the end of the post I'm posting code for view and controller. Now tell me is there any better way to do the same; like using SQLFORM.factory (I tried, but hopelessly failed.) so that view get shortened. Now, what follows is my code... controller ~~~ def register(): msg = '' fieldLabels={'name':'Full Name:', 'course':'Enrolled Course:', 'college':'College/University:', 'mobile':'Mobile Number:', 'email':'Email Address:'} form = SQLFORM(db.register, submit_button='Register', labels=fieldLabels) if form.accepts(request.vars, session): form = None a = q = c = d = '' import smtplib toaddr = request.vars.email q = 'Yes' if request.vars.quiz else 'No' a = 'Yes' if request.vars.animation else 'No' c = 'Yes' if request.vars.coding else 'No' d = 'Yes' if request.vars.dance else 'No' body = ('Dear ' + request.vars.name +',\n\n' + 'It is a pleasure for me to let you know that you had successfully registered for the Exodus-10 (Cultural and IT fest) ' + 'conducted by Computer Science Dept. of St. Thomas College, Thrissur \n\n'+ 'You are registered to:\n'+ ' Quiz : ' + q + '\n' + 'Animation : ' + a + '\n' + ' Coding : ' + c + '\n' + 'Dance : ' + d + '\n\n'+ 'Please note that program commence on 14th Jan, 2010, 9:30am'+ '\n\n\nThank You,\nShibu \n(Student Co-ordinator)\nMobile : +919496349988' + '\n Website: http://exodus-fest.appspot.com/') mail.send(to = toaddr, subject='Exodus: Event registration', message= body) msg += "You are Successfully registered. Please Check your email." elif form.errors: if form.errors.name: form.errors.name='Your name seems too short' if form.errors.college: form.errors.college='It is a too short name' if form.errors.mobile: form.errors.mobile='Enter a valied Mobile Number' if form.errors.email: form.errors.email='Enter a valied Email Address' return dict(form=form, msg=msg) now view ~~~ {{extend 'tmpl.html'}} {{if form:}} {{lbl=form.custom.label}} {{wdgt=form.custom.widget}} Exodus: Event Registration Form Your Details {{=lbl.name}} {{=wdgt.name}} {{=lbl.course}} {{=wdgt.course}} {{=lbl.college}} {{=wdgt.college}} Contact Information {{=lbl.mobile}} {{=wdgt.mobile}} {{=lbl.email}} {{=wdgt.email}} Participating Events {{=lbl.quiz}} {{=wdgt.quiz}} {{=lbl.animation}} {{=wdgt.animation}} {{=lbl.coding}} {{=wdgt.coding}} {{=lbl.dance}} {{=wdgt.dance}} {{=form.hidden_fields()}} {{pass}} {{=msg}} -- You received this message because you are subs
[web2py:38228] Re: django and web2py
Mind that unless the referenced table has a format='...', then reference fields do not have a default validator. If they do not have one, when you use a database that does provide referential integrity you will run into problems because you will get an OperationalError form the database. Web2py should validate the field before it sends the data to the database. > nother feature, that django's admin knows and quite useful: where you > can select an FK, there is a link for creating that type of object > (displays in a popup). So, when you could not find the desired value > in the selectbox, you can create a new option. We should have something like this. It can be done easily with a widget but appadmin should have something like that by default. On Jan 2, 1:10 pm, "KONTRA, Gergely" wrote: > >> > On Jan 1, 9:48 am, pihentagy wrote: > >> > The sytnax is Field(name, type). The default type is a string. If you > >> > want it to be a reference it has to said explicitly. You do the same > >> > in Django. The validator is optional and, in fact, since 1.74 you get > >> > that validator by default if web2py knows how to represent a partner. > >> > For example > > >> > db.define_table('partner',Field('name'),format='%(names)s') > >> > db.define_table('whatever',Field('partner',db.partner)) > > >> Hm so getting referential integrity only when the system can _display_ > >> some type of record? Again, I see a problem here: validator should > >> really care about validity, and representation should be another > >> thing. > > > I am not sure I understand. Field('partner',db.partner) defined a > > reference field. The reference is always implemented using the Primary > > Key (the ID field) and this has nothing to do with representation. The > > format string is used only when building a representation of the > > reference in forms. What you see (%(name)s) is not the key and is not > > what is stores in the database for whatever.partner. > > Ah, maybe the fact, that I use sqlite for testing purposes can explain things. > So, if I say: > db.define_table('whatever',Field('partner',db.partner)) > > than, using the appadmin, I can create a record with arbitrary partner > id (because no selectbox for FK selection). And since sqlite does not > handle referential integrity, it can save it fine. > > >> And if we are representation: if web2py renders a mandatory FK as a > >> combobox, there is no dummy 'please select one' option. > >> The first valid option is selected by default. This causes serious > >> usability issues, because users will not pay any attention to select a > >> valid option, because there is something, and it validates. > > > Please never assume that something that is not done by default cannot > > be done. > > > db.whatever.partner.requires.zero="Please Select One" > > Ah, thanks. (IMHO that shold be default in the appadmin). > > Another feature, that django's admin knows and quite useful: where you > can select an FK, there is a link for creating that type of object > (displays in a popup). So, when you could not find the desired value > in the selectbox, you can create a new option. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38229] Re: SQLFORM.factory or a better way for custom forms
I cannot think of a better way. Nice site by the way. I would only replace {{=form.hidden_fields()}} with {{=form.custom.end}} On Jan 2, 1:15 pm, "K.R.Arun" wrote: > hi, > I'm new to web2py and my first experience with it is fun. > It's true that I can develop fast but for now customization is pain in > some places. > For example, I like css over tables. And I have to add some fieldsets > to my form. > Form is generated from a table and using SQLForm(because many tasks > are done by it, like automatic insertion, validation etc.,) > > You can see my site on-line athttp://exodus-fest.appspot.com/ > (It uses css3, best viewed on a latest chrome/firefox or any other > css3 supported browser) > > at the end of the post I'm posting code for view and controller. > Now tell me is there any better way to do the same; like using > SQLFORM.factory (I tried, but hopelessly failed.) so that view get > shortened. > > Now, what follows is my code... > > controller > ~~~ > > def register(): > msg = '' > fieldLabels={'name':'Full Name:', 'course':'Enrolled Course:', > 'college':'College/University:', 'mobile':'Mobile Number:', > 'email':'Email Address:'} > form = SQLFORM(db.register, submit_button='Register', > labels=fieldLabels) > if form.accepts(request.vars, session): > form = None > a = q = c = d = '' > import smtplib > toaddr = request.vars.email > q = 'Yes' if request.vars.quiz else 'No' > a = 'Yes' if request.vars.animation else 'No' > c = 'Yes' if request.vars.coding else 'No' > d = 'Yes' if request.vars.dance else 'No' > body = ('Dear ' + request.vars.name +',\n\n' + > 'It is a pleasure for me to let you know that you had > successfully > registered for the Exodus-10 (Cultural and IT fest) ' + > 'conducted by Computer Science Dept. of St. Thomas College, > Thrissur > \n\n'+ > 'You are registered to:\n'+ > ' Quiz : ' + q + '\n' + > 'Animation : ' + a + '\n' + > ' Coding : ' + c + '\n' + > ' Dance : ' + d + '\n\n'+ > 'Please note that program commence on 14th Jan, 2010, 9:30am'+ > '\n\n\nThank You,\nShibu \n(Student Co-ordinator)\nMobile : > +919496349988' + '\n Website:http://exodus-fest.appspot.com/') > > mail.send(to = toaddr, subject='Exodus: Event registration', > message= body) > msg += "You are Successfully registered. Please Check your > email." > elif form.errors: > if form.errors.name: form.errors.name='Your name seems too > short' > if form.errors.college: form.errors.college='It is a too > short name' > if form.errors.mobile: form.errors.mobile='Enter a valied > Mobile > Number' > if form.errors.email: form.errors.email='Enter a valied Email > Address' > return dict(form=form, msg=msg) > > > now view > ~~~ > > {{extend 'tmpl.html'}} > > {{if form:}} > {{lbl=form.custom.label}} > {{wdgt=form.custom.widget}} > > > Exodus: Event Registration Form > > Your Details > > > id="register_name__label">{{=lbl.name}} > > {{=wdgt.name}} > > > id="register_course__label"> > {{=lbl.course}} > {{=wdgt.course}} > > > id="register_college__label"> > {{=lbl.college}} > {{=wdgt.college}} > > > > > Contact Information > > > id="register_mobile__label"> > {{=lbl.mobile}} > {{=wdgt.mobile}} > > > id="register_email__label"> > {{=lbl.email}} > {{=wdgt.email}} > > > > > Participating Events > > > > id="register_quiz__label">{{=lbl.quiz}} > > {{=wdgt.quiz}} > > > id="register_animation__label"> > {{=lbl.animation
[web2py:38230] Re: SQLFORM.factory or a better way for custom forms
Thank you, and really really appreciate the response time for the post (hardly 15min). I thought it may be constructed using SQLFORM.factory (I tried but...). If this is the better way, I'm happy. I have another problem with AJAX. ( You can see that menu Items loads asynchronously using ajax(u,s,t) function of web2py_ajax.html. For example following is code for 'home' menu item. (here also, Is there any better way to do this; like read out a html file and send, or jason/xml) - def home(): return DIV( H1('EXODUS'), P('The Computer Science Department of St. Thomas’ college has been conducting, Inter-Collegiate Techno-Cultural Fest named ‘Exodus-Saga Of Campus‘ every year since 2005. Nearly 20 – 25 colleges participate in this program with a total strength of about 1000 students.'), P('It includes technical events such as'), OL( LI('Iron Out – Debugging'), LI('Enlivenance – Flash Animation'), LI('Enigma – Quiz'), ), P('and a cultural program'), OL( LI('Enlivenance – Flash Animation'), ), ).xml() But how can I do the same with registration form? Now it's done using a separate view. Thanks for the quick reply. Have a nice day. Arun -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38231] Re: SQLFORM.factory or a better way for custom forms
well, you can do it with FROM (not SQLFORM.factory) but You would not gain anything in your case. About AJAX. You could make something like def ajax_user(): return auth() # instead of dict(form=auth()) and then in a page {{=LOAD('default','ajax_user/register',ajax_trap=True)}} you do not need to use LOAD, you can use ajax('...'). On Jan 2, 1:48 pm, "K.R.Arun" wrote: > Thank you, and really really appreciate the response time for the post > (hardly 15min). > I thought it may be constructed using SQLFORM.factory (I tried > but...). > If this is the better way, I'm happy. > I have another problem with AJAX. > ( You can see that menu Items loads asynchronously using ajax(u,s,t) > function of web2py_ajax.html. > For example following is code for 'home' menu item. (here also, Is > there any better way to do this; like read out a html file and send, > or jason/xml) > - > def home(): > return DIV( > H1('EXODUS'), > P('The Computer Science Department of St. Thomas’ college has > been > conducting, Inter-Collegiate Techno-Cultural Fest named ‘Exodus-Saga > Of Campus‘ every year since 2005. Nearly 20 – 25 colleges participate > in this program with a total strength of about 1000 students.'), > P('It includes technical events such as'), > OL( > LI('Iron Out – Debugging'), > LI('Enlivenance – Flash Animation'), > LI('Enigma – Quiz'), > ), > P('and a cultural program'), > OL( > LI('Enlivenance – Flash Animation'), > ), > ).xml() > > > But how can I do the same with registration form? > Now it's done using a separate view. > > Thanks for the quick reply. > Have a nice day. > > Arun -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38232] plugin google map
Here is a gmap plugin. - install - edit models/plugin_gmap.py to set the query for the points to be shown on map (read example) - add component to pages {{=LOAD('plugin_gmap')}} -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en. web2py.plugin.gmap.w2p Description: Binary data
[web2py:38233] NameError: name 'auth' is not defined
Hello, I am new to web2py. I am trying to follow the documentation, but I cannot get the image blog example to work. I copied the lines into the db.py. If I select the database administration, I get the following traceback: Traceback (most recent call last): File "C:\Users\sharky\Documents\_MEINE.DATEN\Programmierung\eclipse \web2py\gluon\restricted.py", line 173, in restricted exec ccode in environment File "C:/Users/sharky/Documents/_MEINE.DATEN/Programmierung/eclipse/ web2py/applications/images/views/appadmin.html", line 44, in {{=T('The "query" is a condition like "db.table1.field1==\'value \'". Something like "db.table1.field1==db.table2.field2" results in a SQL JOIN.')}} NameError: name 'auth' is not defined The line 44 contains: if not auth.user: I tried the windows version, the current hg clone and the source version of web2py. It is always the same. What is my fault ? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38234] Re: NameError: name 'auth' is not defined
Hi, just to make sure I understand. Can you point me to the image blog example? When you edited db.py did you append the content or did you replace it? You are supposed to append it since db.py defines auth. On Jan 2, 3:49 pm, joscha wrote: > Hello, > > I am new to web2py. I am trying to follow the documentation, but I > cannot get the image blog example to work. I copied the lines into the > db.py. If I select the database administration, I get the following > traceback: > > Traceback (most recent call last): > File "C:\Users\sharky\Documents\_MEINE.DATEN\Programmierung\eclipse > \web2py\gluon\restricted.py", line 173, in restricted > exec ccode in environment > File "C:/Users/sharky/Documents/_MEINE.DATEN/Programmierung/eclipse/ > web2py/applications/images/views/appadmin.html", line 44, in > {{=T('The "query" is a condition like "db.table1.field1==\'value > \'". Something like "db.table1.field1==db.table2.field2" results in a > SQL JOIN.')}} > NameError: name 'auth' is not defined > > The line 44 contains: > if not auth.user: > > I tried the windows version, the current hg clone and the source > version of web2py. It is always the same. What is my fault ? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:38235] Re: django and web2py
> Please never assume that something that is not done by default cannot > be done. > > db.whatever.partner.requires.zero="Please Select One" Again, where can I find info about the zero argument? It is mentioned at http://www.web2py.com/examples/static/epydoc/web2py.gluon.validators.IS_IN_DB-class.html __init__(self, dbset, field, label=None, error_message='value not in database', orderby=None, cache=None, multiple=False, zero=None) and nothing about the arguments :( but searching for requires zero on the site cannot give me extra info. see: http://www.google.hu/search?q=%2Brequires+%2Bzero+site%3Aweb2py.com IMHO: Something, that is not documented, does not exist. Gergo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38236] Re: django and web2py
You are right. The current documentation refers to the features that existed on August 2009. Features added after that are not yet documented. We are working on it. If you want to submit a patch from the docstring I will be happy to take it. I also agree that zero!=None should be default. I can change it. Anybody against? Massimo On Jan 2, 4:28 pm, "KONTRA, Gergely" wrote: > > Please never assume that something that is not done by default cannot > > be done. > > > db.whatever.partner.requires.zero="Please Select One" > > Again, where can I find info about the zero argument? > > It is mentioned > athttp://www.web2py.com/examples/static/epydoc/web2py.gluon.validators > > __init__(self, dbset, field, label=None, error_message='value not in > database', orderby=None, cache=None, multiple=False, zero=None) > and nothing about the arguments :( > > but searching for requires zero on the site cannot give me extra info. > see:http://www.google.hu/search?q=%2Brequires+%2Bzero+site%3Aweb2py.com > > IMHO: Something, that is not documented, does not exist. > > Gergo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38237] Re: django and web2py
I have updated the docstring and I have make a nonzero zero in trunk. On Jan 2, 4:28 pm, "KONTRA, Gergely" wrote: > > Please never assume that something that is not done by default cannot > > be done. > > > db.whatever.partner.requires.zero="Please Select One" > > Again, where can I find info about the zero argument? > > It is mentioned > athttp://www.web2py.com/examples/static/epydoc/web2py.gluon.validators > > __init__(self, dbset, field, label=None, error_message='value not in > database', orderby=None, cache=None, multiple=False, zero=None) > and nothing about the arguments :( > > but searching for requires zero on the site cannot give me extra info. > see:http://www.google.hu/search?q=%2Brequires+%2Bzero+site%3Aweb2py.com > > IMHO: Something, that is not documented, does not exist. > > Gergo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38238] web2py with python 2.4
I apologize for beating this one, but any help would be appreciated since I'm not in position to upgrade to python 2.5 at the moment, and really want to try using web2py. I installed the hashlib on CENTOS 5.4 x86_64, then got the error that UUID is missing. I used easy_install to install UUID and that worked fine, but now got the following error: ImportError: No module named functools. Any help is more than welcome. Just to be sure, what I do is manually starting the web2py, and then get the error: python web2py.py Thanks, Adnan S. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38239] Re: web2py with python 2.4
Please upgrade to 1.74.5. It will not require functools. On Jan 2, 9:04 pm, Adnan Smajlovic wrote: > I apologize for beating this one, but any help would be appreciated since > I'm not in position to upgrade to python 2.5 at the moment, and really want > to try using web2py. > > I installed the hashlib on CENTOS 5.4 x86_64, then got the error that UUID > is missing. I used easy_install to install UUID and that worked fine, but > now got the following error: ImportError: No module named functools. > > Any help is more than welcome. > > Just to be sure, what I do is manually starting the web2py, and then get the > error: > python web2py.py > > Thanks, > Adnan S. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py:38240] Re: web2py with python 2.4
Thank you Massimo, that did it. On Sat, Jan 2, 2010 at 10:28 PM, mdipierro wrote: > Please upgrade to 1.74.5. It will not require functools. > > On Jan 2, 9:04 pm, Adnan Smajlovic wrote: > > I apologize for beating this one, but any help would be appreciated since > > I'm not in position to upgrade to python 2.5 at the moment, and really > want > > to try using web2py. > > > > I installed the hashlib on CENTOS 5.4 x86_64, then got the error that > UUID > > is missing. I used easy_install to install UUID and that worked fine, but > > now got the following error: ImportError: No module named functools. > > > > Any help is more than welcome. > > > > Just to be sure, what I do is manually starting the web2py, and then get > the > > error: > > python web2py.py > > > > Thanks, > > Adnan S. > > -- > > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py:38241] Re: On Login failure
Ok, that works. Now I correctly get to my logon page at /myapp/admin/user/login?_next=/myapp/admin/home instead of "default\index". But if that logon fails, I get redirected to /myapp/admin/user/login which shows the logon form but fails (goes to "default\index") if I use a valid logon. Somehow the vars have vanished. The code in gluon/tools.py if not user: # invalid login session.flash = self.messages.invalid_login redirect(self.url(args=request.args)) looks suspicious (no vars) , but I am seldom right about these things. Karl On Jan 1, 9:25 am, mdipierro wrote: > auth.settings.controller='myctl' > > On Jan 1, 8:01 am, kbochert wrote: > > > I'm trying to use my custom login page. > > > In models\db.py I put > > > auth.settings.login_url = "/myapp/myctl/user/login" > > > When I go to a protected page, I get the expected login page 'myapp > > \myctl\user\login' . > > If I enter a user email and a bad password, I get sent to the page > > 'myapp\default\user\login' . > > > How can I return to my login page? > > > Karl -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.