[web2py] Re: web2py minimalist version

2010-09-30 Thread guruyaya
I'm curious, what is populate for, anyway? On Sep 30, 3:13 am, Richard richar...@gmail.com wrote: thanks - didn't know about that free plan. Pity they haven't translated everything to English. On Sep 29, 8:13 am, Jose jjac...@gmail.com wrote: On 25 ago, 00:15, Kevin

[web2py] Re: Searching and indexing a microsoft office documents

2010-09-30 Thread selecta
i work on linux and i index ms .doc files like this show and extract content with wvHtml (http://wvware.sourceforge.net/ Ubuntu: sudo aptitude install wv) index them with http://whoosh.ca/ On Sep 29, 11:02 pm, Napoleon Moreno napoleo...@gmail.com wrote: Good afternoon Thanks for your

[web2py] Re: finally solved uplad in web2py ajax loaded components

2010-09-30 Thread selecta
*bump* this actually solves the problem of file uploads in LOAD loaded forms I send the patch for the examples web2py_ajax.html because I do not know which is the main web2py_ajax.html please include this fix in web2py On Sep 28, 10:53 pm, selecta gr...@delarue-berlin.de wrote: After spending

[web2py] left outer join and condition

2010-09-30 Thread annet
In my model I defined the following tables: db.define_table('css_selectorproperty', Field('selector',length=48,default='',notnull=True), Field('property',length=36,default='',notnull=True), Field('name',length=84,default='',notnull=True),

[web2py] Re: sqlite and vaccum

2010-09-30 Thread winti
In my current project i am temporary storing blob's. In this case the vacuum feature helps a lot to reduce overhead. in my case i can reduce the growing sqlite db file's from 600MB to 200KB while using: db.executesql('PRAGMA auto_vacuum = FULL') db.executesql('VACUUM') Thanks Stefan On 29 Sep.,

[web2py] shorting your URL with routes

2010-09-30 Thread Francisco Costa
Hello! I have this url http://domain.com/welcome/user/view/username that shows a user profile page. I've already get rid of the 'welcome application mae by using the following routes routes_in = ( ('/(?Pany.*)', '/welcome/\gany'), ) routes_out = ( ('/welcome/(?Pany.*)', '/\gany'), ) so the

[web2py] Re: dal connection failed on legacy postgres db

2010-09-30 Thread Oleg
Much older :) My client has PostgreSQL 7.4. They have there some sensitive pharma-data and don't wanna migrate to new one in next few years.. :( :( What kind of vulnerability do you mean? What would you recommend in this case? Thank you On Sep 30, 2:38 am, mdipierro mdipie...@cs.depaul.edu

[web2py] Re: shorting your URL with routes

2010-09-30 Thread Wikus van de Merwe
Try this: routes_in = ( (/user/(.+), r/welcome/user/view/\1), } routes_out = ( (/welcome/user/view/(.+), r/user/\1)), }

[web2py] Re: Bug in URL(..,..,vars={})

2010-09-30 Thread Iceberg
Hi there, The change of URL(...) from a string to an XML() helper bites me when I upgrade my old web2py from trunk today. I can change my own app's code to adapt the latest URL(...) behavior, but am just writing to let people know there is one more scenario in which the new URL(...) breaks code.

[web2py] Re: rise HTML !--xxxxxx

2010-09-30 Thread Iceberg
Thanks for the info. I remembered once I had same question but did not find the answer. But hey, why not just put all these important notes directly into our code instead of those meaningless x? That way we combine code and its document together. Perfect! On Sep 11, 9:31 am, mdipierro

[web2py] Re: shorting your URL with routes

2010-09-30 Thread Francisco Costa
Hello Wikus, tx for your answer. It only works if I don't have the previous routes that cut the 'welcome' application. Can you make it work with bouth? I wouldn't like to show the application name in the others controllers/ functions urls. On Sep 30, 11:57 am, Wikus van de Merwe

[web2py] nginx with bultin uwsgi module

2010-09-30 Thread elffikk
http://nginx.org/

[web2py] Re: web2py minimalist version

