[web2py] Re: Unable to edit record in admin because of postgres fkey violation

2011-06-20 Thread Massimo Di Pierro
That is not the problem. There is no user with id==0. The problem is that modified_by seems to default to 0 instead of auth.user_id. Are you sure you are logged in? Massimo On Jun 21, 1:51 am, pbreit wrote: > I'm trying to edit a record in admin but am getting an fkey violation. This > kind of

[web2py] how to ignore keyword in web2py

2011-06-20 Thread sagar
i have to use group as column name in web2py. i am using mysql as a db. in mysql we can do it using `group` in python we can do it using group_ d=db.test.insert(name=exacturl,group="") How to ignore keyword in web2py.

[web2py] Unable to edit record in admin because of postgres fkey violation

2011-06-20 Thread pbreit
I'm trying to edit a record in admin but am getting an fkey violation. This kind of makes sense since I guess the admin is user=0. But if I'm logged in as user.id=1 should I be able to avoid the restriction? IntegrityError: insert or update on table "item" violates foreign key constraint "item_

Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-20 Thread Massimo Di Pierro
My mistake, should have been form.errors.update({'email':'not allowed'}) By adding the error message it prevent the user from registering (because he does not have a valid token). You do not need to pay me for help in this list but I will not refuse a donation. ;-) Massimo On Jun 20, 8:16 pm,

Re: [web2py] Best way to re-use snippet of HTML

2011-06-20 Thread Anthony
On Monday, June 20, 2011 9:54:16 PM UTC-4, rochacbruno wrote: > > On Mon, Jun 20, 2011 at 10:40 PM, Anthony wrote: > >> {{include 'pat/to/file'}} >> >> Note, the template doesn't have to be purely static for the above to >> work. Look at web2py_ajax.html, for example -- it is included in lay

Re: [web2py] Best way to re-use snippet of HTML

2011-06-20 Thread Bruno Rocha
On Mon, Jun 20, 2011 at 10:40 PM, Anthony wrote: > {{include 'pat/to/file'}} > > Note, the template doesn't have to be purely static for the above to > work. Look at web2py_ajax.html, for example -- it is included in layout.html > but is not static. > Anthony > Your're right, but. the parsing

Re: [web2py] Best way to re-use snippet of HTML

2011-06-20 Thread Anthony
On Monday, June 20, 2011 9:25:31 PM UTC-4, rochacbruno wrote: > > > or you can include if thats static (no template parsing) > > {{include 'pat/to/file'}} Note, the template doesn't have to be purely static for the above to work. Look at web2py_ajax.html, for example -- it is included in layout

Re: [web2py] Best way to re-use snippet of HTML

2011-06-20 Thread Bruno Rocha
You can use block in views ##layout.html## {{block header}} a {{end}} then inherit it in the view.. or you can define functions in model or modules (see instamtpress source code) def myheader(): html = """ njvnjnvjf """ return XML(html) then, all it in any place of the vi

Re: Re : Re: Re : Re: Re : Re: [web2py] Re: Email invitation

2011-06-20 Thread Dwayne
Dear Massimo, Thank you very much. I'll send you the 30 dollars if it works :) I have a problem. I cannot compile : auth.settings.register_onvalidation.append(lambda form: db.invitation(token=form.vars.email) or form.errors.update({'email','not allowed'})) Why do I need : form.errors.update({'e

[web2py] Re: Best way to re-use snippet of HTML

2011-06-20 Thread Anthony
On Monday, June 20, 2011 8:32:30 PM UTC-4, pbreit wrote: > > What's the best way to re-use a snippet of HTML in different places? > Components and LOAD()? Or is there some way to include a block? These can be > lengthy snippets so I'd rather do it more in HTML than with tags. Have you tried j

Re: [web2py] Re: Strange behaviour with import.

2011-06-20 Thread Mike Veltman
> This is fixed in trunk. > Thanks :-) I noticed that I never added version and stuff, sorry for that. > On Jun 20, 3:38 am, Mike Veltman wrote: > > When I dump a table from a SQLite3 db and import it in a mysql database > > some of the integers do not load. > > > > Interesting enough the .

[web2py] Best way to re-use snippet of HTML

