[web2py] Re: Brainstorming
I want to use the template capabilities of web2py for server side script generation, not just html. From my brief look at the ractive website I'm wondering if it is any better than what web2py does now. Do I really want a js library for this for server side templating. I could use node but I can't see a reason to change. Massimo, are you thinking of changing the templating approach ? On Tuesday, June 17, 2014 6:25:17 AM UTC+12, Derek wrote: > > I prefer jqote2 and jquery pesonally. It's one of the fastest out there > and the templates are pretty simple yet flexible. > > On Sunday, June 15, 2014 1:34:25 AM UTC-7, Massimo Di Pierro wrote: >> >> Often Angular comes up on this list. I tried it and I was un-impressed. >> Instead today my favorite client-side stack is based on these: >> >> - jquery.js >> - sugar.js >> - ractive.js >> - semantic-ui (css & js) >> >> Have you tried sugar, ractive, and semantic-ui? What is your opinion? >> >> Massimo >> >> >> >> >> -- 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: How do I view text on view.html
Thanks! it works! On Mon, Jun 16, 2014 at 6:32 PM, LoveWeb2py wrote: > >> >> If you want to get 'Victor' in a view you could do something simple like: >> >> Controller: >> def name_return(): >> name = 'Victor' >> return dict(name=name) >> >> view name_return.html: >> >> {{extend 'layout.html'}} >> {{=name}} >> > -- > 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 a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/ERdNYzSpnEk/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Dr Maurice Waka, MBCHB. Nairobi -- 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: apache 2.4 mod_wsgi windows server 2008 R2, constant 100% CPU use immediately after start
> why apache and not iis ? Familiarity ... I have never used iis and there is no deployment recipe in the book. For sure my Apache is not set up correctly or there is a bug somewhere. -- 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] Which pure python DB or BTree (like ZODB) is best to modify the Scheduler to use pure-python code?
I am interested to deploy the Scheduler in gluon in a non web app, separate from the web2py web scaffolding, in pure python environments which may not have any SQL database installed or accessible.SQLite needs a platform-dependent installer so is unsuitable. Does the DAL have any support for a pure python DB that can work with the Scheduler instead of a SQL database, With some Scheduler and/or DAL hacking, will ZODB do the trick? -- 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: Possible to use IS_IN_SET with no db? Just need simple drop down
Your method is exactly what I was looking for SELECT((1,5,10), ...)) Thank you! I knew there was an easier way :) On Monday, June 16, 2014 2:38:03 PM UTC-4, Niphlod wrote: > > ehmmm. a TD inside a TR inside a SELECT ? and for a list:integer ? It sums > ups to "all kind of wrongs". You're messing widgets with Fields. > why don't you just use SQLFORM.factory ? (or, if you know your html. > pleease use SELECT((1,5,10), )) > > On Monday, June 16, 2014 5:41:22 PM UTC+2, LoveWeb2py wrote: >> >> I got it. Sorry I just learned about the SELECT statement. >> >> SELECT(*[TR(TD(item)) for item in [1,5,10]], _name="query_limit", >> _type='list:integer'), >> >> Hope this helps someone. >> >> On Monday, June 16, 2014 11:22:50 AM UTC-4, LoveWeb2py wrote: >>> >>> I have a form I'm using and I just want a user to be able to select the >>> max amount of queries from a pre-selected set, but the dropdown isn't >>> working (I'm sure its because of my code) >>> >>> Here is what I have: >>> >>> form = FORM('Choose dates', >>> INPUT(_name="date1", _class=datetime', requires=IS_DATETIME()), >>> INPUT(_name="date1", _class=datetime', requires=IS_DATETIME()), >>> INPUT(_name="date1", requires=IS_IN_SET([1,5,10])), >>> INPUT(_type='submit', _class='submit btn')) >>> >>> I'm sure this isn't hard but I just want to generate something like this >>> from the controller: >>> >>> >>> One >>> Two >>> Three >>> Four >>> Five >>> >>> >>> -- 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: Possible to use IS_IN_SET with no db? Just need simple drop down
Hi Niphlod, I actually got the information from the web2py cheatsheet. I have removed the TR/TD and the list:integer http://web2py.com/examples/static/web2py_cheatsheet.pdf On Monday, June 16, 2014 2:38:03 PM UTC-4, Niphlod wrote: > > ehmmm. a TD inside a TR inside a SELECT ? and for a list:integer ? It sums > ups to "all kind of wrongs". You're messing widgets with Fields. > why don't you just use SQLFORM.factory ? (or, if you know your html. > pleease use SELECT((1,5,10), )) > > On Monday, June 16, 2014 5:41:22 PM UTC+2, LoveWeb2py wrote: >> >> I got it. Sorry I just learned about the SELECT statement. >> >> SELECT(*[TR(TD(item)) for item in [1,5,10]], _name="query_limit", >> _type='list:integer'), >> >> Hope this helps someone. >> >> On Monday, June 16, 2014 11:22:50 AM UTC-4, LoveWeb2py wrote: >>> >>> I have a form I'm using and I just want a user to be able to select the >>> max amount of queries from a pre-selected set, but the dropdown isn't >>> working (I'm sure its because of my code) >>> >>> Here is what I have: >>> >>> form = FORM('Choose dates', >>> INPUT(_name="date1", _class=datetime', requires=IS_DATETIME()), >>> INPUT(_name="date1", _class=datetime', requires=IS_DATETIME()), >>> INPUT(_name="date1", requires=IS_IN_SET([1,5,10])), >>> INPUT(_type='submit', _class='submit btn')) >>> >>> I'm sure this isn't hard but I just want to generate something like this >>> from the controller: >>> >>> >>> One >>> Two >>> Three >>> Four >>> Five >>> >>> >>> -- 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: Possible to use IS_IN_SET with no db? Just need simple drop down
ehmmm. a TD inside a TR inside a SELECT ? and for a list:integer ? It sums ups to "all kind of wrongs". You're messing widgets with Fields. why don't you just use SQLFORM.factory ? (or, if you know your html. pleease use SELECT((1,5,10), )) On Monday, June 16, 2014 5:41:22 PM UTC+2, LoveWeb2py wrote: > > I got it. Sorry I just learned about the SELECT statement. > > SELECT(*[TR(TD(item)) for item in [1,5,10]], _name="query_limit", > _type='list:integer'), > > Hope this helps someone. > > On Monday, June 16, 2014 11:22:50 AM UTC-4, LoveWeb2py wrote: >> >> I have a form I'm using and I just want a user to be able to select the >> max amount of queries from a pre-selected set, but the dropdown isn't >> working (I'm sure its because of my code) >> >> Here is what I have: >> >> form = FORM('Choose dates', >> INPUT(_name="date1", _class=datetime', requires=IS_DATETIME()), >> INPUT(_name="date1", _class=datetime', requires=IS_DATETIME()), >> INPUT(_name="date1", requires=IS_IN_SET([1,5,10])), >> INPUT(_type='submit', _class='submit btn')) >> >> I'm sure this isn't hard but I just want to generate something like this >> from the controller: >> >> >> One >> Two >> Three >> Four >> Five >> >> >> -- 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: web2py & IronPython status
Test it out. I believe you'll be pleasantly surprised at what does work. Not everything does work, but for a while, IronPython didn't have access to the CSV library built into CPython so it couldn't even do logging. Now that it does have that, more should work. Give it a shot and report back your findings. On Sunday, January 19, 2014 7:35:01 AM UTC-7, damond...@gmail.com wrote: > > Hi there, > > Could anyone clarify for me the current status of running web2py on > IronPython ? > > The posts I found on this topics are both old and not very clear to me : > >> 5/22/09 : I would not recommend anybody to run web2py with IronPython >> and IIS. > > > > Why not ? what are the stumbling blocks ? > >> 8/8/09 : The database drivers do not work with IronPython. > > > Why not ? Isn’t there a pyodbc-based web2py MSSQL driver available? > Doesn’t it generate the MSSQL tables/queries from web2py model > tables/queries ? Why does it work for web2py model table/queries as CPython > objects and not for web2py model table/queries as IronPython objects ? > > 9/2/09 : With minor changes web2py runs on IronPython. > > > > Has anyone tested and published these minor changes somewhere over the > last 4 years? > > 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: Brainstorming
I prefer jqote2 and jquery pesonally. It's one of the fastest out there and the templates are pretty simple yet flexible. On Sunday, June 15, 2014 1:34:25 AM UTC-7, Massimo Di Pierro wrote: > > Often Angular comes up on this list. I tried it and I was un-impressed. > Instead today my favorite client-side stack is based on these: > > - jquery.js > - sugar.js > - ractive.js > - semantic-ui (css & js) > > Have you tried sugar, ractive, and semantic-ui? What is your opinion? > > Massimo > > > > > -- 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: Why does this happen: DAL returns a tuple & is it supposed to?
Leonel, Ah, so it is. Thank you. On Monday, June 16, 2014 10:31:53 AM UTC-4, Leonel Câmara wrote: > > That's just a consequence of python's DB-API (see > http://legacy.python.org/dev/peps/pep-0249/ ) the result is indeed > supposed to be a list of tuples. > > However, web2py's DAL executesql does have many parameters that allow you > to change the results, you can even get Rows if you want. I recommend you > check executesql parameters (for instance as_dict) in the docs. > http://web2py.readthedocs.org/en/latest/dal.html#gluon.dal.DAL.executesql > -- 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: How do I view text on view.html
I guess you need to familiarize yourself more with not just with web2py but also with web development, right? Anthony is right, you should read web2py book at www.web2py.com/book, at least the first chapters to get a start. At first you need to understand MVC. For example you may have: in db.py (Model) class Person(): name = 'Victor' in default.py (Controler) def index(): person = Person() return dict(person=person) in default/index.html (View) {{=person.name}} 2014-06-16 10:24 GMT-03:00 Anthony : > This doesn't look anything like typical web2py code. I would recommend > that you read some of the book and follow the typical patterns and then > come back with questions if you're having trouble. In general, though, note > that you won't be using the print statement to display anything in HTML > pages -- print is for printing to the console. > > Anthony > > > On Monday, June 16, 2014 6:08:55 AM UTC-4, Maurice Waka wrote: >> >> My code: >> >> >> >> >> class Person(): >> name = 'Victor' >> def say(self, what): >> print(self.name, what) >> >> >> getattr(person, attr_name) >> >> How do I display 'Victor' on web2py html.view? >> >> I tried using: >> >> {{=getattr(person, attr_name)}} >> >> >> I know this could be wrong and I cant get a result either >> >> -- > 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. > -- Att. Carlos J. Costa Cientista da Computação Esp. Gestão em Telecom <º))>< -- 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: Possible to use IS_IN_SET with no db? Just need simple drop down
I got it. Sorry I just learned about the SELECT statement. SELECT(*[TR(TD(item)) for item in [1,5,10]], _name="query_limit", _type='list:integer'), Hope this helps someone. On Monday, June 16, 2014 11:22:50 AM UTC-4, LoveWeb2py wrote: > > I have a form I'm using and I just want a user to be able to select the > max amount of queries from a pre-selected set, but the dropdown isn't > working (I'm sure its because of my code) > > Here is what I have: > > form = FORM('Choose dates', > INPUT(_name="date1", _class=datetime', requires=IS_DATETIME()), > INPUT(_name="date1", _class=datetime', requires=IS_DATETIME()), > INPUT(_name="date1", requires=IS_IN_SET([1,5,10])), > INPUT(_type='submit', _class='submit btn')) > > I'm sure this isn't hard but I just want to generate something like this > from the controller: > > > One > Two > Three > Four > Five > > > -- 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] appadmin is disabled because insecure channel using default ipv6 local ::1 on windows with w2p 2.95
Heading says it all... no problems using localhost IPv4... Is this expected behaviour? Seems rather strange if so... -- 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: How do I view text on view.html
> > > > If you want to get 'Victor' in a view you could do something simple like: > > Controller: > def name_return(): > name = 'Victor' > return dict(name=name) > > view name_return.html: > > {{extend 'layout.html'}} > {{=name}} > -- 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: How do I view text on view.html
On Monday, June 16, 2014 6:08:55 AM UTC-4, Maurice Waka wrote: > > My code: > > > > > class Person(): > name = 'Victor' > def say(self, what): > print(self.name, what) > > > getattr(person, attr_name) > > How do I display 'Victor' on web2py html.view? > > I tried using: > > {{=getattr(person, attr_name)}} > > > I know this could be wrong and I cant get a result either > If you want to get 'Victor' in a view you could do something simple like: Controller: def name_return(): name = 'Victor' return dict(name=name) view name_return.html: {{extend 'layout.html'}} {{=name) -- 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] Possible to use IS_IN_SET with no db? Just need simple drop down
I have a form I'm using and I just want a user to be able to select the max amount of queries from a pre-selected set, but the dropdown isn't working (I'm sure its because of my code) Here is what I have: form = FORM('Choose dates', INPUT(_name="date1", _class=datetime', requires=IS_DATETIME()), INPUT(_name="date1", _class=datetime', requires=IS_DATETIME()), INPUT(_name="date1", requires=IS_IN_SET([1,5,10])), INPUT(_type='submit', _class='submit btn')) I'm sure this isn't hard but I just want to generate something like this from the controller: One Two Three Four Five -- 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: Why does this happen: DAL returns a tuple & is it supposed to?
That's just a consequence of python's DB-API (see http://legacy.python.org/dev/peps/pep-0249/ ) the result is indeed supposed to be a list of tuples. However web2py's DAL executesql does have many parameters that allow you to change the results, you can even get Rows if you want. I recommend you check executesql parameters (for instance as_dict) in the docs. http://web2py.readthedocs.org/en/latest/dal.html#gluon.dal.DAL.executesql -- 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] Why does this happen: DAL returns a tuple & is it supposed to?
Why is DAL returning a tuple here? >>> from dal import DAL >>> db = DAL('postgres://web2pyuser:password@localhost:5432/webtest', fake_migrate_all=True) >>> q = '''select coalesce(sum(amount), 0) from product_journal''' >>> db.executesql(q) [(Decimal('250.000'),)] # Why is the returned value a tuple? This does not seem to make sense. >>> q = '''select coalesce(sum(amount), 0) from product_journal where product_id = 255''' >>> db.executesql(q) [(Decimal('0'),)] Is this the way it's supposed to work and will it stay this way? -- 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: Brainstorming
I have tried both Angular and Ractive. I choose Ractive every time. On Sunday, June 15, 2014 3:34:25 AM UTC-5, Massimo Di Pierro wrote: > > Often Angular comes up on this list. I tried it and I was un-impressed. > Instead today my favorite client-side stack is based on these: > > - jquery.js > - sugar.js > - ractive.js > - semantic-ui (css & js) > > Have you tried sugar, ractive, and semantic-ui? What is your opinion? > > Massimo > > > > > -- 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: Trying to use the LOAD helper, if a button is clicked
If you want to dynamically add a component in the browser, you cannot use the LOAD helper, which is a Python helper that is serialized on the server. Instead, use the $.web2py.component() Javascript function. Something like: Anthony On Friday, June 13, 2014 7:47:34 PM UTC-4, Omri Levy wrote: > > Hi , > > So I have a ticket system, and I want to allow user to edit the ticket > without leaving the page. > I don't want to LOAD the edit_page and hide it, but only load it once user > is clicking on the ticket body. > Another thing is, when user edits the ticket, he should again see changes > on the same page. > > Is this possible? I'm a bit confused, because LOAD works fine, but not > when using conditions with JS. > > 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: How do I view text on view.html
This doesn't look anything like typical web2py code. I would recommend that you read some of the book and follow the typical patterns and then come back with questions if you're having trouble. In general, though, note that you won't be using the print statement to display anything in HTML pages -- print is for printing to the console. Anthony On Monday, June 16, 2014 6:08:55 AM UTC-4, Maurice Waka wrote: > > My code: > > > > > class Person(): > name = 'Victor' > def say(self, what): > print(self.name, what) > > > getattr(person, attr_name) > > How do I display 'Victor' on web2py html.view? > > I tried using: > > {{=getattr(person, attr_name)}} > > > I know this could be wrong and I cant get a result either > > -- 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] How do I view text on view.html
@ Carlo, that's where am stuck On Mon, Jun 16, 2014 at 2:36 PM, Carlos Costa wrote: > You should create and action for that view and pass it in dictionary to > the view > > > 2014-06-16 7:08 GMT-03:00 Maurice Waka : > >> My code: >> >> >> >> >> class Person(): >> name = 'Victor' >> def say(self, what): >> print(self.name, what) >> >> >> getattr(person, attr_name) >> >> How do I display 'Victor' on web2py html.view? >> >> I tried using: >> >> {{=getattr(person, attr_name)}} >> >> >> I know this could be wrong and I cant get a result either >> >> -- >> 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. >> > > > > -- > Att. > > Carlos J. Costa > Cientista da Computação > Esp. Gestão em Telecom > <º))>< > > -- > 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 a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/ERdNYzSpnEk/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Dr Maurice Waka, MBCHB. Nairobi -- 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: apache 2.4 mod_wsgi windows server 2008 R2, constant 100% CPU use immediately after start
why apache and not iis ? On Monday, June 16, 2014 12:59:24 PM UTC+2, Tim Richardson wrote: > > I've moved a client's web2py apps to a new windows server. It's now 2008 > R2 (on a 2012 hypervisor). I'm still using Apache 2.4 (although a slightly > later version). > I get constant and very high CPU usage (1 of 8 cores showing 10% or 11% > CPU) as soon as the Apache service starts. This server only hosts one app > (although it is a standard web2py installation). Memory usage is low, and > the website appears responsive to casual use. The Apache log files indicate > low access rates, no errors. Stopping the server and restarting it > immediately results in the same CPU load. The mod_wsgi configuration is the > same as on the old server. The hosting filesystem is Microsoft's ReFS > (Resilient Filesystem) which causes PyCharm some grief (Java's filesystem > notifying doesn't work on ReFS yet), maybe that's a factor. I have other > services running Rocket and they are all normal. > > Apache is 32 bit, so is python. > > I wonder if anyone has seen this before and may be able to give me some > hints > -- 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] Trying to use the LOAD helper, if a button is clicked
It may work if this button is inside the component loaded. 2014-06-13 20:47 GMT-03:00 Omri Levy : > Hi , > > So I have a ticket system, and I want to allow user to edit the ticket > without leaving the page. > I don't want to LOAD the edit_page and hide it, but only load it once user > is clicking on the ticket body. > Another thing is, when user edits the ticket, he should again see changes > on the same page. > > Is this possible? I'm a bit confused, because LOAD works fine, but not > when using conditions with JS. > > 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. > -- Att. Carlos J. Costa Cientista da Computação Esp. Gestão em Telecom <º))>< -- 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] How do I view text on view.html
You should create and action for that view and pass it in dictionary to the view 2014-06-16 7:08 GMT-03:00 Maurice Waka : > My code: > > > > > class Person(): > name = 'Victor' > def say(self, what): > print(self.name, what) > > > getattr(person, attr_name) > > How do I display 'Victor' on web2py html.view? > > I tried using: > > {{=getattr(person, attr_name)}} > > > I know this could be wrong and I cant get a result either > > -- > 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. > -- Att. Carlos J. Costa Cientista da Computação Esp. Gestão em Telecom <º))>< -- 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] apache 2.4 mod_wsgi windows server 2008 R2, constant 100% CPU use immediately after start
I've moved a client's web2py apps to a new windows server. It's now 2008 R2 (on a 2012 hypervisor). I'm still using Apache 2.4 (although a slightly later version). I get constant and very high CPU usage (1 of 8 cores showing 10% or 11% CPU) as soon as the Apache service starts. This server only hosts one app (although it is a standard web2py installation). Memory usage is low, and the website appears responsive to casual use. The Apache log files indicate low access rates, no errors. Stopping the server and restarting it immediately results in the same CPU load. The mod_wsgi configuration is the same as on the old server. The hosting filesystem is Microsoft's ReFS (Resilient Filesystem) which causes PyCharm some grief (Java's filesystem notifying doesn't work on ReFS yet), maybe that's a factor. I have other services running Rocket and they are all normal. Apache is 32 bit, so is python. I wonder if anyone has seen this before and may be able to give me some hints -- 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 do I view text on view.html
My code: class Person(): name = 'Victor' def say(self, what): print(self.name, what) getattr(person, attr_name) How do I display 'Victor' on web2py html.view? I tried using: {{=getattr(person, attr_name)}} I know this could be wrong and I cant get a result either -- 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: web2py & IronPython status
Hi, Why would you have IronPython support for Web2py? I am planning a web2py app within a .NET applications landscape and will create .NET classes for communication with the other applications. These classes will are accessible by the web2py server. I'll call it best of both worlds. Richard. On Sunday, January 19, 2014 4:56:31 PM UTC+1, Massimo Di Pierro wrote: > > To my knowledge we do not support IronPython. > > On Sunday, 19 January 2014 08:35:01 UTC-6, damond...@gmail.com wrote: >> >> Hi there, >> >> Could anyone clarify for me the current status of running web2py on >> IronPython ? >> >> The posts I found on this topics are both old and not very clear to me : >> >>> 5/22/09 : I would not recommend anybody to run web2py with IronPython >>> and IIS. >> >> >> >> Why not ? what are the stumbling blocks ? >> >>> 8/8/09 : The database drivers do not work with IronPython. >> >> >> Why not ? Isn’t there a pyodbc-based web2py MSSQL driver available? >> Doesn’t it generate the MSSQL tables/queries from web2py model >> tables/queries ? Why does it work for web2py model table/queries as CPython >> objects and not for web2py model table/queries as IronPython objects ? >> >> 9/2/09 : With minor changes web2py runs on IronPython. >> >> >> >> Has anyone tested and published these minor changes somewhere over the >> last 4 years? >> >> 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] Apache virtual hosts http and https correct WSGI setup?
Hello :) I am experiencing an issue when I try to log-in through http, then through https behind Apache using WSGI. Web2py Version 2.9.5-stable+timestamp.2014.03.16.02.35.39 Python 2.7.3: /usr/bin/python (prefix: /usr) Traceback (most recent call last): File "/opt/web2py/gluon/main.py", line 457, in wsgibase session._try_store_in_db(request, response) File "/opt/web2py/gluon/globals.py", line 1089, in _try_store_in_db (self._unchanged(response) and not response.session_new)): File "/opt/web2py/gluon/globals.py", line 1078, in _unchanged session_pickled = cPickle.dumps(self) File "/usr/lib/python2.7/copy_reg.py", line 84, in _reduce_ex dict = getstate() TypeError: 'NoneType' object is not callable After apache restart it works fine. Seems to be related to these: https://code.google.com/p/web2py/issues/detail?id=1438#makechanges https://groups.google.com/forum/#!topic/web2py/jkqyPM5_zaE https://groups.google.com/forum/#!msg/web2py/2SLPllKa-qQ/E_a55n5iGTMJ My setup is: 1. One WSGIDaemonProcess for the whole apache server: WSGIDaemonProcess web2py user=www-data group=www-data display-name=%{GROUP} 2. SSL config for the whole server - mainly for the purpose of accessing web2py admin interface: SSLEngine on SSLCertificateFile /etc/apache2/ssl/self_signed.cert SSLCertificateKeyFile /etc/apache2/ssl/self_signed.key WSGIProcessGroup web2py WSGIScriptAlias / /opt/web2py/wsgihandler.py AllowOverride None Order Allow,Deny Deny from all Allow from all AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) /opt/web2py/applications/$1/static/$2 Order Allow,Deny Allow from all CustomLog /var/log/apache2/access-ssl.log common ErrorLog /var/log/apache2/error-ssl.log 3. Macro: ServerName $domain WSGIProcessGroup web2py WSGIScriptAlias / /opt/web2py/wsgihandler.py AllowOverride None Order Allow,Deny Deny from all Allow from all AliasMatch ^/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) /opt/web2py/applications/$1/static/$2 Options -Indexes Order Allow,Deny Allow from all Deny from all Deny from all CustomLog /var/log/apache2/$domain.log common ErrorLog /var/log/apache2/$domain-error.log 4. Virtual hosts (in separate files): # firstdomain.com ServerName firstdomain.com RedirectMatch permanent (.*) http://www.firstdomain.com$1 Use Web2Py www.firstdomain.com # my.mywebserver.com Use Web2Py my.mywebserver.com 4. Routes in web2py: routers = dict( BASE=dict( domains = { 'www.firstdomain.com' : 'firstapp', 'my.mywebserver.com' : 'myapp', } ), ) A workaround is suggested at the end of the thread: https://groups.google.com/forum/#!topic/web2py/jkqyPM5_zaE "Anyway i use different WSGIDaemonProcess on https and http and problem solve." So, I have changed in Macro: WSGIProcessGroup web2py to WSGIDaemonProcess $domain user=www-data group=www-data display-name=%{GROUP} WSGIProcessGroup $domain and the problem seems to be solved. But is it really correct to use different WSGIDaemonProcess for the same web2py instance? Graham Dumpleton here: https://groups.google.com/forum/#!topic/modwsgi/URpyQXl5d8g lists several potential problems related to a configuration with separate WSGIDaemonProcess, such as leakage of data between sub interpreters. He suggests: "Overall, the safest thing to do is to have each distinct web application instance delegated to its own daemon process group, with it being forced to run in %{GLOBAL} application group of that daemon process group. The %{GLOBAL} here means force it to run in the main (first created) Python interpreter within the process. This is equivalent to the interpreter environment which is used by command line Python and so all C extension modules should work in that." Please, is there anyone with the necessary inside to provide correct instructions how to set-up multiple virtual hosts with SSL, all served by one web2py instance behind Apache correctly? It would be great to include the instructions in the web2py book, because IMO such config is likely to be quite common. :) Thanks in advance! David -- 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: Brainstorming
Massimo, can you post a ractive example where you had problems doing it with angular? Whe should go to examples to understand this angular/ractive issue better 2014-06-16 4:31 GMT+01:00 Massimo Di Pierro : > I have used Angular for a project and it was a nightmare. I soon moved to > ractive and did not regret it. Angular forces a scope and, for example, > promises can only live within the scope. That means you cannot use Angular > promises in your own library unless you put all the code in the scope. I > constantly found myself fighting the constraints imposed by angular. > > > On Sunday, 15 June 2014 19:59:43 UTC-5, samuel bonill wrote: >> >> Angular is very easy to learn... >> >> #1 http://campus.codeschool.com/courses/shaping-up-with-angular-js/intro >> >> #2 www.*ng*-*book*.com >> >> El domingo, 15 de junio de 2014 03:34:25 UTC-5, Massimo Di Pierro >> escribió: >>> >>> Often Angular comes up on this list. I tried it and I was un-impressed. >>> Instead today my favorite client-side stack is based on these: >>> >>> - jquery.js >>> - sugar.js >>> - ractive.js >>> - semantic-ui (css & js) >>> >>> Have you tried sugar, ractive, and semantic-ui? What is your opinion? >>> >>> Massimo >>> >>> >>> >>> >>> -- > 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.