[web2py] Re: URL of an external website
@Niphlod My point was simply this: if I set a='myapp' I would expect 'myapp' to replace the appname from r or anywhere else. This behaviour also caused difficulty for the OP. I just mentioned it in case it was a bug. Thanks for commenting. -- 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/d/optout.
[web2py] Feature Request: IS_IN_SET with list:string field type
I would love to have a list set with strings but I am able to define if they should be of a certain string type. Does this already exist and I did it wrong, or would this be a good idea to implement. BR, Jason Brower -- 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/d/optout.
[web2py] Re: Feature Request: IS_IN_SET with list:string field type
I forgot, this is my code: db.define_table('opening_time', Field('restaurant', 'reference restaurant'), Field('start_time', 'time'), Field('end_time', 'time'), Field('days', 'list:string') ) db.opening_time.days.requires = IS_IN_SET(('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday')) On Sat, 2014-03-29 at 14:50 +0200, Jason Brower wrote: I would love to have a list set with strings but I am able to define if they should be of a certain string type. Does this already exist and I did it wrong, or would this be a good idea to implement. BR, Jason Brower -- 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/d/optout.
[web2py] Re: Feature Request: IS_IN_SET with list:string field type
http://web2py.com/books/default/chapter/29/07/forms-and-validators#Validators multiple=True ... On Saturday, March 29, 2014 1:51:35 PM UTC+1, Encompass solutions wrote: I forgot, this is my code: db.define_table('opening_time', Field('restaurant', 'reference restaurant'), Field('start_time', 'time'), Field('end_time', 'time'), Field('days', 'list:string') ) db.opening_time.days.requires = IS_IN_SET(('Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday')) On Sat, 2014-03-29 at 14:50 +0200, Jason Brower wrote: I would love to have a list set with strings but I am able to define if they should be of a certain string type. Does this already exist and I did it wrong, or would this be a good idea to implement. BR, Jason Brower -- 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/d/optout.
[web2py] Dynamically Creating a Form
Is there a way for me to dynamically add form elements, such as INPUT fields or SELECT fields, to a form? I'm not sure how to do this. I'd like to add these elements only under certain conditions. 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/d/optout.
[web2py] Re: Dynamically Creating a Form
FORMs are just HTML helpers, so you manipulate them after creating them. You can therefore just treat them like python lists, but there is functionality which may be more helpful: http://web2py.com/books/default/chapter/29/05/the-views#Server-side-DOM-and-parsing On Sunday, 30 March 2014 00:11:27 UTC+11, horridohobbyist wrote: Is there a way for me to dynamically add form elements, such as INPUT fields or SELECT fields, to a form? I'm not sure how to do this. I'd like to add these elements only under certain conditions. 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/d/optout.
Re: [web2py] Re: URL of an external website
On 29 Mar 2014, at 5:04 AM, villas villa...@gmail.com wrote: My point was simply this: if I set a='myapp' I would expect 'myapp' to replace the appname from r or anywhere else. This behaviour also caused difficulty for the OP. I just mentioned it in case it was a bug. Thanks for commenting. Sadly, it's not a bug. If it were, we'd fix it. Rather, it's for backward compatibility with ancient versions of URL() in which the first argument was treated as positional. -- 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/d/optout.
[web2py] Problems with login_bare
Dear users, I'm writing because i have a problem with function login_bare. I'm developing a mobile app and data are shared by json i'm using something like this response.view = 'generic.json' import gluon.contrib.simplejson, collections json_data = request.body.read() external_data = gluon.contrib.simplejson.loads(json_data) db.auth_user.username.requires = [IS_NOT_EMPTY(error_message=T(xxx)), IS_NOT_IN_DB(db,'auth_user.username',error_message=T('xxx'))] db.auth_user.email.requires = [IS_EMAIL(error_message=T(xxx)), IS_NOT_IN_DB(db,'auth_user.email',error_message=T('xxx'))] db.auth_user.password.requires = [IS_NOT_EMPTY(error_message=T(xxx)), IS_STRONG(min=8,max=30,entropy=1,upper=None,lower=None,special=None,number=None, error_message=xxxi'), IS_EQUAL_TO(external_data['auth_user_rpassword'],error_message=T(xxx))] ret = db.auth_user.validate_and_insert(username=external_data['auth_user_username'], email=external_data['auth_user_email'], password=external_data['auth_user_password'] ) if(ret.errors): db.rollback() errors = ret.errors.as_dict() errors[tjsondata] = error return gluon.contrib.simplejson.dumps(errors) else: db.commit() return gluon.contrib.simplejson.dumps({tjsondata:registered,id:ret.id,username:external_data['auth_user_username']}) For login i have created this def for testing the function login_bare response.view = 'generic.json' import gluon.contrib.simplejson, collections json_data = request.body.read() external_data = gluon.contrib.simplejson.loads(json_data) user = auth.login_bare(external_data[auth_user_username],external_data[auth_user_password]) if not user : return gluon.contrib.simplejson.dumps({username:}) else: return gluon.contrib.simplejson.dumps({username:user}) The function login_bare always returns a empty string but i'm sure about the data i put in table auth_user Why does this happen ? Should i encrypt the password before the insert ? In the row the field password isn't encrypted... Thanks for your answers... -- 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/d/optout.
[web2py] Re: Installation Error Windows Vista Home
Here #41 the workaround / solution: http://code.google.com/p/web2py/issues/detail?id=1809 Il giorno venerdì 28 marzo 2014 16:26:27 UTC+1, egigi ha scritto: Could someone help me about this error? I'm trying to install the framework just downloaded but something doesn't work fine: C:\web2pyweb2py.exe Traceback (most recent call last): File string, line 6, in module File __main__.py, line 128, in module File __main__web2py__.py, line 18, in module File /home/mdipierro/make_web2py/web2py/gluon/__init__.py, line 15, in module File /home/mdipierro/make_web2py/web2py/gluon/globals.py, line 19, in module File /home/mdipierro/make_web2py/web2py/gluon/xmlrpc.py, line 10, in module File SimpleXMLRPCServer.pyc, line 102, in module File xmlrpclib.pyc, line 144, in module File httplib.pyc, line 78, in module File mimetools.pyc, line 6, in module File tempfile.pyc, line 34, in module File random.pyc, line 873, in module File random.pyc, line 96, in __init__ File random.pyc, line 110, in seed WindowsError: [Error -2146893795] Inizializzazione non corretta eseguita da una DLL del provider Any suggest for me please? -- 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/d/optout.
[web2py] sending serial data from web2py
Iam a newbie, I just wanted to know if I can make use of web2py to create login Send sms by clicking a button on web2py with gsm modem attached to same computer recieve sms store sms details in database? Thanks in advance! -- 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/d/optout.
[web2py] Re: Keep menu floating on top
In layout.html add class: navbar-fixed-top !-- Navbar == -- div class=navbar navbar-inverse navbar-fixed-top div class=flash{{=response.flash or ''}}/div div class=navbar-inner div class=container-full button type=button class=btn btn-navbar data-toggle=collapse data-target=.nav-collapse span class=icon-bar/span span class=icon-bar/span span class=icon-bar/span /button ... ... เมื่อ วันพฤหัสบดีที่ 27 มีนาคม ค.ศ. 2014, 22 นาฬิกา 50 นาที 29 วินาที UTC+7, Tom Clerckx เขียนว่า: Is there an easy way to keep the menu 'floating' on top. I.e. when a user scrolls down that the menu stays visible at the top of the page Best regards, Tom. -- 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/d/optout.
[web2py] Re: New Windows Vista Install problem
Il giorno venerdì 28 marzo 2014 19:35:51 UTC+1, Dave S ha scritto: On Thursday, March 27, 2014 2:41:14 PM UTC-7, User wrote: Did you install web2py source version or web2py_win.zip? What python version are you using? And when you run it, what are you doing specifically? On Wednesday, March 26, 2014 4:51:30 PM UTC-4, ian james wrote: I have installed Win2py on my Vista laptop. (My laptop video hardware is not supported on windows 7) When I run Win2py, the CMD window flashes on my screen and then disappears. I have had this problem with a previous Python install years ago. However, the PY application opens a CMD window and seems to run a Python interpreter, so Python does not seem to be the problem. Any suggestions on what to check? User asks some good questions, but note that there were recently some issues in packaging the release for Windows and Mac (web2py_win.zip, for instance). This has been fixed in the latest night builds since about a week ago, so you might try going to the downloads page for that, or getting an older release. /dps -- 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/d/optout.
[web2py] handbook, Configuring layout
Hi, I’m too newbie to know if this is a typo or an error but, here http://web2py.com/books/default/chapter/29/03/overview#Configuring-the-layout when Massimo writes “(…) In fact, the static/base.css stylesheet is well documented and described in Chapter 5 (…), I can’t find any reference to this ‘static/base.css’ file under chapter 5 or under the official repo https://github.com/web2py/web2py/tree/master/applications/welcome/static/css Maybe I am missing something or this ‘static/base.css’ file should be another one? Cheers, -- Frank -- 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/d/optout.
[web2py] Web Editor Blank Screen
Hi guys, Having an issue with the web editor. Other's have experienced this problem before with no resolution: https://groups.google.com/forum/#!topic/web2py/fIuUAqdSieQ https://groups.google.com/forum/#!topic/web2py/SxYJX90zszY http://comments.gmane.org/gmane.comp.python.web2py/120843 I'm running web2py on a raspberry pi on the local network. I can access it fine, log into the admin interface, create a new app, and peek at the files. When I go to edit any files the page loads but the file doesn't. I've tried on multiple machines and browsers. The raspberry pi is headless and doesn't have xserver so I can't try locally. Using Chrome's debugger I can see the http request being cancelled and there's no response data in the header http://imgur.com/5HUd3cp http://imgur.com/wBPwRRl Looking at /var/log/apache2/access.log the http request returns 200 OK Any thoughts what this might be? -- 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/d/optout.
Re: [web2py] sending serial data from web2py
pyserial maybe? 2014-03-29 5:01 GMT+00:00 Jayesh Adhikari jayeshadhik...@gmail.com: Iam a newbie, I just wanted to know if I can make use of web2py to create login Send sms by clicking a button on web2py with gsm modem attached to same computer recieve sms store sms details in database? Thanks in advance! -- 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/d/optout. -- 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/d/optout.
[web2py] Get text portion of IS_IN_SET when using as a dict
I have this field in my table: Field('exceed_by', length=1, requires=IS_IN_SET({'P':'Percentage', 'A':'Amount'})), In my controller code I want to get the label for my field, as in record = db.table_name(1) print record.exceed_by I want it to print 'Percentage' or 'Amount' depending on whether it is a P or A. But, it just prints the P or A. How can I get the referenced label portion of the validator? -Jim -- 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/d/optout.
[web2py] Re: New Windows Vista Install problem
Can you please try the latest nightly build? http://web2py.com/examples/static/nightly/web2py_win.zip On Friday, 28 March 2014 14:06:37 UTC-5, egigi wrote: Il giorno venerdì 28 marzo 2014 19:35:51 UTC+1, Dave S ha scritto: On Thursday, March 27, 2014 2:41:14 PM UTC-7, User wrote: Did you install web2py source version or web2py_win.zip? What python version are you using? And when you run it, what are you doing specifically? On Wednesday, March 26, 2014 4:51:30 PM UTC-4, ian james wrote: I have installed Win2py on my Vista laptop. (My laptop video hardware is not supported on windows 7) When I run Win2py, the CMD window flashes on my screen and then disappears. I have had this problem with a previous Python install years ago. However, the PY application opens a CMD window and seems to run a Python interpreter, so Python does not seem to be the problem. Any suggestions on what to check? User asks some good questions, but note that there were recently some issues in packaging the release for Windows and Mac (web2py_win.zip, for instance). This has been fixed in the latest night builds since about a week ago, so you might try going to the downloads page for that, or getting an older release. /dps -- 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/d/optout.
[web2py] json and URL
Let's say I have URL(f=myfunction, vars=dict(x=1)) or v = {f:myfunction, vars:{x:1}} URL(**v) That works fine. Now I do j = json.dumps(v) I store j in Field(url, requires=IS_JSON()) Now I read this field and call URL(**fieldvalue). I get an error: type 'exceptions.SyntaxError' when calling URL, function or function name required The fieldvalue I get is {'u'f : u'festfunction' ... } The key is a unicode string and not utf-8 coded. What is wrong? How can I get an utf-8 string? Regards, Martin -- 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/d/optout.
[web2py] Re: sending serial data from web2py
had you already read this chapter? http://web2py.com/books/default/chapter/29/08/emails-and-sms#Sending-SMS-messages 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/d/optout.
Re: [web2py] web2py and python3
I am curious how much interest has been garnered for python 3 support. I have read about people askign about it for quite some time. And have seen that it may very well be a different project all together (web3py ?). Python 3 seems to really have picked up a lot more in the last couple years. even the last 6 months. Well, at least to me it seems. I am starting something new and would love to use python 3 and web2py looks great. So I am not sure yet. I almost feel like I would rather use django or pyramid that has python 3 support. On Thursday, March 27, 2014 7:06:05 PM UTC-7, Massimo Di Pierro wrote: and it never will - by definition. we''l build something that works with python3 eventually. On Thursday, 27 March 2014 11:06:08 UTC-5, viniciusban wrote: Web2py doesn't work with Python 3 yet. On Thu, Mar 27, 2014 at 8:01 AM, Maurice Waka mauri...@gmail.comjavascript: wrote: Does web2py function with python 3.3 or python 3.4? I have installed web2py but it cannot run with the python3.4 that I use. I get an error after trying to run the 'web2py.exe - S welcome' that says, syntax 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+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- 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/d/optout.