2011-06-20 Thread pbreit
What's the best way to re-use a snippet of HTML in different places? Components and LOAD()? Or is there some way to include a block? These can be lengthy snippets so I'd rather do it more in HTML than with tags.

[web2py] Re: Problem with models in subdirectories

2011-06-20 Thread Anthony
On Monday, June 20, 2011 8:08:44 PM UTC-4, pbreit wrote: > > I'd say just prefix the filenames with their folder names and put them all > in /models. I think we should have a solution within the next week (at least in trunk), and in the meantime, the hack in compileapp.py is easy, so I wouldn

Re: [web2py] Re: email alert in cron

2011-06-20 Thread pbreit
Maybe show us the code?

[web2py] Re: Problem with models in subdirectories

2011-06-20 Thread pbreit
I'd say just prefix the filenames with their folder names and put them all in /models.

[web2py] Re: plugins

2011-06-20 Thread selecta
> If I find any bug, would you like me to send it to you yes :D please post them here http://pymantis.org/pymantis_server/plugin_issue/index

[web2py] Re: How to create web2py-based desktop app?

2011-06-20 Thread selecta
check out the plugin_release from pyMantis it will automatically build win linux mac and w2p package releases of your app it also has an update mechanism that allows the download and installation of updated versions the plugin is not perfect yet and it would be cool to have more testers/developers

[web2py] Re: web2py with Eclipse -- still lots of undefined stuff

2011-06-20 Thread weheh
Makes sense! And prettier, too. Thx. On Jun 20, 1:36 pm, Pierre Thibault wrote: > 2011/6/20 weheh > > > @Anthony, Unfortunately, this code from the other thread does not work > > for my Eclipse installation: > > > if 0: > >    from gluon.dal import DAL > >    from gluon.tools import Auth > >    

[web2py] Re: How to create web2py-based desktop app?

2011-06-20 Thread Vinhthuy
Thank you we will try this. On Jun 20, 4:54 pm, Massimo Di Pierro wrote: > My answer did not appear... retrying... > > http://web2py.com/book/default/chapter/12#How-to-Distribute-your-Appl... > > On Jun 20, 4:05 pm, Vinhthuy wrote: > > > > > > > > > Hello everyone, > > > We have used web2py to

[web2py] Re: How to create web2py-based desktop app?

2011-06-20 Thread Massimo Di Pierro
My answer did not appear... retrying... http://web2py.com/book/default/chapter/12#How-to-Distribute-your-Applications-as-Binaries On Jun 20, 4:05 pm, Vinhthuy wrote: > Hello everyone, > > We have used web2py to create server-based application.  With minimal > change, e would like to make it so t

[web2py] How to create web2py-based desktop app?

2011-06-20 Thread Vinhthuy
Hello everyone, We have used web2py to create server-based application. With minimal change, e would like to make it so that it can be used as stand-alone desktop applications on both Windows and Mac. If possible, I would it to contain everything, including Python so that users simply download

[web2py] Re: Download of big files broken

2011-06-20 Thread Stefan Scholl
Forget it. (If this would be a real newsgroup I would cancel the article.) Forgot about the problems on localhost. Stefan Scholl wrote: > I had to do something perverted to save the project: I make a > local redirect to a PHP script, which uses readfile >

[web2py] Re: Download of big files broken

2011-06-20 Thread Stefan Scholl
I had to do something perverted to save the project: I make a local redirect to a PHP script, which uses readfile . No problem there. (Retrieving the original file name and content-type in web2py.) It's only rocket. And it was reported by a co-wor

[web2py] a not null constraint for one of 2 fields and both field can't be filled...

2011-06-20 Thread Richard Vézina
Hello, I am trying to implement a not null constraint for 2 fields... Both field can't be filled at the same time... But at least one field should be filled. It because of a not normalized design where there is a 2 FK are pointing on differents tables. I found this to be interresting : http://gr

[web2py] Re: Problem with models in subdirectories