2010-09-30 Thread mdipierro
http://gluonframework.wordpress.com/2010/03/04/web2py-learner/ On Sep 30, 1:49 am, guruyaya guruy...@gmail.com wrote: I'm curious, what is populate for, anyway? On Sep 30, 3:13 am, Richard richar...@gmail.com wrote: thanks - didn't know about that free plan. Pity they haven't translated

[web2py] Re: finally solved uplad in web2py ajax loaded components

2010-09-30 Thread mdipierro
I knew about this but this requires adding files to the scaffolding apps that 99% of users would not use. What do other people think? Massimo On Sep 30, 2:34 am, selecta gr...@delarue-berlin.de wrote: *bump* this actually solves the problem of file uploads in LOAD loaded forms I send the

[web2py] Re: left outer join and condition

2010-09-30 Thread mdipierro
can you print db(...)._select(...) with _select but same query as yours and see what you get? On Sep 30, 3:07 am, annet annet.verm...@gmail.com wrote: In my model I defined the following tables: db.define_table('css_selectorproperty',     Field('selector',length=48,default='',notnull=True),

[web2py] Re: dal connection failed on legacy postgres db

2010-09-30 Thread mdipierro
You app is vulnerable to SQL injections. Anybody can get in. period. On Sep 30, 5:30 am, Oleg obutov...@googlemail.com wrote: Much older :) My client has PostgreSQL 7.4. They have there some sensitive pharma-data and don't wanna migrate to new one in next few years.. :( :( What kind of

[web2py] Re: Bug in URL(..,..,vars={})

2010-09-30 Thread mdipierro
just fixed in trunk. On Sep 30, 6:28 am, Iceberg iceb...@21cn.com wrote: Hi there, The change of URL(...) from a string to an XML() helper bites me when I upgrade my old web2py from trunk today. I can change my own app's code to adapt the latest URL(...) behavior, but am just writing to

[web2py] job in london

2010-09-30 Thread mdipierro
http://www.jobserve.us/SrDOT-Java-Developer-Python-Web2py-London-Permanent-W22086645464B1847.jsjob

[web2py] Re: dal connection failed on legacy postgres db

2010-09-30 Thread Oleg
Oops.. You are right.. hm... what would you recommend in this case? Is it possible to make some kind protection on web2py level? Should I just apply this patch always locally for every new version web2py? :) On Sep 30, 3:14 pm, mdipierro mdipie...@cs.depaul.edu wrote: You app is vulnerable to

[web2py] Re: shorting your URL with routes

2010-09-30 Thread Francisco Costa
any thoughts on this one? On Sep 30, 12:57 pm, Francisco Costa m...@franciscocosta.com wrote: Hello Wikus, tx for your answer. It only works if I don't have the previous routes that cut the 'welcome' application. Can you make it work with bouth? I wouldn't like to show the application

[web2py] Re: dal connection failed on legacy postgres db

2010-09-30 Thread mdipierro
The problem is that postgresql before 8.2 was not conform to the SQL specs and uses \' to escape quotes instead of '' even in 8.2 it was optional and had to be set with the command that gives you trouble. 1) One thing you can do is use this validator class IS_SAFE(): def __init__(self):

[web2py] Re: Image gallery on GAE

2010-09-30 Thread István Gazsi
Thank you for your replies!

[web2py] Re: shorting your URL with routes

2010-09-30 Thread mdipierro
routes_in = ( ('/user/(?Pany.*)', '/welcome/user/view/\gany'), ('/(?Pany.*)', '/welcome/\gany'), ) routes_out = ( ('/welcome/user/view/(?Pany.*)', '/user/\gany'), ('/welcome/(?Pany.*)', '/\gany'), ) the order is important . On Sep 30, 4:47 am, Francisco Costa m...@franciscocosta.com

[web2py] Select specific fields on GAE

2010-09-30 Thread István Gazsi
Hi everybody! I've working on a web2py application and I deployed it on Google App Engine. In my application I do database query like this: db(db.gallery.category_id==main_category.id).select(db.gallery.id, db.gallery.title, db.gallery.thumbnail, db.gallery.posted_on,

Re: [web2py] Re: dal connection failed on legacy postgres db

