[web2py] Re: Polls doesn't work in GAE
I think the problems is that poll doesn't have a foreign key to choice, it's the other way around. Try this: {{poll_choices = db(db.choice.poll==poll.id).select()}} {{ for choice in poll_choices: }} {{=choice.choice }} -- {{=choice.votes }} vote{{if choice.votes!=1:}}s{{pass}} {{ pass } On Mar 3, 11:51 pm, mdmcginn wrote: > db.define_table('poll', > Field('question',length=200), > > Field('pub_date','datetime',default=request.now,writable=False)) > > db.define_table('choice', > Field('poll',db.poll), > Field('choice',length=200), > Field('votes','integer',default=0)) > > db.define_table('recorded_votes', > Field('poll',db.poll), > Field('voter',db.auth_user)) > > On Mar 1, 9:37 pm, "mr.freeze" wrote: > > > Can we see your model? > > > On Mar 1, 9:05 pm, mdmcginn wrote: > > > > From index.html: > > > Latest Polls > > > Answer the question [vote] [results] > > > > When I click on [results], I'm sent > > > tohttp://localhost:8080/Polls/default/results/67 > > > > ERROR 2010-03-02 02:54:08,609 restricted.py:53] In FILE: /home/ > > > michael/mycode/google_appengine/web2py/applications/Polls/views/ > > > default/results.html > > > > Traceback (most recent call last): > > > File "/home/michael/mycode/web2py/gluon/restricted.py", line 173, in > > > restricted > > > exec ccode in environment > > > File "/home/michael/mycode/google_appengine/web2py/applications/ > > > Polls/views/default/results.html", line 64, in > > > File "/home/michael/mycode/web2py/gluon/sql.py", line 3041, in > > > select > > > query = self._select(*fields, **attributes) > > > File "/home/michael/mycode/web2py/gluon/sql.py", line 2932, in > > > _select > > > raise SyntaxError, 'Set: no tables selected' > > > SyntaxError: Set: no tables selected > > > > INFO 2010-03-02 02:54:08,610 gaehandler.py:55] Request: > > > 286.06ms/50.00ms (real time/cpu time) > > > INFO 2010-03-02 02:54:08,618 dev_appserver.py:3246] "GET /Polls/ > > > default/results/67 HTTP/1.1" 500 - > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Dream Host Deployment
I just went through the setup again (with virtualenv though) and it worked like a charm. It must be related to your python install. What happens if you open a python shell and type 'import dbhash'? On Mar 3, 8:58 pm, Jesse wrote: > I tried running the python code from the passenger_wsgi.py manually to > see if there were any issues. > > When I got down to > import gluon.main > I got: > WARNING:root:unable to import dbhash > issues??? > > My passenger_wsgi.py / wsgihandler.py code: > > #!/usr/bin/env python > # -*- coding: utf-8 -*- > > """ > This is a WSGI handler for Apache > Requires apache+mod_wsgi. > > In httpd.conf put something like: > > LoadModule wsgi_module modules/mod_wsgi.so > WSGIScriptAlias / /path/to/wsgihandler.py > > """ > > import sys > import os > INTERP = "/home/jesdavid/opt/bin/python2.5" > if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.arg) > sys.path.insert(0, '') > path = os.path.dirname(os.path.abspath(__file__)) > if not path in sys.path: > sys.path.append(path) > os.chdir(path) > > import gluon.main > from gluon.contrib.wsgihooks import ExecuteOnCompletion2, callback > > application = ExecuteOnCompletion2(gluon.main.wsgibase, callback) -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Polls doesn't work in GAE
db.define_table('poll', Field('question',length=200), Field('pub_date','datetime',default=request.now,writable=False)) db.define_table('choice', Field('poll',db.poll), Field('choice',length=200), Field('votes','integer',default=0)) db.define_table('recorded_votes', Field('poll',db.poll), Field('voter',db.auth_user)) On Mar 1, 9:37 pm, "mr.freeze" wrote: > Can we see your model? > > On Mar 1, 9:05 pm, mdmcginn wrote: > > > > > From index.html: > > Latest Polls > > Answer the question [vote] [results] > > > When I click on [results], I'm sent > > tohttp://localhost:8080/Polls/default/results/67 > > > ERROR 2010-03-02 02:54:08,609 restricted.py:53] In FILE: /home/ > > michael/mycode/google_appengine/web2py/applications/Polls/views/ > > default/results.html > > > Traceback (most recent call last): > > File "/home/michael/mycode/web2py/gluon/restricted.py", line 173, in > > restricted > > exec ccode in environment > > File "/home/michael/mycode/google_appengine/web2py/applications/ > > Polls/views/default/results.html", line 64, in > > File "/home/michael/mycode/web2py/gluon/sql.py", line 3041, in > > select > > query = self._select(*fields, **attributes) > > File "/home/michael/mycode/web2py/gluon/sql.py", line 2932, in > > _select > > raise SyntaxError, 'Set: no tables selected' > > SyntaxError: Set: no tables selected > > > INFO 2010-03-02 02:54:08,610 gaehandler.py:55] Request: > > 286.06ms/50.00ms (real time/cpu time) > > INFO 2010-03-02 02:54:08,618 dev_appserver.py:3246] "GET /Polls/ > > default/results/67 HTTP/1.1" 500 - -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: A suggestion on table migration
This wouldn't work for everyone as sometime you want to control the migration per table. As a workaround, create a variable in your model: migrate_db = True db.define_table('things',...,migrate=migrate_db) db.define_table('stuff',...,migrate=migrate_db) On Mar 3, 10:25 pm, Mengu wrote: > Hi, > > I think it would be better and faster for setting a global option for > db for migrations so instead of checking per table, if that global > option is set to True then it migrates and if it's set to False then > it doesn't migrate. What do you think? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: crud delete weird behavior (on GAE at least)
Just installed 1.76.3 and it seems to have fixed the problem. -Miguel On Tue, Mar 2, 2010 at 11:16 PM, Miguel Goncalves wrote: > What is the file that locally stores the databases/tables contents when > using GAE devserver? > I would like to delete it (without re-installing) and start from scratch to > see if this is due to a local issue. > > -Miguel > > > On Fri, Feb 26, 2010 at 11:58 AM, Miguel Goncalves < > goncalvesmig...@gmail.com> wrote: > >> Hi >> >> I just downloaded the new version (1.75.5) and it is still happening :( >> >> -Miguel >> >> >> >> On Fri, Feb 26, 2010 at 12:12 AM, mdipierro wrote: >> >>> I am a bit confused myself and I have low bandwidth to search the >>> thread. Please let me know if there is a problem still. >>> >>> On Feb 26, 2:03 am, Miguel Goncalves >>> wrote: >>> > I just saw that 1.75.5 is out. >>> > Since it has : "fixed problem with GAE deleted by id (thanks what_ho)" >>> > >>> > Do you think it is related or is this to fix the count vs len issue? >>> > >>> > In any case I will try it tomorrow morning. >>> > >>> > Thanks >>> > Miguel >>> > >>> > On Thu, Feb 25, 2010 at 3:33 PM, Miguel Goncalves < >>> goncalvesmig...@gmail.com >>> > >>> > > wrote: >>> > > Hi >>> > >>> > > I attached a modified "welcome" application that reproduces the >>> problem. >>> > >>> > > To repro: >>> > > - create a user >>> > > - login >>> > > - click on the "list Stats" link (top left of the page) >>> > > - add few stats. You will see the stats you add get listed on the >>> same >>> > > page. >>> > > - click on the link "Delete stat" >>> > > You should now see the error. >>> > >>> > > Thanks >>> > > Miguel >>> > >>> > > On Tue, Feb 23, 2010 at 8:32 PM, mdipierro >> >wrote: >>> > >>> > >> I think: >>> > >>> > >> 1. Run "appcfg.py vacuum_indexes your_app_dir/" >>> > >> 2. Run "appcfg.py update_indexes your_app_dir/" >>> > >>> > >> On Feb 23, 10:23 pm, Miguel Goncalves >>> > >> wrote: >>> > >> > How do I do that? >>> > >>> > >> > On Tue, Feb 23, 2010 at 7:09 PM, mdipierro < >>> mdipie...@cs.depaul.edu> >>> > >> wrote: >>> > >> > > I would try delete and rebuild indices. >>> > >>> > >> > > On Feb 23, 7:54 pm, Miguel Goncalves >> > >>> > >> > > wrote: >>> > >> > > > Yes I tried to upload it to GAE but I ran into the missing >>> indexes >>> > >> issue. >>> > >> > > So >>> > >> > > > I was trying to run the app locally to generate the required >>> indexes >>> > >> and >>> > >> > > be >>> > >> > > > able to run on the live GAE. :( >>> > >>> > >> > > > I have the issue on the dev server. This used to work and I >>> have no >>> > >> clue >>> > >> > > > what could have broken it. I believe the only thing I did was >>> to >>> > >> update >>> > >> > > GAE >>> > >> > > > to the latest sdk. >>> > >>> > >> > > > Debugging the app a little bit further I found the place where >>> the >>> > >> > > exception >>> > >> > > > is raised: >>> > >>> > >> > > > class Table >>> > >> > > > def __delitem__(self, key): >>> > >> > > > if not str(key).isdigit() or not self._db(self.id == >>> > >> > > key).delete(): >>> > >> > > > raise SyntaxError, 'No such record: %s' % key >>> > >>> > >> > > > However the table does contain a record equal to key. >>> > >> > > > What gives? >>> > >>> > >> > > > Thanks >>> > >> > > > Miguel >>> > >>> > >> > > > On Tue, Feb 23, 2010 at 11:04 AM, Wes James < >>> compte...@gmail.com> >>> > >> wrote: >>> > >> > > > > Have you uploaded your app to gae and tested it there? >>> > >>> > >> > > > > -wes >>> > >>> > >> > > > > On Tue, Feb 23, 2010 at 10:57 AM, Miguel Goncalves >>> > >> > > > > wrote: >>> > >> > > > > > Anybody run into a similar issue? >>> > >> > > > > > I cannot seem to figure it out. :( >>> > >>> > >> > > > > > Thanks >>> > >> > > > > > -Miguel >>> > >>> > >> > > > > > On Mon, Feb 22, 2010 at 6:09 PM, Miguel < >>> > >> goncalvesmig...@gmail.com> >>> > >> > > > > wrote: >>> > >>> > >> > > > > >> Hi >>> > >>> > >> > > > > >> I implemented the following function to delete an entry >>> in a >>> > >> db: >>> > >>> > >> > > > > >> @auth.requires_login() >>> > >> > > > > >> def DeleteSite(): >>> > >> > > > > >>msg = T("Cannot delete specified record.") >>> > >> > > > > >>try: >>> > >> > > > > >>record_id = request.vars['id'] >>> > >> > > > > >>next_page = request.vars['next'] >>> > >> > > > > >>except: >>> > >> > > > > >>response.flash = msg >>> > >> > > > > >>return dict( message=msg) >>> > >>> > >> > > > > >>if record_id is None or next_page is None or >>> > >> len(next_page) >>> > >> > > == 0: >>> > >> > > > > >>response.flash = msg >>> > >> > > > > >>return dict( message=msg) >>> > >>> > >> > > > > >>crud.delete(db.sites,record_id, >>> > >> > > next=URL(r=request,f=next_page)) >>> > >>> > >> > > > > >> It gets invoked like this (local server on GAE): >>> > >>> > >>http://127.0.0.1:8081/mlinks/default/DeleteSite?id=388&next=MySite
[web2py] A suggestion on table migration
Hi, I think it would be better and faster for setting a global option for db for migrations so instead of checking per table, if that global option is set to True then it migrates and if it's set to False then it doesn't migrate. What do you think? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] online book correction protocol
How shall we submit minor (and not so minor) corrections to the online book? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: uservoice problems
What browser are you using? I am on firefox using a local account I made with them, and it works fine...I just commented on the routes.py for each app suggestion... On Mar 3, 7:13 pm, mdipierro wrote: > I am having lots of problems with uservoice. I am trying to comment > since some of the things people asked already exist (at least > partially) but it logs me out when I post the comment and the comment > does not who up. I tried two different accounts (google and local). -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: * web2py's Brand *
I tend to agree with what has been mentioned in the past. Concentrate on building good web apps and websites using web2py. Let the work speak for itself. All we need is one or two big successes... On Mar 3, 7:02 pm, mdipierro wrote: > On Mar 3, 7:23 pm, John Heenan wrote: > > > On Mar 4, 2:17 am, mdipierro wrote: > > > > Some of the answers are funny. Mostly they are consistent with one > > > exception. > > > Perhaps a web2py hat is better than a t-shirt. I lost mine last > > > summer. :-( > > > Rather flippant given that someone has gone to some effort to set up a > > survey to help out Web2py and that the survey responses were careful. > > Perhaps my comment did not come out right. This was a good idea. When > I said some some of the answers are "funny" I meant it in a positive > sense. Perhaps I did not translated the concept I have in my mind > ("simpatiche" in Italian) in the proper english. > > > As I see it the real goal of Web2py is to become more popular than > > Django. I do not see this as healthy. > > I do not think this is the goal. I think the future of python > frameworks is correlated, not anti-correlated. > > > Like it or not, for whatever reasons the Python community is > > interested in Django and not in Web2py, as evidenced through > > democratic votes of PyCon participants about what participants want to > > attend presentations about. > > I was part of the process so I have something to add about this. For > three years there has been no talk and no tutorials about web2py, > although for three years I have submitted proposals. I was on a panel > discussion at PyCon 2009 because Guido stepped in and told them > excluding web2py was unfair. I was invited to a panel discussion at > PyCon 2010 but I did not go because 5 minutes of air time are not > worth the costs. > It is not the participants making the choice but a small set of > organizers. The decision process by the organizers is indeed > democratic (one person one vote) and I was one of them, but the rules > are debatable because the goal is unclear. One problem is that > basically few people participate to all rounds of discussions and in > practice it takes only one or two people to essentially veto a talk. > Some people when confronted with the choice tend to give a preference > to talks that they perceive to be more popular (for example Django vs > TG or web.py or web2py) and to "good speakers" defined as those who > have already presented at PyCon before. I have argued that the goal of > PyCon should be to broaden the audience (identify medium/large sub- > communities and give them representation) as opposed to consolidate > existing audience by giving a majority premium to largest communities > (such as ~24 hours of Django tutorials/talks and almost nothing to > other web frameworks). Of course the Django tutorials were the most > popular since by filtering out smaller communities the Django users > were the largest community represented at PyCon. The result is that > almost nobody from our list of 1600 people attended PyCon 2010. This > is not a problem for us as much as it is a problem for PyCon and the > Python community in general. > > Although I have published some technical comparisons between web2py > and Django (as well as between web2py and other web frameworks) you > will not find any post from me or other members less than deferential > towards Django. Although, unfortunately, the opposite is not true, > negative remarks tend to come from the low end of the food chain. In > fact top Django developers and contributors are nice, intelligent and > friendly people. > > Moreover I am not convinced at all that the Django community is > particularly hostile to web2py. It is just very large so it is more > likely that some particularly vocal people belong to it. The people > who have been most annoying online (and I know who they are) are not > Django cheerleaders either. > > Some people have been offended by a few comments of mine like "[that > piece of software] is horrible" or "building an ORM is not rocket > science". In there first case the comment just did not come out right > and I apologized. In the second case I stand by what I said. > > I personally care more about design and integrity of the framework > than its popularity. > > Massimo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] uservoice problems
I am having lots of problems with uservoice. I am trying to comment since some of the things people asked already exist (at least partially) but it logs me out when I post the comment and the comment does not who up. I tried two different accounts (google and local). -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: web2py 1.76.2 is OUT - testing cron
ok, in trunk. Thanks for your help with this. On Mar 3, 8:42 pm, Rowdy wrote: > mdipierro wrote: > > Let's make it 59.99 then. We want to avoid false positives more than > > false negatives. > > Sounds good. > > Over the past 2.5 hours the smallest value I saw was 59.9909880161. > > Rowdy -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: * web2py's Brand *
On Mar 3, 7:23 pm, John Heenan wrote: > On Mar 4, 2:17 am, mdipierro wrote: > > > Some of the answers are funny. Mostly they are consistent with one > > exception. > > Perhaps a web2py hat is better than a t-shirt. I lost mine last > > summer. :-( > > Rather flippant given that someone has gone to some effort to set up a > survey to help out Web2py and that the survey responses were careful. Perhaps my comment did not come out right. This was a good idea. When I said some some of the answers are "funny" I meant it in a positive sense. Perhaps I did not translated the concept I have in my mind ("simpatiche" in Italian) in the proper english. > As I see it the real goal of Web2py is to become more popular than > Django. I do not see this as healthy. I do not think this is the goal. I think the future of python frameworks is correlated, not anti-correlated. > Like it or not, for whatever reasons the Python community is > interested in Django and not in Web2py, as evidenced through > democratic votes of PyCon participants about what participants want to > attend presentations about. I was part of the process so I have something to add about this. For three years there has been no talk and no tutorials about web2py, although for three years I have submitted proposals. I was on a panel discussion at PyCon 2009 because Guido stepped in and told them excluding web2py was unfair. I was invited to a panel discussion at PyCon 2010 but I did not go because 5 minutes of air time are not worth the costs. It is not the participants making the choice but a small set of organizers. The decision process by the organizers is indeed democratic (one person one vote) and I was one of them, but the rules are debatable because the goal is unclear. One problem is that basically few people participate to all rounds of discussions and in practice it takes only one or two people to essentially veto a talk. Some people when confronted with the choice tend to give a preference to talks that they perceive to be more popular (for example Django vs TG or web.py or web2py) and to "good speakers" defined as those who have already presented at PyCon before. I have argued that the goal of PyCon should be to broaden the audience (identify medium/large sub- communities and give them representation) as opposed to consolidate existing audience by giving a majority premium to largest communities (such as ~24 hours of Django tutorials/talks and almost nothing to other web frameworks). Of course the Django tutorials were the most popular since by filtering out smaller communities the Django users were the largest community represented at PyCon. The result is that almost nobody from our list of 1600 people attended PyCon 2010. This is not a problem for us as much as it is a problem for PyCon and the Python community in general. Although I have published some technical comparisons between web2py and Django (as well as between web2py and other web frameworks) you will not find any post from me or other members less than deferential towards Django. Although, unfortunately, the opposite is not true, negative remarks tend to come from the low end of the food chain. In fact top Django developers and contributors are nice, intelligent and friendly people. Moreover I am not convinced at all that the Django community is particularly hostile to web2py. It is just very large so it is more likely that some particularly vocal people belong to it. The people who have been most annoying online (and I know who they are) are not Django cheerleaders either. Some people have been offended by a few comments of mine like "[that piece of software] is horrible" or "building an ORM is not rocket science". In there first case the comment just did not come out right and I apologized. In the second case I stand by what I said. I personally care more about design and integrity of the framework than its popularity. Massimo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Dream Host Deployment
I tried running the python code from the passenger_wsgi.py manually to see if there were any issues. When I got down to import gluon.main I got: WARNING:root:unable to import dbhash issues??? My passenger_wsgi.py / wsgihandler.py code: #!/usr/bin/env python # -*- coding: utf-8 -*- """ This is a WSGI handler for Apache Requires apache+mod_wsgi. In httpd.conf put something like: LoadModule wsgi_module modules/mod_wsgi.so WSGIScriptAlias / /path/to/wsgihandler.py """ import sys import os INTERP = "/home/jesdavid/opt/bin/python2.5" if sys.executable != INTERP: os.execl(INTERP, INTERP, *sys.arg) sys.path.insert(0, '') path = os.path.dirname(os.path.abspath(__file__)) if not path in sys.path: sys.path.append(path) os.chdir(path) import gluon.main from gluon.contrib.wsgihooks import ExecuteOnCompletion2, callback application = ExecuteOnCompletion2(gluon.main.wsgibase, callback) -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: * web2py's Brand *
John, There are things that I agree with you and there are things that I disagree with you. For example if PyCon participants are interested in Django and not in web2py, isn't this for Django's popularity? If so, how come the concern over popularity is uncomfortable? When selecting a framework, I do not care about its popularity, I care about how powerful it is, how easy it is, the tools it provides me and how it makes me focus on development. However many people out there looking for a framework start by popular ones. This is why we should care about the framework popularity. On people not liking web2py.. I have been in this community for a long time I can say and I have never seen serious criticisms on the framework except for Armin Ronacher's post. [1] People just talk about web2py and this is all. For example I see people talking about DAL being different and weird however if web2py's database side would be like Django models or SQLAlchemy models they would surely say "yet another orm, do we need it?" but now it is different and way more easy to use they say "what is that? is it a joke?". We can never please everybody and I think we don't have to. Just let web2py to be there in its best form and let there be happy web2py users. As a web2py developer there are things that I don't like in the framework but I simply don't use them and go with another way. For example I don't create my forms with SQLFORM tool or FORM helper. I don't use SQLFORM because I think it is not customizable and I don't use FORM because I think writing pure html is a little bit faster than using HTML helpers. (Not using HTML helpers is my principle, not something related to web2py). Yet what do I do for improving SQLFORM? Nothing. I just have couple of ideas but I just have and I don't do anything about it. And when I'm in such situation how can I complain about SQLFORM? It is not fair. [1] http://groups.google.com/group/web2py/browse_thread/thread/e772b1e29f1cf833/fa2686e1c08be941? On Mar 4, 3:23 am, John Heenan wrote: > On Mar 4, 2:17 am, mdipierro wrote: > > > Some of the answers are funny. Mostly they are consistent with one > > exception. > > Perhaps a web2py hat is better than a t-shirt. I lost mine last > > summer. :-( > > Rather flippant given that someone has gone to some effort to set up a > survey to help out Web2py and that the survey responses were careful. > > As I see it the real goal of Web2py is to become more popular than > Django. I do not see this as healthy. > > Like it or not, for whatever reasons the Python community is > interested in Django and not in Web2py, as evidenced through > democratic votes of PyCon participants about what participants want to > attend presentations about. > > Web2py says it is for the enterprise yet who can identify where the > enterprise is in web2py that will ensure its long term future and > suitability for those really unexciting and boring issues such as paid > guaranteed support? The support base is tiny and lacks well known > names. > > I did not complete the survey. I find the concern over popularity > uncomfortable. I have never come anything of a comparable nature that > gets so anguished about its 'destiny'. To me it is a bad sign and > indicates a weakness. If the goal of Linux was to be more popular than > Windows then Linux would be long dead. There is some irony related to > issues I do not want to revive and never wanted raised, that Linux > lost the PR battle with Windows not because of Linux but because of > Apache. How dumb is that from those who obsessively hammered Windows > and Windows users as dumb? > > John Heenan > > > > > On Mar 3, 10:10 am, Wobmofo wrote: > > > > Here is the results (from only 11 responses): > > > >http://spreadsheets.google.com/pub?key=tKCyJuTYjVuWHWNFyPcZ51w&single... > > > >http://spreadsheets.google.com/viewanalytics?formkey=dEtDeUp1VFlqVnVX... > > > > In summary : > > > web2py is THE EASY web framework > > > django people don't like us > > > web2py's Authenticity and Passion is good > > > web2py's Identity (The art work, logos) need some works > > > web2py's Reputation is average > > > about half people here would wear a web2py T-Shirt > > > > For those who haven't take the survey it's not too late > > > :https://spreadsheets.google.com/viewform?formkey=dEtDeUp1VFlqVnVXSFdO... -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: web2py 1.76.2 is OUT - testing cron
mdipierro wrote: Let's make it 59.99 then. We want to avoid false positives more than false negatives. Sounds good. Over the past 2.5 hours the smallest value I saw was 59.9909880161. Rowdy -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: KeyError in web2py_modpython.py
I don't know what it is you are even trying to do, nor even have the code which is raising the error. The last web2py I downloaded doesn't have that file in it, it only has 'modpythonhandler.py'. On Mar 4, 1:13 pm, mdipierro wrote: > Can you propose a fix? I can write the patch if you can provide us > with a proposal. > > Massimo > > On Mar 3, 7:36 pm, Graham Dumpleton > wrote: > > > > > On Mar 4, 4:28 am, mdipierro wrote: > > > > problem is the error appear to be in mod_python, not web2py. > > > Not an issue with mod_python. > > > Web2Py is looking for SCRIPT_URL, this isn't put into > > req.subprocess_env by Apache core modules or mod_python under normal > > conditions. > > > The only time that a variable by the name of SCRIPT_URL is placed in > > req.subprocess_env is as a side effect of certain operations of > > mod_rewrite. > > > So, if mod_rewrite isn't used at all, or rewrite rules aren't coming > > into play, it will not be present. > > > The web2py package should be more tolerant of this and be able to cope > > with it not being present. So, it is arguably a web2py issue. > > > Graham > > > > On Mar 3, 11:22 am, fadehelix wrote: > > > > > Hi, > > > > > I have the same problem as @IRV. I can't use mod_wsgi because on my > > > > shared hosting i haven't own apache configuration. > > > > > regards > > > > > On 19 Sty, 14:44, mdipierro wrote: > > > > > > I will take a look but I stongly suggest you use mod_wsgi instead of > > > > > mod_python. > > > > > > On Jan 19, 4:57 am, IRV wrote: > > > > > > > Hello, > > > > > > > I am newish to python and new to both web2py and deploying code on > > > > > > the > > > > > > web so I apologize in advance if this is a very basic issue that is > > > > > > solved in the documentation but I can't seem to find a solution. > > > > > > > I followed the instructions from section 11.8 in the web2py book > > > > > > (i.e. > > > > > > the manual athttp://www.web2py.com/examples/default/docs), "Apache > > > > > > and mod_python in a shared hosting environment". The web2py app is > > > > > > within the public_html while 'Contents' is within a folder in > > > > > > public_html. I have created the two files as specified but when > > > > > > trying > > > > > > to view the /Contents/Resources/ folder in my browser (or any > > > > > > application within) I get a key error (shown below). I was wondering > > > > > > if you could shed some light on the problem and how I should go > > > > > > about > > > > > > solving it. > > > > > > > It seems that modpythonhandler.py is trying to parse this path that > > > > > > we > > > > > > send in and make sense of what controller/view to call and it's not > > > > > > able to figure it out properly based on the given url so that script > > > > > > could be making assumptions about where to find files that are > > > > > > incorrect. However, when i've tinkered with this and tried to drop > > > > > > in > > > > > > explicit URLs that make sense to me in the context it generates a > > > > > > similar Key Error. > > > > > > > ### > > > > > > ## > > > > > > > Phase: 'PythonHandler' > > > > > > Handler: 'web2py_modpython' > > > > > > > Traceback (most recent call last): > > > > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > > > > importer.py", line 1537, in HandlerDispatch > > > > > > default=default_handler, arg=req, silent=hlist.silent) > > > > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > > > > importer.py", line 1229, in _process_target > > > > > > result = _execute_target(config, req, object, arg) > > > > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > > > > importer.py", line 1128, in _execute_target > > > > > > result = object(arg) > > > > > > > File "/home/black/public_html/irv/Contents/Resources/ > > > > > > web2py_modpython.py", line 5, in handler > > > > > > req.subprocess_env['PATH_INFO'] = > > > > > > req.subprocess_env['SCRIPT_URL'] > > > > > > > KeyError: 'SCRIPT_URL' > > > > > > > ### > > > > > > ## > > > > > > > Many thanks for any help you can provide and please let me know if > > > > > > there is somewhere more appropriate to make this query and i'll move > > > > > > it there. > > > > > > > Regards, > > > > > > > Irv -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: web2py 1.76.2 is OUT - testing cron
Let's make it 59.99 then. We want to avoid false positives more than false negatives. On Mar 3, 7:08 pm, Rowdy wrote: > mdipierro wrote: > > g. as the changelog above said: > > > 1) major fix in cron (will I ever get this 100% right?) > > > Anyway, please check it in trunk. > > I did not get a chance to test cron changes in trunk before the 1.76.3 > release. > > Thank you for the speedy responses and update. > > I have had a look at the 1.76.3 cron, and have the following > observations. > > 1. The "execute every minute" problem is fixed :-) > > 2. The spelling error is still there "CRON Call retruned success" should > be "returned" > > 3. There is a problem with acquiring a lock. Not a web2py problem > particularly. As I understand it, Token.acquire() in cron.py checks > whether the last time cron started was more than 60 seconds ago. If > not, it does not try to acquire a lock, and the whole cron cycle > silently aborts (crondance(): if not cronmaster: return) until the next > minute. > > What I am seeing with a few extra debug statements is that while > acquiring a lock and testing "self.now - start >= 60" sometimes the > calculation is like 60.019073 and sometimes like 59.949932. > This seems to happen fairly randomly, so occasionally, but repeatably, > cron thinks the last execution was 59.999 seconds ago, and does not > start up. The next time thru the time difference is like 119.17984 > seconds, so the next cron does start. > > How about changing the test for >= 60 seconds to >= 59 seconds in > Token.acquire()? I tried that and, although it is difficult to state > authoritatively that it works forever, running my 5 minute and 10 minute > cron jobs for an hour or so has reliably run each job at the scheduled > times. > > Rowdy -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: wordpress
the designer can just use jquery.corner plugin for rounded corners. it is working with firefox, ie, opera and chrome very good. On Mar 4, 3:02 am, mdipierro wrote: > The nice thing about wordpress is that it is color neutral and it doed > almost everything with CSS not images. They have a few images like > this for example: > > http://s0.wp.com/wp-admin/images/gray-grad.png > > and they they have tabs like > > > > > > Title > > > > > > all the effect logic for all "someblock"s can be handled by one very > simple JS > > // start with all closed blocks > jQuery(document).ready(function(){jQuery('.inside').hide();}); > // slide-toggle when clicking on the handles > jQuery('handlediv, h3.handle').click(function() > {jQuery(this).parent().child('inside').slideToggle();}); > > the rounded corner are handled via CSS > > > .rounded { > -moz-border-radius-bottomleft:6px; > -moz-border-radius-bottomright:6px; > -moz-border-radius-topleft:6px; > -moz-border-radius-topright:6px; > width: 80%; > border: 1px solid #33;} > > h3 { > background:#DFDFDF url(images/gray-grad.png) repeat-x scroll left > top; > text-shadow:0 1px 0 #FF; > width: 100%;} > > > > Notice that when the ".inside" is closed the H3 has 4 rounded corners. > When the ".inside" is open the H3 has top rounded corners and and the > border of ".rounded" someblock has bottom rounded corners too, which > is a cool effect. > > It should be possible to apply the same logic to all admin views. > > There is not really much more than that except for the top menu (which > web2py needs) and the left accordion menu (which web2py admin does not > need). > > I am not saying this is easy. It takes time, understanding of CSS and > an artistic eye. > > Massimo > > On Mar 3, 5:57 pm, Richard wrote: > > > > > that would be great! > > There was an OSX admin style posted here some time back but can't find > > it right now ... > > > Richard > > > On Mar 4, 3:07 am, "Giovanni Giorgi" wrote: > > > > I am working on an application and I need to change the CSS. > > > I can grab the Wordpress CSS and adapt it... :) > > > After I finished the work, how do you like to send you the changes? > > > > On Wed, March 3, 2010 17:04, mdipierro wrote: > > > > I really like the look and feel of the management interface of > > > > wordpress (white/black/gray with rounder corner and js effects/menu). > > > > It would be nice to use their CSS and images in web2py admin. What do > > > > you think? Any volunteers to work on it? > > > > > -- > > > > You received this message because you are subscribed to the Google > > > > Groups > > > > "web2py-users" group. > > > > To post to this group, send email to web...@googlegroups.com. > > > > To unsubscribe from this group, send email to > > > > web2py+unsubscr...@googlegroups.com. > > > > For more options, visit this group at > > > >http://groups.google.com/group/web2py?hl=en. > > > > -- > > > Team Leader > > > Gioorgi.com Chief Editor -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: KeyError in web2py_modpython.py
Can you propose a fix? I can write the patch if you can provide us with a proposal. Massimo On Mar 3, 7:36 pm, Graham Dumpleton wrote: > On Mar 4, 4:28 am, mdipierro wrote: > > > problem is the error appear to be in mod_python, not web2py. > > Not an issue with mod_python. > > Web2Py is looking for SCRIPT_URL, this isn't put into > req.subprocess_env by Apache core modules or mod_python under normal > conditions. > > The only time that a variable by the name of SCRIPT_URL is placed in > req.subprocess_env is as a side effect of certain operations of > mod_rewrite. > > So, if mod_rewrite isn't used at all, or rewrite rules aren't coming > into play, it will not be present. > > The web2py package should be more tolerant of this and be able to cope > with it not being present. So, it is arguably a web2py issue. > > Graham > > > On Mar 3, 11:22 am, fadehelix wrote: > > > > Hi, > > > > I have the same problem as @IRV. I can't use mod_wsgi because on my > > > shared hosting i haven't own apache configuration. > > > > regards > > > > On 19 Sty, 14:44, mdipierro wrote: > > > > > I will take a look but I stongly suggest you use mod_wsgi instead of > > > > mod_python. > > > > > On Jan 19, 4:57 am, IRV wrote: > > > > > > Hello, > > > > > > I am newish to python and new to both web2py and deploying code on the > > > > > web so I apologize in advance if this is a very basic issue that is > > > > > solved in the documentation but I can't seem to find a solution. > > > > > > I followed the instructions from section 11.8 in the web2py book (i.e. > > > > > the manual athttp://www.web2py.com/examples/default/docs), "Apache > > > > > and mod_python in a shared hosting environment". The web2py app is > > > > > within the public_html while 'Contents' is within a folder in > > > > > public_html. I have created the two files as specified but when trying > > > > > to view the /Contents/Resources/ folder in my browser (or any > > > > > application within) I get a key error (shown below). I was wondering > > > > > if you could shed some light on the problem and how I should go about > > > > > solving it. > > > > > > It seems that modpythonhandler.py is trying to parse this path that we > > > > > send in and make sense of what controller/view to call and it's not > > > > > able to figure it out properly based on the given url so that script > > > > > could be making assumptions about where to find files that are > > > > > incorrect. However, when i've tinkered with this and tried to drop in > > > > > explicit URLs that make sense to me in the context it generates a > > > > > similar Key Error. > > > > > > ### > > > > > ## > > > > > > Phase: 'PythonHandler' > > > > > Handler: 'web2py_modpython' > > > > > > Traceback (most recent call last): > > > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > > > importer.py", line 1537, in HandlerDispatch > > > > > default=default_handler, arg=req, silent=hlist.silent) > > > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > > > importer.py", line 1229, in _process_target > > > > > result = _execute_target(config, req, object, arg) > > > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > > > importer.py", line 1128, in _execute_target > > > > > result = object(arg) > > > > > > File "/home/black/public_html/irv/Contents/Resources/ > > > > > web2py_modpython.py", line 5, in handler > > > > > req.subprocess_env['PATH_INFO'] = req.subprocess_env['SCRIPT_URL'] > > > > > > KeyError: 'SCRIPT_URL' > > > > > > ### > > > > > ## > > > > > > Many thanks for any help you can provide and please let me know if > > > > > there is somewhere more appropriate to make this query and i'll move > > > > > it there. > > > > > > Regards, > > > > > > Irv -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: * web2py's Brand *
I think that was the goal of this survey was to find out where web2py is currently in the minds of the community and those using it, and then where do we actually "want" to be. We can't dial a Stargate unless we know the point of origin! -Thadeus On Wed, Mar 3, 2010 at 7:23 PM, John Heenan wrote: > On Mar 4, 2:17 am, mdipierro wrote: >> Some of the answers are funny. Mostly they are consistent with one >> exception. >> Perhaps a web2py hat is better than a t-shirt. I lost mine last >> summer. :-( >> > > Rather flippant given that someone has gone to some effort to set up a > survey to help out Web2py and that the survey responses were careful. > > As I see it the real goal of Web2py is to become more popular than > Django. I do not see this as healthy. > > Like it or not, for whatever reasons the Python community is > interested in Django and not in Web2py, as evidenced through > democratic votes of PyCon participants about what participants want to > attend presentations about. > > Web2py says it is for the enterprise yet who can identify where the > enterprise is in web2py that will ensure its long term future and > suitability for those really unexciting and boring issues such as paid > guaranteed support? The support base is tiny and lacks well known > names. > > I did not complete the survey. I find the concern over popularity > uncomfortable. I have never come anything of a comparable nature that > gets so anguished about its 'destiny'. To me it is a bad sign and > indicates a weakness. If the goal of Linux was to be more popular than > Windows then Linux would be long dead. There is some irony related to > issues I do not want to revive and never wanted raised, that Linux > lost the PR battle with Windows not because of Linux but because of > Apache. How dumb is that from those who obsessively hammered Windows > and Windows users as dumb? > > John Heenan > > >> On Mar 3, 10:10 am, Wobmofo wrote: >> >> > Here is the results (from only 11 responses): >> >> >http://spreadsheets.google.com/pub?key=tKCyJuTYjVuWHWNFyPcZ51w&single... >> >> >http://spreadsheets.google.com/viewanalytics?formkey=dEtDeUp1VFlqVnVX... >> >> > In summary : >> > web2py is THE EASY web framework >> > django people don't like us >> > web2py's Authenticity and Passion is good >> > web2py's Identity (The art work, logos) need some works >> > web2py's Reputation is average >> > about half people here would wear a web2py T-Shirt >> >> > For those who haven't take the survey it's not too late >> > :https://spreadsheets.google.com/viewform?formkey=dEtDeUp1VFlqVnVXSFdO... > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: KeyError in web2py_modpython.py
On Mar 4, 4:28 am, mdipierro wrote: > problem is the error appear to be in mod_python, not web2py. Not an issue with mod_python. Web2Py is looking for SCRIPT_URL, this isn't put into req.subprocess_env by Apache core modules or mod_python under normal conditions. The only time that a variable by the name of SCRIPT_URL is placed in req.subprocess_env is as a side effect of certain operations of mod_rewrite. So, if mod_rewrite isn't used at all, or rewrite rules aren't coming into play, it will not be present. The web2py package should be more tolerant of this and be able to cope with it not being present. So, it is arguably a web2py issue. Graham > On Mar 3, 11:22 am, fadehelix wrote: > > > > > Hi, > > > I have the same problem as @IRV. I can't use mod_wsgi because on my > > shared hosting i haven't own apache configuration. > > > regards > > > On 19 Sty, 14:44, mdipierro wrote: > > > > I will take a look but I stongly suggest you use mod_wsgi instead of > > > mod_python. > > > > On Jan 19, 4:57 am, IRV wrote: > > > > > Hello, > > > > > I am newish to python and new to both web2py and deploying code on the > > > > web so I apologize in advance if this is a very basic issue that is > > > > solved in the documentation but I can't seem to find a solution. > > > > > I followed the instructions from section 11.8 in the web2py book (i.e. > > > > the manual athttp://www.web2py.com/examples/default/docs), "Apache > > > > and mod_python in a shared hosting environment". The web2py app is > > > > within the public_html while 'Contents' is within a folder in > > > > public_html. I have created the two files as specified but when trying > > > > to view the /Contents/Resources/ folder in my browser (or any > > > > application within) I get a key error (shown below). I was wondering > > > > if you could shed some light on the problem and how I should go about > > > > solving it. > > > > > It seems that modpythonhandler.py is trying to parse this path that we > > > > send in and make sense of what controller/view to call and it's not > > > > able to figure it out properly based on the given url so that script > > > > could be making assumptions about where to find files that are > > > > incorrect. However, when i've tinkered with this and tried to drop in > > > > explicit URLs that make sense to me in the context it generates a > > > > similar Key Error. > > > > > ### > > > > ## > > > > > Phase: 'PythonHandler' > > > > Handler: 'web2py_modpython' > > > > > Traceback (most recent call last): > > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > > importer.py", line 1537, in HandlerDispatch > > > > default=default_handler, arg=req, silent=hlist.silent) > > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > > importer.py", line 1229, in _process_target > > > > result = _execute_target(config, req, object, arg) > > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > > importer.py", line 1128, in _execute_target > > > > result = object(arg) > > > > > File "/home/black/public_html/irv/Contents/Resources/ > > > > web2py_modpython.py", line 5, in handler > > > > req.subprocess_env['PATH_INFO'] = req.subprocess_env['SCRIPT_URL'] > > > > > KeyError: 'SCRIPT_URL' > > > > > ### > > > > ## > > > > > Many thanks for any help you can provide and please let me know if > > > > there is somewhere more appropriate to make this query and i'll move > > > > it there. > > > > > Regards, > > > > > Irv -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: * web2py's Brand *
On Mar 4, 2:17 am, mdipierro wrote: > Some of the answers are funny. Mostly they are consistent with one > exception. > Perhaps a web2py hat is better than a t-shirt. I lost mine last > summer. :-( > Rather flippant given that someone has gone to some effort to set up a survey to help out Web2py and that the survey responses were careful. As I see it the real goal of Web2py is to become more popular than Django. I do not see this as healthy. Like it or not, for whatever reasons the Python community is interested in Django and not in Web2py, as evidenced through democratic votes of PyCon participants about what participants want to attend presentations about. Web2py says it is for the enterprise yet who can identify where the enterprise is in web2py that will ensure its long term future and suitability for those really unexciting and boring issues such as paid guaranteed support? The support base is tiny and lacks well known names. I did not complete the survey. I find the concern over popularity uncomfortable. I have never come anything of a comparable nature that gets so anguished about its 'destiny'. To me it is a bad sign and indicates a weakness. If the goal of Linux was to be more popular than Windows then Linux would be long dead. There is some irony related to issues I do not want to revive and never wanted raised, that Linux lost the PR battle with Windows not because of Linux but because of Apache. How dumb is that from those who obsessively hammered Windows and Windows users as dumb? John Heenan > On Mar 3, 10:10 am, Wobmofo wrote: > > > Here is the results (from only 11 responses): > > >http://spreadsheets.google.com/pub?key=tKCyJuTYjVuWHWNFyPcZ51w&single... > > >http://spreadsheets.google.com/viewanalytics?formkey=dEtDeUp1VFlqVnVX... > > > In summary : > > web2py is THE EASY web framework > > django people don't like us > > web2py's Authenticity and Passion is good > > web2py's Identity (The art work, logos) need some works > > web2py's Reputation is average > > about half people here would wear a web2py T-Shirt > > > For those who haven't take the survey it's not too late > > :https://spreadsheets.google.com/viewform?formkey=dEtDeUp1VFlqVnVXSFdO... -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: web2py 1.76.2 is OUT - testing cron
mdipierro wrote: g. as the changelog above said: 1) major fix in cron (will I ever get this 100% right?) Anyway, please check it in trunk. I did not get a chance to test cron changes in trunk before the 1.76.3 release. Thank you for the speedy responses and update. I have had a look at the 1.76.3 cron, and have the following observations. 1. The "execute every minute" problem is fixed :-) 2. The spelling error is still there "CRON Call retruned success" should be "returned" 3. There is a problem with acquiring a lock. Not a web2py problem particularly. As I understand it, Token.acquire() in cron.py checks whether the last time cron started was more than 60 seconds ago. If not, it does not try to acquire a lock, and the whole cron cycle silently aborts (crondance(): if not cronmaster: return) until the next minute. What I am seeing with a few extra debug statements is that while acquiring a lock and testing "self.now - start >= 60" sometimes the calculation is like 60.019073 and sometimes like 59.949932. This seems to happen fairly randomly, so occasionally, but repeatably, cron thinks the last execution was 59.999 seconds ago, and does not start up. The next time thru the time difference is like 119.17984 seconds, so the next cron does start. How about changing the test for >= 60 seconds to >= 59 seconds in Token.acquire()? I tried that and, although it is difficult to state authoritatively that it works forever, running my 5 minute and 10 minute cron jobs for an hour or so has reliably run each job at the scheduled times. Rowdy -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: wordpress
The nice thing about wordpress is that it is color neutral and it doed almost everything with CSS not images. They have a few images like this for example: http://s0.wp.com/wp-admin/images/gray-grad.png and they they have tabs like Title all the effect logic for all "someblock"s can be handled by one very simple JS // start with all closed blocks jQuery(document).ready(function(){jQuery('.inside').hide();}); // slide-toggle when clicking on the handles jQuery('handlediv, h3.handle').click(function() {jQuery(this).parent().child('inside').slideToggle();}); the rounded corner are handled via CSS .rounded { -moz-border-radius-bottomleft:6px; -moz-border-radius-bottomright:6px; -moz-border-radius-topleft:6px; -moz-border-radius-topright:6px; width: 80%; border: 1px solid #33; } h3 { background:#DFDFDF url(images/gray-grad.png) repeat-x scroll left top; text-shadow:0 1px 0 #FF; width: 100%; } Notice that when the ".inside" is closed the H3 has 4 rounded corners. When the ".inside" is open the H3 has top rounded corners and and the border of ".rounded" someblock has bottom rounded corners too, which is a cool effect. It should be possible to apply the same logic to all admin views. There is not really much more than that except for the top menu (which web2py needs) and the left accordion menu (which web2py admin does not need). I am not saying this is easy. It takes time, understanding of CSS and an artistic eye. Massimo On Mar 3, 5:57 pm, Richard wrote: > that would be great! > There was an OSX admin style posted here some time back but can't find > it right now ... > > Richard > > On Mar 4, 3:07 am, "Giovanni Giorgi" wrote: > > > I am working on an application and I need to change the CSS. > > I can grab the Wordpress CSS and adapt it... :) > > After I finished the work, how do you like to send you the changes? > > > On Wed, March 3, 2010 17:04, mdipierro wrote: > > > I really like the look and feel of the management interface of > > > wordpress (white/black/gray with rounder corner and js effects/menu). > > > It would be nice to use their CSS and images in web2py admin. What do > > > you think? Any volunteers to work on it? > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "web2py-users" group. > > > To post to this group, send email to web...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > web2py+unsubscr...@googlegroups.com. > > > For more options, visit this group at > > >http://groups.google.com/group/web2py?hl=en. > > > -- > > Team Leader > > Gioorgi.com Chief Editor -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Javascript Comment Bug
Templates are converted to python programs. In python the comments start with a # or are enclosed in triple quotes. So {{#...}} or {{'''...'''}} or {{"""..."""}} should work. What you have is a Javascript comment which is just another HTML string in the template. {{=review.id}} will still be converted to python code if you don't want that then try e.g. {{#review.id}} or just remove the block. Hope this helps. On Mar 3, 1:58 pm, Mengu wrote: > Hi, > > This is not a big deal. I have some inline javascript in my layout and > I have a commented line like "// url: /review/vote?reviewid={{= > review.id}}" (it was for rememering the url) but the template system > want to find review and print the id. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Helper functions
To handle the missing view you could modify the "generic" one to suit your needs. That is the one that gets executed when there is no corresponding view for a controller. On Mar 3, 6:57 pm, "mr.freeze" wrote: > Functions that take arguments or start with a double underscore are > not publicly exposed and can only be called by other functions. > > On Mar 3, 5:52 pm, minh wrote: > > > I have functions in my controller that require no view and should be > > inaccessible through the browser, i.e: helper functions, callbacks, > > etc > > > If the user tries to access the function > > throughhttp://../app/controller/function, > > I'll either get an 'invalid function' or the return values. > > > How do I prevent users from seeing this? I basically want the user to > > be redirected to an error page if there is no corresponding view. > > > Thanks in advance. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: wordpress
that would be great! There was an OSX admin style posted here some time back but can't find it right now ... Richard On Mar 4, 3:07 am, "Giovanni Giorgi" wrote: > I am working on an application and I need to change the CSS. > I can grab the Wordpress CSS and adapt it... :) > After I finished the work, how do you like to send you the changes? > > > > > > On Wed, March 3, 2010 17:04, mdipierro wrote: > > I really like the look and feel of the management interface of > > wordpress (white/black/gray with rounder corner and js effects/menu). > > It would be nice to use their CSS and images in web2py admin. What do > > you think? Any volunteers to work on it? > > > -- > > You received this message because you are subscribed to the Google Groups > > "web2py-users" group. > > To post to this group, send email to web...@googlegroups.com. > > To unsubscribe from this group, send email to > > web2py+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/web2py?hl=en. > > -- > Team Leader > Gioorgi.com Chief Editor -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Helper functions
Functions that take arguments or start with a double underscore are not publicly exposed and can only be called by other functions. On Mar 3, 5:52 pm, minh wrote: > I have functions in my controller that require no view and should be > inaccessible through the browser, i.e: helper functions, callbacks, > etc > > If the user tries to access the function > throughhttp://../app/controller/function, > I'll either get an 'invalid function' or the return values. > > How do I prevent users from seeing this? I basically want the user to > be redirected to an error page if there is no corresponding view. > > Thanks in advance. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Helper functions
I have functions in my controller that require no view and should be inaccessible through the browser, i.e: helper functions, callbacks, etc If the user tries to access the function through http://../app/controller/function, I'll either get an 'invalid function' or the return values. How do I prevent users from seeing this? I basically want the user to be redirected to an error page if there is no corresponding view. Thanks in advance. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: wordpress
With all the respects, i always thought that the admin interface could be better, it's because i think this is a great idea. +1 for wordpress-like css. On Wed, Mar 3, 2010 at 7:53 PM, mr.freeze wrote: > + 1. Admin is mighty but needs some makeup. > > On Mar 3, 10:50 am, "Giovanni Giorgi" wrote: > > I will start doing some tests on a demo app, > > then I will send it to you when ready. > > I plan to work on it on the weekend. > > Because Wordpress CSS is quite complex I will start with a prototype. > > Ciao ciao :) > > > > > > > > On Wed, March 3, 2010 17:27, mdipierro wrote: > > > You should be able to do this by just changing the views, css and > > > static files in web2py admin. You can just zip the admin folder and I > > > will check for differences. > > > > > On Mar 3, 10:07 am, "Giovanni Giorgi" wrote: > > >> I am working on an application and I need to change the CSS. > > >> I can grab the Wordpress CSS and adapt it... :) > > >> After I finished the work, how do you like to send you the changes? > > > > >> On Wed, March 3, 2010 17:04, mdipierro wrote: > > >> > I really like the look and feel of the management interface of > > >> > wordpress (white/black/gray with rounder corner and js > effects/menu). > > >> > It would be nice to use their CSS and images in web2py admin. What > do > > >> > you think? Any volunteers to work on it? > > > > >> > -- > > >> > You received this message because you are subscribed to the Google > > >> Groups > > >> > "web2py-users" group. > > >> > To post to this group, send email to web...@googlegroups.com. > > >> > To unsubscribe from this group, send email to > > >> > web2py+unsubscr...@googlegroups.com > . > > >> > For more options, visit this group at > > >> >http://groups.google.com/group/web2py?hl=en. > > > > >> -- > > >> Team Leader > > >> Gioorgi.com Chief Editor > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "web2py-users" group. > > > To post to this group, send email to web...@googlegroups.com. > > > To unsubscribe from this group, send email to > > > web2py+unsubscr...@googlegroups.com > . > > > For more options, visit this group at > > >http://groups.google.com/group/web2py?hl=en. > > > > -- > > Team Leader > > Gioorgi.com Chief Editor > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Javascript Comment Bug
a python fork? ;) AFAIK there are two styles of comments in python # single line comment " " " this is a multiline comment which spawns many lines " " " -- Kuba On Wed, Mar 3, 2010 at 11:28 PM, Mengu wrote: > which file should i edit to fix this? > > On Mar 3, 8:58 pm, Mengu wrote: >> Hi, >> >> This is not a big deal. I have some inline javascript in my layout and >> I have a commented line like "// url: /review/vote?reviewid={{= >> review.id}}" (it was for rememering the url) but the template system >> want to find review and print the id. > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Javascript Comment Bug
which file should i edit to fix this? On Mar 3, 8:58 pm, Mengu wrote: > Hi, > > This is not a big deal. I have some inline javascript in my layout and > I have a commented line like "// url: /review/vote?reviewid={{= > review.id}}" (it was for rememering the url) but the template system > want to find review and print the id. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: data type for .sum()?
way more cool! :) thanks. On Mar 3, 10:59 pm, mdipierro wrote: > this is simpler and works with 2.4 > > review.votes = review.votes or 0 > > On Mar 3, 2:49 pm, Mengu wrote: > > > > > for such operations i use, for example, review.votes = review.votes if > > review.votes is not None else 0 so i can do operations on it. > > > On Mar 3, 10:26 pm, mdipierro wrote: > > > > I can see there is a bug in web2py in that respect since it assumes > > > integer while it should be of the same type as the field being summed. > > > I fixed it in trunk. Anyway, that is not your problem. can I see how > > > you are using it? > > > > On Mar 3, 1:39 pm, Philip wrote: > > > > > I have a DAL field of type 'double'. What python data type is > > > > row._extra[db.table.field.sum()] for that field? > > > > > Assuming it was a python float, I tried to perform an arithmetic > > > > operation on it, and an error came back that the type was 'NoneType' > > > > so the operation could not be performed. I can't tell if this is an > > > > error on my part. > > > > > Thanks, > > > > Philip -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Online Users
after some discussions with b00m_chef on IRC, I have decided going with database. in the login action, i will insert the user record to the "onlineuser" table. in db.py which is executed on every request, i will update the lastactivity field on the onlinetable of the current user. and i will also delete the records those have done nothing in the last 10 minutes. so these all are done per request, i need to write a cron job which will make some cleaning. i hope i'm on the right way. On Mar 3, 9:01 pm, Mengu wrote: > no actually, for two reasons: > > 1) it says: "The counter is associated to each visitor, and is > incremented each time the visitor reloads the page. Different visitors > see different counters." > > 2) i need to keep the usernames and ids. > > i thought i could add something like "session.online_users = > session.online_users if hasattr(session, online_users) else {}" and > then in the login action i add the user to this dict. however since > every session info is kept seperate, i cannot get the global list. > different visitors see different online users which is only > themselves. :) > > On Mar 3, 8:39 pm, "mr.freeze" wrote: > > > > > This?:http://web2py.com/book/default/section/3/3?search=sessions > > > On Mar 3, 11:23 am, Mengu wrote: > > > > Hi, > > > > After logging in, how should I collect the online users? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: how to pass multiline output from controller to view and get it printed in multiline..
Thank you very much. This works fantastic! On Mar 3, 2:06 pm, mdipierro wrote: > def index(): > > return dict(message=message) > > and the view should be > {{extend 'layout.html'}} > {{=message}} > > On Mar 2, 10:56 pm, Babu wrote: > > > > > Sorry, I am new to python and web2py. I am running a python script to > > get multiline output of 'ifconfig' but I am not able to print it in > > multiline through view. My stand alone script works fine.. > > > Here is controller.. > > def index(): > > import paramiko > > import os > > > hostname = '' > > port = 22 > > username ='root' > > > paramiko.util.log_to_file('/var/tmp/paramiko.log') > > s = paramiko.SSHClient() > > s.load_system_host_keys() > > s.connect(hostname, port, username) > > stdin, stdout, stderr = s.exec_command('ifconfig -a') > > message = stdout.readlines() > > s.close() > > return message > > > here is my view: > > {{extend 'layout.html'}} > > This is the ifconfig/index.html template > > {{=BEAUTIFY(response._vars)}} > > {{=message}} > > > Here is the output: > > eth0 Link encap:Ethernet HWaddr 00:11:0A:55:25:12 BROADCAST MULTICAST > > MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 > > txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Base address: > > 0x5000 Memory:fdfe-fe00 eth1 Link encap:Ethernet HWaddr > > 00:11:0A:55:25:13 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 > > errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 > > overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) > > TX bytes:0 (0.0 b) Base address:0x5040 Memory:fdf6-fdf8 eth2 > > Link encap:Ethernet HWaddr 00:11:85:E7:67:AF inet > > addr:xxx...xxx Bcast:xxx..xxx.255 Mask:255.255.255.0 UP > > BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1057247994 > > errors:0 dropped:0 overruns:0 frame:0 TX packets:1251720 errors:0 > > dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes: > > 667206916895 (621.3 GiB) TX bytes:323342695 (308.3 MiB) Interrupt:233 > > eth3 Link encap:Ethernet HWaddr 00:11:85:E7:67:AE BROADCAST MULTICAST > > MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 > > txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) Interrupt:50 lo > > Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP > > LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:10655273 errors:0 > > dropped:0 overruns:0 frame:0 TX packets:10655273 errors:0 dropped:0 > > overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:1658158195 > > (1.5 GiB) TX bytes:1658158195 (1.5 GiB) > > > I want to get the output the following way: > > eth0 Link encap:Ethernet HWaddr 00:11:0A:55:25:12 > > BROADCAST MULTICAST MTU:1500 Metric:1 > > RX packets:0 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:1000 > > RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) > > Base address:0x5000 Memory:fdfe-fe00 > > > > > > > > Thanks for the help -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Problem with IS_IN_SET validator where valid list is dynamic
On Mar 3, 2010, at 11:29 AM, hschill...@nasa.gov wrote: > > Thanks for all the help again. It should have been obvious to me > before but I am sure the problem is that values coming back from > get_last_names() are different when the form is generated compared to > when it is validated. So I really need to just get the list of last > names once and it use it both times. > > The question is how to do that. Does this look like a good approach? I > tried it and it seems to work. > > if request.vars: >db.reg_test.last_name.requires = IS_IN_SET( session.last_names, > zero = "Select a Last Name" ) > else: >session.last_names = get_last_names() >db.reg_test.last_name.requires = IS_IN_SET( session.last_names, > zero = "Select a Last Name" ) That looks plausible. You could also use the test: if session.last_names is None: ... Notice, though, that if that fixes the validation, you've still got the problem that the user has selected a last name that's no longer in the database. If you can confirm that this is indeed the bug, you might want to leave the code as-is, since the validation failure is correct (in the sense that the selected item is not in the database). (And you can still have duplicate last names, which is another matter altogether.) -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Problem with IS_IN_SET validator where valid list is dynamic
An ajax autocomplete field would be a better option IMO. There is an experimental AutocompleteWidget in web2py but I believe it still has some issues plus it might not allow enough customization of the query depending on your particular needs in this case. You can create your own widget though. On Mar 3, 2:29 pm, "hschill...@nasa.gov" wrote: > Thanks for all the help again. It should have been obvious to me > before but I am sure the problem is that values coming back from > get_last_names() are different when the form is generated compared to > when it is validated. So I really need to just get the list of last > names once and it use it both times. > > The question is how to do that. Does this look like a good approach? I > tried it and it seems to work. > > if request.vars: > db.reg_test.last_name.requires = IS_IN_SET( session.last_names, > zero = "Select a Last Name" ) > else: > session.last_names = get_last_names() > db.reg_test.last_name.requires = IS_IN_SET( session.last_names, > zero = "Select a Last Name" ) -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: New features not documented in Book (2 ed)
On Mar 3, 2010, at 12:22 PM, mdipierro wrote: > you can already trash an application We want to trash the application, but not the application state (database, etc). > > On Mar 3, 1:34 pm, Yarko Tymciurak > wrote: >> On Mar 3, 11:48 am, Dragonfyre13 wrote: >> >>> If it's untarred over the top of the old one, any files that are not >>> in the new tar file will be left there. Since an app is supposed to >>> kind of be self contained, shouldn't it remove the old app, and then >>> untar to the directory? >> >> A trivially simple way to handle this would be to have the concept of >> an application "trash can", where >> a current app would be moved to "trash", and a new one installed. >> >> Another way would be to literally have app-area per-application >> repositories (hg), and literall just "pull" the new app (including any >> file deletions) - but this would mean the tar / w2p file format >> giving way to /letting mercurial manage updates in these circumstances >> (which would probably not be bad). >> >> - Yarko >> >> >> >>> On Feb 16, 11:08 am, Jonathan Lundell wrote: >> On Feb 16, 2010, at 8:32 AM, DenesL wrote: >> > Thanks (it is copy/paste of the original). > Do you know of any docs on usage?. >> On the admin app's app-installation page, there's a checkbox to enable overwriting of an uploaded app. If not checked, the behavior is the same as before: an attempt to install an app with the same name as an installed app fails. In the overwrite case, the new app simply gets untarred over the old app. >> > On Feb 16, 11:21 am, Jonathan Lundell wrote: >> On Feb 16, 2010, at 7:16 AM, DenesL wrote: >> >>> New features not documented in Book (2nd edition) >> >>> 1.75.2 >>> - no more cron with -S option >>> - ability to override/upgrade and app >> >> overwrite > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Online Users
http://www.mail-archive.com/web2py@googlegroups.com/msg16186.html here you can find more. -- Kuba -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Online Users
> 1) it says: "The counter is associated to each visitor, and is > incremented each time the visitor reloads the page. Different visitors > see different counters." yes, but you can make "users" timeout.. and f.e: update table with online users - on that basis. there is no way to get online users in a trivial way because users tend to shutdown their browsers w/o logging off or they go afk.. -- Kuba -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: New features not documented in Book (2 ed)
On Mar 3, 2:22 pm, mdipierro wrote: > you can already trash an application How? (From the admin interface? - I don't see a trash-can to "undo" this from...) In any case, the discussion was about "overrite installed app" behavior, and the problem with files no longer used, and managing that... One exploratory suggestion I made: Recoverable trash can (and perhaps replacing "overwrite existing app" with "replace existing app") Another: have local hg manage it (and I know you've already said you don't like this, because it means "one more distributon dependency" - but with discussion, there might be a non-trivial path to this, e.g.: declare local SCM, and admin plugins to handle hg, git, or svn, for example as messy as that is, it is _an approach_ to a solution to this problem). Anyway, this (I thought) was exploratory discussion - Yarko > > On Mar 3, 1:34 pm, Yarko Tymciurak > wrote: > > > On Mar 3, 11:48 am, Dragonfyre13 wrote: > > > > If it's untarred over the top of the old one, any files that are not > > > in the new tar file will be left there. Since an app is supposed to > > > kind of be self contained, shouldn't it remove the old app, and then > > > untar to the directory? > > > A trivially simple way to handle this would be to have the concept of > > an application "trash can", where > > a current app would be moved to "trash", and a new one installed. > > > Another way would be to literally have app-area per-application > > repositories (hg), and literall just "pull" the new app (including any > > file deletions) - but this would mean the tar / w2p file format > > giving way to /letting mercurial manage updates in these circumstances > > (which would probably not be bad). > > > - Yarko > > > > On Feb 16, 11:08 am, Jonathan Lundell wrote: > > > > > On Feb 16, 2010, at 8:32 AM, DenesL wrote: > > > > > > Thanks (it is copy/paste of the original). > > > > > Do you know of any docs on usage?. > > > > > On the admin app's app-installation page, there's a checkbox to enable > > > > overwriting of an uploaded app. If not checked, the behavior is the > > > > same as before: an attempt to install an app with the same name as an > > > > installed app fails. In the overwrite case, the new app simply gets > > > > untarred over the old app. > > > > > > On Feb 16, 11:21 am, Jonathan Lundell wrote: > > > > >> On Feb 16, 2010, at 7:16 AM, DenesL wrote: > > > > > >>> New features not documented in Book (2nd edition) > > > > > >>> 1.75.2 > > > > >>> - no more cron with -S option > > > > >>> - ability to override/upgrade and app > > > > > >> overwrite > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: data type for .sum()?
this is simpler and works with 2.4 review.votes = review.votes or 0 On Mar 3, 2:49 pm, Mengu wrote: > for such operations i use, for example, review.votes = review.votes if > review.votes is not None else 0 so i can do operations on it. > > On Mar 3, 10:26 pm, mdipierro wrote: > > > I can see there is a bug in web2py in that respect since it assumes > > integer while it should be of the same type as the field being summed. > > I fixed it in trunk. Anyway, that is not your problem. can I see how > > you are using it? > > > On Mar 3, 1:39 pm, Philip wrote: > > > > I have a DAL field of type 'double'. What python data type is > > > row._extra[db.table.field.sum()] for that field? > > > > Assuming it was a python float, I tried to perform an arithmetic > > > operation on it, and an error came back that the type was 'NoneType' > > > so the operation could not be performed. I can't tell if this is an > > > error on my part. > > > > Thanks, > > > Philip -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: data type for .sum()?
for such operations i use, for example, review.votes = review.votes if review.votes is not None else 0 so i can do operations on it. On Mar 3, 10:26 pm, mdipierro wrote: > I can see there is a bug in web2py in that respect since it assumes > integer while it should be of the same type as the field being summed. > I fixed it in trunk. Anyway, that is not your problem. can I see how > you are using it? > > On Mar 3, 1:39 pm, Philip wrote: > > > > > I have a DAL field of type 'double'. What python data type is > > row._extra[db.table.field.sum()] for that field? > > > Assuming it was a python float, I tried to perform an arithmetic > > operation on it, and an error came back that the type was 'NoneType' > > so the operation could not be performed. I can't tell if this is an > > error on my part. > > > Thanks, > > Philip -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: data type for .sum()?
I can see there is a bug in web2py in that respect since it assumes integer while it should be of the same type as the field being summed. I fixed it in trunk. Anyway, that is not your problem. can I see how you are using it? On Mar 3, 1:39 pm, Philip wrote: > I have a DAL field of type 'double'. What python data type is > row._extra[db.table.field.sum()] for that field? > > Assuming it was a python float, I tried to perform an arithmetic > operation on it, and an error came back that the type was 'NoneType' > so the operation could not be performed. I can't tell if this is an > error on my part. > > Thanks, > Philip -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: New features not documented in Book (2 ed)
you can already trash an application On Mar 3, 1:34 pm, Yarko Tymciurak wrote: > On Mar 3, 11:48 am, Dragonfyre13 wrote: > > > If it's untarred over the top of the old one, any files that are not > > in the new tar file will be left there. Since an app is supposed to > > kind of be self contained, shouldn't it remove the old app, and then > > untar to the directory? > > A trivially simple way to handle this would be to have the concept of > an application "trash can", where > a current app would be moved to "trash", and a new one installed. > > Another way would be to literally have app-area per-application > repositories (hg), and literall just "pull" the new app (including any > file deletions) - but this would mean the tar / w2p file format > giving way to /letting mercurial manage updates in these circumstances > (which would probably not be bad). > > - Yarko > > > > > On Feb 16, 11:08 am, Jonathan Lundell wrote: > > > > On Feb 16, 2010, at 8:32 AM, DenesL wrote: > > > > > Thanks (it is copy/paste of the original). > > > > Do you know of any docs on usage?. > > > > On the admin app's app-installation page, there's a checkbox to enable > > > overwriting of an uploaded app. If not checked, the behavior is the same > > > as before: an attempt to install an app with the same name as an > > > installed app fails. In the overwrite case, the new app simply gets > > > untarred over the old app. > > > > > On Feb 16, 11:21 am, Jonathan Lundell wrote: > > > >> On Feb 16, 2010, at 7:16 AM, DenesL wrote: > > > > >>> New features not documented in Book (2nd edition) > > > > >>> 1.75.2 > > > >>> - no more cron with -S option > > > >>> - ability to override/upgrade and app > > > > >> overwrite -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] data type for .sum()?
I have a DAL field of type 'double'. What python data type is row._extra[db.table.field.sum()] for that field? Assuming it was a python float, I tried to perform an arithmetic operation on it, and an error came back that the type was 'NoneType' so the operation could not be performed. I can't tell if this is an error on my part. Thanks, Philip -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: New features not documented in Book (2 ed)
On Mar 3, 11:48 am, Dragonfyre13 wrote: > If it's untarred over the top of the old one, any files that are not > in the new tar file will be left there. Since an app is supposed to > kind of be self contained, shouldn't it remove the old app, and then > untar to the directory? A trivially simple way to handle this would be to have the concept of an application "trash can", where a current app would be moved to "trash", and a new one installed. Another way would be to literally have app-area per-application repositories (hg), and literall just "pull" the new app (including any file deletions) - but this would mean the tar / w2p file format giving way to /letting mercurial manage updates in these circumstances (which would probably not be bad). - Yarko > > On Feb 16, 11:08 am, Jonathan Lundell wrote: > > > On Feb 16, 2010, at 8:32 AM, DenesL wrote: > > > > Thanks (it is copy/paste of the original). > > > Do you know of any docs on usage?. > > > On the admin app's app-installation page, there's a checkbox to enable > > overwriting of an uploaded app. If not checked, the behavior is the same as > > before: an attempt to install an app with the same name as an installed app > > fails. In the overwrite case, the new app simply gets untarred over the old > > app. > > > > On Feb 16, 11:21 am, Jonathan Lundell wrote: > > >> On Feb 16, 2010, at 7:16 AM, DenesL wrote: > > > >>> New features not documented in Book (2nd edition) > > > >>> 1.75.2 > > >>> - no more cron with -S option > > >>> - ability to override/upgrade and app > > > >> overwrite > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Problem with IS_IN_SET validator where valid list is dynamic
Thanks for all the help again. It should have been obvious to me before but I am sure the problem is that values coming back from get_last_names() are different when the form is generated compared to when it is validated. So I really need to just get the list of last names once and it use it both times. The question is how to do that. Does this look like a good approach? I tried it and it seems to work. if request.vars: db.reg_test.last_name.requires = IS_IN_SET( session.last_names, zero = "Select a Last Name" ) else: session.last_names = get_last_names() db.reg_test.last_name.requires = IS_IN_SET( session.last_names, zero = "Select a Last Name" ) -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Online Users
no actually, for two reasons: 1) it says: "The counter is associated to each visitor, and is incremented each time the visitor reloads the page. Different visitors see different counters." 2) i need to keep the usernames and ids. i thought i could add something like "session.online_users = session.online_users if hasattr(session, online_users) else {}" and then in the login action i add the user to this dict. however since every session info is kept seperate, i cannot get the global list. different visitors see different online users which is only themselves. :) On Mar 3, 8:39 pm, "mr.freeze" wrote: > This?:http://web2py.com/book/default/section/3/3?search=sessions > > On Mar 3, 11:23 am, Mengu wrote: > > > > > Hi, > > > After logging in, how should I collect the online users? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] newcron
I am trying to refactor cron and get rid of ExecuteOnCompletion I think I succeeded. In trunk: gluon/contrib/wsgihooks.py and gluon/contrib/cron.py are now unused and replaced by gluon/newcron.py gluon/newcron is very similar to old gluon/contrib/cron.py but cron.crontype is replaced by settings.web2py_crontype so the apps can check what type of cron is runnin. softcron is called directly by main.py/wsgibase and this should make web2py faster. If you try it, please post your finding here. Massimo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Javascript Comment Bug
Hi, This is not a big deal. I have some inline javascript in my layout and I have a commented line like "// url: /review/vote?reviewid={{= review.id}}" (it was for rememering the url) but the template system want to find review and print the id. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: wordpress
+ 1. Admin is mighty but needs some makeup. On Mar 3, 10:50 am, "Giovanni Giorgi" wrote: > I will start doing some tests on a demo app, > then I will send it to you when ready. > I plan to work on it on the weekend. > Because Wordpress CSS is quite complex I will start with a prototype. > Ciao ciao :) > > > > On Wed, March 3, 2010 17:27, mdipierro wrote: > > You should be able to do this by just changing the views, css and > > static files in web2py admin. You can just zip the admin folder and I > > will check for differences. > > > On Mar 3, 10:07 am, "Giovanni Giorgi" wrote: > >> I am working on an application and I need to change the CSS. > >> I can grab the Wordpress CSS and adapt it... :) > >> After I finished the work, how do you like to send you the changes? > > >> On Wed, March 3, 2010 17:04, mdipierro wrote: > >> > I really like the look and feel of the management interface of > >> > wordpress (white/black/gray with rounder corner and js effects/menu). > >> > It would be nice to use their CSS and images in web2py admin. What do > >> > you think? Any volunteers to work on it? > > >> > -- > >> > You received this message because you are subscribed to the Google > >> Groups > >> > "web2py-users" group. > >> > To post to this group, send email to web...@googlegroups.com. > >> > To unsubscribe from this group, send email to > >> > web2py+unsubscr...@googlegroups.com. > >> > For more options, visit this group at > >> >http://groups.google.com/group/web2py?hl=en. > > >> -- > >> Team Leader > >> Gioorgi.com Chief Editor > > > -- > > You received this message because you are subscribed to the Google Groups > > "web2py-users" group. > > To post to this group, send email to web...@googlegroups.com. > > To unsubscribe from this group, send email to > > web2py+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/web2py?hl=en. > > -- > Team Leader > Gioorgi.com Chief Editor -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Online Users
This?: http://web2py.com/book/default/section/3/3?search=sessions On Mar 3, 11:23 am, Mengu wrote: > Hi, > > After logging in, how should I collect the online users? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: New features not documented in Book (2 ed)
On Mar 3, 2010, at 9:48 AM, Dragonfyre13 wrote: > If it's untarred over the top of the old one, any files that are not > in the new tar file will be left there. Since an app is supposed to > kind of be self contained, shouldn't it remove the old app, and then > untar to the directory? Probably, though I'm not sure that it's always obvious which files to delete. For the app I'm working on, it'd be everything in (controllers,models,modules,private,views,static). I think. But is that always the right list? > > On Feb 16, 11:08 am, Jonathan Lundell wrote: >> On Feb 16, 2010, at 8:32 AM, DenesL wrote: >> >> >> >>> Thanks (it is copy/paste of the original). >>> Do you know of any docs on usage?. >> >> On the admin app's app-installation page, there's a checkbox to enable >> overwriting of an uploaded app. If not checked, the behavior is the same as >> before: an attempt to install an app with the same name as an installed app >> fails. In the overwrite case, the new app simply gets untarred over the old >> app. >> >>> On Feb 16, 11:21 am, Jonathan Lundell wrote: On Feb 16, 2010, at 7:16 AM, DenesL wrote: >> > New features not documented in Book (2nd edition) >> > 1.75.2 > - no more cron with -S option > - ability to override/upgrade and app >> overwrite > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: web2py 1.76.2 is OUT
No errors. On Mar 3, 11:39 am, mdipierro wrote: > Check if it works anyway. > > On Mar 3, 11:37 am, "mr.freeze" wrote: > > > I forgot to mention, I only get the error when I have cron=False in > > web2py.py. Sorry. There is no error when cron=True. > > > On Mar 3, 11:22 am, mdipierro wrote: > > > > g. as the changelog above said: > > > > 1) major fix in cron (will I ever get this 100% right?) > > > > Anyway, please check it in trunk. > > > > On Mar 3, 11:10 am, "mr.freeze" wrote: > > > > > Bad news. Cron errors on Windows running from source: > > > > > Exception in thread Thread-22: > > > > Traceback (most recent call last): > > > > File "c:\Python25\lib\threading.py", line 486, in __bootstrap_inner > > > > self.run() > > > > File "C:\Users\me\workspace\web2py\gluon\contrib\cron.py", line 81, > > > > in run > > > > if 60 <= now - self.cronmaster: # new minute, do the cron dance > > > > TypeError: unsupported operand type(s) for -: 'float' and 'NoneType' > > > > > On Mar 3, 11:00 am, mdipierro wrote: > > > > > > nobody downloaded it so I did and preserved the number. > > > > > > On Mar 3, 10:51 am, "mr.freeze" wrote: > > > > > > > You might need to repost again. auth and crud captcha had problems. > > > > > > > On Mar 3, 10:50 am, mdipierro wrote: > > > > > > > > made a build error. re-posting as 1.76.3. sorry. > > > > > > > > On Mar 3, 10:11 am, mdipierro wrote: > > > > > > > > > Main changes include: > > > > > > > > > 1) major fix in cron (will I ever get this 100% right?) > > > > > > > > 2) auth.settings.login_captcha and > > > > > > > > auth.settings.register_captcha > > > > > > > > 3) crud.settings.create_captcha and > > > > > > > > crud.settings.update_captcha > > > > > > > > 4) automatic update button in admin > > > > > > > > > 4) needs testing. To test-in: > > > > > > > > > - make a fresh web2py installation > > > > > > > > - located the file VERSION (under web2py/ on Win and under > > > > > > > > web2py.app/ > > > > > > > > Contents/Resources/ on Mac) > > > > > > > > - edit this file with a editor and set it to something old like > > > > > > > > 1.0.0 > > > > > > > > - restart web2py > > > > > > > > - in admin/default/site click on "upgrade web2py" > > > > > > > > - restart web2py > > > > > > > > - did it work? > > > > > > > > > Please let me know. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: New features not documented in Book (2 ed)
If it's untarred over the top of the old one, any files that are not in the new tar file will be left there. Since an app is supposed to kind of be self contained, shouldn't it remove the old app, and then untar to the directory? On Feb 16, 11:08 am, Jonathan Lundell wrote: > On Feb 16, 2010, at 8:32 AM, DenesL wrote: > > > > > Thanks (it is copy/paste of the original). > > Do you know of any docs on usage?. > > On the admin app's app-installation page, there's a checkbox to enable > overwriting of an uploaded app. If not checked, the behavior is the same as > before: an attempt to install an app with the same name as an installed app > fails. In the overwrite case, the new app simply gets untarred over the old > app. > > > On Feb 16, 11:21 am, Jonathan Lundell wrote: > >> On Feb 16, 2010, at 7:16 AM, DenesL wrote: > > >>> New features not documented in Book (2nd edition) > > >>> 1.75.2 > >>> - no more cron with -S option > >>> - ability to override/upgrade and app > > >> overwrite -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: web2py 1.76.2 is OUT
Check if it works anyway. On Mar 3, 11:37 am, "mr.freeze" wrote: > I forgot to mention, I only get the error when I have cron=False in > web2py.py. Sorry. There is no error when cron=True. > > On Mar 3, 11:22 am, mdipierro wrote: > > > g. as the changelog above said: > > > 1) major fix in cron (will I ever get this 100% right?) > > > Anyway, please check it in trunk. > > > On Mar 3, 11:10 am, "mr.freeze" wrote: > > > > Bad news. Cron errors on Windows running from source: > > > > Exception in thread Thread-22: > > > Traceback (most recent call last): > > > File "c:\Python25\lib\threading.py", line 486, in __bootstrap_inner > > > self.run() > > > File "C:\Users\me\workspace\web2py\gluon\contrib\cron.py", line 81, > > > in run > > > if 60 <= now - self.cronmaster: # new minute, do the cron dance > > > TypeError: unsupported operand type(s) for -: 'float' and 'NoneType' > > > > On Mar 3, 11:00 am, mdipierro wrote: > > > > > nobody downloaded it so I did and preserved the number. > > > > > On Mar 3, 10:51 am, "mr.freeze" wrote: > > > > > > You might need to repost again. auth and crud captcha had problems. > > > > > > On Mar 3, 10:50 am, mdipierro wrote: > > > > > > > made a build error. re-posting as 1.76.3. sorry. > > > > > > > On Mar 3, 10:11 am, mdipierro wrote: > > > > > > > > Main changes include: > > > > > > > > 1) major fix in cron (will I ever get this 100% right?) > > > > > > > 2) auth.settings.login_captcha and auth.settings.register_captcha > > > > > > > 3) crud.settings.create_captcha and crud.settings.update_captcha > > > > > > > 4) automatic update button in admin > > > > > > > > 4) needs testing. To test-in: > > > > > > > > - make a fresh web2py installation > > > > > > > - located the file VERSION (under web2py/ on Win and under > > > > > > > web2py.app/ > > > > > > > Contents/Resources/ on Mac) > > > > > > > - edit this file with a editor and set it to something old like > > > > > > > 1.0.0 > > > > > > > - restart web2py > > > > > > > - in admin/default/site click on "upgrade web2py" > > > > > > > - restart web2py > > > > > > > - did it work? > > > > > > > > Please let me know. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: KeyError in web2py_modpython.py
I have been using it on web2py.com for ~3 years until January 2010 without issues. On Mar 3, 11:33 am, Jonathan Lundell wrote: > On Mar 3, 2010, at 9:22 AM, fadehelix wrote: > > > Hi, > > > I have the same problem as @IRV. I can't use mod_wsgi because on my > > shared hosting i haven't own apache configuration. > > I've been using mod_proxy in that situation, and it seems to work OK. It's > straightforward, at least. Are there serious downsides? > > > > > regards > > > On 19 Sty, 14:44, mdipierro wrote: > >> I will take a look but I stongly suggest you use mod_wsgi instead of > >> mod_python. > > >> On Jan 19, 4:57 am, IRV wrote: > > >>> Hello, > > >>> I am newish to python and new to both web2py and deploying code on the > >>> web so I apologize in advance if this is a very basic issue that is > >>> solved in the documentation but I can't seem to find a solution. > > >>> I followed the instructions from section 11.8 in the web2py book (i.e. > >>> the manual athttp://www.web2py.com/examples/default/docs), "Apache > >>> and mod_python in a shared hosting environment". The web2py app is > >>> within the public_html while 'Contents' is within a folder in > >>> public_html. I have created the two files as specified but when trying > >>> to view the /Contents/Resources/ folder in my browser (or any > >>> application within) I get a key error (shown below). I was wondering > >>> if you could shed some light on the problem and how I should go about > >>> solving it. > > >>> It seems that modpythonhandler.py is trying to parse this path that we > >>> send in and make sense of what controller/view to call and it's not > >>> able to figure it out properly based on the given url so that script > >>> could be making assumptions about where to find files that are > >>> incorrect. However, when i've tinkered with this and tried to drop in > >>> explicit URLs that make sense to me in the context it generates a > >>> similar Key Error. > > >>> ### > >>> ## > > >>> Phase: 'PythonHandler' > >>> Handler: 'web2py_modpython' > > >>> Traceback (most recent call last): > > >>> File "/usr/local/lib/python2.6/site-packages/mod_python/ > >>> importer.py", line 1537, in HandlerDispatch > >>> default=default_handler, arg=req, silent=hlist.silent) > > >>> File "/usr/local/lib/python2.6/site-packages/mod_python/ > >>> importer.py", line 1229, in _process_target > >>> result = _execute_target(config, req, object, arg) > > >>> File "/usr/local/lib/python2.6/site-packages/mod_python/ > >>> importer.py", line 1128, in _execute_target > >>> result = object(arg) > > >>> File "/home/black/public_html/irv/Contents/Resources/ > >>> web2py_modpython.py", line 5, in handler > >>> req.subprocess_env['PATH_INFO'] = req.subprocess_env['SCRIPT_URL'] > > >>> KeyError: 'SCRIPT_URL' > > >>> ### > >>> ## > > >>> Many thanks for any help you can provide and please let me know if > >>> there is somewhere more appropriate to make this query and i'll move > >>> it there. > > >>> Regards, > > >>> Irv -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: web2py 1.76.2 is OUT
I forgot to mention, I only get the error when I have cron=False in web2py.py. Sorry. There is no error when cron=True. On Mar 3, 11:22 am, mdipierro wrote: > g. as the changelog above said: > > 1) major fix in cron (will I ever get this 100% right?) > > Anyway, please check it in trunk. > > On Mar 3, 11:10 am, "mr.freeze" wrote: > > > Bad news. Cron errors on Windows running from source: > > > Exception in thread Thread-22: > > Traceback (most recent call last): > > File "c:\Python25\lib\threading.py", line 486, in __bootstrap_inner > > self.run() > > File "C:\Users\me\workspace\web2py\gluon\contrib\cron.py", line 81, > > in run > > if 60 <= now - self.cronmaster: # new minute, do the cron dance > > TypeError: unsupported operand type(s) for -: 'float' and 'NoneType' > > > On Mar 3, 11:00 am, mdipierro wrote: > > > > nobody downloaded it so I did and preserved the number. > > > > On Mar 3, 10:51 am, "mr.freeze" wrote: > > > > > You might need to repost again. auth and crud captcha had problems. > > > > > On Mar 3, 10:50 am, mdipierro wrote: > > > > > > made a build error. re-posting as 1.76.3. sorry. > > > > > > On Mar 3, 10:11 am, mdipierro wrote: > > > > > > > Main changes include: > > > > > > > 1) major fix in cron (will I ever get this 100% right?) > > > > > > 2) auth.settings.login_captcha and auth.settings.register_captcha > > > > > > 3) crud.settings.create_captcha and crud.settings.update_captcha > > > > > > 4) automatic update button in admin > > > > > > > 4) needs testing. To test-in: > > > > > > > - make a fresh web2py installation > > > > > > - located the file VERSION (under web2py/ on Win and under > > > > > > web2py.app/ > > > > > > Contents/Resources/ on Mac) > > > > > > - edit this file with a editor and set it to something old like > > > > > > 1.0.0 > > > > > > - restart web2py > > > > > > - in admin/default/site click on "upgrade web2py" > > > > > > - restart web2py > > > > > > - did it work? > > > > > > > Please let me know. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: KeyError in web2py_modpython.py
On Mar 3, 2010, at 9:22 AM, fadehelix wrote: > Hi, > > I have the same problem as @IRV. I can't use mod_wsgi because on my > shared hosting i haven't own apache configuration. I've been using mod_proxy in that situation, and it seems to work OK. It's straightforward, at least. Are there serious downsides? > > regards > > On 19 Sty, 14:44, mdipierro wrote: >> I will take a look but I stongly suggest you use mod_wsgi instead of >> mod_python. >> >> On Jan 19, 4:57 am, IRV wrote: >> >> >> >>> Hello, >> >>> I am newish to python and new to both web2py and deploying code on the >>> web so I apologize in advance if this is a very basic issue that is >>> solved in the documentation but I can't seem to find a solution. >> >>> I followed the instructions from section 11.8 in the web2py book (i.e. >>> the manual athttp://www.web2py.com/examples/default/docs), "Apache >>> and mod_python in a shared hosting environment". The web2py app is >>> within the public_html while 'Contents' is within a folder in >>> public_html. I have created the two files as specified but when trying >>> to view the /Contents/Resources/ folder in my browser (or any >>> application within) I get a key error (shown below). I was wondering >>> if you could shed some light on the problem and how I should go about >>> solving it. >> >>> It seems that modpythonhandler.py is trying to parse this path that we >>> send in and make sense of what controller/view to call and it's not >>> able to figure it out properly based on the given url so that script >>> could be making assumptions about where to find files that are >>> incorrect. However, when i've tinkered with this and tried to drop in >>> explicit URLs that make sense to me in the context it generates a >>> similar Key Error. >> >>> ### >>> ## >> >>> Phase: 'PythonHandler' >>> Handler:'web2py_modpython' >> >>> Traceback (most recent call last): >> >>> File "/usr/local/lib/python2.6/site-packages/mod_python/ >>> importer.py", line 1537, in HandlerDispatch >>> default=default_handler, arg=req, silent=hlist.silent) >> >>> File "/usr/local/lib/python2.6/site-packages/mod_python/ >>> importer.py", line 1229, in _process_target >>> result = _execute_target(config, req, object, arg) >> >>> File "/usr/local/lib/python2.6/site-packages/mod_python/ >>> importer.py", line 1128, in _execute_target >>> result = object(arg) >> >>> File "/home/black/public_html/irv/Contents/Resources/ >>> web2py_modpython.py", line 5, in handler >>> req.subprocess_env['PATH_INFO'] = req.subprocess_env['SCRIPT_URL'] >> >>> KeyError: 'SCRIPT_URL' >> >>> ### >>> ## >> >>> Many thanks for any help you can provide and please let me know if >>> there is somewhere more appropriate to make this query and i'll move >>> it there. >> >>> Regards, >> >>> Irv -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: KeyError in web2py_modpython.py
problem is the error appear to be in mod_python, not web2py. On Mar 3, 11:22 am, fadehelix wrote: > Hi, > > I have the same problem as @IRV. I can't use mod_wsgi because on my > shared hosting i haven't own apache configuration. > > regards > > On 19 Sty, 14:44, mdipierro wrote: > > > I will take a look but I stongly suggest you use mod_wsgi instead of > > mod_python. > > > On Jan 19, 4:57 am, IRV wrote: > > > > Hello, > > > > I am newish to python and new to both web2py and deploying code on the > > > web so I apologize in advance if this is a very basic issue that is > > > solved in the documentation but I can't seem to find a solution. > > > > I followed the instructions from section 11.8 in the web2py book (i.e. > > > the manual athttp://www.web2py.com/examples/default/docs), "Apache > > > and mod_python in a shared hosting environment". The web2py app is > > > within the public_html while 'Contents' is within a folder in > > > public_html. I have created the two files as specified but when trying > > > to view the /Contents/Resources/ folder in my browser (or any > > > application within) I get a key error (shown below). I was wondering > > > if you could shed some light on the problem and how I should go about > > > solving it. > > > > It seems that modpythonhandler.py is trying to parse this path that we > > > send in and make sense of what controller/view to call and it's not > > > able to figure it out properly based on the given url so that script > > > could be making assumptions about where to find files that are > > > incorrect. However, when i've tinkered with this and tried to drop in > > > explicit URLs that make sense to me in the context it generates a > > > similar Key Error. > > > > ### > > > ## > > > > Phase: 'PythonHandler' > > > Handler: 'web2py_modpython' > > > > Traceback (most recent call last): > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > importer.py", line 1537, in HandlerDispatch > > > default=default_handler, arg=req, silent=hlist.silent) > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > importer.py", line 1229, in _process_target > > > result = _execute_target(config, req, object, arg) > > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > > importer.py", line 1128, in _execute_target > > > result = object(arg) > > > > File "/home/black/public_html/irv/Contents/Resources/ > > > web2py_modpython.py", line 5, in handler > > > req.subprocess_env['PATH_INFO'] = req.subprocess_env['SCRIPT_URL'] > > > > KeyError: 'SCRIPT_URL' > > > > ### > > > ## > > > > Many thanks for any help you can provide and please let me know if > > > there is somewhere more appropriate to make this query and i'll move > > > it there. > > > > Regards, > > > > Irv -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: KeyError in web2py_modpython.py
Hi, I have the same problem as @IRV. I can't use mod_wsgi because on my shared hosting i haven't own apache configuration. regards On 19 Sty, 14:44, mdipierro wrote: > I will take a look but I stongly suggest you use mod_wsgi instead of > mod_python. > > On Jan 19, 4:57 am, IRV wrote: > > > > > Hello, > > > I am newish to python and new to both web2py and deploying code on the > > web so I apologize in advance if this is a very basic issue that is > > solved in the documentation but I can't seem to find a solution. > > > I followed the instructions from section 11.8 in the web2py book (i.e. > > the manual athttp://www.web2py.com/examples/default/docs), "Apache > > and mod_python in a shared hosting environment". The web2py app is > > within the public_html while 'Contents' is within a folder in > > public_html. I have created the two files as specified but when trying > > to view the /Contents/Resources/ folder in my browser (or any > > application within) I get a key error (shown below). I was wondering > > if you could shed some light on the problem and how I should go about > > solving it. > > > It seems that modpythonhandler.py is trying to parse this path that we > > send in and make sense of what controller/view to call and it's not > > able to figure it out properly based on the given url so that script > > could be making assumptions about where to find files that are > > incorrect. However, when i've tinkered with this and tried to drop in > > explicit URLs that make sense to me in the context it generates a > > similar Key Error. > > > ### > > ## > > > Phase: 'PythonHandler' > > Handler: 'web2py_modpython' > > > Traceback (most recent call last): > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > importer.py", line 1537, in HandlerDispatch > > default=default_handler, arg=req, silent=hlist.silent) > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > importer.py", line 1229, in _process_target > > result = _execute_target(config, req, object, arg) > > > File "/usr/local/lib/python2.6/site-packages/mod_python/ > > importer.py", line 1128, in _execute_target > > result = object(arg) > > > File "/home/black/public_html/irv/Contents/Resources/ > > web2py_modpython.py", line 5, in handler > > req.subprocess_env['PATH_INFO'] = req.subprocess_env['SCRIPT_URL'] > > > KeyError: 'SCRIPT_URL' > > > ### > > ## > > > Many thanks for any help you can provide and please let me know if > > there is somewhere more appropriate to make this query and i'll move > > it there. > > > Regards, > > > Irv -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Online Users
Hi, After logging in, how should I collect the online users? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: web2py 1.76.2 is OUT
g. as the changelog above said: 1) major fix in cron (will I ever get this 100% right?) Anyway, please check it in trunk. On Mar 3, 11:10 am, "mr.freeze" wrote: > Bad news. Cron errors on Windows running from source: > > Exception in thread Thread-22: > Traceback (most recent call last): > File "c:\Python25\lib\threading.py", line 486, in __bootstrap_inner > self.run() > File "C:\Users\me\workspace\web2py\gluon\contrib\cron.py", line 81, > in run > if 60 <= now - self.cronmaster: # new minute, do the cron dance > TypeError: unsupported operand type(s) for -: 'float' and 'NoneType' > > On Mar 3, 11:00 am, mdipierro wrote: > > > nobody downloaded it so I did and preserved the number. > > > On Mar 3, 10:51 am, "mr.freeze" wrote: > > > > You might need to repost again. auth and crud captcha had problems. > > > > On Mar 3, 10:50 am, mdipierro wrote: > > > > > made a build error. re-posting as 1.76.3. sorry. > > > > > On Mar 3, 10:11 am, mdipierro wrote: > > > > > > Main changes include: > > > > > > 1) major fix in cron (will I ever get this 100% right?) > > > > > 2) auth.settings.login_captcha and auth.settings.register_captcha > > > > > 3) crud.settings.create_captcha and crud.settings.update_captcha > > > > > 4) automatic update button in admin > > > > > > 4) needs testing. To test-in: > > > > > > - make a fresh web2py installation > > > > > - located the file VERSION (under web2py/ on Win and under web2py.app/ > > > > > Contents/Resources/ on Mac) > > > > > - edit this file with a editor and set it to something old like 1.0.0 > > > > > - restart web2py > > > > > - in admin/default/site click on "upgrade web2py" > > > > > - restart web2py > > > > > - did it work? > > > > > > Please let me know. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: web2py 1.76.2 is OUT
Bad news. Cron errors on Windows running from source: Exception in thread Thread-22: Traceback (most recent call last): File "c:\Python25\lib\threading.py", line 486, in __bootstrap_inner self.run() File "C:\Users\me\workspace\web2py\gluon\contrib\cron.py", line 81, in run if 60 <= now - self.cronmaster: # new minute, do the cron dance TypeError: unsupported operand type(s) for -: 'float' and 'NoneType' On Mar 3, 11:00 am, mdipierro wrote: > nobody downloaded it so I did and preserved the number. > > On Mar 3, 10:51 am, "mr.freeze" wrote: > > > You might need to repost again. auth and crud captcha had problems. > > > On Mar 3, 10:50 am, mdipierro wrote: > > > > made a build error. re-posting as 1.76.3. sorry. > > > > On Mar 3, 10:11 am, mdipierro wrote: > > > > > Main changes include: > > > > > 1) major fix in cron (will I ever get this 100% right?) > > > > 2) auth.settings.login_captcha and auth.settings.register_captcha > > > > 3) crud.settings.create_captcha and crud.settings.update_captcha > > > > 4) automatic update button in admin > > > > > 4) needs testing. To test-in: > > > > > - make a fresh web2py installation > > > > - located the file VERSION (under web2py/ on Win and under web2py.app/ > > > > Contents/Resources/ on Mac) > > > > - edit this file with a editor and set it to something old like 1.0.0 > > > > - restart web2py > > > > - in admin/default/site click on "upgrade web2py" > > > > - restart web2py > > > > - did it work? > > > > > Please let me know. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: crud.select headers attribute
I found this requires the table name, such as in Annet's example. I tried to edit the book errata wiki, but the edit links are layed out way to the right (on FF) and they all seem to have "page isn't redirecting properly" errors. On Jan 17, 9:15 pm, Michael Howden wrote: > From my use of thecrud.select, I found it needed to be:headers={'name':'Name'} > (Field name only, not table name) > > On Nov 23 2009, 9:33 pm, annet wrote: > > > Massimo, > > > On page 218 of the web2py manual it says: > > >headers={'person.name', 'Name'} > > > That should read like: > > >headers={'person.name':'Name'} > > > Kind regards, > > > Annet -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: wordpress
I will start doing some tests on a demo app, then I will send it to you when ready. I plan to work on it on the weekend. Because Wordpress CSS is quite complex I will start with a prototype. Ciao ciao :) On Wed, March 3, 2010 17:27, mdipierro wrote: > You should be able to do this by just changing the views, css and > static files in web2py admin. You can just zip the admin folder and I > will check for differences. > > On Mar 3, 10:07 am, "Giovanni Giorgi" wrote: >> I am working on an application and I need to change the CSS. >> I can grab the Wordpress CSS and adapt it... :) >> After I finished the work, how do you like to send you the changes? >> >> >> >> On Wed, March 3, 2010 17:04, mdipierro wrote: >> > I really like the look and feel of the management interface of >> > wordpress (white/black/gray with rounder corner and js effects/menu). >> > It would be nice to use their CSS and images in web2py admin. What do >> > you think? Any volunteers to work on it? >> >> > -- >> > You received this message because you are subscribed to the Google >> Groups >> > "web2py-users" group. >> > To post to this group, send email to web...@googlegroups.com. >> > To unsubscribe from this group, send email to >> > web2py+unsubscr...@googlegroups.com. >> > For more options, visit this group at >> >http://groups.google.com/group/web2py?hl=en. >> >> -- >> Team Leader >> Gioorgi.com Chief Editor > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- Team Leader Gioorgi.com Chief Editor -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Limitby not working with Oracle with joins
I applied your top patch. I cannot test the second issue. If you can and want to send me a patch, I will be happy to include it. Thanks. On Mar 3, 10:57 am, SergeyPo wrote: > PATCH > > File gluon/sql.py, line #2987 in _select method of Set (SQLSet) class > should be: > > return '%s %s FROM (SELECT w_tmp.*, ROWNUM w_row FROM (SELECT %s FROM > %s%s%s) w_tmp WHERE ROWNUM<=%i) %s %s %s;' % (sql_s, sql_f, sql_f, > sql_t, sql_w, sql_o, lmax, sql_t, sql_w_row, sql_o) > > Previoisly was: > return '%s %s FROM (SELECT w_tmp.*, ROWNUM w_row FROM (SELECT %s FROM > %s%s%s) w_tmp WHERE ROWNUM<=%i) %s %s;' % (sql_s, sql_f, sql_f, sql_t, > sql_w, sql_o, lmax, sql_t, sql_w_row) > > This adds GROUP BY clause at the end of outer query and fixes error in > Oracle. This make possible queries with left join and grouping, e.g. > > db(cond).select(db.carts.ALL, db.carts.id.count(), > left=db.c_h.on(many_to_many), > groupby=db.carts.ALL, > orderby=carts_orderby, > limitby = session.carts_limitby) > > I tested this very extensively. > > Another problem I reported in this post: > > data = db(db.headers.id == db.alarms.header).select( > db.header.name, db.alarms.komment, > limitby=(0, 5) > ) > > To make it working in Oracle you should add all fields taking part in > WHERE clause to the list of fields to SELECT, i.e. > > data = db(db.headers.id == db.alarms.header).select( > db.header.name, db.alarms.komment, db.headers.id, db.alarms.header > limitby=(0, 5) > ) > > Since original version works in MySQL and SQLite, I think to make DAL > more DB-independent, this feature should be added to the _select > method. I could not (due to time restrictions) fix it myself in DAL, > but hopefully Massimo as author will make it easily. The resulting > query should include the fields in question in the most inner nested > request, i.e.: > > return '%s %s FROM (SELECT w_tmp.*, ROWNUM w_row FROM (SELECT %s > <<>> FROM %s%s%s) w_tmp WHERE ROWNUM<=%i) > %s %s %s;' % (sql_s, sql_f, sql_f, sql_t, sql_w, sql_o, lmax, sql_t, > sql_w_row, sql_o) > > leaving outer select with only the fields requested by SQLSet. > > Hope this helps, > > Sergey > > On Mar 1, 5:22 pm, SergeyPo wrote: > > > Limitby clause works when you select db.table.ALL > > > It must be possible to use aliases carefully to be able to select > > eequired fields only. > > > On 28 фев, 16:02, mdipierro wrote: > > > > No limitby is not working on Oracle with Joins. This is because Oracle > > > does not support pagination. We do it anyway using a trick (three > > > nested select as suggested by the oracle docs) but the trick breaks > > > down with joins. > > > > On Feb 27, 11:50 am, SergeyPo wrote: > > > > > If you remove limitby it works. I reported this error about 6 months > > > > ago, tried many workarounds and thought we fixed it. But somehow it > > > > appeared at my client's site. Versions 1.65 and current 1.75 > > > > downloaded this week. > > > > > On Feb 27, 8:20 pm, Thadeus Burgess wrote: > > > > > > Just going out on a limb here. > > > > > > Have you tried the query where it selects all columns instead of just > > > > > name and komment? > > > > > > -Thadeus > > > > > > 2010/2/27 SergeyPo : > > > > > > > SELECT headers1.name, alarms1.komment FROM (SELECT w_tmp.*, ROWNUM > > > > > > w_row FROM (SELECT headers1.name, alarms1.komment FROM headers1, > > > > > > alarms1 WHERE headers1.id=alarms1.header ORDER BY headers1.id, > > > > > > alarms1.id) w_tmp WHERE ROWNUM<=5) headers1, alarms1 WHERE > > > > > > headers1.id=alarms1.header AND w_row > 0; > > > > > > > Traceback (most recent call last): > > > > > > File "c:\web2pyNEW\gluon\restricted.py", line 173, in restricted > > > > > > exec ccode in environment > > > > > > File "c:/web2pyNEW/applications/test/controllers/default.py", line > > > > > > 11, > > > > > > in > > > > > > File "c:\web2pyNEW\gluon\globals.py", line 96, in > > > > > > self._caller = lambda f: f() > > > > > > File "c:/web2pyNEW/applications/test/controllers/default.py", line > > > > > > 7, > > > > > > in index > > > > > > data = > > > > > > db(db.headers1.id==db.alarms1.header).select(db.headers1.name, > > > > > > db.alarms1.komment, limitby=(0, 5)) > > > > > > File "c:\web2pyNEW\gluon\sql.py", line 3042, in select > > > > > > rows = response(query) > > > > > > File "c:\web2pyNEW\gluon\sql.py", line 3037, in response > > > > > > db._execute(query) > > > > > > File "c:\web2pyNEW\gluon\sql.py", line 970, in > > > > > > oracle_fix_execute(a,self._cursor.execute) > > > > > > File "c:\web2pyNEW\gluon\sql.py", line 603, in oracle_fix_execute > > > > > > return execute(command[:-1], args) > > > > > > DatabaseError: ORA-00904: "HEADERS1"."ID": invalid identifier > > > > > > > On 26 фев, 21:22, Thadeus Burgess wrote: > > > > > >> please print the output of > > > > > > >> db(db.headers.id == db.alarms.header)._select(db.header.name, > > > > > >>
[web2py] Re: web2py 1.76.2 is OUT
nobody downloaded it so I did and preserved the number. On Mar 3, 10:51 am, "mr.freeze" wrote: > You might need to repost again. auth and crud captcha had problems. > > On Mar 3, 10:50 am, mdipierro wrote: > > > made a build error. re-posting as 1.76.3. sorry. > > > On Mar 3, 10:11 am, mdipierro wrote: > > > > Main changes include: > > > > 1) major fix in cron (will I ever get this 100% right?) > > > 2) auth.settings.login_captcha and auth.settings.register_captcha > > > 3) crud.settings.create_captcha and crud.settings.update_captcha > > > 4) automatic update button in admin > > > > 4) needs testing. To test-in: > > > > - make a fresh web2py installation > > > - located the file VERSION (under web2py/ on Win and under web2py.app/ > > > Contents/Resources/ on Mac) > > > - edit this file with a editor and set it to something old like 1.0.0 > > > - restart web2py > > > - in admin/default/site click on "upgrade web2py" > > > - restart web2py > > > - did it work? > > > > Please let me know. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: deleting user groups
I'll take the patch On Mar 3, 10:51 am, "hamdy.a.farag" wrote: > Hi > > there's a problem in removing users , one has to delete the special > group (user_id ) for the user so that all his permissions are > dropped > why not adding a functionality to delete the special user_group > automatically ? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: crud and col3
thank you On Mar 3, 10:48 am, "mr.freeze" wrote: > There were a few issues so I sent you a patch to your patch to my > patch :) > Just a couple small bugs and added the same functionality to crud that > you did to auth. > > On Mar 3, 4:49 am, mdipierro wrote: > > > I applied most of your patch, but I left the syntax > > > auth.settings.captcha = Recaptcha(...) > > auth.settings.captcha.label = > > auth.settings.captcha.comment = > > > Please check it. > > > On Mar 2, 11:22 pm, "mr.freeze" wrote: > > > > On second thought, how would you get captcha into a crud form that is > > > built using request.args without crud.settings.[...]_captcha?: > > > > def data(): > > > return dict(form=crud()) > > > > Same goes for auth. > > > > My patch included a label for auth and cleaned up the captcha code > > > also. > > > > On Mar 2, 11:15 pm, "mr.freeze" wrote: > > > > > Sounds good to me. I was just mirroring what auth does. Should we > > > > change auth too? > > > > auth.login(captcha=...) > > > > If so, it should probably be added to SQLFORM constructor too. > > > > > On Mar 2, 11:04 pm, mdipierro wrote: > > > > > > please check trunk. I have implemented something closer to Yarko's > > > > > proposal: > > > > > > crud.settings.create_captcha= Recaptcha(request,"...","...") > > > > > crud.settings.create_captcha.label = 'Recaptcha' > > > > > crud.settings.create_captcha.comment = 'Try get it right!' > > > > > > do we really need create_captcha and update_captcha? Why not only one? > > > > > wouldn't it be better to pass the Recaptcha object to > > > > > crud.create() or crud.update()? This is not a setting that > > > > > should apply to all create and/or all update forms. > > > > > > On Mar 2, 10:09 pm, "mr.freeze" wrote: > > > > > > > Patch submitted. > > > > > > > On Mar 2, 8:33 pm, mdipierro wrote: > > > > > > > > I agree > > > > > > > capcha is a class so it should be possible to add structure to it. > > > > > > > > Massimo > > > > > > > > On Mar 2, 8:21 pm, Yarko Tymciurak > > > > > > > wrote: > > > > > > > > > On Mar 2, 6:01 pm, "mr.freeze" wrote: > > > > > > > > > > How about this?: > > > > > > > > > > crud.settings.captcha_label > > > > > > > > > auth.settings.captcha_label > > > > > > > > > I think mr.freeze has the right idea: _make_ it an "option" > > > > > > > > --- it's > > > > > > > > not like this is a convenience, rather a requirement: people > > > > > > > > do not > > > > > > > > need to "figure out" what code is saying! > > > > > > > > > crud.settings.captcha - is this is an element, then it > > > > > > > > _behooves_ it > > > > > > > > to have the same regularity as one expected when captcha was > > > > > > > > just used > > > > > > > > from tables with a widget), that is: > > > > > > > > > captcha should have structure: > > > > > > > > > captcha, captcha.label, etc. > > > > > > > > > I like this. > > > > > > > > > > On Mar 2, 5:24 pm, mdipierro wrote: > > > > > > > > > > > This > > > > > > > > > > db.mytable.captcha.label = "This is what I want to put here" > > > > > > > > > > is not an option because captcha is not field of mytable. > > > > > > > > > This is "how it was" a few revisions back - also, this is how > > > > > > > > developers _already_ think for forms, so that following the > > > > > > > > _same > > > > > > > > idiom_ within the framework makes good sense, and will make a > > > > > > > > developer's life easier. > > > > > > > > > > > This is the best I can think of assuming we give the id to > > > > > > > > > > the captcha > > > > > > > > > > row: > > > > > > > > > > > form.element(_id='captcha__row')[2].append(LABEL('Recaptcha')) > > > > > > > > > I much prefer the direction mr.freeze sees... but add a little > > > > > > > > structure > > > > > > > > more readable, easier to remember ("like" other label things > > > > > > > > people > > > > > > > > already use, e.g. table fields) > > > > > > > > > - Yarko > > > > > > > > > > > On Mar 2, 4:58 pm, Yarko Tymciurak > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > On Mar 2, 4:51 pm, "mr.freeze" > > > > > > > > > > > wrote: > > > > > > > > > > > > > Or you can do this: > > > > > > > > > > > > > crud.settings.create_captcha= > > > > > > > > > > > > DIV(Recaptcha(request,recaptcha_public,recaptcha_private),_id='captcha- > > > > > > > > > > > > wrapper') > > > > > > > > > > > > form = crud.create(db.things) > > > > > > > > > > > > form.element(_id='captcha- > > > > > > > > > > > > wrapper').parent.sibling('td').append(LABEL('Recaptcha')) > > > > > > > > > > > > return dict(form=form) > > > > > > > > > > > > ugh! > > > > > > > > > > > > db.mytable.captcha.label = "This is what I want to put > > > > > > > > > > > here" > > > > > > > > > > > > is definitely more concise, less obtuse, and more > > > > > > > > > > > readable. > > > > > > > > > > > > I trust Massimo will arrive at a more direct, clear (and > > > > > > > > > > > less > > > > > > > > > > > "clever", obtus
[web2py] Re: Limitby not working with Oracle with joins
PATCH File gluon/sql.py, line #2987 in _select method of Set (SQLSet) class should be: return '%s %s FROM (SELECT w_tmp.*, ROWNUM w_row FROM (SELECT %s FROM %s%s%s) w_tmp WHERE ROWNUM<=%i) %s %s %s;' % (sql_s, sql_f, sql_f, sql_t, sql_w, sql_o, lmax, sql_t, sql_w_row, sql_o) Previoisly was: return '%s %s FROM (SELECT w_tmp.*, ROWNUM w_row FROM (SELECT %s FROM %s%s%s) w_tmp WHERE ROWNUM<=%i) %s %s;' % (sql_s, sql_f, sql_f, sql_t, sql_w, sql_o, lmax, sql_t, sql_w_row) This adds GROUP BY clause at the end of outer query and fixes error in Oracle. This make possible queries with left join and grouping, e.g. db(cond).select(db.carts.ALL, db.carts.id.count(), left=db.c_h.on(many_to_many), groupby=db.carts.ALL, orderby=carts_orderby, limitby = session.carts_limitby) I tested this very extensively. Another problem I reported in this post: data = db(db.headers.id == db.alarms.header).select( db.header.name, db.alarms.komment, limitby=(0, 5) ) To make it working in Oracle you should add all fields taking part in WHERE clause to the list of fields to SELECT, i.e. data = db(db.headers.id == db.alarms.header).select( db.header.name, db.alarms.komment, db.headers.id, db.alarms.header limitby=(0, 5) ) Since original version works in MySQL and SQLite, I think to make DAL more DB-independent, this feature should be added to the _select method. I could not (due to time restrictions) fix it myself in DAL, but hopefully Massimo as author will make it easily. The resulting query should include the fields in question in the most inner nested request, i.e.: return '%s %s FROM (SELECT w_tmp.*, ROWNUM w_row FROM (SELECT %s <<>> FROM %s%s%s) w_tmp WHERE ROWNUM<=%i) %s %s %s;' % (sql_s, sql_f, sql_f, sql_t, sql_w, sql_o, lmax, sql_t, sql_w_row, sql_o) leaving outer select with only the fields requested by SQLSet. Hope this helps, Sergey On Mar 1, 5:22 pm, SergeyPo wrote: > Limitby clause works when you select db.table.ALL > > It must be possible to use aliases carefully to be able to select > eequired fields only. > > On 28 фев, 16:02, mdipierro wrote: > > > > > No limitby is not working on Oracle with Joins. This is because Oracle > > does not support pagination. We do it anyway using a trick (three > > nested select as suggested by the oracle docs) but the trick breaks > > down with joins. > > > On Feb 27, 11:50 am, SergeyPo wrote: > > > > If you remove limitby it works. I reported this error about 6 months > > > ago, tried many workarounds and thought we fixed it. But somehow it > > > appeared at my client's site. Versions 1.65 and current 1.75 > > > downloaded this week. > > > > On Feb 27, 8:20 pm, Thadeus Burgess wrote: > > > > > Just going out on a limb here. > > > > > Have you tried the query where it selects all columns instead of just > > > > name and komment? > > > > > -Thadeus > > > > > 2010/2/27 SergeyPo : > > > > > > SELECT headers1.name, alarms1.komment FROM (SELECT w_tmp.*, ROWNUM > > > > > w_row FROM (SELECT headers1.name, alarms1.komment FROM headers1, > > > > > alarms1 WHERE headers1.id=alarms1.header ORDER BY headers1.id, > > > > > alarms1.id) w_tmp WHERE ROWNUM<=5) headers1, alarms1 WHERE > > > > > headers1.id=alarms1.header AND w_row > 0; > > > > > > Traceback (most recent call last): > > > > > File "c:\web2pyNEW\gluon\restricted.py", line 173, in restricted > > > > > exec ccode in environment > > > > > File "c:/web2pyNEW/applications/test/controllers/default.py", line 11, > > > > > in > > > > > File "c:\web2pyNEW\gluon\globals.py", line 96, in > > > > > self._caller = lambda f: f() > > > > > File "c:/web2pyNEW/applications/test/controllers/default.py", line 7, > > > > > in index > > > > > data = db(db.headers1.id==db.alarms1.header).select(db.headers1.name, > > > > > db.alarms1.komment, limitby=(0, 5)) > > > > > File "c:\web2pyNEW\gluon\sql.py", line 3042, in select > > > > > rows = response(query) > > > > > File "c:\web2pyNEW\gluon\sql.py", line 3037, in response > > > > > db._execute(query) > > > > > File "c:\web2pyNEW\gluon\sql.py", line 970, in > > > > > oracle_fix_execute(a,self._cursor.execute) > > > > > File "c:\web2pyNEW\gluon\sql.py", line 603, in oracle_fix_execute > > > > > return execute(command[:-1], args) > > > > > DatabaseError: ORA-00904: "HEADERS1"."ID": invalid identifier > > > > > > On 26 фев, 21:22, Thadeus Burgess wrote: > > > > >> please print the output of > > > > > >> db(db.headers.id == db.alarms.header)._select(db.header.name, > > > > >> db.alarms.komment, limitby=(0,5)) > > > > > >> -Thadeus > > > > > >> On Fri, Feb 26, 2010 at 12:00 PM, SergeyPo > > > > >> wrote: > > > > >> > Limitby clause still is not working with Oracle backend when used > > > > >> > in > > > > >> > queries that have any kind of join, left or inner. > > > > > >> > db.define_table('headers', > > > > >> > SQLField('name', 'string') > > > > >> > ) > > > > > >> > db
[web2py] deleting user groups
Hi there's a problem in removing users , one has to delete the special group (user_id )for the user so that all his permissions are dropped why not adding a functionality to delete the special user_group automatically ? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: web2py 1.76.2 is OUT
You might need to repost again. auth and crud captcha had problems. On Mar 3, 10:50 am, mdipierro wrote: > made a build error. re-posting as 1.76.3. sorry. > > On Mar 3, 10:11 am, mdipierro wrote: > > > Main changes include: > > > 1) major fix in cron (will I ever get this 100% right?) > > 2) auth.settings.login_captcha and auth.settings.register_captcha > > 3) crud.settings.create_captcha and crud.settings.update_captcha > > 4) automatic update button in admin > > > 4) needs testing. To test-in: > > > - make a fresh web2py installation > > - located the file VERSION (under web2py/ on Win and under web2py.app/ > > Contents/Resources/ on Mac) > > - edit this file with a editor and set it to something old like 1.0.0 > > - restart web2py > > - in admin/default/site click on "upgrade web2py" > > - restart web2py > > - did it work? > > > Please let me know. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: web2py 1.76.2 is OUT
made a build error. re-posting as 1.76.3. sorry. On Mar 3, 10:11 am, mdipierro wrote: > Main changes include: > > 1) major fix in cron (will I ever get this 100% right?) > 2) auth.settings.login_captcha and auth.settings.register_captcha > 3) crud.settings.create_captcha and crud.settings.update_captcha > 4) automatic update button in admin > > 4) needs testing. To test-in: > > - make a fresh web2py installation > - located the file VERSION (under web2py/ on Win and under web2py.app/ > Contents/Resources/ on Mac) > - edit this file with a editor and set it to something old like 1.0.0 > - restart web2py > - in admin/default/site click on "upgrade web2py" > - restart web2py > - did it work? > > Please let me know. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: crud and col3
There were a few issues so I sent you a patch to your patch to my patch :) Just a couple small bugs and added the same functionality to crud that you did to auth. On Mar 3, 4:49 am, mdipierro wrote: > I applied most of your patch, but I left the syntax > > auth.settings.captcha = Recaptcha(...) > auth.settings.captcha.label = > auth.settings.captcha.comment = > > Please check it. > > On Mar 2, 11:22 pm, "mr.freeze" wrote: > > > On second thought, how would you get captcha into a crud form that is > > built using request.args without crud.settings.[...]_captcha?: > > > def data(): > > return dict(form=crud()) > > > Same goes for auth. > > > My patch included a label for auth and cleaned up the captcha code > > also. > > > On Mar 2, 11:15 pm, "mr.freeze" wrote: > > > > Sounds good to me. I was just mirroring what auth does. Should we > > > change auth too? > > > auth.login(captcha=...) > > > If so, it should probably be added to SQLFORM constructor too. > > > > On Mar 2, 11:04 pm, mdipierro wrote: > > > > > please check trunk. I have implemented something closer to Yarko's > > > > proposal: > > > > > crud.settings.create_captcha= Recaptcha(request,"...","...") > > > > crud.settings.create_captcha.label = 'Recaptcha' > > > > crud.settings.create_captcha.comment = 'Try get it right!' > > > > > do we really need create_captcha and update_captcha? Why not only one? > > > > wouldn't it be better to pass the Recaptcha object to > > > > crud.create() or crud.update()? This is not a setting that > > > > should apply to all create and/or all update forms. > > > > > On Mar 2, 10:09 pm, "mr.freeze" wrote: > > > > > > Patch submitted. > > > > > > On Mar 2, 8:33 pm, mdipierro wrote: > > > > > > > I agree > > > > > > capcha is a class so it should be possible to add structure to it. > > > > > > > Massimo > > > > > > > On Mar 2, 8:21 pm, Yarko Tymciurak > > > > > > wrote: > > > > > > > > On Mar 2, 6:01 pm, "mr.freeze" wrote: > > > > > > > > > How about this?: > > > > > > > > > crud.settings.captcha_label > > > > > > > > auth.settings.captcha_label > > > > > > > > I think mr.freeze has the right idea: _make_ it an "option" --- > > > > > > > it's > > > > > > > not like this is a convenience, rather a requirement: people do > > > > > > > not > > > > > > > need to "figure out" what code is saying! > > > > > > > > crud.settings.captcha - is this is an element, then it _behooves_ > > > > > > > it > > > > > > > to have the same regularity as one expected when captcha was just > > > > > > > used > > > > > > > from tables with a widget), that is: > > > > > > > > captcha should have structure: > > > > > > > > captcha, captcha.label, etc. > > > > > > > > I like this. > > > > > > > > > On Mar 2, 5:24 pm, mdipierro wrote: > > > > > > > > > > This > > > > > > > > > db.mytable.captcha.label = "This is what I want to put here" > > > > > > > > > is not an option because captcha is not field of mytable. > > > > > > > > This is "how it was" a few revisions back - also, this is how > > > > > > > developers _already_ think for forms, so that following the _same > > > > > > > idiom_ within the framework makes good sense, and will make a > > > > > > > developer's life easier. > > > > > > > > > > This is the best I can think of assuming we give the id to > > > > > > > > > the captcha > > > > > > > > > row: > > > > > > > > > > form.element(_id='captcha__row')[2].append(LABEL('Recaptcha')) > > > > > > > > I much prefer the direction mr.freeze sees... but add a little > > > > > > > structure > > > > > > > more readable, easier to remember ("like" other label things > > > > > > > people > > > > > > > already use, e.g. table fields) > > > > > > > > - Yarko > > > > > > > > > > On Mar 2, 4:58 pm, Yarko Tymciurak > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > On Mar 2, 4:51 pm, "mr.freeze" wrote: > > > > > > > > > > > > Or you can do this: > > > > > > > > > > > > crud.settings.create_captcha= > > > > > > > > > > > DIV(Recaptcha(request,recaptcha_public,recaptcha_private),_id='captcha- > > > > > > > > > > > wrapper') > > > > > > > > > > > form = crud.create(db.things) > > > > > > > > > > > form.element(_id='captcha- > > > > > > > > > > > wrapper').parent.sibling('td').append(LABEL('Recaptcha')) > > > > > > > > > > > return dict(form=form) > > > > > > > > > > > ugh! > > > > > > > > > > > db.mytable.captcha.label = "This is what I want to put here" > > > > > > > > > > > is definitely more concise, less obtuse, and more readable. > > > > > > > > > > > I trust Massimo will arrive at a more direct, clear (and > > > > > > > > > > less > > > > > > > > > > "clever", obtuse) solution. > > > > > > > > > > > - Yarko > > > > > > > > > > > > On Mar 2, 3:41 pm, Yarko Tymciurak > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > On Mar 2, 1:28 pm, mdipierro > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > The auth.settings.update_captcha was introduced in > > >
[web2py] Re: wordpress
You should be able to do this by just changing the views, css and static files in web2py admin. You can just zip the admin folder and I will check for differences. On Mar 3, 10:07 am, "Giovanni Giorgi" wrote: > I am working on an application and I need to change the CSS. > I can grab the Wordpress CSS and adapt it... :) > After I finished the work, how do you like to send you the changes? > > > > On Wed, March 3, 2010 17:04, mdipierro wrote: > > I really like the look and feel of the management interface of > > wordpress (white/black/gray with rounder corner and js effects/menu). > > It would be nice to use their CSS and images in web2py admin. What do > > you think? Any volunteers to work on it? > > > -- > > You received this message because you are subscribed to the Google Groups > > "web2py-users" group. > > To post to this group, send email to web...@googlegroups.com. > > To unsubscribe from this group, send email to > > web2py+unsubscr...@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/web2py?hl=en. > > -- > Team Leader > Gioorgi.com Chief Editor -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] wordpress
I am working on an application and I need to change the CSS. I can grab the Wordpress CSS and adapt it... :) After I finished the work, how do you like to send you the changes? On Wed, March 3, 2010 17:04, mdipierro wrote: > I really like the look and feel of the management interface of > wordpress (white/black/gray with rounder corner and js effects/menu). > It would be nice to use their CSS and images in web2py admin. What do > you think? Any volunteers to work on it? > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- Team Leader Gioorgi.com Chief Editor -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: * web2py's Brand *
Some of the answers are funny. Mostly they are consistent with one exception. Perhaps a web2py hat is better than a t-shirt. I lost mine last summer. :-( On Mar 3, 10:10 am, Wobmofo wrote: > Here is the results (from only 11 responses): > > http://spreadsheets.google.com/pub?key=tKCyJuTYjVuWHWNFyPcZ51w&single... > > http://spreadsheets.google.com/viewanalytics?formkey=dEtDeUp1VFlqVnVX... > > In summary : > web2py is THE EASY web framework > django people don't like us > web2py's Authenticity and Passion is good > web2py's Identity (The art work, logos) need some works > web2py's Reputation is average > about half people here would wear a web2py T-Shirt > > For those who haven't take the survey it's not too late > :https://spreadsheets.google.com/viewform?formkey=dEtDeUp1VFlqVnVXSFdO... -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] web2py 1.76.2 is OUT
Main changes include: 1) major fix in cron (will I ever get this 100% right?) 2) auth.settings.login_captcha and auth.settings.register_captcha 3) crud.settings.create_captcha and crud.settings.update_captcha 4) automatic update button in admin 4) needs testing. To test-in: - make a fresh web2py installation - located the file VERSION (under web2py/ on Win and under web2py.app/ Contents/Resources/ on Mac) - edit this file with a editor and set it to something old like 1.0.0 - restart web2py - in admin/default/site click on "upgrade web2py" - restart web2py - did it work? Please let me know. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: * web2py's Brand *
Here is the results (from only 11 responses): http://spreadsheets.google.com/pub?key=tKCyJuTYjVuWHWNFyPcZ51w&single=true&gid=0&output=html http://spreadsheets.google.com/viewanalytics?formkey=dEtDeUp1VFlqVnVXSFdORnlQY1o1MXc6MA In summary : web2py is THE EASY web framework django people don't like us web2py's Authenticity and Passion is good web2py's Identity (The art work, logos) need some works web2py's Reputation is average about half people here would wear a web2py T-Shirt For those who haven't take the survey it's not too late : https://spreadsheets.google.com/viewform?formkey=dEtDeUp1VFlqVnVXSFdORnlQY1o1MXc6MA -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] wordpress
I really like the look and feel of the management interface of wordpress (white/black/gray with rounder corner and js effects/menu). It would be nice to use their CSS and images in web2py admin. What do you think? Any volunteers to work on it? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Web2Py Book application
I will post it but I want to clean it up first. It was written a bit in a hurry. On Mar 3, 7:47 am, "Giovanni Giorgi" wrote: > Hi all, > I am new to web2py, even if I am following it > from time to time (http://gioorgi.com/2009/web2py/) > > I have seen the Book application used for the web2py book > http://web2py.com/book/ > Where Is it possible to download the source of this application? > I'd like to study it for learning web2py... > Thank you! > > -- > Team Leader > Gioorgi.com Chief Editor -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
Re: [web2py] Re: Ajax query
Just append to the title of the post [SOLVED] Glad you fixed it! -Thadeus On Wed, Mar 3, 2010 at 5:39 AM, LB22 wrote: > I don't actually know how to mark this as solved, but please consider > it so. > > On Mar 3, 10:25 am, LB22 wrote: >> OK, Thadeus was right on the money with regard to my problem. >> >> I don't know how I overlooked it, but I had a line of "legacy code" in >> my function that requested the refering page. This is what was being >> returned in the ajax callback. As soon as I removed that line, I no >> longer had the problem with a page loading within a page. >> >> Thanks for all the help :o) >> >> I'll mark this as solved. >> >> LB >> >> On Mar 3, 2:32 am, mdipierro wrote: >> >> >> >> > You may not be calling vote_yay. Try replace >> >> > ajax('vote_yay', ['sreq_id'],'sreq{{=sreq.id}}'); >> >> > with >> >> > ajax('{{=URL(r=request,f='vote_yay')}}', >> > ['sreq_id'],'sreq{{=sreq.id}}'); >> >> > On Mar 2, 7:07 pm, minh wrote: >> >> > > I'm basically just having problems that Thadeus seemed to have >> > > described above. >> >> > > I'm trying to use theajax() function but it seems like an entire page >> > > is being fed into the target rather than a string I'm returning. >> >> > > This is in my view, >> >> > > Votes received: {{=votes_received}} >> > > >> > > [Vote Yay] >> >> > > The function vote_yay returns a string. However, doesn't seem like the >> > > function is being executed and an entire page is fed into the target. >> >> > > Is it still OK to use theajaxfunction? Sorry for hijacking the >> > > thread btw :/ >> >> > > On Mar 2, 3:25 pm, mdipierro wrote: >> >> > > > I do not even remember what is in the manual. Plugins are the >> > > > future... even if they may change. >> >> > > > On Mar 2, 5:19 pm, minh wrote: >> >> > > > > Should I disregard the example in the manual or is there a simple >> > > > > tweak I can do to get it working. >> >> > > > > The plugin you mentioned seems a little more involved... don't want >> > > > > to >> > > > > get into it if there's an easy fix for the former method. >> >> > > > > On Mar 2, 2:42 pm, mdipierro wrote: >> >> > > > > > The manual is old in this respect. I assume you have seen >> > > > > > this:http://web2py.com/plugins/default/rating >> >> > > > > > On Mar 2, 4:36 pm, minh wrote: >> >> > > > > > > I'm trying to implement the voting/rating example from the >> > > > > > > manual and >> > > > > > > I'm getting a similar issue with the page overlapping. >> >> > > > > > > On Mar 2, 2:26 pm, LB22 wrote: >> >> > > > > > > > Hi Thadeus, >> >> > > > > > > > Thanks for your input. Perhaps you could provide a couple of >> > > > > > > > examples, >> > > > > > > > as I'm a little confused. >> >> > > > > > > > In my example, I intended the function 'mark' to only return >> > > > > > > > this: >> >> > > > > > > > DIV(IMG(_src=URL(r=request,c='static',f='icons/ >> > > > > > > > star.png'),_class='icons',_title='Remove from >> > > > > > > > favourites',_alt='Remove >> > > > > > > > from favourites'),_id="fav").xml() >> >> > > > > > > > Basically a div containing an image, which I thought would be >> > > > > > > > serialized as that single portion, not as an entire view, >> > > > > > > > resulting in >> > > > > > > > the page within page problem. Cleary still have much to learn. >> > > > > > > > Could >> > > > > > > > you help me out further? >> >> > > > > > > > Thanks >> >> > > > > > > > On Mar 2, 9:14 pm, Thadeus Burgess >> > > > > > > > wrote: >> >> > > > > > > > > You are returning a view that contains {{extend >> > > > > > > > > "layout.html"}} when >> > > > > > > > > you return theajax, so since your returning the entire page >> > > > > > > > > html... >> > > > > > > > > you insert the page over again :) >> >> > > > > > > > > You can >> >> > > > > > > > > A) Return a view that does not extend layout >> > > > > > > > > B) Return a string that represents the html instead of a dict >> > > > > > > > > C) Call it with .json instead of .html so that your dict gets >> > > > > > > > > serialized into JSON and returned. >> >> > > > > > > > > -Thadeus >> >> > > > > > > > > On Tue, Mar 2, 2010 at 3:03 PM, LB22 >> > > > > > > > > wrote: >> > > > > > > > > > OK, so I tried upgrading, but still the same result I'm >> > > > > > > > > > afraid. I >> > > > > > > > > > figured I must be doing something wrong. Is there another >> > > > > > > > > > method I >> > > > > > > > > > could try to acheive the same result? Or do you know what >> > > > > > > > > > I might be >> > > > > > > > > > doing wrong? >> >> > > > > > > > > > I'm just trying to mark something (by inserting a record >> > > > > > > > > > into my db), >> > > > > > > > > > and replace the existing image to reflect the current >> > > > > > > > > > state (marked/ >> > > > > > > > > > unmarked). >> >> > > > > > > > > > Thanks >> >> > > > > > > > > > On 2 Mar, 20:37, LB22 wrote: >> > > > > > > > > >> Hmm...no I'm actually using 1.75.4. I'll try upgrading >> > > > > > > > > >> and r
[web2py] Web2Py Book application
Hi all, I am new to web2py, even if I am following it from time to time (http://gioorgi.com/2009/web2py/) I have seen the Book application used for the web2py book http://web2py.com/book/ Where Is it possible to download the source of this application? I'd like to study it for learning web2py... Thank you! -- Team Leader Gioorgi.com Chief Editor -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: trunkeylinux help
Thank you Mark. On Mar 3, 7:38 am, Mark Breedveld wrote: > I've done some research on turnkey. > And its much better than the thing a made. > > I will test it in the coming week. > and the results will come as soon as possible. > > regards, > > Mark Breedveld, > > On 17 feb, 07:41, Massimo Di Pierro wrote: > > > I am trying to make a web2py appliance for turnkey linux. Once done > > this will run on xen, vmware and ec2. > > > I could use some help. Try this. > > > RUN THIS IN A VIRTUAL MACHINE BECAUSE I AM NOT SURE HOW tkpatch > > THEREFORE I DO NOT KNOW IF THIS MAY MESS UP YOUR SYSTEM. although > > probably not. > > > From a linux box, possibly a virtual machine, as root type > > > mkdir tkl > > cd tkl > > apt-get install squashfs-tools genisoimage tar gzip git > > git clone git://github.com/turnkeylinux/tklpatch.git > > cd tklpatch > > make install > > cd .. > > rm -r tkpatch > > wgethttp://downloads.sourceforge.net/project/turnkeylinux/turnkey-lapp/20... > > unzip web2py_patch.zip < the attached file > > tklpatch turnkey-lapp-2009.10-hardy-x86.iso web2py_patch > > > This should make a new ISO image that starts up with web2py, > > phppgadmin, webmin, web based os shell, etc. > > > Let me know if you manage to try. > > > More detailed explanations are > > here:http://www.turnkeylinux.org/docs/tklpatch > > > Massimo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: trunkeylinux help
I've done some research on turnkey. And its much better than the thing a made. I will test it in the coming week. and the results will come as soon as possible. regards, Mark Breedveld, On 17 feb, 07:41, Massimo Di Pierro wrote: > I am trying to make a web2py appliance for turnkey linux. Once done > this will run on xen, vmware and ec2. > > I could use some help. Try this. > > RUN THIS IN A VIRTUAL MACHINE BECAUSE I AM NOT SURE HOW tkpatch > THEREFORE I DO NOT KNOW IF THIS MAY MESS UP YOUR SYSTEM. although > probably not. > > From a linux box, possibly a virtual machine, as root type > > mkdir tkl > cd tkl > apt-get install squashfs-tools genisoimage tar gzip git > git clone git://github.com/turnkeylinux/tklpatch.git > cd tklpatch > make install > cd .. > rm -r tkpatch > wgethttp://downloads.sourceforge.net/project/turnkeylinux/turnkey-lapp/20... > unzip web2py_patch.zip < the attached file > tklpatch turnkey-lapp-2009.10-hardy-x86.iso web2py_patch > > This should make a new ISO image that starts up with web2py, > phppgadmin, webmin, web based os shell, etc. > > Let me know if you manage to try. > > More detailed explanations are here:http://www.turnkeylinux.org/docs/tklpatch > > Massimo -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: auto upgrade needs testing
on a second thought. I need to make binaries before you can test them later today. On Mar 3, 7:09 am, mdipierro wrote: > There is a new link in admin/default/site "upgrade web2py". > > Seems to work on source but needs to be tested on Windows and Mac > binary. > > ** This may mess up your web2py installation ** > > To help with test: > > 1) make a copy of web2py in a different folder > 2) edit the VERSION file and set it to something old like 1.0.0 > 3) start web2py and click on the link > 4) Restart web2py > 5) check the version again, was it upgraded? > > I need your tests. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] auto upgrade needs testing
There is a new link in admin/default/site "upgrade web2py". Seems to work on source but needs to be tested on Windows and Mac binary. ** This may mess up your web2py installation ** To help with test: 1) make a copy of web2py in a different folder 2) edit the VERSION file and set it to something old like 1.0.0 3) start web2py and click on the link 4) Restart web2py 5) check the version again, was it upgraded? I need your tests. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Redefining db types without patching sql.py
Thank you for example, sure it works for most cases, but what could be done with id of rows? They are not defined explicity, and changes in sql.by were enought for defining table i need. Let me explain my idea. Let see sql.py from 1.76.1 release at position of SQL_DIALECTS = { .skipped... 'postgres': { 'boolean': 'CHAR(1)', 'string': 'VARCHAR(%(length)s)', 'text': 'TEXT', 'password': 'VARCHAR(%(length)s)', 'blob': 'BYTEA', 'upload': 'VARCHAR(%(length)s)', 'integer': 'INTEGER', 'double': 'FLOAT8', 'decimal': 'NUMERIC(%(precision)s,%(scale)s)', 'date': 'DATE', 'time': 'TIME', 'datetime': 'TIMESTAMP', 'id': 'SERIAL PRIMARY KEY', 'reference': 'INTEGER REFERENCES %(foreign_key)s ON DELETE % (on_delete_action)s', 'lower': 'LOWER(%(field)s)', 'upper': 'UPPER(%(field)s)', 'is null': 'IS NULL', 'is not null': 'IS NOT NULL', 'extract': 'EXTRACT(%(name)s FROM %(field)s)', 'left join': 'LEFT JOIN', 'random': 'RANDOM()', 'notnull': 'NOT NULL DEFAULT %(default)s', 'substring': 'SUBSTR(%(field)s,%(pos)s,%(length)s)', }, -- How ugly will be aproach where are at db.py top the code SQL_DIALECTS = { 'postgres': { 'boolean': 'CHAR(1)', 'string': 'VARCHAR(%(length)s)', 'text': 'TEXT', 'password': 'VARCHAR(%(length)s)', 'blob': 'BYTEA', 'upload': 'VARCHAR(%(length)s)', 'integer': 'BIGINT', 'double': 'FLOAT8', 'decimal': 'NUMERIC(%(precision)s,%(scale)s)', 'date': 'DATE', 'time': 'TIME', 'datetime': 'TIMESTAMP WITH TIME ZONE', 'id': 'BIGSERIAL PRIMARY KEY', 'reference': 'BIGINT REFERENCES %(foreign_key)s ON DELETE % (on_delete_action)s', 'lower': 'LOWER(%(field)s)', 'upper': 'UPPER(%(field)s)', 'is null': 'IS NULL', 'is not null': 'IS NOT NULL', 'extract': 'EXTRACT(%(name)s FROM %(field)s)', 'left join': 'LEFT JOIN', 'random': 'RANDOM()', 'notnull': 'NOT NULL DEFAULT %(default)s', 'substring': 'SUBSTR(%(field)s,%(pos)s,%(length)s)', }, } ---end of code This does not work, web2py use code from sql.py anyway... QUESTION: So, is it possible to redefine SQL_DIALECTS before tables defined and in db.py ? I guess here required knowledge of internal process - how it works. I am sorry if question like sphere-horse model in vacuum. On 2 мар, 18:27, mdipierro wrote: > You can do for example: > > mydt = > SQLCustomType( > type > =datetime', > native ='TIMESTAMP WITH TIME > ZONE', > encoder = ... , > decoder = ... ) > ) > > db.define_table( > > 'example', > Field('value', > type=mydt) > ) > > type =datetime' is the web2py > representation > native ='TIMESTAMP WITH TIME ZONE' is the SQL > representation > encoder is a function that that gives you the SQL representation (must > escape ' into '' for strings) > decoder does the oppotsite. > > On Mar 2, 1:07 am, KMax wrote: > > > Hello > > I create db schema at postgres db and then start to move it to db.py > > definition. > > But get the issue with data types. For example: I use bigserial while > > web2py use simple serial type. > > I use TIMESTAMP WITH TIME ZONE (to support winter and summer time) > > while web2py use TIMESTAMP (and postgres treat it as TIMESTAMP WITHOUT > > TIME ZONE). > > I solve this issue by editing sql.py and dal.py and all gets fine, > > but it make me force to apply this changes every web2py release. > > THE QUESTION: > > Could I redefine something in my db.py for avoid edition sql.py ? > > Please provide short example of it (I guess there difference in > > sql.py and dal.py) > > > Thank you. > > Maxim -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: One time loading of large pickle file on server start
There are many ways to do. The simplest was it create a module in your app applications/yourapp/modules/pickle_loader.py that contains import cPickle data = cPickle.load(.) then in your model: pickle_loader = local_import('pickle_loader') data = pickle_loader.data On Mar 3, 6:44 am, praveendasigi wrote: > Hi, > > I have a large pickle file (approx 400MB) which contains objects to be > used by various controllers in my app. The pickle loading obviously > cannot happen online whenever the application is accessed. Earlier > when I built a primitive version of this app with cherrypy alone, the > pickle loaded along with server startup. I am unable to understand how > to do it in the web2py setup. The requirement is to load this data > once into memory ( say, every time on server restart) and persist it > indefinitely. Is there a straightforward way to do this?? The objects > cannot exist in any other form like a DB etc., Any help is > appreciated. Thanks. > > Praveen -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Dream Host Deployment
Hello, I've been trying to set up web2py on my dreamhost account. I've searched the web over trying to find something that works finally found: http://www.web2pyslices.com/main/slices/take_slice/1 Which I effective followed save that I used different directory (/opt instead of /local) and installed python 2.55 instead of virtualenv. I don't think that is terribly import but I could be wrong. Regardless, as far as I can tell I made it all the way through, however when I go to the site I get: An error occurred importing your passenger_wsgi.py Unfortunately, I'm no expert on wsgi and the like so I'm at a loss at what to do next to figure out the issue. -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] One time loading of large pickle file on server start
Hi, I have a large pickle file (approx 400MB) which contains objects to be used by various controllers in my app. The pickle loading obviously cannot happen online whenever the application is accessed. Earlier when I built a primitive version of this app with cherrypy alone, the pickle loaded along with server startup. I am unable to understand how to do it in the web2py setup. The requirement is to load this data once into memory ( say, every time on server restart) and persist it indefinitely. Is there a straightforward way to do this?? The objects cannot exist in any other form like a DB etc., Any help is appreciated. Thanks. Praveen -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: error in tools.py (in trunk)
fixed, thanks On Mar 3, 6:21 am, Jose wrote: > in line 1033 and 1227 > > captcha = self.settings.register_captcha or self.settings.captcha > > Jose -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] error in tools.py (in trunk)
in line 1033 and 1227 captcha = self.settings.register_captcha or self.settings.captcha Jose -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: shell only web2py
oops On Mar 3, 5:13 am, Nicol van der Merwe wrote: > Sweet! > > I noticed a typo: > > "*My Fist Application" *should be "*My First Application*" > (notice the 'r') > > Nicolaas > > > > On Wed, Mar 3, 2010 at 7:10 AM, Jason Brower wrote: > > Very nice article. Thanks, it's good to know this side as well, > > especially when deploying remotely. > > BR, > > Jason Brower > > On Tue, 2010-03-02 at 09:59 -0800, mdipierro wrote: > > >http://gluonframework.wordpress.com/ > > > -- > > You received this message because you are subscribed to the Google Groups > > "web2py-users" group. > > To post to this group, send email to web...@googlegroups.com. > > To unsubscribe from this group, send email to > > web2py+unsubscr...@googlegroups.com > > . > > For more options, visit this group at > >http://groups.google.com/group/web2py?hl=en. > > -- > If we hit that bullseye, the rest of the dominoes should fall like a house > of cards. Checkmate. -Z. Brannigan -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: Ajax query
I don't actually know how to mark this as solved, but please consider it so. On Mar 3, 10:25 am, LB22 wrote: > OK, Thadeus was right on the money with regard to my problem. > > I don't know how I overlooked it, but I had a line of "legacy code" in > my function that requested the refering page. This is what was being > returned in the ajax callback. As soon as I removed that line, I no > longer had the problem with a page loading within a page. > > Thanks for all the help :o) > > I'll mark this as solved. > > LB > > On Mar 3, 2:32 am, mdipierro wrote: > > > > > You may not be calling vote_yay. Try replace > > > ajax('vote_yay', ['sreq_id'],'sreq{{=sreq.id}}'); > > > with > > > ajax('{{=URL(r=request,f='vote_yay')}}', > > ['sreq_id'],'sreq{{=sreq.id}}'); > > > On Mar 2, 7:07 pm, minh wrote: > > > > I'm basically just having problems that Thadeus seemed to have > > > described above. > > > > I'm trying to use theajax() function but it seems like an entire page > > > is being fed into the target rather than a string I'm returning. > > > > This is in my view, > > > > Votes received: {{=votes_received}} > > > > > > [Vote Yay] > > > > The function vote_yay returns a string. However, doesn't seem like the > > > function is being executed and an entire page is fed into the target. > > > > Is it still OK to use theajaxfunction? Sorry for hijacking the > > > thread btw :/ > > > > On Mar 2, 3:25 pm, mdipierro wrote: > > > > > I do not even remember what is in the manual. Plugins are the > > > > future... even if they may change. > > > > > On Mar 2, 5:19 pm, minh wrote: > > > > > > Should I disregard the example in the manual or is there a simple > > > > > tweak I can do to get it working. > > > > > > The plugin you mentioned seems a little more involved... don't want to > > > > > get into it if there's an easy fix for the former method. > > > > > > On Mar 2, 2:42 pm, mdipierro wrote: > > > > > > > The manual is old in this respect. I assume you have seen > > > > > > this:http://web2py.com/plugins/default/rating > > > > > > > On Mar 2, 4:36 pm, minh wrote: > > > > > > > > I'm trying to implement the voting/rating example from the manual > > > > > > > and > > > > > > > I'm getting a similar issue with the page overlapping. > > > > > > > > On Mar 2, 2:26 pm, LB22 wrote: > > > > > > > > > Hi Thadeus, > > > > > > > > > Thanks for your input. Perhaps you could provide a couple of > > > > > > > > examples, > > > > > > > > as I'm a little confused. > > > > > > > > > In my example, I intended the function 'mark' to only return > > > > > > > > this: > > > > > > > > > DIV(IMG(_src=URL(r=request,c='static',f='icons/ > > > > > > > > star.png'),_class='icons',_title='Remove from > > > > > > > > favourites',_alt='Remove > > > > > > > > from favourites'),_id="fav").xml() > > > > > > > > > Basically a div containing an image, which I thought would be > > > > > > > > serialized as that single portion, not as an entire view, > > > > > > > > resulting in > > > > > > > > the page within page problem. Cleary still have much to learn. > > > > > > > > Could > > > > > > > > you help me out further? > > > > > > > > > Thanks > > > > > > > > > On Mar 2, 9:14 pm, Thadeus Burgess > > > > > > > > wrote: > > > > > > > > > > You are returning a view that contains {{extend > > > > > > > > > "layout.html"}} when > > > > > > > > > you return theajax, so since your returning the entire page > > > > > > > > > html... > > > > > > > > > you insert the page over again :) > > > > > > > > > > You can > > > > > > > > > > A) Return a view that does not extend layout > > > > > > > > > B) Return a string that represents the html instead of a dict > > > > > > > > > C) Call it with .json instead of .html so that your dict gets > > > > > > > > > serialized into JSON and returned. > > > > > > > > > > -Thadeus > > > > > > > > > > On Tue, Mar 2, 2010 at 3:03 PM, LB22 > > > > > > > > > wrote: > > > > > > > > > > OK, so I tried upgrading, but still the same result I'm > > > > > > > > > > afraid. I > > > > > > > > > > figured I must be doing something wrong. Is there another > > > > > > > > > > method I > > > > > > > > > > could try to acheive the same result? Or do you know what I > > > > > > > > > > might be > > > > > > > > > > doing wrong? > > > > > > > > > > > I'm just trying to mark something (by inserting a record > > > > > > > > > > into my db), > > > > > > > > > > and replace the existing image to reflect the current state > > > > > > > > > > (marked/ > > > > > > > > > > unmarked). > > > > > > > > > > > Thanks > > > > > > > > > > > On 2 Mar, 20:37, LB22 wrote: > > > > > > > > > >> Hmm...no I'm actually using 1.75.4. I'll try upgrading and > > > > > > > > > >> report back > > > > > > > > > >> what happens. > > > > > > > > > > >> On 2 Mar, 19:24, mdipierro wrote: > > > > > > > > > > >> > Are you using the latest web2py? > > > > > > > > > > >> > On Mar 2, 11:57 am, LB22 > > > > > > > > > >> > wrote: > > > > > > > > > > >> > > Hi there
[web2py] Re: GAE delete() has subtle difference compared to native Web2Py
I think this is now fixed in trunk. On Mar 3, 3:24 am, Throngly wrote: > I also get this problem with code that used to work before the > ".count() to len()" change, so it appears to be a regression. > > My traceback is as follows: > > Traceback (most recent call last): > File "/base/data/home/apps/throngly-com/1.340262947933306301/gluon/ > restricted.py", line 173, in restricted > exec ccode in environment > File "/base/data/home/apps/throngly-com/1.340262947933306301/ > applications/throngly/controllers/events.py:delete", line 225, in > > File "/base/data/home/apps/throngly-com/1.340262947933306301/gluon/ > globals.py", line 96, in > self._caller = lambda f: f() > File "/base/data/home/apps/throngly-com/1.340262947933306301/gluon/ > tools.py", line 1850, in f > return action(*a, **b) > File "/base/data/home/apps/throngly-com/1.340262947933306301/ > applications/throngly/controllers/events.py:delete", line 80, in > delete > File "/base/data/home/apps/throngly-com/1.340262947933306301/gluon/ > contrib/gql.py", line 696, in delete > counter = len(items) > TypeError: object of type 'Query' has no len() > > On Mar 1, 6:30 pm, mdipierro wrote: > > > Can you send me the complete traceback please. This is different than > > the error that strasted the thread (about count()). > > > Massimo > > > On Mar 1, 5:24 am, Richard wrote: > > > > when using appadmin forgaetodeleteall records that satisfy the > > > query "db.scrape.id>0" I get: > > > > Invalid Query > > > > object of type 'Query' has no len() > > > > I get this with both the latest release and trunk. > > > > On Mar 1, 12:09 am, mdipierro wrote: > > > > > they should be quivalent > > > > > On Feb 23, 10:11 pm, Richard wrote: > > > > > > I sometimes get that ID error on bothGAEand the development server, > > > > > and for non-deleteoperations such as: > > > > > > db(db.client.id > 0).select() > > > > > > so to be more robust I have replaced ID calls with: > > > > > > db().select(db.client.ALL) > > > > > > On Feb 7, 11:33 am, Jon Romero wrote: > > > > > > > the problem seems to happen when you try to query by the id field > > > > > > and > > > > > > thendelete(I coulddeletewhen I chose a different field) > > > > > > > On Feb 7, 2:18 am, Jon Romero wrote: > > > > > > > > Some thing happens to me. When I do: > > > > > > > db(db.table.id == some_id_that_exists).delete, I get the same > > > > > > > count > > > > > > > error > > > > > > > > On Feb 4, 3:16 am, mdipierro wrote: > > > > > > > > > do you use 2.5 or something else locally? > > > > > > > > > On Feb 3, 6:11 pm, Carl wrote: > > > > > > > > > > This may be related toGAEupdate_record() has subtle difference > > > > > > > > > compared to native > > > > > > > > > Web2Pyhttp://groups.google.com/group/web2py/browse_thread/thread/a69afded01... > > > > > > > > > but until shown otherwise, I've posed separately. > > > > > > > > > > I have this in db.py: > > > > > > > > > > db.define_table('team_user', > > > > > > > > > Field('teamId', 'integer', notnull=True, > > > > > > > > > required=True), > > > > > > > > > Field('user_email', 'string', length=254, > > > > > > > > > notnull=True, required=True, > > > > > > > > > requires = [IS_LOWER(),IS_EMAIL()]), > > > > > > > > > Field('live', 'boolean', notnull=True, > > > > > > > > > required=True, > > > > > > > > > default='True'), > > > > > > > > > Field('cDate', 'datetime'), > > > > > > > > > Field('mDate', 'datetime')) > > > > > > > > > > I make this call: > > > > > > > > > self.db(self.db.team_user.id==memberId).delete() > > > > > > > > > > such a statement callsdelete(self) in gql.py > > > > > > > > > defdelete(self): > > > > > > > > > self._db['_lastsql'] = 'DELETEWHERE %s' % self.where > > > > > > > > > (items, tablename, fields) = self._select() > > > > > > > > > tableobj = self._db[tablename]._tableobj > > > > > > > > > counter = items.count() > > > > > > > > > gae.delete(items) > > > > > > > > > return counter - items.count() > > > > > > > > > > When the interpreter exectutes "counter = items.count()" an > > > > > > > > > exception > > > > > > > > > is thrown stating "TypeError: count() takes exactly one > > > > > > > > > argument (0 > > > > > > > > > given)" > > > > > > > > > > Have I something in my db.py definition that native web2py is > > > > > > > > > happy > > > > > > > > > with but dev_appserver chokes on? -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
[web2py] Re: crud and col3
After this thread ends could someone write a reference manual to this new feature - what is implemented now? Could be good :-D On márc. 3, 11:49, mdipierro wrote: > I applied most of your patch, but I left the syntax > > auth.settings.captcha = Recaptcha(...) > auth.settings.captcha.label = > auth.settings.captcha.comment = > > Please check it. > > On Mar 2, 11:22 pm, "mr.freeze" wrote: > > > > > On second thought, how would you get captcha into a crud form that is > > built using request.args without crud.settings.[...]_captcha?: > > > def data(): > > return dict(form=crud()) > > > Same goes for auth. > > > My patch included a label for auth and cleaned up the captcha code > > also. > > > On Mar 2, 11:15 pm, "mr.freeze" wrote: > > > > Sounds good to me. I was just mirroring what auth does. Should we > > > change auth too? > > > auth.login(captcha=...) > > > If so, it should probably be added to SQLFORM constructor too. > > > > On Mar 2, 11:04 pm, mdipierro wrote: > > > > > please check trunk. I have implemented something closer to Yarko's > > > > proposal: > > > > > crud.settings.create_captcha= Recaptcha(request,"...","...") > > > > crud.settings.create_captcha.label = 'Recaptcha' > > > > crud.settings.create_captcha.comment = 'Try get it right!' > > > > > do we really need create_captcha and update_captcha? Why not only one? > > > > wouldn't it be better to pass the Recaptcha object to > > > > crud.create() or crud.update()? This is not a setting that > > > > should apply to all create and/or all update forms. > > > > > On Mar 2, 10:09 pm, "mr.freeze" wrote: > > > > > > Patch submitted. > > > > > > On Mar 2, 8:33 pm, mdipierro wrote: > > > > > > > I agree > > > > > > capcha is a class so it should be possible to add structure to it. > > > > > > > Massimo > > > > > > > On Mar 2, 8:21 pm, Yarko Tymciurak > > > > > > wrote: > > > > > > > > On Mar 2, 6:01 pm, "mr.freeze" wrote: > > > > > > > > > How about this?: > > > > > > > > > crud.settings.captcha_label > > > > > > > > auth.settings.captcha_label > > > > > > > > I think mr.freeze has the right idea: _make_ it an "option" --- > > > > > > > it's > > > > > > > not like this is a convenience, rather a requirement: people do > > > > > > > not > > > > > > > need to "figure out" what code is saying! > > > > > > > > crud.settings.captcha - is this is an element, then it _behooves_ > > > > > > > it > > > > > > > to have the same regularity as one expected when captcha was just > > > > > > > used > > > > > > > from tables with a widget), that is: > > > > > > > > captcha should have structure: > > > > > > > > captcha, captcha.label, etc. > > > > > > > > I like this. > > > > > > > > > On Mar 2, 5:24 pm, mdipierro wrote: > > > > > > > > > > This > > > > > > > > > db.mytable.captcha.label = "This is what I want to put here" > > > > > > > > > is not an option because captcha is not field of mytable. > > > > > > > > This is "how it was" a few revisions back - also, this is how > > > > > > > developers _already_ think for forms, so that following the _same > > > > > > > idiom_ within the framework makes good sense, and will make a > > > > > > > developer's life easier. > > > > > > > > > > This is the best I can think of assuming we give the id to > > > > > > > > > the captcha > > > > > > > > > row: > > > > > > > > > > form.element(_id='captcha__row')[2].append(LABEL('Recaptcha')) > > > > > > > > I much prefer the direction mr.freeze sees... but add a little > > > > > > > structure > > > > > > > more readable, easier to remember ("like" other label things > > > > > > > people > > > > > > > already use, e.g. table fields) > > > > > > > > - Yarko > > > > > > > > > > On Mar 2, 4:58 pm, Yarko Tymciurak > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > On Mar 2, 4:51 pm, "mr.freeze" wrote: > > > > > > > > > > > > Or you can do this: > > > > > > > > > > > > crud.settings.create_captcha= > > > > > > > > > > > DIV(Recaptcha(request,recaptcha_public,recaptcha_private),_id='captcha- > > > > > > > > > > > wrapper') > > > > > > > > > > > form = crud.create(db.things) > > > > > > > > > > > form.element(_id='captcha- > > > > > > > > > > > wrapper').parent.sibling('td').append(LABEL('Recaptcha')) > > > > > > > > > > > return dict(form=form) > > > > > > > > > > > ugh! > > > > > > > > > > > db.mytable.captcha.label = "This is what I want to put here" > > > > > > > > > > > is definitely more concise, less obtuse, and more readable. > > > > > > > > > > > I trust Massimo will arrive at a more direct, clear (and > > > > > > > > > > less > > > > > > > > > > "clever", obtuse) solution. > > > > > > > > > > > - Yarko > > > > > > > > > > > > On Mar 2, 3:41 pm, Yarko Tymciurak > > > > > > > > > > > > > > > > > > > > > > wrote: > > > > > > > > > > > > > On Mar 2, 1:28 pm, mdipierro > > > > > > > > > > > > wrote: > > > > > > > > > > > > > > The auth.settings.update_captcha was introduced in > > > > > > > > > > > > > 1.76.1 and
Re: [web2py] shell only web2py
Sweet! I noticed a typo: "*My Fist Application" *should be "*My First Application*" (notice the 'r') Nicolaas On Wed, Mar 3, 2010 at 7:10 AM, Jason Brower wrote: > Very nice article. Thanks, it's good to know this side as well, > especially when deploying remotely. > BR, > Jason Brower > On Tue, 2010-03-02 at 09:59 -0800, mdipierro wrote: > > http://gluonframework.wordpress.com/ > > > > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to web...@googlegroups.com. > To unsubscribe from this group, send email to > web2py+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- If we hit that bullseye, the rest of the dominoes should fall like a house of cards. Checkmate. -Z. Brannigan -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.