2011-06-20 Thread Anthony
There's some discussion about adding some kind of setting that will allow you to control/override the conditional execution behavior. Hopefully we'll have something soon, but in the meantime, I suppose you could hack gluon.compileapp.run_models_in ( http://code.google.com/p/web2py/source/browse/

Re: [web2py] Re: email alert in cron

2011-06-20 Thread Manuele Pesenti
On 20/06/2011 15:49, Massimo Di Pierro wrote: What do you mean not executed? Does send.mail return false? tomorrow I'll report about it, maybe I found an error that were blocking mail sending. I as just supposing... thankyou anyway. Manuele

Re: [web2py] Re: Gigya - Janrain alternative

2011-06-20 Thread Bruno Rocha
Thanks for sharing, very nice, I will test it. On Mon, Jun 20, 2011 at 4:28 PM, TekNullOG wrote: > Hey guys, > > I found a new alternative. I've played around with their Free account. > They have very similar services to Gigya and Janrain but offer their > complete product for free to sites wi

[web2py] Re: problem with using powertable in components

2011-06-20 Thread apple
Ah: powerTable.truncate=150 On Jun 20, 12:37 pm, apple wrote: > Have emailed you a w2p. > > Alsotext fields seem to be truncated at 30 characters with just an > ellipsis showing. How does one turn off the truncation? > > On Jun 20, 8:07 am, Bruno Rocha wrote: > > > > > > > > > I will take a

[web2py] Re: Problem with models in subdirectories

2011-06-20 Thread Dane
I see... any ideas for a quick method to force all models in subfolders to run? I have dozens of model files organized in various subfolders and I'd rather avoid lumping them all together. Thanks for the help. On Jun 20, 3:41 pm, Anthony wrote: > 1.96 introduced conditional models -- so model fil

[web2py] Re: Gigya - Janrain alternative

2011-06-20 Thread TekNullOG
Hey guys, I found a new alternative. I've played around with their Free account. They have very similar services to Gigya and Janrain but offer their complete product for free to sites with less than 2500 monthly registrations (that's what sold me). I called to see if they support SSL encrypted pa

[web2py] Re: Problem with models in subdirectories

2011-06-20 Thread Anthony
1.96 introduced conditional models -- so model files in subfolders will only run if the name of the subfolder matches the name of the currently requested controller (you can also add an additional level of subfolders to match function names within controllers). Prior to 1.96, I don't think using

[web2py] Re: Download of big files broken

2011-06-20 Thread Anthony
I've tried on Windows 7 in IE 7, 8, and 9 with a 50MB file and cannot reproduce the problem either. Anthony On Monday, June 20, 2011 2:53:42 PM UTC-4, Massimo Di Pierro wrote: > I just tried with chrome and osx and I cannot reproduce the problem (I > tried with a 166MB file). > > TIm, who ma

[web2py] Problem with models in subdirectories

2011-06-20 Thread Dane
Hello, I'm migrating an app to a new server (ubuntu 10.10) and upgraded to the most newest web2py stable version as part of this. This has introduced a problem where models in subdirectories of the model folder don't seem to be getting executed. Files placed directly in the model folder run correct

[web2py] Re: Download of big files broken

2011-06-20 Thread Massimo Di Pierro
I just tried with chrome and osx and I cannot reproduce the problem (I tried with a 166MB file). TIm, who made rocket, also claims he tried this extensively on windows and cannot reproduce the problem. I do not doubt you experience this issue. In order to try isolate better what may be causing it

Re: [web2py] Re: web2py with Eclipse -- still lots of undefined stuff

2011-06-20 Thread Pierre Thibault
2011/6/20 weheh > @Anthony, Unfortunately, this code from the other thread does not work > for my Eclipse installation: > > if 0: >from gluon.dal import DAL >from gluon.tools import Auth >db = DAL() >auth = Auth() > > > The only thing that has worked so far is Pierre's implementat

[web2py] Long Polling getting only the newly added records.

2011-06-20 Thread David J.
I am not sure how to go about long polling. I need to know how to get only the most recently added items in the list; My guess in solving this problem is to include a current row count and pass that as a parameter? and then returning more rows that the current row count? I am polling at 15 se

[web2py] Re: web2py with Eclipse -- still lots of undefined stuff

2011-06-20 Thread weheh
@Anthony, Unfortunately, this code from the other thread does not work for my Eclipse installation: if 0: from gluon.dal import DAL from gluon.tools import Auth db = DAL() auth = Auth() The only thing that has worked so far is Pierre's implementation, which is (no offense) unbeli