2010-09-30 Thread Adrian Klaver
On Thursday 30 September 2010 6:47:38 am mdipierro wrote: The problem is that postgresql before 8.2 was not conform to the SQL specs and uses \' to escape quotes instead of '' even in 8.2 it was optional and had to be set with the command that gives you trouble. If its only a matter of

[web2py] Re: Select specific fields on GAE

2010-09-30 Thread mdipierro
GAE does not support selecting parts of a record. We could filter out the data at the web2py level but why? You already downloaded more than you need and filtering would just consume cycles. The solution it not to use fields you do not need. If the problem is SQLTABLE, you can filter fields with

[web2py] Re: dal connection failed on legacy postgres db

2010-09-30 Thread mdipierro
that may work but you would need to try. try insert a ' and \ in a text field and see if you get any OperationalError On Sep 30, 8:59 am, Adrian Klaver adrian.kla...@gmail.com wrote: On Thursday 30 September 2010 6:47:38 am mdipierro wrote: The problem is that postgresql before 8.2 was not

[web2py] Re: Image gallery on GAE

2010-09-30 Thread mdipierro
Mind that @cache(request.env.path_info+request.env.query_string, time_expire=3600, cache_model=cache.ram) my end up caching a lot of stuff and cause out of memory problems. Is there a way on GAE to have a normal form that includes a file upload for the blobstore? I mean a form that includes

[web2py] Re: shorting your URL with routes

2010-09-30 Thread Wikus van de Merwe
You mean this doesn't work for you? routes_in = ( (/user/(.+), r/welcome/user/view/\1), (/(.+), r/welcome/\1) ) routes_out = ( (/welcome/user/view/(.+), r/user/\1), (/welcome/(.+), r/\1) )

[web2py] Re: Image gallery on GAE

2010-09-30 Thread Martin.Mulone
i try some time ago, caching download with this parameters and didn't work. perhaps you have to take a look to this http://groups.google.com/group/web2py/browse_thread/thread/c10235cb16c476f/d72d988abe41a3c1?lnk=gstq=cache+download#d72d988abe41a3c1 On Sep 30, 11:14 am, mdipierro

[web2py] Re: Google groups posts and Google code changes gadgets?

2010-09-30 Thread Wikus van de Merwe
On Sep 28, 10:04 pm, Bruno Rocha rochacbr...@gmail.com wrote: I just need to find a solution to read latest 5 entries in code.google It's just a HTML table, isn't it? Use one of the HTML parsers [1-4] to get what you want. Alternatively parse the output of hg incoming run on an empty repo:

[web2py] seo starter guide

2010-09-30 Thread Martin.Mulone
for all interested in seo, google update his SEO guide. http://googlewebmastercentral.blogspot.com/2010/09/seo-starter-guide-updated.html

Re: [web2py] seo starter guide

2010-09-30 Thread Bruno Rocha
Thank you, this will be useful for a project I am working right now ;) 2010/9/30 Martin.Mulone mulone.mar...@gmail.com for all interested in seo, google update his SEO guide. http://googlewebmastercentral.blogspot.com/2010/09/seo-starter-guide-updated.html -- http://rochacbruno.com.br

[web2py] Minor bug and fix in cache.py

2010-09-30 Thread Iceberg
Hi Massimo, The following code snippet comes from the end of gluon/cache.py 's CacheInRam.__call__(): value = f() self.locker.acquire() self.storage[key] = (time.time(), value) self.storage[CacheAbstract.cache_stats_name]['misses'] += 1

[web2py] Serve different applications to different URLS

2010-09-30 Thread Tyler Laing
I have two URLs, novelite.ca and noverotic.ca and I'm trying to figure out how to make web2py serve a different application depending on the base url. Does this involve routes.py?

Re: [web2py] Re: jqgrid how can I get my field label?

2010-09-30 Thread Richard Vézina
Does the plugin_wiki.py file is the only difference? I try to only replace that file and I have no better result. Richard On Wed, Sep 29, 2010 at 10:55 PM, mdipierro mdipie...@cs.depaul.edu wrote: now plugin_wiki jqgrid has colnames. Please give it a try. You need to get it from cube2py on

