[web2py:23169] why id field is displaying in the form?
Hi , I have created a table for user. to update the table i have written the code def editprofile(): user = db(db.users.id==session.userid).select()[0] form = SQLFORM(db.users,user,fields=['firstname','lastname']) i found id field is showing in the browser though i have selected ['firstname','lastname']. how to avoid this user.id from the form. output in browser: Id: 1 First Name: durga Last Name: prasad thanks durga --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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:23179] inserting values in to db fields which are not there in SQLFORM
hi, i would like to insert a values to a table through form where user can enter fewer fields. for example i have table 'company' which has fields userid,compname,designation,location. form = SQLFORM(db(db.company),fields= ['compname','designation','location']) userid is stored in session as session.userid in this case user can enter 3 fields through form but i want userid also to be updated at the same time in to company table. can some one help me how to update all 4 fields at a time. thanks durga --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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:23195] date field error
Hi, i have defined a date field in my table. db.define_table('users', SQLField('dob',requires=IS_DATE()), when i click on db.users in database administration. its throwing below error. Error traceback 1.2.3.4.5.6.7.8.9.10.11.12. Traceback (most recent call last): File "C:\Apps\web2py_src\gluon\restricted.py", line 98, in restricted exec ccode in environment File "C:/Apps/web2py_src/applications/ whosay/views/appadmin.html", line 112, in File "C:\Apps \web2py_src\gluon\sqlhtml.py", line 645, in __init__r = str (field.formatter(r)) File "C:\Apps\web2py_src\gluon\sql.py", line 1658, in formattervalue = item.formatter(value) File "C:\Apps \web2py_src\gluon\validators.py", line 1409, in formatterreturn value.strftime(str(self.format))AttributeError: 'str' object has no attribute 'strftime' thanks durga --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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:23198] Re: date field error
thanks for your immediate response On Jun 3, 7:42 pm, Mladen Milankovic wrote: > Hi. > > You need to define the type of the field, the IS_DATE is only a > validator that will check the values before insert/update. > > Use: > db.define_table('users', > SQLField('dob', 'date',requires=IS_DATE()), > > regards > mmlado > > On Wed, Jun 3, 2009 at 4:36 PM, durga wrote: > > > Hi, > > > i have defined a date field in my table. > > db.define_table('users', > > SQLField('dob',requires=IS_DATE()), > > > when i click on db.users in database administration. its throwing > > below error. > > > Error traceback > > 1.2.3.4.5.6.7.8.9.10.11.12. Traceback (most recent call last): File > > "C:\Apps\web2py_src\gluon\restricted.py", line 98, in restricted > > exec ccode in environment File "C:/Apps/web2py_src/applications/ > > whosay/views/appadmin.html", line 112, in File "C:\Apps > > \web2py_src\gluon\sqlhtml.py", line 645, in __init__ r = str > > (field.formatter(r)) File "C:\Apps\web2py_src\gluon\sql.py", line > > 1658, in formatter value = item.formatter(value) File "C:\Apps > > \web2py_src\gluon\validators.py", line 1409, in formatter return > > value.strftime(str(self.format))AttributeError: 'str' object has no > > attribute 'strftime' > > > thanks > > durga --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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:23872] sqllite web2py gen question
Hi, I am developing a website with web2py and sqllite. I am expecting no. of users of the site would increase to 50k. My question is would the sqllite in web2py support for 50k users or I need to migrate to mysql. The database would contain user information, messages and some blogs. thanks durga --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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:28867] download problem of web2py_src.zip from web2py.com site. are there any other mirrors to download..?
cannot download from http://www.web2py.com/examples/static/web2py_src.zip --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@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:29069] how do I upload data to GAE database tables
how do I upload default data to GAE database tables like we do it in admin app using CSV file --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@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:21857] how to deploy web2py app with lighttpd server on windows xp
hi all, I have downloaded web2py_win and lighttpd(windows ver) on my windows machine. configured as below but still its not working can somebody help me in web2py app deployment web2py at C:\Apps\web2py_win\web2py lighttpd at C:\apps\LightTPD in lighttpd i have configured server.modules = ( "mod_fastcgi") server.document-root= "C:/Apps/web2py_win/web2py/ applications/" # files to check for if .../ is requested index-file.names= ( "index.php", "index.pl", "index.cgi", "index.html", "index.htm", "default.htm" ) static-file.exclude-extensions = ( ".php", ".pl", ".cgi", ".py") fastcgi.server = (".fcgi" => ("localhost" => ( "socket"=> "TMP/fcgi.sock", "min-procs" => 1 ) ) ) cgi.assign = ( ".fcgi" => "C:/Apps/web2py_win/ web2py/web2py.exe") --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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:22143] cannot open page
i have created an app which is working before i added the code for session expiration. # ### # ## session expiration # ### t0 = time.time() if session.authorized: if session.last_time and session.last_time < t0 - EXPIRATION: session.flash = T('session expired') session.authorized = False else: session.last_time = t0 if not session.authorized and not request.function == 'index': redirect(URL(r=request,f='index')) ### with out this code it was working fine. now the browser showing "The page cannot be displayed". may i know why it is not redirecting to 'index' ? is there anything wrong in my code? thanks durga --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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:22201] can I use source code of apps from web2py appliances
Hi all, I am new to web2py and decided to use web2py to construct my website. website contains some of the features similar to apps available in web2py appliances. can I use/refer source code of apps from web2py appliances? thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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:22864] how to send xml data to client
i have xml data framed in my controller. now i would like to send it as response to client without using view. can someone please let me know how to do it. thanks durga --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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:23106] how to generate combobox for a sqlfield
hi I would like create a form through SQLFORM in which one of my field to be generated as combo box. for example i have options male/female for a sex field. How do i write code for this. db.define_table('users', SQLField('sex',requires=[IS_IN_SET (['male','female'])]) thanks in advance --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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:23167] Re: how to generate combobox for a sqlfield
thanks guys...its working :) On Tue, Jun 2, 2009 at 7:59 PM, mdipierro wrote: > > or > > db.Field('gender', requires = IS_IN_SET( > ['male', 'female'],['Handsome man','Pretty woman'])) > > to preserve order. > > Notice that 'gender' is more appropriate than 'sex'. > > Massimo > > On Jun 2, 7:55 am, Iceberg wrote: > > You can also try this: > > > > db.Field('sex', requires = IS_IN_SET( > > {'male':'Handsome man', 'female':'Pretty woman'} > > )) > > > > On Jun2, 8:24pm, Mladen Milankovic wrote: > > > > > Hi. > > > > > You don't need the [] brackets. > > > use: > > > db.define_table('user', > > > db.Field('sex', requires = IS_IN_SET(['male', 'female']))) > > > > > regards > > > mmlado > > > > > On Tuesday 02 June 2009 13:39:35 durga wrote: > > > > > > hi > > > > > > I would like create a form through SQLFORM in which one of my field > to > > > > be generated as combo box. for example i have options male/female > for > > > > a sex field. How do i write code for this. > > > > > > db.define_table('users', > > > > SQLField('sex',requires=[IS_IN_SET > > > > (['male','female'])]) > > > > > > thanks in advance > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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:23171] Re: why id field is displaying in the form?
thanks mmlado :) On Wed, Jun 3, 2009 at 12:21 PM, Mladen Milankovic wrote: > > Hi. > > There's a parameter to SQLFORM, showid which is True by default. Just set > it > to False. > Like: > form = SQLFORM(db.users,user,fields=['firstname','lastname'], showid = > False) > > regards > mmlado > > > On Wednesday 03 June 2009 08:32:16 durga wrote: > > Hi , > > > > I have created a table for user. to update the table i have written > > the code > > > > def editprofile(): > > user = db(db.users.id==session.userid).select()[0] > > form = SQLFORM(db.users,user,fields=['firstname','lastname']) > > > > i found id field is showing in the browser though i have selected > > ['firstname','lastname']. how to avoid this user.id from the form. > > > > output in browser: > > > >Id:1 > >First Name:durga > >Last Name: prasad > > > > > > thanks > > durga > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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:23194] Re: inserting values in to db fields which are not there in SQLFORM
thanks lado its working :) On Wed, Jun 3, 2009 at 5:38 PM, Mladen Milankovic wrote: > > Hi. > > Do something like this: > form = SQLFORM(db(db.company),fields = > ['compname','designation','location']) > if form.accepts(request.vars, session): >db(db.company.id == form.vars.id).update(userid = session.userid) ># do something else like redirect if needed > > The id of the new record can be found in form.vars.id after it was > inserted. > This way you'll update the new record after it was inserted. > > regards > mmlado > > On Wednesday 03 June 2009 13:42:34 durga wrote: > > hi, > > > > i would like to insert a values to a table through form where user > > can enter fewer fields. > > > > for example i have table 'company' which has fields > > userid,compname,designation,location. > > > > form = SQLFORM(db(db.company),fields= > > ['compname','designation','location']) > > > > userid is stored in session as session.userid > > > > in this case user can enter 3 fields through form but i want userid > > also to be updated at the same time in to company table. > > > > can some one help me how to update all 4 fields at a time. > > > > thanks > > durga > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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:28882] Re: download problem of web2py_src.zip from web2py.com site. are there any other mirrors to download..?
its not working... access to website http://www.web2py.com/ is very slow. can someone try from different location. On Tue, Aug 18, 2009 at 12:56 PM, mdipierro wrote: > > can you try again, works for me. > > On Aug 18, 1:10 am, durga wrote: > > cannot download from > http://www.web2py.com/examples/static/web2py_src.zip > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@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:28916] Re: download problem of web2py_src.zip from web2py.com site. are there any other mirrors to download..?
today its working fine..i could download new version On Tue, Aug 18, 2009 at 2:58 PM, mdipierro wrote: > > I am trying form Italy and I have no problem. I don't think the > problem is with the web2py server or network. > > On Aug 18, 3:37 am, durga moganty > wrote: > > its not working... access to websitehttp://www.web2py.com/ is very > slow. > > can someone try from different location. > > > > On Tue, Aug 18, 2009 at 12:56 PM, mdipierro > wrote: > > > > > can you try again, works for me. > > > > > On Aug 18, 1:10 am, durga wrote: > > > > cannot download from > > >http://www.web2py.com/examples/static/web2py_src.zip > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@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:29203] Re: how do I upload data to GAE database tables
thanks victor, On Mon, Aug 24, 2009 at 7:00 AM, Victor wrote: > > I dunno, but this might be what you're looking for. > http://code.google.com/appengine/docs/python/tools/uploadingdata.html > Cheers > Victor > > On Aug 21, 8:53 am, durga wrote: > > how do I upload default data to GAE database tables like we do it in > > admin app using CSV file > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@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:22869] Re: how to send xml data to client
first one. def mycontroller(): xml="World" response.headers['Content-Type']='text/xml' return xml i ll parse the xml data at client side. On Fri, May 29, 2009 at 11:15 AM, mdipierro wrote: > > Do you mean you want to return it as in > > def mycontroller(): >xml="World" >response.headers['Content-Type']='text/xml' >return xml > > or do you want to email it > > def mycontroller(): >from gluon.tools import Mail >mail=Mail() >mail.server='' >mail.sender='''' >mail.login='' >xml="World" >mail.send(to='...',message=xml) >return "done" > > > > > > On May 29, 12:17 am, durga wrote: > > i have xml data framed in my controller. now i would like to send it > > as response to client without using view. can someone please let me > > know how to do it. > > > > thanks > > durga > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@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 -~--~~~~--~~--~--~---