[web2py] Re: Scheduler not finding module
On Wednesday, 13 April 2016 13:29:18 UTC+1, peter wrote: > > I have an issue with processes run by the scheduler are not seeing a > module. > > If I Do > python2.6 > >>>import dropbox > > it imports fine. > > The conf file for the web2py scheduler contains > > DAEMON=python2.6 > PARAMETERS="/opt/web-apps/web2py/web2py.py -K new_spin2" > LOGFILE=/var/log/web2py-scheduler.log > > start() { > echo -n "starting up $DAEMON" > RUN=`$DAEMON $PARAMETERS > $LOGFILE 2>&1` > if [ "$?" -eq 0 ]; then > echo " Done." > else > echo " FAILED." > fi > } > > > So it is also using python2.6 > > However I get > ImportError: No module named dropbox > > when a task is run by the scheduler. If I run the same web2py function > directly from a url, then it works fine. > > So how come the function when run by the scheduler does not see the > dropbox module > > Thanks > Peter > > > -- 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] How to compile C programs uploaded as file as per some input cases and get output?
Where to put gcc command files in the web2py app? -- 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: Scheduler not finding module
I was just asking because trying to identify any issues without any code is a pretty daunting task. Technically the scheduler uses only what python provides to spawn subprocesses, and they ususally are spawned on the same interpreter but I don't use 2.6 since ever so I really don't recall if there are/have been outstanding issues with it. What does happen if you launch the scheduler process manually ? does it happen too ? On Wednesday, April 13, 2016 at 11:37:37 PM UTC+2, peter wrote: > > I do have more than one python, but I thought the python the scheduler was > using was the one specified in the RUN statement above, and > DAEMON=python2.6 > > As I showed, python2.6 has dropbox installed. How could a scheduler task > use a different python? This is useful to know. > Thanks > Peter > > -- 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: Empty strings stored as null in database
I hear you and I'm happy (or not, not sure) to not being alone ranting about web2py's code quality and lack of tests. this was a serious bug that should have had the effect of retiring web2py's release until it was fixed (or at least loudly advertised). On Thursday, April 14, 2016 at 5:08:24 AM UTC+2, Leonel Câmara wrote: > > Ok I've fixed it: > https://github.com/web2py/web2py/pull/1294 > > And now I hate you guys with a tremendous passion. It took me a huge > amount of time for a fix that ended up being a oneliner. > > html.py is horrible, Cthulhu level horrible, it couldn't be harder to > follow its execution flow if it had goto statements and afterwards you > minified it. > > To understand the bug first you need to look at the _validate method of > the INPUT helper. > > Then you also need sqlhtml.py and see that it sets some default validators > > Then look dal.py where those defaults are defined (no it's not inside the > pydal package) > > Then you need to really understand the IS_EMPTY_OR validator which > thankfully I do because I have been making tests for validators. > > Someone please contribute to the book how important the null argument is > to IS_EMPTY_OR because otherwise you're getting a None which will be a NULL > in the database since IS_EMPTY_OR doesn't know what kind of field it's > dealing with. > > > > > -- 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] sqlform time field value representation
Hello I have the following problem. I have SQLFORM.grid When I go to edit view i have 4 fields which should be represented as time (clock picker etc) Once the form is submited only one field is actually send as datetime.time other are as strings. I have no idea why Also if I edit time fields the value send it '16:00' but if I do not edit them the value is from db '16:00:00' in my model db.define_table('shifts', Field('sh_organisation' , 'reference organizations', label = T('Organization')), Field('sh_code', type= 'string', length = 256, label = T('Code')), Field('sh_status', type= 'integer', label = T('Status'), widget = SQLFORM.widgets.options.widget, default = 1), Field('sh_name', type= 'string', length = 256 ,label = T('Name'),requires = IS_NOT_EMPTY(error_message=T('Missing shift name!'))), Field('sh_color', type= 'string',label = T('Color')), # widget = color_widget, Field('sh_start1', type= 'time',length = 4, label = T('Start'),requires = IS_NOT_EMPTY(error_message=T('Insert start time')),represent=repr), Field('sh_end1', type= 'time', label = T('End'),requires=IS_NOT_EMPTY(error_message=T('Insert end time')) if request.post_vars.sh_start1 else None,represent=repr), Field('sh_length1', type= 'integer', label = T('Length 1'),represent=repr), Field('sh_start2', type= 'time', label = T('Start 2'),represent=repr), Field('sh_end2', type= 'time', label = T('End 2'), requires=IS_NOT_EMPTY(error_message=T('Insert second end time')) if request.post_vars.sh_start2 else None,represent=repr), Field('sh_length2', type= 'integer', label = T('Length 2'),represent=repr), Field('sh_start3', type= 'time', label = T('Start 3')), Field('sh_end3', type= 'time',label = T('End ')), Field('sh_length3', type= 'integer', label = T('Length 3')), Field('sh_start4', type= 'time', label = T('Start 4')), Field('sh_end4', type= 'time',label = T('End 4')), Field('sh_length4', type= 'integer', label = T('Length 4')), Field('sh_start5', type= 'time', label = T('Start 5')), Field('sh_end5', type= 'time', label = T('End 5')), Field('sh_length5', type= 'time', label = T('Length 5')), Field('sh_duration', type= 'integer', label = T('Duration')), Field('sh_duration1', type= 'integer', label =T('Duration 2')), Field('sh_note', type= 'text', label = T('Note')), migrate=settings.migrate ) where repr = lambda v, r: v if v is not None else '' -- 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: Empty strings stored as null in database
Let test then!! On Thu, Apr 14, 2016 at 9:15 AM, Niphlod wrote: > I hear you and I'm happy (or not, not sure) to not being alone ranting > about web2py's code quality and lack of tests. this was a serious bug that > should have had the effect of retiring web2py's release until it was fixed > (or at least loudly advertised). > > > On Thursday, April 14, 2016 at 5:08:24 AM UTC+2, Leonel Câmara wrote: >> >> Ok I've fixed it: >> https://github.com/web2py/web2py/pull/1294 >> >> And now I hate you guys with a tremendous passion. It took me a huge >> amount of time for a fix that ended up being a oneliner. >> >> html.py is horrible, Cthulhu level horrible, it couldn't be harder to >> follow its execution flow if it had goto statements and afterwards you >> minified it. >> >> To understand the bug first you need to look at the _validate method of >> the INPUT helper. >> >> Then you also need sqlhtml.py and see that it sets some default validators >> >> Then look dal.py where those defaults are defined (no it's not inside the >> pydal package) >> >> Then you need to really understand the IS_EMPTY_OR validator which >> thankfully I do because I have been making tests for validators. >> >> Someone please contribute to the book how important the null argument is >> to IS_EMPTY_OR because otherwise you're getting a None which will be a NULL >> in the database since IS_EMPTY_OR doesn't know what kind of field it's >> dealing with. >> >> >> >> >> -- > 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.
Re: [web2py] Re: cas broken in 2.14.3?
Yes, I downloaded a new version and it works fine. Thank you. Em quinta-feira, 7 de abril de 2016 14:11:08 UTC-3, Massimiliano escreveu: > > I tested trunk. > Seems ok to me. > > > > On Thu, Apr 7, 2016 at 3:26 PM, Massimo Di Pierro > wrote: > >> I believe this has been fixed in trunk. Can you check? If you confirm we >> will deploy a new web2py version. >> >> >> On Wednesday, 6 April 2016 08:55:31 UTC-5, Franz Pietz wrote: >>> >>> Same here. My server was running 2.12.3 and CAS works fine (with a >>> logout issue that I reported previously, but had no answer yet). >>> >>> After updating to 2.14.3, I get the same 'not authorized' page. >>> >>> On Saturday, April 2, 2016 at 4:15:04 AM UTC-3, mweissen wrote: Is cas broken in 2.14.3? I am not sure - I have tested it with two different sites and I have got errors like "invalid request" or "not authorized". Site 1: Cas worked before upgrade to 2.14.3. Site 2: A new test with my local server: In application m_abschluss, db.py: auth = Auth(db, cas_provider = ' http://127.0.0.1:8000/media/default/user/cas') A login to m_abschluss creates this url: http://127.0.0.1:8000/media/default/user/cas/login?service=http://127.0.0.1:8000/m_abschluss/default/user/login And a call to this url gives "not authorized". Kind 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+un...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Massimiliano > -- 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: cas broken in 2.14.3?
I've reported another CAS issue in this topic: https://groups.google.com/d/topic/web2py/mnVTJ31KlA4/discussion Anyone has a clue? Em quinta-feira, 14 de abril de 2016 10:52:03 UTC-3, Franz Pietz escreveu: > > Yes, I downloaded a new version and it works fine. > Thank you. > > Em quinta-feira, 7 de abril de 2016 14:11:08 UTC-3, Massimiliano escreveu: >> >> I tested trunk. >> Seems ok to me. >> >> >> >> On Thu, Apr 7, 2016 at 3:26 PM, Massimo Di Pierro >> wrote: >> >>> I believe this has been fixed in trunk. Can you check? If you confirm we >>> will deploy a new web2py version. >>> >>> >>> On Wednesday, 6 April 2016 08:55:31 UTC-5, Franz Pietz wrote: Same here. My server was running 2.12.3 and CAS works fine (with a logout issue that I reported previously, but had no answer yet). After updating to 2.14.3, I get the same 'not authorized' page. On Saturday, April 2, 2016 at 4:15:04 AM UTC-3, mweissen wrote: > > Is cas broken in 2.14.3? > > I am not sure - I have tested it with two different sites and I have > got errors like "invalid request" or "not authorized". > > Site 1: Cas worked before upgrade to 2.14.3. > > Site 2: A new test with my local server: > > In application m_abschluss, db.py: > > auth = Auth(db, cas_provider = ' > http://127.0.0.1:8000/media/default/user/cas') > > > A login to m_abschluss creates this url: > > > http://127.0.0.1:8000/media/default/user/cas/login?service=http://127.0.0.1:8000/m_abschluss/default/user/login > > And a call to this url gives "not authorized". > > Kind 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+un...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Massimiliano >> > -- 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: cas broken in 2.14.3?
Try clean cache browser. Em 14/04/2016 11:03, "Franz Pietz" escreveu: > I've reported another CAS issue in this topic: > https://groups.google.com/d/topic/web2py/mnVTJ31KlA4/discussion > Anyone has a clue? > > > Em quinta-feira, 14 de abril de 2016 10:52:03 UTC-3, Franz Pietz escreveu: >> >> Yes, I downloaded a new version and it works fine. >> Thank you. >> >> Em quinta-feira, 7 de abril de 2016 14:11:08 UTC-3, Massimiliano escreveu: >>> >>> I tested trunk. >>> Seems ok to me. >>> >>> >>> >>> On Thu, Apr 7, 2016 at 3:26 PM, Massimo Di Pierro >> > wrote: >>> I believe this has been fixed in trunk. Can you check? If you confirm we will deploy a new web2py version. On Wednesday, 6 April 2016 08:55:31 UTC-5, Franz Pietz wrote: > > Same here. My server was running 2.12.3 and CAS works fine (with a > logout issue that I reported previously, but had no answer yet). > > After updating to 2.14.3, I get the same 'not authorized' page. > > On Saturday, April 2, 2016 at 4:15:04 AM UTC-3, mweissen wrote: >> >> Is cas broken in 2.14.3? >> >> I am not sure - I have tested it with two different sites and I have >> got errors like "invalid request" or "not authorized". >> >> Site 1: Cas worked before upgrade to 2.14.3. >> >> Site 2: A new test with my local server: >> >> In application m_abschluss, db.py: >> >> auth = Auth(db, cas_provider = ' >> http://127.0.0.1:8000/media/default/user/cas') >> >> >> A login to m_abschluss creates this url: >> >> >> http://127.0.0.1:8000/media/default/user/cas/login?service=http://127.0.0.1:8000/m_abschluss/default/user/login >> >> And a call to this url gives "not authorized". >> >> Kind 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+un...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. >>> >>> >>> >>> -- >>> Massimiliano >>> >> -- > 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] Adding appended text to SQLFROM
db.define_table("search_table", Field('search_string', 'string')) form = SQLFORM(db.search_table); view {{=form}} If I have to use validators and security of SQLFORM, how do I add appended text to this form?I am guessing {{=form.custom.begin}}? -- 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: Adding appended text to SQLFROM
Here is the html, Form Name Appended Text append help On Thursday, April 14, 2016 at 10:39:56 AM UTC-4, Ron Chatterjee wrote: > > db.define_table("search_table", > Field('search_string', 'string')) > > > > form = SQLFORM(db.search_table); > > > view {{=form}} > > > If I have to use validators and security of SQLFORM, how do I add appended > text to this form?I am guessing {{=form.custom.begin}}? > > > -- 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] Using site packages with web2py
Hi, I'm trying to import openpyxl to web2py without success. What is the right way to do it? I have working openpyxl in my Windows environment and I'm able to use it without problems when testing it without web2py. If I understood right, I can either install openpyxl to web2py site packages and run web2py.exe, or I can run web2py from source and then it should be able to use already installed openpyxl. Neither of these methods is working. I followed the instructions in the book and installed pywin32 before running from source, but it won't help. When I run "python web2py.py", it says: no file locking, you must install the win32 extensions from: http://sourceforge. net/projects/pywin32/files/ So looks like there is something wrong with the pywin32 installation, even though I've installed it for sure. Any ideas what could be wrong? And why I cant import openpyxl even though I installed it to web2py's site-packages folder? I'm using Python 3.3.3 and Windows-bit. Thanks, - Marko -- 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: XHR application/json scraping
ok, so after a week of zero success trying everything i can think of, i decided to try using the requests method instead of the above urllib2 method. it worked like a charm and it was less complicated code. i replicated the above method but in requests as shown below. requests is probably doing more blackbox stuff to get that XMLHttpRequest thing to work, but it totally returned a code of 200 and the proper json record as in the firefox tracing. just documenting for others... #part 1 #establish connection and session cookie... s = requests.Session() qh = { } qh['Host'] = "core.duvalclerk.com" qh['User-Agent'] = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Firefox/45.0" qh['Accept-Language'] = "en-US,en;q=0.5" s.headers.update(qh) r1 = s.get('https://core.website.com/CoreCms.aspx', verify=True) sh1 = rpt(r1, 'r1') c1 = r1.cookies['ASP.NET_SessionId'] #part 2 #replicate the login as from firefox... postdata = {'username':'us...@yahoo.com','password':'passwd'} qh['Referer'] = "https://core.website.com/CoreCms.aspx"; qh['X-Requested-With'] = "XMLHttpRequest" qh['Content-Type'] = "application/json; charset=UTF-8" qh['Origin'] = "https://core.website.com"; s.headers.update(qh) r2 = s.post('https://core.website.com/CoreWebSvc.asmx/InteractiveLogin', data=(json.dumps(postdata)).encode('utf-8'), verify=True) -- 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: Using site packages with web2py
first of all, web2py is not python 3 compatible. On Thursday, April 14, 2016 at 6:02:20 PM UTC+2, Marko Seppälä wrote: > > Hi, > > I'm trying to import openpyxl to web2py without success. What is the right > way to do it? > > I have working openpyxl in my Windows environment and I'm able to use it > without problems when testing it without web2py. If I understood right, I > can either install openpyxl to web2py site packages and run web2py.exe, or > I can run web2py from source and then it should be able to use already > installed openpyxl. Neither of these methods is working. I followed the > instructions in the book and installed pywin32 before running from source, > but it won't help. When I run "python web2py.py", it says: > no file locking, you must install the win32 extensions from: > http://sourceforge. > net/projects/pywin32/files/ > > So looks like there is something wrong with the pywin32 installation, even > though I've installed it for sure. Any ideas what could be wrong? And why I > cant import openpyxl even though I installed it to web2py's site-packages > folder? > > I'm using Python 3.3.3 and Windows-bit. > > Thanks, > - Marko > -- 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: Using site packages with web2py
Hi, Just found that, I've always run web2py from exe-file so far, so didn't realize that before... torstai 14. huhtikuuta 2016 19.56.34 UTC+3 Niphlod kirjoitti: > > first of all, web2py is not python 3 compatible. > > On Thursday, April 14, 2016 at 6:02:20 PM UTC+2, Marko Seppälä wrote: >> >> Hi, >> >> I'm trying to import openpyxl to web2py without success. What is the >> right way to do it? >> >> I have working openpyxl in my Windows environment and I'm able to use it >> without problems when testing it without web2py. If I understood right, I >> can either install openpyxl to web2py site packages and run web2py.exe, or >> I can run web2py from source and then it should be able to use already >> installed openpyxl. Neither of these methods is working. I followed the >> instructions in the book and installed pywin32 before running from source, >> but it won't help. When I run "python web2py.py", it says: >> no file locking, you must install the win32 extensions from: >> http://sourceforge. >> net/projects/pywin32/files/ >> >> So looks like there is something wrong with the pywin32 installation, >> even though I've installed it for sure. Any ideas what could be wrong? And >> why I cant import openpyxl even though I installed it to web2py's >> site-packages folder? >> >> I'm using Python 3.3.3 and Windows-64bit. >> >> Thanks, >> - Marko >> > -- 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: Scheduler not finding module
> > It works fine if it is launched manually, ie I run the web2y function in >> the scheduler from the url. >> > Peter -- 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: Scheduler not finding module
what does it mean "from the url" ? On Thursday, April 14, 2016 at 9:31:20 PM UTC+2, peter wrote: > > It works fine if it is launched manually, ie I run the web2y function in >>> the scheduler from the url. >>> >> Peter > -- 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: missing response.title and subtitle
On Wednesday, April 13, 2016 at 6:33:23 PM UTC-7, Dave S wrote: > FWIW, my oldest app (created under 2.4.x) did have the > banner/title/subtitle stuff in layout.html, and not in default/index.html. > It kept working under most updates, so I didn't pay attention, and the > later apps mostly started with the newer welcome. > > With the oldest app, I'm not using the horizon background (and the other apps may not keep it, either), so I'd like to skip the whitening of the title, and the drop shadow, too. But I'm not sure where it comes from. Is it from using the "jumbotron" style on the div? Changing that to "masthead" doesn't alter the lettering. This seems to be tied to the H1 tag, but H1 outside the header container is black and no drop shadow. (H2 is black and no drop shadow, but too small.) I know, this is a Bootstrap (3) question, but it's tempting me to switch this app to stupid.css. /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] Re: missing response.title and subtitle
On Thursday, April 14, 2016 at 1:43:45 PM UTC-7, Dave S wrote: > > > > On Wednesday, April 13, 2016 at 6:33:23 PM UTC-7, Dave S wrote: > > >> FWIW, my oldest app (created under 2.4.x) did have the >> banner/title/subtitle stuff in layout.html, and not in default/index.html. >> It kept working under most updates, so I didn't pay attention, and the >> later apps mostly started with the newer welcome. >> >> > With the oldest app, I'm not using the horizon background (and the other > apps may not keep it, either), so I'd like to skip the whitening of the > title, and the drop shadow, too. But I'm not sure where it comes from. Is > it from using the "jumbotron" style on the div? Changing that to > "masthead" doesn't alter the lettering. This seems to be tied to the H1 > tag, but H1 outside the header container is black and no drop shadow. (H2 > is black and no drop shadow, but too small.) > > I know, this is a Bootstrap (3) question, but it's tempting me to switch > this app to stupid.css. > > Ah, web2py-bootstrap3.css. /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] Re: Scheduler not finding module
I mean if I create a function foobar in default.py and have foobar call the function that is in the scheduler (that is normally run by the task), To run this I type app/default/foobar in the browser.The function then runs fine, and does see the dropbox module. So web2py is correctly using python2.6, and the scheduler is 'started' correctly with python2.6 Here is some more detail. The error is Traceback (most recent call last): File "/opt/web-apps/web2py/gluon/scheduler.py", line 238, in executor result = dumps(_function(*args, **vars)) File "applications/new_spin2/models/scheduler.py", line 45, in save_sqlite client=dropbox_client() File "applications/new_spin2/modules/myutils.py", line 198, in dropbox_client from dropbox import client, rest, session File "/opt/web-apps/web2py/gluon/custom_import.py", line 86, in custom_importer return base_importer(pname, globals, locals, fromlist, level) File "/opt/web-apps/web2py/gluon/custom_import.py", line 125, in __call__ result = NATIVE_IMPORTER(name, globals, locals, fromlist, level) ImportError: No module named dropbox Myutils contains dropbox_client def dropbox_client(): from dropbox import client, rest, session from gluon import current token=current.session.token etc def save_sqlite(): import os ... client=dropbox_client() Thanks for your time on this Niphlod Peter -- 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: Scheduler not finding module
ok. more tests needed. a) start web2py shell executing the function with web2py.py -M -S app/default/foobar b) if a) works, queue the task, then start the scheduler manually with web2py.py -K app and see what happens a) is needed to see if the shell env is different from the web one b) is needed to see if the scheduler env is different from the shell one I'm quite positive that the problem is the dropbox module importing "session" which is a module of web2py itself, and something bad happens. -- 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: missing response.title and subtitle
okay, I get itI never changed layout.html until now. what font do you use for headers? I used "class = 'header" and it looks a little plain thanks for your help Dave Alex -- 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: Empty strings stored as null in database
I just tested 2.14.5 and the solution is working. Great job !! On Thursday, April 14, 2016 at 7:46:57 AM UTC-6, Richard wrote: > > Let test then!! > > On Thu, Apr 14, 2016 at 9:15 AM, Niphlod > > wrote: > >> I hear you and I'm happy (or not, not sure) to not being alone ranting >> about web2py's code quality and lack of tests. this was a serious bug that >> should have had the effect of retiring web2py's release until it was fixed >> (or at least loudly advertised). >> >> >> On Thursday, April 14, 2016 at 5:08:24 AM UTC+2, Leonel Câmara wrote: >>> >>> Ok I've fixed it: >>> https://github.com/web2py/web2py/pull/1294 >>> >>> And now I hate you guys with a tremendous passion. It took me a huge >>> amount of time for a fix that ended up being a oneliner. >>> >>> html.py is horrible, Cthulhu level horrible, it couldn't be harder to >>> follow its execution flow if it had goto statements and afterwards you >>> minified it. >>> >>> To understand the bug first you need to look at the _validate method of >>> the INPUT helper. >>> >>> Then you also need sqlhtml.py and see that it sets some default >>> validators >>> >>> Then look dal.py where those defaults are defined (no it's not inside >>> the pydal package) >>> >>> Then you need to really understand the IS_EMPTY_OR validator which >>> thankfully I do because I have been making tests for validators. >>> >>> Someone please contribute to the book how important the null argument is >>> to IS_EMPTY_OR because otherwise you're getting a None which will be a NULL >>> in the database since IS_EMPTY_OR doesn't know what kind of field it's >>> dealing with. >>> >>> >>> >>> >>> -- >> 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 . >> 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] Re: Adding appended text to SQLFROM
Ron, I am pretty sure the only way to do this would be a custom for, so yes {{=form.custom.begin}}. {{=form.custom.begin}} Form Name Appended Text {{=form.custom.widget.appendedtext}} append help {{=form.custom.end}} Hope that helps. Stuart. On Thursday, April 14, 2016 at 7:39:56 AM UTC-7, Ron Chatterjee wrote: > > db.define_table("search_table", > Field('search_string', 'string')) > > > > form = SQLFORM(db.search_table); > > > view {{=form}} > > > If I have to use validators and security of SQLFORM, how do I add appended > text to this form?I am guessing {{=form.custom.begin}}? > > > -- 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: AppConfig and Storage
So what would be the strategy for having config settings for dev and production? Would there be some way to branch on is_local? On Sunday, July 19, 2015 at 12:06:42 PM UTC-7, Alex wrote: > > it's a clear separation of code and configuration. When you deploy the > application on a server you usually have a different database connection > string (and maybe other different settings as well), usually even multiple > setups for dev, test and so on. Without a configuration file you'd have to > change the source code on the deployed app. > > Am Sonntag, 19. Juli 2015 17:10:30 UTC+2 schrieb ermolaev...@gmail.com: >> >> why it better than code in /models/0.py ? >> >> response.db_cs = 'DB_CONN_STR' >> or >> DB_SC = 'DB_CONN_STR' >> >> >> четверг, 16 июля 2015 г., 5:29:03 UTC+3 пользователь Alex написал: >>> >>> thanks for the AppConfig implementation! this is really useful and >>> allows easy configuration of db connections. Actually I posted a question >>> about this a few years ago - in the meantime I found a workaround but I'll >>> change it to AppConfig soon. >>> >>> Is this already mentioned in the book somewhere? I couldn't find it. >>> >>> Alex >>> >> -- 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: AppConfig and Storage
or an env variable. On Friday, April 15, 2016 at 7:47:19 AM UTC+2, pbreit wrote: > > So what would be the strategy for having config settings for dev and > production? > > Would there be some way to branch on is_local? > > > On Sunday, July 19, 2015 at 12:06:42 PM UTC-7, Alex wrote: >> >> it's a clear separation of code and configuration. When you deploy the >> application on a server you usually have a different database connection >> string (and maybe other different settings as well), usually even multiple >> setups for dev, test and so on. Without a configuration file you'd have to >> change the source code on the deployed app. >> >> Am Sonntag, 19. Juli 2015 17:10:30 UTC+2 schrieb ermolaev...@gmail.com: >>> >>> why it better than code in /models/0.py ? >>> >>> response.db_cs = 'DB_CONN_STR' >>> or >>> DB_SC = 'DB_CONN_STR' >>> >>> >>> четверг, 16 июля 2015 г., 5:29:03 UTC+3 пользователь Alex написал: thanks for the AppConfig implementation! this is really useful and allows easy configuration of db connections. Actually I posted a question about this a few years ago - in the meantime I found a workaround but I'll change it to AppConfig soon. Is this already mentioned in the book somewhere? I couldn't find it. Alex >>> -- 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.