[web2py] timestamp update from a crud form

2010-09-30 Thread Manu
Hi I need some help with a simple thing , My DB is defined this way : db.define_table('test', Field('message'), Field('date',datetime), ) I would like to ensure that when the form is created with form = crud.create('test') , that when i submit my form the timestamp is updated with the

Re: [web2py] Re: jqgrid how can I get my field label? CLOSED

2010-09-30 Thread Richard Vézina
Ok I was not copied the /models/plugin_wiki.py Now work perfectly. Richard On Thu, Sep 30, 2010 at 12:58 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: Does the plugin_wiki.py file is the only difference? I try to only replace that file and I have no better result. Richard On

[web2py] Re: GAE address

2010-09-30 Thread Rick
But how to upload it in my local copy? I understand that I'd somehow get the app on the address http://127.0.0.1:8000 but I don't understand how to get it there. It has still the address: http://127.0.0.1:8000/myapp I'm running linux. Perhaps that has an impact on the procedure? On Sep 28, 5:46 

[web2py] Re: left outer join and condition

2010-09-30 Thread annet
Massimo, can you print db(...)._select(...) with _select but same query as yours and see what you get? This: @auth.requires_membership('card') def manage_css(): print db()._select(db.css_selectorproperty.ALL,db.css_declaration.ALL,\

[web2py] LOAD with crud not working properly

2010-09-30 Thread yamandu
I have LOAD with ajax activated that loads a crud form and a list. Crud form in a create when there is only one argument in request.args and is a update when request.args has two arguments. The update is achieved via a trapped ajax link (that has two args) in the list. This LOAD as the detail

[web2py] Re: Minor bug and fix in cache.py

2010-09-30 Thread mdipierro
thanks. Will post it tonight. On Sep 30, 11:29 am, Iceberg iceb...@21cn.com wrote: Hi Massimo, The following code snippet comes from the end of gluon/cache.py 's CacheInRam.__call__():         value = f()         self.locker.acquire()         self.storage[key] = (time.time(), value)      

[web2py] Re: Serve different applications to different URLS

2010-09-30 Thread mdipierro
routes does not support this but you can do things like app=request.env.http_host.split('.')[0] if not app=request.application: redirect(...) On Sep 30, 11:57 am, Tyler Laing trinio...@gmail.com wrote: I have two URLs, novelite.ca and noverotic.ca and I'm trying to figure out how to make

[web2py] Re: jqgrid how can I get my field label?

2010-09-30 Thread mdipierro
yes On Sep 30, 11:58 am, Richard Vézina ml.richard.vez...@gmail.com wrote: Does the plugin_wiki.py file is the only difference? I try to only replace that file and I have no better result. Richard On Wed, Sep 29, 2010 at 10:55 PM, mdipierro mdipie...@cs.depaul.edu wrote: now plugin_wiki

[web2py] Re: timestamp update from a crud form

2010-09-30 Thread mdipierro
'date' is not a valid field name and it may cause trouble. Let's use saved_on you can do db.define_table('test', Field('message'), Field('saved_on','datetime',default=request.now,writable=False,readable=False), ) and then you can use form = crud.create(db.test) On Sep 30, 12:00 pm, Manu

[web2py] Re: left outer join and condition

2010-09-30 Thread mdipierro
The problem is that you select css_selectorproperty and left join css_selectorproperty. Yet you send a condition about the primary table db.css_selectorproperty.inquery==True in the codition about the left join. It should be

[web2py] Re: LOAD with crud not working properly

2010-09-30 Thread mdipierro
i think the problem may be that the curd.create(...) does not have the next attribute set to the correct location. Can you show us the LOAD statement and body of the called function? On Sep 30, 1:06 pm, yamandu yamandu.co...@gmail.com wrote: I have LOAD with ajax activated that loads a crud

[web2py] Unicode bug in XML service

2010-09-30 Thread Clayton
The following crashes with ascii encoding error: @service.xml def test(): return dict(test=u'K\u00E5') It fails with UnicodeEncodeError: 'ascii' codec can't encode character u'\xe5' in position 1: ordinal not in range(128) when the service is called. The following succeeds: @service.xml

[web2py] Re: Unicode bug in XML service

2010-09-30 Thread mdipierro
I would not call this a bug because as a rule web2py supports only utf8 strings. Yet sometime unicode works just fine. I'd call this a suggestion for improvement and I will take a look into it. I am sure It can be done. Massimo On Sep 30, 11:54 am, Clayton clayton.grass...@gmail.com wrote: The

Re: [web2py] Re: timestamp update from a crud form

2010-09-30 Thread Manu
Ok i have tried the default argument , but the issue is that the form is going to be generated with the saved_on value already set instead of generating the value if the submited values are stored and validated. I have seen in the doc that we could use onvalidation , is that the right way to do it

[web2py] Re: timestamp update from a crud form

2010-09-30 Thread mdipierro
I do not understand. If the saved_on value is not generated when the form is saved, when is it generated? How is it passed to the form? setting it in onvalidation is ok, but the problem is whether it can be tampered with. On Sep 30, 1:48 pm, Manu swel...@gmail.com wrote: Ok i have tried the

[web2py] jqgrid sort pb with represent

2010-09-30 Thread Richard Vézina
Hello, I use db.table.field.reprensent=... In that particular case the jqgrid is not able to sort those column instead I use the ID number... Richard

Re: [web2py] Re: finally solved uplad in web2py ajax loaded components

2010-09-30 Thread Michele Comitini
adding while keeping old scaffolding for reference around? 2010/9/30 mdipierro mdipie...@cs.depaul.edu: I knew about this but this requires adding files to the scaffolding apps that 99% of users would not use. What do other people think? Massimo On Sep 30, 2:34 am, selecta

[web2py] Re: special characters in database credentials

2010-09-30 Thread Josh J
Sure I can provide the patch if you want, Would basically just have to change user = m.group(user) passwd = m.group(passwd) to user = urllib.unquote(m.group(user)) passwd = urllib.unquote(m.group(passwd)) everywhere you parse the credentials. On Sep 29, 11:35 am, mdipierro

[web2py] Re: dal connection failed on legacy postgres db

2010-09-30 Thread Oleg
yehhh... just had a look to postgresql docu.. I found that both parameters 'standard_conforming_strings' and 'backslash_quote' were introduced in security update 7.4.13 My client has 7.4.3.. with a lot of security problems :) I give him know about it. On Sep 30, 4:05 pm, mdipierro