Re: [web2py] Re: plugins

2011-06-20 Thread José Luis Redrejo Rodríguez
2011/6/20 selecta : > > > On Jun 20, 8:32 am, José L. wrote: >> selecta, the downloads >> fromhttp://pymantis.org/pymantis_server/plugin_release/downloaddon't work in >> any of its versions. > i know but the strange thing is that i works from some locations (all > that i have access to :( ) and o

[web2py] Re: URL showing on links when printing a page

2011-06-20 Thread Matt Gorecki
My Google searches didn't yield much information. There is a CSS trick that will show the URLs only when the page is printed. Maybe you have something like this in your stylesheets: http://davidwalsh.name/optimize-your-links-for-print-using-css-show-url The only other thing I can think is it's a

[web2py] PFtabler application

2011-06-20 Thread Todor Todorov
Hello All, Me and few colleagues have developed an application, called PFtabler. The purpose of this application is to control the IP address tables of the OpenBSD's packet filter. I know that probably the audience of this type of software would be narrow, but nevertheless, if somebody is interest

[web2py] Re: URL showing on links when printing a page

2011-06-20 Thread Auden RovelleQuartz
Thanks, that did work! On Jun 20, 10:39 am, Anthony wrote: > I didn't realize the base.css file that comes with the web2py 'welcome' app > does this (I was viewing it in IE, and the URL printing doesn't work in IE). > The line of CSS to remove is near the bottom of /static/css/base.css in the

[web2py] Re: URL showing on links when printing a page

