[web2py] Re: web2py arguments syntax

2010-10-27 Thread cjrh
On Oct 27, 5:43 pm, VP wrote: > I saw this marriage between web2py and Flask (a strange one, I'll give > you that)... but I'm thinking web2py might be able to improve its > syntax/convention as follows. > > Here's Flask: > > @app.route('/insertdog///') > def insertdog(name,owner,age): >      # oth

[web2py] reg:DAL and google datastore

2010-10-27 Thread bally boy
Hi, While DAL is wonderful considering the easy semantics and wonderful portability across all databases. However while working with google datastore , I find it much more productive and flexible to use google's API rather than DAL.Can this be done?

[web2py] possible to alias a field?

2010-10-27 Thread Andrew Thompson
I'm trying to get around the problem of not being able to do a join in the IS_IN_DB(). I've got the following, which I thought was working until I realized that it's using the id field from both tables. Can I alias a field from mol as id? (I don't need the actual id field from mol in this insta

[web2py] logging cannot create a log file when run from web2py

2010-10-27 Thread Avik Basu
Hi, I would like a web2py script to create a log file, but when run via the "python web2py.py ..." command line, the log file (in this case logging.log) is not being created. Is this a permissions issue with file creation? Here is what I what I am doing: #in cron/log.py import logging logging.b

[web2py] Using list:reference in a model on GAE

2010-10-27 Thread johntynan
I have a question about using list:reference in a model on Google App Engine. Here is my model: http://code.google.com/p/publicradioroadtrip/source/browse/models/db_custom.py?spec=svna7a27f086f9519cd6c133493eed55ffd64f9446c&r=a7a27f086f9519cd6c133493eed55ffd64f9446c#33 I am able to add records t

Re: [web2py] Re: web2py arguments syntax

2010-10-27 Thread Bruno Rocha
No, I do not know of any case and I'm not proposing to break compatibility, I love the backwards compatibility and the "web2py" way of doing things. I was just wondering if by chance it might not be an issue to think about. There is no way to measure how far the maintenance of compatibility could

[web2py] Re: web2py arguments syntax

2010-10-27 Thread mdipierro
I do not think we should ever break backward compatibility in order to change syntax (because here there is nothing more that syntax at stake, not functionality). Different people have different preferences. Can you think of any case where backward compatibility has prevented us form adding a rea

[web2py] Re: Record Versioning

2010-10-27 Thread mdipierro
The problem is that update=auth.user.username the right hand site is node defined if you are not logged in. Try: update=auth.user and auth.user.username On Oct 27, 4:50 pm, baloan wrote: > I am trying to use versioning in an authenticated section of a > website. Instead of this: > > db.define_

[web2py] Re: Some beginner questions on form

2010-10-27 Thread mdipierro
On Oct 27, 7:45 pm, pierreth wrote: > Hello, > > I am doing my first application with web2py and I don't know how to do > some things with forms. > > Like I would like to show a drop menu to show the possible values for > a text field. How can I specify this menu with define_table? > Field('nam

[web2py] Re: clean up uservoice

2010-10-27 Thread Anthony
Looks good. One potential problem -- it looks like you can only sort (by date, popularity, what's hot) _within_ each topic. That will make it difficult to see which suggestions are most popular overall. Or am I missing something? Anthony On Oct 27, 10:00 pm, Bruno Rocha wrote: > And look this :h

Re: [web2py] Re: web2py arguments syntax

2010-10-27 Thread Bruno Rocha
> > Morover changing it (even > if it were possible) would be a change in backward compatibility. > Speaking of backwards compatibility, sometimes I see some users are tending more to have new features and design changes than maintaining backward compatibility I think backwards compatibility is o

Re: [web2py] Re: clean up uservoice

2010-10-27 Thread Bruno Rocha
And look this : http://goo.gl/mod/Aj8g 2010/10/27 Richard > On Oct 27, 9:49 am, Bruno Rocha wrote: > > I think Googlehttp://www.google.com/moderator/should be better for that! > > what are advantages of Moderator over uservoice? -- http://rochacbruno.com.br

Re: [web2py] Re: clean up uservoice

2010-10-27 Thread Bruno Rocha
we are using that for PyCon Brasil look: https://www.google.com/moderator/#15/e=351cc&t=351cc.41&f=351cc.a9e3b we can try a little, and if not works we leave that Lets give it a try: http://www.google.com/moderator/#16/e=33f86 2010/10/27 Bruno Rocha > I think, being a google tool has its advant

[web2py] Re: web2py arguments syntax

2010-10-27 Thread mdipierro
Easy answer. It cannot be done. Flask and Django execute the controller (sees the decorator and registers it) before any http request arrives. Web2py executes the controller after the http request arrives. Morover changing it (even if it were possible) would be a change in backward compatibility.

[web2py] Re: forms2pdf: new free web2py appliance

2010-10-27 Thread mdipierro
requires trunk On Oct 27, 11:48 am, Christopher Steel wrote: > Great application! > > When running with Web2py Version 1.87.3 (2010-10-13 19:44:46) > > I am getting the error: > >   File "/Users/christophersteel/dev/web2py/applications/forms2pdf/ > controllers/default.py", line 63, in form_get >

Re: [web2py] Re: clean up uservoice

2010-10-27 Thread Bruno Rocha
I think, being a google tool has its advantage, the ease of use, the ease of authentication, the ease of integration with google tools. Regarding interface, I like most the Google Moderator interface, and there we can separate things by topic Lets give it a try: http://www.google.com/moderator/#1

[web2py] Some beginner questions on form

2010-10-27 Thread pierreth
Hello, I am doing my first application with web2py and I don't know how to do some things with forms. Like I would like to show a drop menu to show the possible values for a text field. How can I specify this menu with define_table? Another thing that I would like to do is format postal code and

[web2py] Re: clean up uservoice

2010-10-27 Thread Richard
On Oct 27, 9:49 am, Bruno Rocha wrote: > I think Googlehttp://www.google.com/moderator/should be better for that! what are advantages of Moderator over uservoice?

[web2py] Re: Best way to update schedule with multiple users/locations?

2010-10-27 Thread howesc
what about a javascript timer that makes a JSON call to check for updates every x minutes? i suspect that the database can be designed in such a way that the query could be quite quick. then you don't need queues and background processes. just a thought... cfh On Oct 26, 9:23 pm, Tom Campbell

[web2py] Record Versioning

2010-10-27 Thread baloan
I am trying to use versioning in an authenticated section of a website. Instead of this: db.define_table('my_table', Field('saved_by',auth.user, default=auth.user_id,update=auth.user_id,writable=False) I was trying this: db.define_table('my_table', Field('saved_by','string', default=auth

[web2py] Render svg using web2py without js library

2010-10-27 Thread Chris Baron
Hello web2py users, I'm having trouble rendering SVG in firefox using web2py without using a js library. For instance, take this simple example here : http://www.w3schools.com/svg/tryit.asp?filename=rect1&type=svg Can anyone give me an example of how to render this using web2py ? Thanks in adva

[web2py] Patch for cron not working on compiled apps

2010-10-27 Thread Álvaro J . Iradier
Hi, cron jobs won't work on a bytecode compiled application after unpacked. When web2py starts, the following error(s) is(are) displayed: invalid application name: testapp/cron/crontask the crontab file looks like: #crontab * * * * * root *cron/crontask it looks like gluon/shell.py is not workin

Re: [web2py] Re: web2py equivalent of Django's pluralize?

2010-10-27 Thread Michael Wolfe
Thanks for the link. I can certainly write a function that will do what I need. I just wanted to make sure I wasn't reinventing the wheel (at least with reference to web2py). -Mike On Wed, Oct 27, 2010 at 1:32 PM, Vidul Petrov wrote: > You may want to see this recipe: > http://code.activestat

Re: [web2py] web2py arguments syntax

2010-10-27 Thread Bruno Rocha
Hello, I've made this example using the DAL with Flask, the goal was just to show how the DAL may be used alone in other projects without depending on web2py. I thought about doing this example using GTK or other Python project, but at the time seemed more useful to use a different web framework.

[web2py] Error running routes.py doctest after update to changeset 1054

2010-10-27 Thread mwolfe02
When I run the doctest for my routes file (python routes.py) after updating to changeset 1054 or later, I receive the following error message: Traceback (most recent call last): File "routes.py", line 103, in from gluon.rewrite import select, load, filter_url, filter_out, filter_err, compil

[web2py] Re: Loading a pickled file once globally

2010-10-27 Thread mdipierro
In a model: def load(): """ Load the file into memory and message the number of entries """ f = open('tables.pkl','rb') tables = pickle.load(f) f.close() return tables session.tables=cache.ram('tables',load,None) and it will be cached in ram for all users. On Oct 27

[web2py] Re: how to install wizard in this ...

2010-10-27 Thread mdipierro
Download the "nightly build" from http://web2py.com/examples/default/download Mind it is still experimental (works but we may change it). Massimo On Oct 27, 5:15 am, sunny wrote: > Hi , > i had recently seen this video of using the wizard. Its really cool. I > want to use that. Person in the vi

[web2py] how to install wizard in this ...

2010-10-27 Thread sunny
Hi , i had recently seen this video of using the wizard. Its really cool. I want to use that. Person in the video the link saying "create application using wizard" but i don't see any thing like that in my screen and my web2py software is up to date . Please help me with this . If there is anythin

[web2py] Loading a pickled file once globally

2010-10-27 Thread siddharth
I am loading a pickled dictionary into memory. I need it to be available to all users all the time. It needs to be loaded only once at application startup. I wrote the following code and put it in models directory code: load_table.py import cPickle as pickle """ Load the file into mem

[web2py] Re: Powered by web2py

2010-10-27 Thread Martin.Mulone
About Instant Press, instead of testing page make link to my new blog made with instant press about instant press, python and web2py . I am not going to maintain test page in appspot but the blog yes. The link is http://martin.tecnodoc.com.ar/ On Oct 24, 10:44 pm, mdipierro wrote: > If you do, I

[web2py] Re: wizard: site without authentification

2010-10-27 Thread mdipierro
That should be fixed. I would take a patch. On Oct 26, 5:03 pm, Tim Michelsen wrote: > Hello, > I took the auth_user table out of the wizard. > > Still, I am required to register and log in after the app is created. > > Regards, > Timmie

[web2py] Re: Best way to represent list:string on the widget side?

2010-10-27 Thread mdipierro
I am a bit lost in this thread... if there is a | in the code something is wrong. Make sure you have the latest web2py_ajax.html and there is a default widget for list:string. On Oct 20, 12:12 am, Chris wrote: > I'm trying to make an HTML widget that saves its data as a > list:string. > > Current

[web2py] web2py equivalent of Django's pluralize?

2010-10-27 Thread mwolfe02
How do you do this in web2py: http://docs.djangoproject.com/en/dev/ref/templates/builtins/?from=olddocs#pluralize Thanks, Mike

[web2py] Re: Using components breaks javascript?

2010-10-27 Thread Luther Goh Lu Feng
Thanks for the help selecta. I think your explanation is correct. I have managed to resolve my problem by using .live() method http://api.jquery.com/live/ replacing $('select#conversation_dropdown_text').change(function(){ for $('select#conversation_dropdown_text').live('change',function(){ O

[web2py] new features in trunk: detect_record_change

2010-10-27 Thread Massimo Di Pierro
Two changes in trunk: 1) form.accepts(request) is now the same as form.accepts(request.post_vars) 2) before you had three options: form=SQLFORM(table,record) if form.accepts(request): response.flash="record updated" elif form.errors: response.flash="errors in form" else:

[web2py] Re: Using components breaks javascript?

2010-10-27 Thread selecta
i think the problem is that only on the first load the $ ('select#conversation_dropdown_text').change(function(){ is executed that means that the change() is only applied to select#conversation_dropdown_text on the initial load on reload you would need to retrigger the change() on the select#conver

[web2py] Re: auth issue in Firefox 3.6.10+ on Mac

2010-10-27 Thread Adi
I've found the problem. In Firefox there's a setting in Privacy which says "Accept third party cookies". As per the documented behavior here: http://kb.mozillazine.org/Network.cookie.cookieBehavior if that is unchecked, network.cookie.cookieBehavior = 1 and "will allow cookies from the originatin