[web2py] jqgrid (plugin_wiki) and @auth.requires_login()

2010-09-30 Thread Richard Vézina
Hello, Is it possible to make jqgrid sensible to be @auth.requires_login()? When there is a session that ends because no activity has been detect during long moment there is no message when user try to use the jqgrid control : search or refresh button... I understand that it is a plugin that

[web2py] login?_next= not working

2010-09-30 Thread Johann Spies
Persons who want to use the form on the platform I am developing have to log in. On my local version running on localhost where I do the development the user gets redirected to the form he/she selected. The same does not happen where I publish the page. After login the user gets the 'welcome'

Re: [web2py] jqgrid (plugin_wiki) and @auth.requires_login()

2010-09-30 Thread Bruno Rocha
Thats not the best way, but I do: ``{{if auth.is_logged_in():}}``:template ``table:``:jqgrid ``{{pass}}``:template Ugly, but works. 2010/9/30 Richard Vézina ml.richard.vez...@gmail.com Hello, Is it possible to make jqgrid sensible to be @auth.requires_login()? When there is a session

[web2py] Re: jqgrid (plugin_wiki) and @auth.requires_login()

2010-09-30 Thread mdipierro
There should be no need for that. the `` ... ``:widget is always embedded in a page that has permissions. So it will only be visible to users who have access to that page. the issue is the ajax callback. That is already restricted to logged in users

[web2py] Re: login?_next= not working

2010-09-30 Thread mdipierro
I cannot try what is doing on. I do not have a password. On Sep 30, 2:35 pm, Johann Spies johann.sp...@gmail.com wrote: Persons who want to use the form on the platform I am developing have to log in.  On my local version running on localhost where I do the development the user gets redirected

