[web2py] Grid/Smartgrid: how to use the 'selectable' option?

2011-10-18 Thread Johann Spies
The default value for 'selectable' is None. When I use 'selectable = True' the an option button appears to every record, but when submitted I get File "/home/js/web2py/gluon/sqlhtml.py", line 1821, in grid selectable(records) TypeError: 'bool' object is not callable So if what should 'not

[web2py] Grid/smartgrid: overriding the search_options

2011-10-18 Thread Johann Spies
My client does not want all the search options under the query-button - just the 'contains' option as default. How do I specify that in the controller? Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] How to share a function between controllers

2011-10-18 Thread Manuele
On 17/10/2011 23:14, Jonathan Lundell wrote: Or import it from a module. but modules don't have direct access to the db... maybe the two easiest ways are: 1. define it in a model file... at least in a mylib.py file separeted to the main db.py or other file you use to define models. 2. use t

Re: [web2py] Re: mysql postgres different behaviors

2011-10-18 Thread Manuele
On 18/10/2011 00:23, Massimo Di Pierro wrote: The code in this traceback has nothing to do with postgresql but is related to reading data from the socket. What is the code that causes the problem? http://pastebin.com/yVJskGww here you can find the two function used. The second one reads the xls

[web2py] SOCKsify all connections from web2py server

2011-10-18 Thread Arturo Filastò
I am interested in having all connections made by web2py run through a SOCKS4a proxy (in this specific case Tor). What is the best way to do so? Is there some function that is always used by web2py for network connections that I can go and patch? It is also very important that the connections mad

[web2py] Re: SOCKsify all connections from web2py server

2011-10-18 Thread Arturo Filastò
More details on what exactly I am trying to solve can be found here: https://github.com/globaleaks/GlobaLeaks/issues/90. - Art. On Oct 18, 10:59 am, Arturo Filastò wrote: > I am interested in having all connections made by web2py run through a > SOCKS4a proxy (in this specific case Tor). > > Wha

[web2py] Ubuntu 11.10 Internal error Ticket issued: unrecoverable

2011-10-18 Thread Halili
I downloaded the web2py source, unzipped it. When I tried to run web2py.py, I got "Internal error Ticket issued: unrecoverable". starting browser... (firefox:4334): Gtk-WARNING **: Tema aygıtı module_path "pixmap" içinde bulunamadı, (firefox:4334): Gtk-WARNING **: Tema aygıtı module_path "pixma

[web2py] Freeing the DAL memory, outside web2py

2011-10-18 Thread Petrucio
I'm using dal.py to do some basic database programming, but outside web2py. It's basic stuff, but there's a ton of data, and it seems to be getting cached and never freed, so I eventually get into MemoryError land. I've searched around and bumped into a lot of posts about using cache.ram and cache

[web2py] grid custom button icons

2011-10-18 Thread Nik Go
how do I specify the other icons available from the default icon sprite?

[web2py] new scheduler options quest

2011-10-18 Thread Manuele
I would try to use the new scheduler so I've seen the video how to by mdp, now I want to apply the scheduler on my needs but the options are not so clear, I expected they more reflect the crontab syntax but maybe they reflect a simpler way of thinking I can't figure out :) what if I want to ru