2011-06-20 Thread Anthony
I didn't realize the base.css file that comes with the web2py 'welcome' app does this (I was viewing it in IE, and the URL printing doesn't work in IE). The line of CSS to remove is near the bottom of /static/css/base.css in the "print styles" section: a:after { content: " (" attr(href) ")";

[web2py] Re: URL showing on links when printing a page

2011-06-20 Thread Anthony
I think that's probably an issue with your CSS. Your CSS may include a special "print" stylesheet that displays the URLs next to the links when the page is printed -- the idea is that when you print a document with hyperlinks, you might want a way to see the URLs behind the links (since they ca

[web2py] URL showing on links when printing a page

2011-06-20 Thread Auden RovelleQuartz
on my application, the display on my screen looks fine as expected; but when I print the page or do a "print preview" operation, the path URL shows up to the right of every hyperlink why is this and how do I avoid that behavior? many thanks

[web2py] Re: FORM Field change keyboary reaction type

2011-06-20 Thread max
thanks a lot for the advice. On Jun 19, 6:58 pm, pbreit wrote: > Any behaviors you see are provided by the browser. What you are seeing on a > multi-down is that some browsers let you press enter to select the current > entry and move to the next field. To do what you want, you'd need to trap >

[web2py] Re: Strange behaviour with import.

2011-06-20 Thread Massimo Di Pierro
This is fixed in trunk. On Jun 20, 3:38 am, Mike Veltman wrote: > When I dump a table from a SQLite3 db and import it in a mysql database some > of the integers do not load. > > Interesting enough the .id do show up fine. > > With regards, > Mike Veltman

[web2py] Re: email alert in cron

2011-06-20 Thread Massimo Di Pierro
What do you mean not executed? Does send.mail return false? On Jun 20, 1:38 am, Manuele Pesenti wrote: > Dear all, > there could be some reason why a controller called by cron is executed > except the command mail.send? Perhaps does it require a logged user? > moreover no error ticket about it is

Re: [web2py] Re: import error

2011-06-20 Thread Pierre Thibault
2011/6/20 selecta > > > try to replace: > > > > oldmod = sys.modules['pygments.lexers'] > > > > with: > > > > import pygments.lexers as oldmod > > hagrr why must pygements be so ... > > i tried that but i got > File "applications/pygments_test/modules/pygments/lexers/__init__.py", > line 223, in

[web2py] Re: import error

2011-06-20 Thread selecta
maybe it is better so switch to some javascript syntax highlighter? any recommendations ...

[web2py] Re: import error

2011-06-20 Thread selecta
> try to replace: > > oldmod = sys.modules['pygments.lexers'] > > with: > > import pygments.lexers as oldmod hagrr why must pygements be so ... i tried that but i got File "applications/pygments_test/modules/pygments/lexers/__init__.py", line 223, in import pygments.lexers as oldmod Attribu

Re: [web2py] Re: import error

2011-06-20 Thread Pierre Thibault
2011/6/20 selecta > > I guess I can improve the design by replacing sys.modules by a class that > > will do the lockup in applications.appname if it fails like in this > example. > > How can I access appname from the code? I guess this is the new thread > > variable thing implemented recently. >

[web2py] Re: plugins

2011-06-20 Thread selecta
On Jun 20, 8:32 am, José L. wrote: > selecta, the downloads > fromhttp://pymantis.org/pymantis_server/plugin_release/downloaddon't work in > any of its versions. i know but the strange thing is that i works from some locations (all that i have access to :( ) and others not (download stalls at 9

[web2py] Re: problem with using powertable in components

2011-06-20 Thread apple
Have emailed you a w2p. Alsotext fields seem to be truncated at 30 characters with just an ellipsis showing. How does one turn off the truncation? On Jun 20, 8:07 am, Bruno Rocha wrote: > I will take a look in to it ASAP, can you share more code? or send your .w2p > ? > > datatables.net is t

[web2py] Re: import error

2011-06-20 Thread selecta
> > but the pygments error still exists > >  oldmod = sys.modules['pygments.lexers'] > >  KeyError: 'pygments.lexers' > > any clue about this one? > > -- > > Hello, > > The importer will import the module as something like > applications.appname.modules.pygments (this the name used for sys.modul

[web2py] Re : Re: web2py with Eclipse

2011-06-20 Thread Pierre Thibault
On May 10, 8:46 am, Massimo Di Pierro wrote: > This is going to be easier in the future. Using trunk, just add this > to models: > > from gluon import * > request,session,response,T, cache=current.request,current,session,curremt.response,current.t,current.cache Can we the same trick for the

Re: [web2py] import from my modules with reload

2011-06-20 Thread Pierre Thibault
2011/6/20 Manuele Pesenti > is it possible? > using features nearly introduced and importing modules with > import mymodules > > is it possible to have a reload of the modules just modified? > > thanks a lot > >Manuele > Yes. You can use the Python reload function. Or you can use the d

Re: [web2py] Re: import error

2011-06-20 Thread Pierre Thibault
2011/6/20 selecta > the open id error is gone now > (globals = None -> AttributeError: 'NoneType' object has no attribute > 'get') > but the pygments error still exists > oldmod = sys.modules['pygments.lexers'] > KeyError: 'pygments.lexers' > any clue about this one? > -- > Hello, The importe

[web2py] import from my modules with reload

2011-06-20 Thread Manuele Pesenti
is it possible? using features nearly introduced and importing modules with import mymodules is it possible to have a reload of the modules just modified? thanks a lot Manuele

[web2py] Re: import error

2011-06-20 Thread selecta
the open id error is gone now (globals = None -> AttributeError: 'NoneType' object has no attribute 'get') but the pygments error still exists oldmod = sys.modules['pygments.lexers'] KeyError: 'pygments.lexers' any clue about this one? On Jun 18, 1:39 am, Pierre Thibault wrote: > 2011/6/17 sele

[web2py] Strange behaviour with import.

2011-06-20 Thread Mike Veltman
When I dump a table from a SQLite3 db and import it in a mysql database some of the integers do not load. Interesting enough the .id do show up fine. With regards, Mike Veltman

[web2py] Re: Download of big files broken

2011-06-20 Thread Stefan Scholl
Sever OS: Linux (remote, behind Apache 2.2), Windows XP (local, direct) Client OS: Windows XP Browser: Firefox 4, Internet Explorer 8 Rocket version: 1.2.2 All combinations break the download for big files (33 MiB), regardless of chunk_size or server. Only Internet Explorer 8 (all servers) had p

Re: [web2py] problem with using powertable in components

2011-06-20 Thread Bruno Rocha
I will take a look in to it ASAP, can you share more code? or send your .w2p ? datatables.net is the core od PowerTable, as it is Javscript could be some name conflict that I need to solve. I am planniing to check, test and release the new optimized version that I have here. -- Bruno Rocha [