Re: [web2py] Re: jqgrid (plugin_wiki) and @auth.requires_login()

2010-09-30 Thread Bruno Rocha
I use that way, when I need the page to be public, but protecting just some parts of the page. 2010/9/30 mdipierro mdipie...@cs.depaul.edu There should be no need for that. the `` ... ``:widget is always embedded in a page that has permissions. So it will only be visible to users who

Re: [web2py] Re: jqgrid (plugin_wiki) and @auth.requires_login()

2010-09-30 Thread Richard Vézina
Ok, but : @auth.requires_login() def jqgrid(): is already in the plugin_wiki controller. Problem is still there. Do we have to find a solution for the ajax callback? Just to be sure we understand the problem correctly : If the logged user has been on the page that uses jqgrid and he lets the

[web2py] Re: jqgrid (plugin_wiki) and @auth.requires_login()

2010-09-30 Thread mdipierro
I see. The problem is that the user has been logged off. the callback knows but the page no because was not reloaded. let me think about this one. Suggestions are welcome. Massimo On Sep 30, 3:03 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: Ok, but : @auth.requires_login() def

Re: [web2py] jqgrid (plugin_wiki) and @auth.requires_login()

2010-09-30 Thread Richard Vézina
Try like this : {{if auth.is_logged_in():}} {{=plugin_wiki.widget('jqgrid',tablename,col_width=80,width=900,height=500)}} {{pass}} And that not solve the pb I decribe in most detail. Richard On Thu, Sep 30, 2010 at 3:41 PM, Bruno Rocha rochacbr...@gmail.com wrote: Thats not the best way, but

Re: [web2py] Re: Serve different applications to different URLS

2010-09-30 Thread Albert Abril
I'm seeing about this problem too. I have a web2py install at webfaction. And three different domains. I have only one web2py installation, and I wish that depending on the url, serve an app or other. (because If I have two instances of web2py, it exceeds the memory of my hosting plan). I will

[web2py] Re: jqgrid (plugin_wiki) and @auth.requires_login()