[web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread Sathvik Ponangi
db(db.files.hash==name).select().first() always gives None, what's the right way to do it? Thanks for your help...

Re: [web2py] How to share a function between controllers

2011-10-18 Thread Tito Garrido
Thank you! On Tue, Oct 18, 2011 at 5:52 AM, Manuele wrote: > On 17/10/2011 23:14, Jonathan Lundell wrote: > >> Or import it from a module. >> > but modules don't have direct access to the db... maybe the two easiest > ways are: > > 1. define it in a model file... at least in a mylib.py file sepa

Re: [web2py] Freeing the DAL memory, outside web2py

2011-10-18 Thread Michele Comitini
You should give an idea of what your code looks like... anyway you may try to free some memory by removing references to "heavy" objects. rows = db(db.mytable.id>0).select(db.mytable.ALL) . . (do stuff) . rows = None # remove reference to query result . . (do stuff) . mic 2011/10/18 Petrucio :

Re: [web2py] new scheduler options quest

2011-10-18 Thread Martín Mulone
take a look to this app: https://bitbucket.org/mulonemartin/scheduler/src 2011/10/18 Manuele > I would try to use the new scheduler so I've seen the video how to by mdp, > now I want to apply the scheduler on my needs but the options are not so > clear, I expected they more reflect the crontab s

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread Johann Spies
On 18 October 2011 13:20, Sathvik Ponangi wrote: > db(db.files.hash==name).select().first() always gives None, what's the > right way to do it? > > Thanks for your help... > .first() will only work if len(db(db.files.hash==name).select()) > 0 If you get None it means that the query did not find

Re: [web2py] new scheduler options quest

2011-10-18 Thread Manuele
On 18/10/2011 13:48, Martín Mulone wrote: take a look to this app: https://bitbucket.org/mulonemartin/scheduler/src well I need to see what to save in db for my purposes... the video on vimeo is very clear about how to set up a scheduled function. Is there something more on your app? Thanks

[web2py] SQLFORM.factory and Select functionalities

2011-10-18 Thread Kostas M
I want a FORM that the select option from the 2nd field, depends on the select option of the 1st field. This could be accomplished using a jQuery function to change the available options. However, the construction of the SQLFORM.factory SELECT Field, comes with the "requires" command, which leaves

[web2py] python 2.4 - last supported version

2011-10-18 Thread Cory Coager
Could you tell me the last release of web2py that supported python 2.4 and where I can download it? The new version of web2py obviously don't support it and don't work either.

[web2py] Re: Grid/Smartgrid: how to use the 'selectable' option?

2011-10-18 Thread Massimo Di Pierro
selectable should be None (nothing to do) or a function like selectable = lambda ids: do_something(ids) where ids is the list of selected ids. On Oct 18, 2:49 am, Johann Spies wrote: > The default value for 'selectable' is None. > > When I use 'selectable = True' the an option button appears to

[web2py] Re: Grid/smartgrid: overriding the search_options

2011-10-18 Thread Massimo Di Pierro
        search_options = search_options or {            'string': ['=','!=','<','>','<=','>=','starts with','contains'],            'text':['=','!=','<','>','<=','>=','starts with','contains'],            'date':['=','!=','<','>','<=','>='],            'time':['=','! =','<','>','<=','>='],         

[web2py] Re: mysql postgres different behaviors

2011-10-18 Thread Massimo Di Pierro
One problem I see is this: try: db io except Exception: On exception you should explicitly rollback try: db io except Exception: db.rollback() I also do not know why you defined m_wind_table = db.Table(db, 'm_wind_10min', base_table, Field(...), ...) instead of m_wind_table = db.define_

[web2py] language

2011-10-18 Thread Web2Py Freak
Dear All , I want to button the can change the language of the website ? Is it possible ? Best Regards.

[web2py] Re: SOCKsify all connections from web2py server

2011-10-18 Thread Massimo Di Pierro
Interesting problem. I assume you are working the web server level. That means Rocket. If that is correct, you should contact the author of Rocket: https://launchpad.net/rocket look into gluon/rocket.py and the logic to handle SSL. There is a single socket and a it is wrapped into SSL. Hope this

[web2py] Re: Ubuntu 11.10 Internal error Ticket issued: unrecoverable

2011-10-18 Thread Massimo Di Pierro
You are doing something weird (I do not mean it in a negative sense). Why the GTK reference in the traceback? What's the web server? The error is that the web server is not storing the environment variable PATH_INFO when passing control to WSGI. On Oct 18, 5:06 am, Halili wrote: > I downloaded th

Re: [web2py] How to share a function between controllers

2011-10-18 Thread Jonathan Lundell
On Oct 18, 2011, at 12:52 AM, Manuele wrote: > On 17/10/2011 23:14, Jonathan Lundell wrote: >> Or import it from a module. > but modules don't have direct access to the db... True, but you can pass the db to your functions. > maybe the two easiest ways are: > > 1. define it in a model file... a

[web2py] Re: SQLFORM.factory and Select functionalities

2011-10-18 Thread Anthony
Check out http://dev.s-cubism.com/plugin_lazy_options_widget and http://www.web2pyslices.com/search?query=cascad&criteria=title. Anthony On Tuesday, October 18, 2011 9:00:33 AM UTC-4, Kostas M wrote: > > I want a FORM that the select option from the 2nd field, depends on > the select option of

[web2py] Re: Web2py MVC and Qooxdoo

2011-10-18 Thread wwwgong
Hi Phyo, I have exactly the same question as yours when you first started this thread 1 month ago. can you share your working sample with qooxdoo and web2py integration? I am interested in using Qooxdoo for custom UI in front of web2py. Thanks, Wen my email=wen.g.g...@gmail.com On Sep 19, 3:31 pm

[web2py] Re: language

2011-10-18 Thread David Marko
See docs here: http://www.web2py.com/book/default/chapter/04#T-and-Internationalization T .force('it-it')

Re: [web2py] Freeing the DAL memory, outside web2py

2011-10-18 Thread Ross Peoples
Not sure what effect it will have, but I believe the only way to really free memory in Python is to use something like this: rows = db(...).select(...) del rows This won't immediately free the memory, but might make it free faster than dereferencing it. Alternatively, you can call gc.collect()

Re: [web2py] Re: Grid/smartgrid: overriding the search_options

2011-10-18 Thread Johann Spies
Thanks Massimo. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: Grid/Smartgrid: how to use the 'selectable' option?

2011-10-18 Thread Johann Spies
Thanks! Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: mysql postgres different behaviors

2011-10-18 Thread Manuele
On 18/10/2011 15:24, Massimo Di Pierro wrote: One problem I see is this: try: db io except Exception: On exception you should explicitly rollback try: db io except Exception: db.rollback() interesting point... i'll try and report I also do not know why you defined m_wind_table = db.T

[web2py] Re: python 2.4 - last supported version

2011-10-18 Thread Ross Peoples
I think 1.95.1 was the last version to support Python 2.4. If you are using modules, this release will require you to use the old import method by calling local_import('module_name'). I couldn't immediately find where to download it, so maybe someone else can direct you to it, now that you know

[web2py] Re: python 2.4 - last supported version

2011-10-18 Thread Anthony
I suppose you can also do an hg pull from Google code and specify the R-1.95.1 tag (http://code.google.com/p/web2py/source/browse/?name=R-1.95.1). On Tuesday, October 18, 2011 10:02:17 AM UTC-4, Anthony wrote: > > http://web2py.com/examples/static/1.95.1/web2py_src.zip > > You can get any old ver

[web2py] Re: python 2.4 - last supported version

2011-10-18 Thread Anthony
http://web2py.com/examples/static/1.95.1/web2py_src.zip You can get any old version by filling in the correct version number in that URL. Anthony On Tuesday, October 18, 2011 9:59:18 AM UTC-4, Ross Peoples wrote: > > I think 1.95.1 was the last version to support Python 2.4. If you are using >

[web2py] Re: language

2011-10-18 Thread annet
Hi, I only use web2py's T and Internationalization feature in case I need a few words to be translated. In cases were I have longer texts that need to be translated, I either put them in a database or in a view. I also have the user choose his preferred language, I never base it on a user's locat

[web2py] Re: Menus and Selected Tab

2011-10-18 Thread horridohobbyist
Sorry, I tried it, but it didn't work. Richard On Oct 17, 3:00 pm, Paolo Caruccio wrote: > If you're using respone.menu to build your menu and in line > withhttp://www.web2py.com/book/default/search?search=response.menu > you could replace the second item (the boolean value)in the tuple with th

[web2py] Re: Menus and Selected Tab

2011-10-18 Thread horridohobbyist
This is all very messy. I think I'll just leave well enough alone. Pity, though. I'm quite surprised at how poorly thought-out the Superfish menu system is. Richard On Oct 17, 3:01 pm, ron_m wrote: > Oops sorry forgot a detail, I did this a while back > > I have a simple mapping of top level me

[web2py] Re: language

2011-10-18 Thread Anthony
On Tuesday, October 18, 2011 10:19:27 AM UTC-4, annet wrote: > > I also have the user choose his preferred language, I never base it on > a user's location. At the > moment I live in the Baltic Sea area, some web sites think they do me > a favour by presenting their > content in German ... > T

[web2py] DAL continual memory increase (relatively easy fix)

2011-10-18 Thread Dragonfyre13
First, this post actually already talks about it (found after doing my own profiling with guppy/heapy): http://groups.google.com/group/web2py/browse_thread/thread/534961af8e972300/212d7a59f2a7f239 The general idea is that all sql statements are stored as is in db._timings. This isn't an issue, exc

[web2py] Re: Freeing the DAL memory, outside web2py

2011-10-18 Thread Dragonfyre13
Could your issue be related to this: http://groups.google.com/group/web2py/browse_thread/thread/c85577827584952f You should be able to use (with some small difficulty in the interface) heapy to trace where you are using memory. Where I traced it down to was db._timings. That attribute seems safe t

[web2py] Re: python 2.4 - last supported version

2011-10-18 Thread Cory Coager
Thank you both, version 1.95.1 seems to be working so far on python 2.4.

[web2py] Re: Menus and Selected Tab

2011-10-18 Thread Paolo Caruccio
Richard, could you post not working code sample? Ciao. Paolo

[web2py] Re: SOCKsify all connections from web2py server

2011-10-18 Thread Dragonfyre13
Sounds like you're more concerned with outbound connections. Checkout these (I've only played briefly with the first): http://socksipy.sourceforge.net/ http://sourceforge.net/projects/pysocks/ Discussion here: http://stackoverflow.com/questions/2537726/using-urllib2-with-socks-proxy Unless I'm m

[web2py] Re: DAL continual memory increase (relatively easy fix)

2011-10-18 Thread Anthony
Can you submit an issue: http://code.google.com/p/web2py/issues/list On Tuesday, October 18, 2011 10:56:56 AM UTC-4, Dragonfyre13 wrote: > > First, this post actually already talks about it (found after doing my > own profiling with guppy/heapy): > > http://groups.google.com/group/web2py/browse_

[web2py] Re: language

2011-10-18 Thread Web2Py Freak
i just want to have a button and when i clikc on it , it changes the language to another one , how can i do it ?? i dont want it by the browser settings ..

[web2py] Re: language

2011-10-18 Thread Anthony
Looks like the 'admin' app does it by setting a cookie: http://code.google.com/p/web2py/source/browse/applications/admin/views/layout.html#34 On Tuesday, October 18, 2011 11:59:44 AM UTC-4, Web2Py Freak wrote: > > i just want to have a button and when i clikc on it , it changes the > language

Re: [web2py] Re: mysql postgres different behaviors

2011-10-18 Thread Manuele
On 18/10/2011 15:59, Manuele wrote: On 18/10/2011 15:24, Massimo Di Pierro wrote: One problem I see is this: try: db io except Exception: On exception you should explicitly rollback try: db io except Exception: db.rollback() interesting point... i'll try and report nothing changes..

[web2py] Re: Does auth.requires() always requires login?

2011-10-18 Thread Ray (a.k.a. Iceberg)
Thanks Massimo and everyone took part in this thread. By the way, Massimo did not give the reason why changed auth.requires() behavior in 1.99.x, but here is my guess: otherwise it would become an easy mistake for web2py users (all of us), to just write auth.requires(condition) and forgetting it c

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread Anthony
How are you calling fetchText? Are you sure the value you are passing as the 'name' argument is in fact the value of the 'hash' field of one of the records? On Tuesday, October 18, 2011 12:16:09 PM UTC-4, Sathvik Ponangi wrote: > > Dear Johann, > I'm using Web2py with Google AppEngine & I can s

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread Sathvik Ponangi
Yes, I'm always calling it with: fetchText('changeThis.txt') On Tue, Oct 18, 2011 at 10:40 PM, Anthony wrote: > How are you calling fetchText? Are you sure the value you are passing as > the 'name' argument is in fact the value of the 'hash' field of one of the > records? > > > On Tuesday, Oct

[web2py] Ideas for new welcome app

2011-10-18 Thread Anthony
All, There are plans to update the 'welcome' scaffolding app, and we are considering various front-end frameworks to serve as a base. Here are some options being considered: - HTML5 Boilerplate (http://html5boilerplate.com) - Twitter Bootstrap (http://twitter.github.com/bootstrap) - Sk

[web2py] Re: mysql postgres different behaviors

2011-10-18 Thread Massimo Di Pierro
No. I am still very puzzled that the error you quote is not related to the code you posted. The error is in code executed before your code is executed and it is related to parsing input from form submission. Do you use current.request somewhere? If used improperly could, maybe, cause something like

[web2py] Re: Does auth.requires() always requires login?

2011-10-18 Thread Massimo Di Pierro
True. It also allowed to simplify the logic of the other decorators since now they all call auth.requires(...) and this limited some duplication of code. On Oct 18, 11:57 am, "Ray (a.k.a. Iceberg)" wrote: > Thanks Massimo and everyone took part in this thread. > > By the way, Massimo did not give

[web2py] Re: Ideas for new welcome app

2011-10-18 Thread David Marko
I think the Twitter Bootstrap is most complex from those mentioned and covers all alters, grids, modal dialogues etc and still lightweight

[web2py] Re: Ideas for new welcome app

2011-10-18 Thread Gour
On Tue, 18 Oct 2011 11:01:55 -0700 (PDT) Anthony wrote: > The question is, are we missing any good options that should be > considered, particularly mobile-friendly responsive frameworks? I'm not sure whether it's already mobile-friendly, but I like YAML. http://www.yaml.de/en/ Sincerely, Go

[web2py] Re: Freeing the DAL memory, outside web2py

2011-10-18 Thread Petrucio
Doing a select(ALL) is completely out of the question. I'm already releasing heavy objects, even doing calls to gc.collect() by hand, and I've taken extra precautions to create methods that returns me rows in groups of only 10k at a time. And I'm sure I'M not the one holding references to those row

Re: [web2py] Re: Ideas for new welcome app

2011-10-18 Thread Vasile Ermicioi
I like foundation slider - Orbit but they all are awesome thanks for sharing these links ))

[web2py] Re: Freeing the DAL memory, outside web2py

2011-10-18 Thread Petrucio
Since I was already doing calls to gc.collect by hand after releasing all references, this is unlikely to have a difference over that. One way I was thinking of [over]-doing it was to do some processing, save the state, exit the process entirelly, resume where it left of, rince and repeat. Obvious

[web2py] Re: Freeing the DAL memory, outside web2py

2011-10-18 Thread Petrucio
Yes, I've seen your post earlier but haven't had time to test it, indeed it looks like they are the same problem. I'll test it later tonight, and let you know if it solves my problem too. Thanks everyone for the inputs. On Oct 18, 1:01 pm, Dragonfyre13 wrote: > Could your issue be related to

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread Anthony
I'm puzzled. Maybe someone else has an idea. What happens if you run the same app on your local machine with SQLite? On Tuesday, October 18, 2011 1:17:54 PM UTC-4, Sathvik Ponangi wrote: > > Yes, I'm always calling it with: > > fetchText('changeThis.txt') > > > On Tue, Oct 18, 2011 at 10:40 PM, A

[web2py] web2py on gae

2011-10-18 Thread Minocha
I am a beginner and have been trying to build an app using web2py. I have also read the posts related to the uploading of the app. The things i have done - build a general app update the app.yaml file in web2py/applications/[application_name]/ But still when i run the app on the google local sdk

[web2py] is web2py use ascii internally?

2011-10-18 Thread Richard
Hello, Is web2py use unicode or ascii internally for string? I found having problem inserting value from a web2py select query into custom xml building export that I build with lxml... How or where to specify that I want the row.field output to be utf-8? Thanks Richard

Re: [web2py] Re: Ubuntu 11.10 Internal error Ticket issued: unrecoverable

2011-10-18 Thread Halil I CELIK
Thank you for your response. And sorry for "firefox and Gtk-warning " messages. All I did was to copy and paste the console errors I received when I run web2py. The web server is Rocket1.2.4. 2011/10/18 Massimo Di Pierro > You are doing something weird (I do not mean it in a negative sense

Re: [web2py] is web2py use ascii internally?

2011-10-18 Thread Richard Vézina
Here the error message that I get when I try to insert the output of this piece of code into my xml : from lxml import etree from lxml.builder import ElementMaker from lxml.etree import Comment, ProcessingInstruction from StringIO import StringIO from copy import deepcopy W = ElementMaker(namespa

Re: [web2py] is web2py use ascii internally?

2011-10-18 Thread Richard Vézina
Ok this works : tbl.append( TR( TC( P( R( T(r.first_name.decode('utf-8')), ), ), ), TC( P(

[web2py] Re: SQLFORM.factory and Select functionalities

2011-10-18 Thread Omi Chiba
Kostas, This could be your alternatives. slice: http://www.web2pyslices.com/slices/take_slice/144 demo: http://ochiba.fluxflex.com/Ajax_Cascading_Drop_Down/default/index On Oct 18, 8:00 am, Kostas M wrote: > I want a FORM that the select option from the 2nd field, depends on > the select optio

[web2py] Re: Ideas for new welcome app

2011-10-18 Thread Omi Chiba
+1 Twitter Bootstrap >(hopefully that's mobile-friendly) Yes! I was working on the internal site for blackberry and hoping if welcome app become more flexible.

[web2py] Re: Ideas for new welcome app

2011-10-18 Thread Omi Chiba
Woops, I missed the note. Maybe +1 for Foundation. >Note, the latter two (Skeleton and Foundation) offer mobile-friendly >responsive/adaptive layouts (i.e., use of CSS media queries to automatically >alter the layout on smaller devices). On Oct 18, 2:07 pm, Omi Chiba wrote: > +1 Twitter Bootstra

[web2py] Re: Menus and Selected Tab

2011-10-18 Thread horridohobbyist
Sorry, it does work. I forgot to clear the damn browser cache! (This bites me in the ass every frickin' time!) Richard On Oct 18, 11:06 am, Paolo Caruccio wrote: > Richard, > > could you post not working code sample? > > Ciao. > > Paolo

[web2py] Re: Ideas for new welcome app

2011-10-18 Thread Ross Peoples
I know this was mentioned elsewhere, but I feel that being mobile-friendly is a must, since these devices are being used to browse the web as much as (if not more than) regular desktops.

Re: [web2py] Re: Ubuntu 11.10 Internal error Ticket issued: unrecoverable

2011-10-18 Thread Bruno Rocha
I just downloaded ans runs ok. I am running stable 11.10 Oneiric Oceilot. Look screenshot: http://minus.com/mbkblfH0er GTK warnings still appears but does nothing..

[web2py] Ubuntu 11.10 Internal error Ticket issued: unrecoverable (continued)

2011-10-18 Thread Halili
I installed web2py on my ubuntu 11.10 labtop. It worked!!! (but with following errors: web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.99.2 (2011-09-26 06:55:33) stable Database drivers available: SQLite3, pymysql Starting hardcron... WARNING:web2py:GUI not avai

[web2py] Reusing a view

2011-10-18 Thread pepper_bg
I am curious about the general case of how a view file can be reused but here is my specific example. I need custom user registration and profile pages so my controller (default.py) looks like: def profile(): return dict(form=generate_profile_form()) def register(): return dict(form=gener

[web2py] Dynamic modules

2011-10-18 Thread haggis
Hello, I want an intranet application which is extendable by dynamic modules. That is, it should be possible to copy i.e. a "statistic module" into a module directory and the module will be automatically implemented without changing the applications source or doing anything in appadmin. So with nex

Re: [web2py] Reusing a view

2011-10-18 Thread Vasile Ermicioi
take a look at http://web2py.com/book/default/chapter/05#Using-the-Template-System-to-Generate-Emails you can use this technique to reuse your views

Re: [web2py] Reusing a view

2011-10-18 Thread pbreit
response.view might work better: http://web2py.com/book/default/chapter/04?search=response.view But what I do in my user.html view is branch on request.args(0): {{if request.args(0)=='login':}} ... {{elif request.args(0)=='register':}} ... {{else:}} {{=form}} {{pass}}

[web2py] AJAX weirdness

2011-10-18 Thread Harshad
Following is the code that makes the ajax call: $.ajax({ type: "GET", url: '/devicemanager/default/get_response.json/192.168.1.24/107', success: display_received, }); display_received displays the received information. The controller simply does the following: de

[web2py] Re: web2py on gae

2011-10-18 Thread Simon Ashley
Are you able to post more details of the errors you get? Generally it works as expected (but with some caveats on the GAE side). We've currently going through that exercise, and noting that there could issues with SQL cloud which we haven't resolved yet (i.e. runs nosql OK but not mysql) On Oct 1

[web2py] Re: AJAX weirdness

2011-10-18 Thread Anthony
You're using a relative URL. On Tuesday, October 18, 2011 5:20:54 PM UTC-4, Harshad wrote: > > Following is the code that makes the ajax call: > > $.ajax({ > type: "GET", > url: '/devicemanager/default/get_response.json/192.168.1.24/107', > success: display_received, >

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread pbreit
Does this work? db(db.files.hash=='changeThis.txt').select().first()

[web2py] Re: AJAX weirdness

2011-10-18 Thread Harshad
$.ajax({ type: "GET", url: 'http://Harshad-PC.local/devicemanager/default/get_response.json/192.168.1.24/107', success: function(data,textStatus,jqXHR) {alert("Success! Data: "+data)}, error: function(data,textStatus,jqXHR) {alert("Error: Failed to load data."

[web2py] Re: Reusing a view

2011-10-18 Thread Anthony
On Tuesday, October 18, 2011 4:20:55 PM UTC-4, pepper_bg wrote: > > I am curious about the general case of how a view file can be reused > but here is my specific example. I need custom user registration and > profile pages so my controller (default.py) looks like: > > def profile(): > retu

[web2py] Re: AJAX weirdness

2011-10-18 Thread Anthony
Does the machine you're making the request from have access to http://Harshad-PC.local/ in general (what happens if you enter that in the browser address bar)? If not, an Ajax call wouldn't work either. On Tuesday, October 18, 2011 5:37:26 PM UTC-4, Harshad wrote: > > $.ajax({ > type

[web2py] Re: AJAX weirdness

2011-10-18 Thread pbreit
It also might be a problem that the browser is disallowing a cross-domain Ajax call (usually the case for security reasons).

[web2py] Re: SOCKsify all connections from web2py server

2011-10-18 Thread Arturo Filastò
Yes, you are correct I am worried about outbound connections. Like connecting to SMTP etc. Is there a central location that I should patch in web2py to reroute all *outbound* connections through a proxy. I am aware of how to use python with a SOCKS proxy, but I would like to know where I should i

[web2py] Re: Reusing a view

2011-10-18 Thread pepper_bg
response.view was what I was looking for (remember seeing it somewhere but then lost it), thank you guys... > Rather than providing links to /user/register and then redirecting to > /register, why not just provide links directly to /register? You don't have > to route requests to register or to vi

[web2py] Re: AJAX weirdness

2011-10-18 Thread Harshad
Wouldn't this only be a problem if I was actually making a cross-domain call? The remote machines are on the same local area network as the server.

Re: [web2py] AJAX weirdness

2011-10-18 Thread Bruno Rocha
response.generic_patterns = ['*'] or ['.json']

Re: [web2py] AJAX weirdness

2011-10-18 Thread Harshad
I'm at home right now, but I'll try that at work tomorrow. Thanks.

Re: [web2py] Re: table, grid, smartgrid, getting better

2011-10-18 Thread Tito Garrido
Is there a way to translate the buttons and etc? Is there any documentation about smartgrid? This thread is so big... it complicated to follow it... Regards, Tito On Mon, Oct 3, 2011 at 4:49 PM, Phyo Arkar wrote: > Very nice work ongoing .. > > Only sad thing is i am moving into Qooxdoo framew

[web2py] Re: AJAX weirdness

2011-10-18 Thread pbreit
"same origin" is probably the better term. Basically Ajax can only call the same server that the page was served from. There are some workarounds. http://en.wikipedia.org/wiki/Same_origin_policy I'm still guessing that that's the issue. That's what it sounds like, at least.

Re: [web2py] AJAX weirdness

2011-10-18 Thread Anthony
If you're using generic.json for the view, then setting response.generic_patterns might be the issue. The 'welcome' app allows the generic views to work on the local machine only by default. If you have a specific get_response.json view, then this would not be the issue. Anthony On Tuesday, Oc

[web2py] Re: Reusing a view

2011-10-18 Thread Anthony
On Tuesday, October 18, 2011 6:50:06 PM UTC-4, pepper_bg wrote: > > > Rather than providing links to /user/register and then redirecting to > > /register, why not just provide links directly to /register? You don't > have > > to route requests to register or to view the profile through the user

[web2py] Error when @auth.requires_login() decorator is used on a method in controllers/default.py

2011-10-18 Thread Matthew Young
Hi everyone I am using the following python/web2y versions: web2py™ (1, 99, 3, datetime.datetime(2011, 10, 18, 17, 10, 12), 'dev') Python Python 2.7: /usr/bin/python I am running web2py from source under linux. I have the following method in my default controller file: @auth.requires_log

[web2py] Re: Ideas for new welcome app

2011-10-18 Thread TheSweetlink
+1 Foundation or Skeleton for mobile friendliness. Seems much easier than adapting a custom grid. I found one here a while ago if anyone is interested. Licensed under GPL and MIT. http://www.spry-soft.com/grids/ On Oct 18, 2:01 pm, Anthony wrote: > All, > > There are plans to update the 'welc

[web2py] Re: web2py on gae

2011-10-18 Thread howesc
try moving app.yaml to web2py/app.yaml that's where i keep mine.

[web2py] Re: Error when @auth.requires_login() decorator is used on a method in controllers/default.py

2011-10-18 Thread Anthony
On Tuesday, October 18, 2011 8:30:41 PM UTC-4, Matthew Young wrote: > > Hi everyone I am using the following python/web2y versions: > web2py™ (1, 99, 3, datetime.datetime(2011, 10, 18, 17, 10, 12), > 'dev') > Where did you get that version? The latest I see on Google code is 2011/10/17: http:/

Re: [web2py] DAL: Selecting using the 'WHERE' clause

2011-10-18 Thread howesc
shot in the dark herechange the field type from 'text' to 'string'. on GAE 'text' fields do not support all the filtering operations i think. if that change makes it work (you probably will have to re-insert the data), then we should re-read the docs about text fields on GAE

[web2py] GAE - SQL cloud connection

2011-10-18 Thread Simon Ashley
Having an issues connecting to the SQL cloud. Have a simple application which works on SQLite. Able to deploy to GAE using the following: db = DAL('gae') However if its changed to: db = DAL('google:sql://cdmr01:csm/csmcel05',migrate_enabled=True) # cdmr01:csm is the sql cloud instance and c

  1   2   >