2010-09-30 Thread mdipierro
The only way to solve the problem without changing pluginwiki is to add an ajax keepalive. I.e. a script in the page the makes an ajax call every few minutes (20?) to a dummy controller action. On Sep 30, 3:20 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: Try like this : {{if

Re: [web2py] Re: jqgrid (plugin_wiki) and @auth.requires_login()

2010-09-30 Thread Bruno Rocha
2010/9/30 mdipierro mdipie...@cs.depaul.edu I see. The problem is that the user has been logged off. the callback knows but the page no because was not reloaded. let me think about this one. Suggestions are welcome. What if the ajaxcallback changes the HTTP header location? which will

Re: [web2py] Re: jqgrid (plugin_wiki) and @auth.requires_login()

2010-09-30 Thread Bruno Rocha
when session has expired ajax callback function could return this script: window.location = 'user' then user will be redirected to login page That works for me 2010/9/30 Bruno Rocha rochacbr...@gmail.com 2010/9/30 mdipierro mdipie...@cs.depaul.edu I see. The problem is that the user has

Re: [web2py] Re: Serve different applications to different URLS

2010-09-30 Thread Bruno Rocha
If you are using Apache, you can create rules on apache default configuration. to redirect based on domain. 2010/9/30 Albert Abril albert.ab...@gmail.com I'm seeing about this problem too. I have a web2py install at webfaction. And three different domains. I have only one web2py

Re: [web2py] Re: Serve different applications to different URLS

2010-09-30 Thread Bruno Rocha
$ cd /etc/apache2/sites-enabled $ yourApp then VirtualHost www.yourAppDomain.com ServerName www.yourAppDomain.com RewriteEngine on RewriteRule ^/(.*) http://anyhost:anyport/yourSiteBase/http/anyhost:anyport/YourSiteBase/YourAppBase/$1 [L,P] /VirtualHost If you create separate config

[web2py] Re: Image gallery on GAE

2010-09-30 Thread howesc
I have an integrated form that does a file upload and other fields. the trouble is to get blobstore to load the file you have to redirect to blobstore then back to your form processing. it works fine when there are no errors, but the major problem i have with it is that when there are errors, the

Re: [web2py] Re: timestamp update from a crud form

2010-09-30 Thread Manu
Let me be more acurate , this is a stripped down version of my app: in my model i have defined the test table, db.define_table('test', Field('message'), Field('saved_on','datetime', default = datetime.now()), ) if if my action i have something like def create(): form = crud.create('test')

[web2py] bytea or BLOB

2010-09-30 Thread Richard Vézina
Hello dear web2py friends! Should I use BLOB or bytea for storing image in postgres? What should I pay attention? Richard

[web2py] javascript in layout.html

2010-09-30 Thread Manu
Hi, What is the reason to not have these functions into a dedicated external file. By including it in the html page we can't use the browser cache and we need to transfer it again and again , sounds me a waste of time transfer and bandwidth. As i am not a web expert ( i am actually learning

Re: [web2py] javascript in layout.html

2010-09-30 Thread Bruno Rocha
In layout.html you can call external JS files using: {{response.files.append(URL(request.application,'static/js','javascriptfile.js'))}} Scripts are also loaded dinamicaly by 'web2py_ajax.html' which builds the JS script at runtime, as this uses string interpolation to build scripts, this could

Re: [web2py] Re: timestamp update from a crud form

2010-09-30 Thread Adrian Klaver
On 09/30/2010 03:18 PM, Manu wrote: Let me be more acurate , this is a stripped down version of my app: in my model i have defined the test table, db.define_table('test', Field('message'), Field('saved_on','datetime', default = datetime.now()), ) if if my action i have something like def

[web2py] Re: Serve different applications to different URLS

2010-09-30 Thread Tyler Laing
Hmm, not sure how that would work on Webfaction. I'll submit a ticket about this, thanks! On Sep 30, 2:35 pm, Bruno Rocha rochacbr...@gmail.com wrote: $ cd /etc/apache2/sites-enabled $ yourApp then VirtualHostwww.yourAppDomain.com   ServerNamewww.yourAppDomain.com   RewriteEngine on  

Re: [web2py] Re: dal connection failed on legacy postgres db

2010-09-30 Thread Adrian Klaver
On 09/30/2010 12:31 PM, Oleg wrote: yehhh... just had a look to postgresql docu.. I found that both parameters 'standard_conforming_strings' and 'backslash_quote' were introduced in security update 7.4.13 My client has 7.4.3.. with a lot of security problems :) I give him know about it.

Re: [web2py] javascript in layout.html

2010-09-30 Thread Bruno Rocha
Correction: 'web2py_ajax.html' does not have string interpolation, this have to be parsed by web2py template system, because uses {{=}} notation to build scripts. 2010/9/30 Bruno Rocha rochacbr...@gmail.com In layout.html you can call external JS files using:

Re: [web2py] javascript in layout.html

2010-09-30 Thread Manu
Hi Bruno , I agree with you for the first 17 lines , but after that it is just regular javascript/jquery code !! Furthermore what is done in these first 17lines is indeed parsed but could have been put somewhere else ( in layout.html for ex, or in in another file that has to be included in your

Re: [web2py] javascript in layout.html

2010-09-30 Thread Bruno Rocha
I think putting that 17 lines in 'layout.html' is not a good idea, because 'layout.html' are there for you to replace or customize, putting more JS out there, users will need to implement that by their own. And what is the difference being in web2py_ajax or in layout.html? as these files will be

Re: [web2py] javascript in layout.html

2010-09-30 Thread Manu
I think putting that 17 lines in 'layout.html' is not a good idea, because 'layout.html' are there for you to replace or customize, putting more JS out there, users will need to implement that by their own. I totally agree with that just in case people doesn't want to have many small files

[web2py] Re: Retrieve Password Issue ????

2010-09-30 Thread Yannick
Thanks for the note. I can send email from my application. Welcome registration email and other email without any problem. I did try what you just asked and I got an error : NameError: name 'mail' is not defined So here is what i did from command line: python web2py.py -S yourapp -M mail=Mail()

[web2py] Re: bytea or BLOB

2010-09-30 Thread mdipierro
I think it is the same. Field('...','blob') makes bytea. On Sep 30, 5:20 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: Hello dear web2py friends! Should I use BLOB or bytea for storing image in postgres? What should I pay attention? Richard

[web2py] Re: Retrieve Password Issue ????

2010-09-30 Thread mdipierro
and you do have the same settings in model? On Sep 30, 8:17 pm, Yannick ytchatch...@gmail.com wrote: Thanks for the note. I can send email from my application. Welcome registration email and other email without any problem. I did try what you just asked and I got an error : NameError: name

Re: [web2py] Re: bytea or BLOB

2010-09-30 Thread Richard Vézina
Yeah I realise it after... Can I do this example from the book with CRUD??? : def display_form(): record = db.person(request http://www.web2py.com/book/default/docstring/request.args(0)) or redirect http://www.web2py.com/book/default/docstring/redirect(URL

[web2py] Re: Image gallery on GAE

2010-09-30 Thread Richard
also note that you can enable billing but ensure you never pay by allocating the resources to something you don't use - eg sending emails On Sep 15, 8:23 pm, Martin.Mulone mulone.mar...@gmail.com wrote: First to use blobstore you have to enabled billing. Yes for your approach i think the best

[web2py] upload blob postgres pb

2010-09-30 Thread Richard Vézina
Hello, I am getting this : Traceback (most recent call last): File /web2py/web2py/gluon/restricted.py, line 188, in restricted exec ccode in environment File /web2py/web2py/applications/image/controllers/appadmin.py, line 410, in module File /web2py/web2py/gluon/globals.py, line 96, in

[web2py] Re: bytea or BLOB

2010-09-30 Thread mdipierro
almost form=crud.update(db.person,record,message=form accepted) if form.errors: response.flash=form has errors) On Sep 30, 9:09 pm, Richard Vézina ml.richard.vez...@gmail.com wrote: Yeah I realise it after... Can I do this example from the book with CRUD??? : def display_form():     record

[web2py] Can't install via pypi or easy_install

2010-09-30 Thread caiges
easy_install web2py install_dir /usr/lib/python2.6/site-packages/ Searching for web2py Reading http://pypi.python.org/simple/web2py/ Reading http://web2py.com Reading http://web2py.com/examples/default/download No local packages or download links found for web2py error: Could not find suitable

[web2py] Re: Retrieve Password Issue ????

2010-09-30 Thread Yannick
Yes with the same setting in model. But I just tried something I create a brand new function in the controller like: def TestSendPassword(): auth.messages.retrieve_password = 'Allo Issue with ur pwd.' return dict(forgotPwdForm = auth.retrieve_password(next=testlogin)) SO I did not

[web2py] Re: Newbie question: Access to data loaded via ajax in view

2010-09-30 Thread mdipierro
You cannot in the page that calls web2py but you can do it 'mydata.load' On Sep 30, 6:17 pm, Relaxd relax...@gmail.com wrote: I'm a web2py newbie. I have some data that gets updated constantly. I used the following code to load the data via ajax every few seconds. The data is updated as

[web2py] Re: Minor bug and fix in cache.py

2010-09-30 Thread mdipierro
At a second look I do not see the difference. Moreover this would not work with 2.4 On Sep 30, 11:29 am, Iceberg iceb...@21cn.com wrote: Hi Massimo, The following code snippet comes from the end of gluon/cache.py 's CacheInRam.__call__():         value = f()         self.locker.acquire()  

[web2py] Re: Can't install via pypi or easy_install

2010-09-30 Thread mdipierro
No. we do not distribute web2py that way because web2py is not a python module. Although it includes python modules. Massimo On Sep 30, 5:55 pm, caiges caig...@gmail.com wrote: easy_install web2py install_dir /usr/lib/python2.6/site-packages/ Searching for web2py

[web2py] Re: nginx with bultin uwsgi module

2010-09-30 Thread KMax
Glad you note this, but no documentaions on top. I like nginx , but apache-wsgi is more documented so used. If any one have links to nginx-wsgi docs please share. On 30 сен, 19:12, elffikk elff...@gmail.com wrote: http://nginx.org/