Re: [web2py] Re: My editor ...

2010-08-20 Thread Stef Mientki
 On 20-08-2010 03:24, dlin wrote:
> It's so cool.
thanks,
> I often use linux & vim.
> But, I think that will let my colleagues happy to work with windows.
> And your slide is also very cool (what's tool you use?)
I used a rather old version of wink:
http://www.debugmode.com/wink/

cheers,
Stef
> On Aug 20, 7:08 am, Stef Mientki  wrote:
>>  On 19-08-2010 23:08, Alexandre Andrade wrote:> It's really impressive. So 
>> cool.
>> thanks.
>>> it would be nice if it works in linux
>> most of it, except the wysiwyg editor should work under linux> and over ssh,
>>
>> I don't know if it works over ssh (I've no experience with that),
>> at this moment it's a desktop application, and I think such a GUI-interface 
>> only works (fast enough)
>> as a desktop application,
>> but I might be mistaken.
>>
>> cheers,
>> Stef



Re: [web2py] My editor ...

2010-08-20 Thread Stef Mientki
 On 20-08-2010 07:46, Jason Brower wrote:
> SSH can do a graphical connection, so to say, from a server to a client.
> It's very nice for stuff like this.
> We could try it in wine. :P
>From other experiments, I think it'll probably runs flawless in wine.
>   I use a delphi windows program in linux all
> the time.
> Sadly, I couldn't see the video in my browsers.  Somethings up with it.
well it's a swf-flash movie, maybe you can't view falsh ?
> I wonder how hard it would be to make a linux version.  We should
> seriously concider making it cross platform before plopping it into
> web2py.
Yes I agree with that.
I think almost everything (except the wysiwyg editor) will run under Linux and 
Mac,
but it's difficult / impossible for me to test.
>   And does delphi allow open programs?
No, and as I use commercial libs, I'm not even allowed to make a dll,
so I created an exe, which behaves more like a dll than like a exe ;-)

cheers,
Stef


Re: [web2py] Re: My editor ...

2010-08-20 Thread Stef Mientki
 On 20-08-2010 04:36, dlin wrote:
> Instead of using wx, I suggest to try QT, that's will let it portable,
> and there is solution for webkit+qt.
> That's will let it more portable between windows/linux/mac
AFAIK, webkit is also supported under wxPython, (I'm sure it's for Mac),
and it should also work for Windows and Linux,
but I haven't had the chance to try it out (because I'm anxious to update my 
well working libraries ;-)

cheers,
Stef


[web2py] Login form for mobile web access

2010-08-20 Thread David Marko
I'm working on mobile access to my web app built on web2py. I'm using
mobile.sniffer to detect mobile platform(which works quite well btw.)
but I'm not sure how to switch login form based on this detection. (I
need more simple login form than for standard web browser access)

Any hint on this?

David


[web2py] Re: oposite to XML operation or how to escape string

2010-08-20 Thread mdipierro
something like this?

''.join(xmlescape(s) for s in t.split('&&'))


On Aug 19, 11:25 pm, KMax  wrote:
> Hello
>  I have a string with '&&' which must be replaced by 
>  If I change all && with  and XML it, it could miss other html
> tag in a string
>  I could join  ''.join(DIV(substr)), but I do not need div tag
> in output.
>
>  So how to escaped string without DIV or other HTML helper?
>
>  I look at web2py source, but miss that thing.
>
> Thank you.


[web2py] Re: My editor ...

2010-08-20 Thread mdipierro

> No, and as I use commercial libs, I'm not even allowed to make a dll,
> so I created an exe, which behaves more like a dll than like a exe ;-)

does the license allows you to make an exe but not a dll? Which
libraries are commercial?


[web2py] Re: communication between view and controller

2010-08-20 Thread david.waldrop
The original problem still exists AND I now have a similar problem in
another view.  I am unsure of how the views communicate with their
controller (or another one).   Today I have decided to immerse myself
into JQuery as it is the only path I am unfamiliar with and have not
tried.  I still am very impressed with the power of this framework,
but I am spending tons of time on trying to get trivial things to
work.  What would be helpful is an explanation of the top 5 best
practices on how controllers and views interact.


On Aug 18, 9:15 pm, "david.waldrop"  wrote:
> I am making some customizations to the tagging plugin and am having a
> problem.  See the code below:
>
> 
> {{=form.custom.begin}}
> 
> 
> 
> {{for link in links:}}
> {{=link.tag.name}}
>   
> {{pass}}
>
> 
> 
> 
> 
> 
> {{=form.custom.end}}
> 
>
> The problem with the original tagging systems is the users action were
> not explicit.  For example if you entered a new tag and pressed the
> DEL button the new tag was created , or if you checked a tag for
> deletion and pressed the TAG button the selected tag was deleted.  In
> addition I wanted to eliminate the multi selection and use image
> buttons to conserve space.  This is represented above in the two HTML
> input statement where type=image".  The problem is when the user
> clicks on the image control is transfered to the controller, but there
> does not seem to be a way to determine which button was clicked.
>
> I believe there is an additional issue with the deltag input in that
> it in addition to knowing the user pressed a specific delettag button
> I need to know the link.id it is associated with.  The above code give
> me exactly what I want in the UX, I just cannot figure out how to
> interact with the controller.


Re: [web2py] Login form for mobile web access

2010-08-20 Thread Jason Brower
I built it ina a way that the phones had the same content but a
different page.  So you can use an if statement in the view (or the
controller if you wanted)
if phone.screensize < 100:
{{extend 'layout100.html'}}
elif phone.screensize < 200:
{{extend 'layout200.html'}}
else:
{{extend 'layout.html'}}
At least in theory that would work.
Depending on what you want you could also tell load a custom made css as
well.
br,
Jason
On Fri, 2010-08-20 at 02:09 -0700, David Marko wrote: 
> I'm working on mobile access to my web app built on web2py. I'm using
> mobile.sniffer to detect mobile platform(which works quite well btw.)
> but I'm not sure how to switch login form based on this detection. (I
> need more simple login form than for standard web browser access)
> 
> Any hint on this?
> 
> David




Re: [web2py] Re: Detecting mobile devices

2010-08-20 Thread Jason Brower
This program uses pywurfl.  Say it in the documentation.  Good lookup.
I will have to read what they do as well.
BR,
Jason 
On Thu, 2010-08-19 at 22:50 -0700, Adi wrote: 
> Nice, thanks!
> 
> By the way I just tested mobile.sniffer:
> http://pypi.python.org/pypi/mobile.sniffer/0.1.1
> 
> So far it seems to work fine for detecting whether the device is
> mobile or not.
> 
> On Aug 20, 10:36 am, Jason Brower  wrote:
> > Yup.  Used it.http://celljam.net/
> > It's massive, but very useful.  It even covers things like, if they have
> > a camera or other what not.
> > ---
> > Best regards,
> > Jason
> >
> >
> >
> > On Thu, 2010-08-19 at 22:09 -0700, Adi wrote:
> > > Hi all,
> >
> > > Is there a python library which can detect mobile devices based on
> > > user-agent, so that I can redirect users to a mobile friendly site?
> > > I'm looking for a Python counterpart of 
> > > this:http://detectmobilebrowsers.mobi/




[web2py] Re: Login form for mobile web access

2010-08-20 Thread mdipierro
You cannot have extend in a conditional but you can have

{{extend layout}}

and in controller or model:

if phone.screensize < 100:
lauout='layout100.htm;'
elif phone.screensize < 200:
layout='layout200.html'
else:
layout='layout.html'

On Aug 20, 5:38 am, Jason Brower  wrote:
> I built it ina a way that the phones had the same content but a
> different page.  So you can use an if statement in the view (or the
> controller if you wanted)
> if phone.screensize < 100:
> {{extend 'layout100.html'}}
> elif phone.screensize < 200:
> {{extend 'layout200.html'}}
> else:
> {{extend 'layout.html'}}
> At least in theory that would work.
> Depending on what you want you could also tell load a custom made css as
> well.
> br,
> Jason
>
> On Fri, 2010-08-20 at 02:09 -0700, David Marko wrote:
> > I'm working on mobile access to my web app built on web2py. I'm using
> > mobile.sniffer to detect mobile platform(which works quite well btw.)
> > but I'm not sure how to switch login form based on this detection. (I
> > need more simple login form than for standard web browser access)
>
> > Any hint on this?
>
> > David


[web2py] Re: communication between view and controller

2010-08-20 Thread mdipierro
Would you email me a copy of this application (confidentially). I will
take a look.

On Aug 18, 8:15 pm, "david.waldrop"  wrote:
> I am making some customizations to the tagging plugin and am having a
> problem.  See the code below:
>
> 
> {{=form.custom.begin}}
> 
> 
> 
> {{for link in links:}}
> {{=link.tag.name}}
>   
> {{pass}}
>
> 
> 
> 
> 
> 
> {{=form.custom.end}}
> 
>
> The problem with the original tagging systems is the users action were
> not explicit.  For example if you entered a new tag and pressed the
> DEL button the new tag was created , or if you checked a tag for
> deletion and pressed the TAG button the selected tag was deleted.  In
> addition I wanted to eliminate the multi selection and use image
> buttons to conserve space.  This is represented above in the two HTML
> input statement where type=image".  The problem is when the user
> clicks on the image control is transfered to the controller, but there
> does not seem to be a way to determine which button was clicked.
>
> I believe there is an additional issue with the deltag input in that
> it in addition to knowing the user pressed a specific delettag button
> I need to know the link.id it is associated with.  The above code give
> me exactly what I want in the UX, I just cannot figure out how to
> interact with the controller.


[web2py] Re: My editor ...

2010-08-20 Thread Martin.Mulone
in linux gwibber use http://code.google.com/p/pywebkitgtk/, I think
you are right, there is no good way to support windows/linux/mac. Any
chances that you make the movie, in format movie and upload to
youtube?.

On 20 ago, 05:08, Stef Mientki  wrote:
>  On 20-08-2010 04:36, dlin wrote:> Instead of using wx, I suggest to try QT, 
> that's will let it portable,
> > and there is solution for webkit+qt.
> > That's will let it more portable between windows/linux/mac
>
> AFAIK, webkit is also supported under wxPython, (I'm sure it's for Mac),
> and it should also work for Windows and Linux,
> but I haven't had the chance to try it out (because I'm anxious to update my 
> well working libraries ;-)
>
> cheers,
> Stef


[web2py] Re: web2py russian group

2010-08-20 Thread Martin.Mulone
welcome!

On 20 ago, 01:07, KMax  wrote:
> Thank you professor for announce.
>
> äÏÂÒÏ ÐÏÖÁÌÏ×ÁÔØ × ÇÒÕÐÐÕ.
>
> On 20 Á×Ç, 09:24, mdipierro  wrote:
>
>
>
> > There is a web2py group in russian.
>
> >http://groups.google.ru/group/web2py_russian
>
> > If you are the owner please let me know and I will be happy to link it
> > from web2py.com


[web2py] auth.settings.retrieve_password_next not being honoured

2010-08-20 Thread Adi
Hi,

I'm setting auth.settings.retrieve_password_next = my_custom_url so
that after sending out reset password mail, the my_custom_url page
should open. However, web2py is taking user to default/index.

Any help?


[web2py] Re: Login form for mobile web access

2010-08-20 Thread Adi
I've realized re-using code becomes quite a hastle - for example if
you use 2 or 3 column layout for web, 1 column layout works best for
mobile.

I've created new controller and views to be shown on the mobile (even
if they are duplicated), and use redirect() and
auth.settings.myfunction_next where myfunction = change_password or
login or logout or retrieve_password etc.

Then you can have corresponding functions in your mobile controller,
like

mobile.py
-
def login():
return dict(form=auth.login())

login.html
--
{{extend 'm_layout.html'}}
{{=form}}

and so on.


[web2py] Re: auth.settings.retrieve_password_next not being honoured

2010-08-20 Thread mdipierro
I think you want to set reset_password_next

auth.settings.retrieve_password_next

On Aug 20, 6:01 am, Adi  wrote:
> Hi,
>
> I'm setting auth.settings.retrieve_password_next = my_custom_url so
> that after sending out reset password mail, the my_custom_url page
> should open. However, web2py is taking user to default/index.
>
> Any help?


[web2py] Re: communication between view and controller

2010-08-20 Thread mdipierro
will look at it asap.

On Aug 20, 6:15 am, David Waldrop  wrote:
> The application is attached.  Also, I sent a previous email asking if you
> knew of a consultant/mentor in the DC area.  I feel I have a very solid
> grasp on the concept and UX, but am not able to implement very efficiently.
>  There are several areas I need some help with  - UX, performance, database
> instancing (especially when deployed), URL mapping.  All of which I have
> asked questions about over the past month on the forum.
>
> /david
> 301.526.9500
>
>
>
> On Fri, Aug 20, 2010 at 6:49 AM, mdipierro  wrote:
> > Would you email me a copy of this application (confidentially). I will
> > take a look.
>
> > On Aug 18, 8:15 pm, "david.waldrop"  wrote:
> > > I am making some customizations to the tagging plugin and am having a
> > > problem.  See the code below:
>
> > > 
> > > {{=form.custom.begin}}
> > > 
> > > 
> > > 
> > > {{for link in links:}}
> > > {{=link.tag.name}}
> > >   
> > > {{pass}}
>
> > > 
> > > 
> > > 
> > > 
> > > 
> > > {{=form.custom.end}}
> > > 
>
> > > The problem with the original tagging systems is the users action were
> > > not explicit.  For example if you entered a new tag and pressed the
> > > DEL button the new tag was created , or if you checked a tag for
> > > deletion and pressed the TAG button the selected tag was deleted.  In
> > > addition I wanted to eliminate the multi selection and use image
> > > buttons to conserve space.  This is represented above in the two HTML
> > > input statement where type=image".  The problem is when the user
> > > clicks on the image control is transfered to the controller, but there
> > > does not seem to be a way to determine which button was clicked.
>
> > > I believe there is an additional issue with the deltag input in that
> > > it in addition to knowing the user pressed a specific delettag button
> > > I need to know the link.id it is associated with.  The above code give
> > > me exactly what I want in the UX, I just cannot figure out how to
> > > interact with the controller.
>
> --
> david.wald...@gmail.com | 301.526.9500
>
>  mm_beta_1.zip
> 822KViewDownload


[web2py] Trying to multiprocess

2010-08-20 Thread Phyo Arkar
well

lets say i have about a thounsand files to be proccessed  .. i need to
extract text out of them , whatever file type it is (i use Linux
"strings") command .

i want to do in multi processed way , which works on multi-core pcs too.

this is my current implementation :


import subprocess,shlex

def __forcedParsing(fname):
cmd = 'strings "%s"' % (fname)
#print cmd
args= shlex.split(cmd)
try:
sp = subprocess.Popen( args, shell = False, stdout =
subprocess.PIPE, stderr = subprocess.PIPE )
out, err = sp.communicate()
except OSError:
print "Error no %s  Message %s" % 
(OSError.errno,OSError.message)
pass

if sp.returncode== 0:
#print "Processed %s" %fname
return out


def parseDocs():
rows_to_parse = [i for i in range( 0,len(SESSION.all_docs))]
row_ids = [x[0] for x in SESSION.all_docs  ]
res=[]
for rowID in rows_to_parse:

file_id, fname, ftype, dir  = SESSION.all_docs[int( rowID ) ]
fp = os.path.join( dir, fname )
res.append(__forcedParsing(fp))


well the problem is i need output from subprocess so i have to read
using sp.communicate(). i need that to be multiprocessed (via forking?
poll?)

so here are my thoughs :

1) without using fork() ,  could I  do multiple ajax posts by
iterating the huge list of files at client side to server   , each
processes will be multi-threaded because of Rocket right? But may this
suffer performace issue on client side?

2) Forking Current implementation, and read output via polling?
subprocess.poll()

any ideas?


[web2py] Re: list:reference not working

2010-08-20 Thread Donut
The problem was my web2py version. This feature is in v1.83.2, not
v1.81.4.

On Aug 19, 2:17 pm, Donut  wrote:
> I had posted this question on stackoverflow.com but haven't gotten a
> response as quick as I'd like. I figured this may be a more
> appropriate place to post the question.
>
> I am trying to get the list:reference field type to work for web2py,
> but for some reason I am getting an error. I am trying the example 
> onhttp://web2py.com/book/default/chapter/06:
>
> db.define_table('tag',Field('name'),format='%(name)s')
> db.define_table('product',
>     Field('name'),
>     Field('tags','list:reference tag'))
> When I try this, I get the following error:
>
> Traceback (most recent call last):
> File "gluon/restricted.py", line 178, in restricted
> File "C:/web2py/applications/idd/models/db.py", line 93, in 
> File "gluon/sql.py", line 1309, in define_table
> File "gluon/sql.py", line 1664, in _create
> SyntaxError: Field: unknown field type: list:reference tag for tags
>
> This should be really simple, but is not working. Am I missing
> something that the book doesn't tell us about? I'm running web2py
> v1.81.4, is the list:reference type not supported in this version?


[web2py] Re: Trying to multiprocess

2010-08-20 Thread mdipierro
You should not use subprocess in a web2py application (if you really
need too, look into the admin/controllers/shell.py) but you can use it
in a web2py program running from shell (web2py.py -R myprogram.py).

Massimo

On Aug 20, 7:01 am, Phyo Arkar  wrote:
> well
>
> lets say i have about a thounsand files to be proccessed  .. i need to
> extract text out of them , whatever file type it is (i use Linux
> "strings") command .
>
> i want to do in multi processed way , which works on multi-core pcs too.
>
> this is my current implementation :
>
> import subprocess,shlex
>
> def __forcedParsing(fname):
>         cmd = 'strings "%s"' % (fname)
>         #print cmd
>         args= shlex.split(cmd)
>         try:
>                 sp = subprocess.Popen( args, shell = False, stdout =
> subprocess.PIPE, stderr = subprocess.PIPE )
>                 out, err = sp.communicate()
>         except OSError:
>                 print "Error no %s  Message %s" % 
> (OSError.errno,OSError.message)
>                 pass
>
>         if sp.returncode== 0:
>                 #print "Processed %s" %fname
>                 return out
>
> def parseDocs():
>         rows_to_parse = [i for i in range( 0,len(SESSION.all_docs))]
>         row_ids = [x[0] for x in SESSION.all_docs  ]
>         res=[]
>         for rowID in rows_to_parse:
>
>                 file_id, fname, ftype, dir  = SESSION.all_docs[int( rowID ) ]
>                 fp = os.path.join( dir, fname )
>                 res.append(__forcedParsing(fp))
>
> well the problem is i need output from subprocess so i have to read
> using sp.communicate(). i need that to be multiprocessed (via forking?
> poll?)
>
> so here are my thoughs :
>
> 1) without using fork() ,  could I  do multiple ajax posts by
> iterating the huge list of files at client side to server   , each
> processes will be multi-threaded because of Rocket right? But may this
> suffer performace issue on client side?
>
> 2) Forking Current implementation, and read output via polling?
> subprocess.poll()
>
> any ideas?


Re: [web2py] Re: Trying to multiprocess

2010-08-20 Thread Phyo Arkar
i use with subprocess.Popen(shell=False) and it works fine tho,

can you point me what are the problems?
i really need to call commands from web2py so what i should use ?

On 8/20/10, mdipierro  wrote:
> You should not use subprocess in a web2py application (if you really
> need too, look into the admin/controllers/shell.py) but you can use it
> in a web2py program running from shell (web2py.py -R myprogram.py).
>
> Massimo
>
> On Aug 20, 7:01 am, Phyo Arkar  wrote:
>> well
>>
>> lets say i have about a thounsand files to be proccessed  .. i need to
>> extract text out of them , whatever file type it is (i use Linux
>> "strings") command .
>>
>> i want to do in multi processed way , which works on multi-core pcs too.
>>
>> this is my current implementation :
>>
>> import subprocess,shlex
>>
>> def __forcedParsing(fname):
>>         cmd = 'strings "%s"' % (fname)
>>         #print cmd
>>         args= shlex.split(cmd)
>>         try:
>>                 sp = subprocess.Popen( args, shell = False, stdout =
>> subprocess.PIPE, stderr = subprocess.PIPE )
>>                 out, err = sp.communicate()
>>         except OSError:
>>                 print "Error no %s  Message %s" %
>> (OSError.errno,OSError.message)
>>                 pass
>>
>>         if sp.returncode== 0:
>>                 #print "Processed %s" %fname
>>                 return out
>>
>> def parseDocs():
>>         rows_to_parse = [i for i in range( 0,len(SESSION.all_docs))]
>>         row_ids = [x[0] for x in SESSION.all_docs  ]
>>         res=[]
>>         for rowID in rows_to_parse:
>>
>>                 file_id, fname, ftype, dir  = SESSION.all_docs[int( rowID
>> ) ]
>>                 fp = os.path.join( dir, fname )
>>                 res.append(__forcedParsing(fp))
>>
>> well the problem is i need output from subprocess so i have to read
>> using sp.communicate(). i need that to be multiprocessed (via forking?
>> poll?)
>>
>> so here are my thoughs :
>>
>> 1) without using fork() ,  could I  do multiple ajax posts by
>> iterating the huge list of files at client side to server   , each
>> processes will be multi-threaded because of Rocket right? But may this
>> suffer performace issue on client side?
>>
>> 2) Forking Current implementation, and read output via polling?
>> subprocess.poll()
>>
>> any ideas?


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

2010-08-20 Thread Phyo Arkar
So the way it worked before was a bug and now (rev 853) it is a feature?

On 8/20/10, mdipierro  wrote:
> On a second thought we should leave it alone. Else we break the
> scaffolding app, i.e. 90% os apps out there.. Anyway,... I'd still
> like to hear your opinions.
>
> On Aug 19, 8:38 pm, mdipierro  wrote:
>> There is a problem (in 1.83.2 and earlier version)
>>
>> URL()
>>
>> returns a string, not a helper. If you want to include the string
>> without escaping twice you have to do
>>
>> {{=XML(URL(...))}}
>>
>> In trunk, I modified the definition of URL so that it returns the
>> XML(..) helper wrapping the string. This will prevent
>>
>> {{=URL(...)}}
>>
>> from double escaping but will prevent you from doing
>>
>> 'http://127.0.0.:8000'+URL(..)
>>
>> you would have to do
>>
>> 'http://127.0.0.:8000%s'% URL(..)
>>
>> we cannot have it both ways.
>>
>> URL is either a helper or a string... The more I think about it the
>> more I am convinced URL should be a helper not a string otherwise all
>> the examples in which we use {{=URL(...)}} are buggy. Therefore this
>> change should be considered a bug fix and not a breaking of backward
>> compatibility.
>>
>> What do other people think? Should we change this as in trunk or leave
>> it alone?
>>
>> Massimo
>>
>> On Aug 19, 1:39 pm, Phyo Arkar  wrote:
>>
>> > Trunk version Rev 853
>>
>> > in view:
>> > $("#list").jqGrid({
>>
>> > url:"{{=URL(r=request,f='listMIME.json',vars={'extracted_path':extracted_path,'source_path':source_path})}}",
>>
>> > HTML Result:
>> >     $("#list").jqGrid({
>> >     url:"/sExtract/extraction/listMIME.json?source_path=home*&*
>> > ;extracted_path=target",
>>
>> > it insert  &instead of &
>>
>> > that screwed up all my sites :D ..
>>
>> > have not tested with released version ..


[web2py] OAuth1.0a authentication preliminary support

2010-08-20 Thread Michele Comitini
Hello,

Just to inform that it is possible to use web2py to make OAuth1.0a
consumer applications!
for instance you should be able to use it for twitter and linkedin.

A scaffold install on GAE is available for you to test vs OAuth
Sandbox (a conformance test):
http://grafbook.appspot.com/helloOAuth10a

try to login or access the 3legged resource.  You should see the OAuth
Sandbox login, just signup with a name and choose a kitty you like...


*PLEASE TEST*

The code is not yet in trunk, so please test it against you favorite
OAuth1.0a provider! copy/pull:
https://code.google.com/r/michelecomitini-facebookaccess/source/browse/gluon/contrib/login_methods/oauth10a_account.py

also copy/pull the scaffold application for the OAuth Sandbox :
https://code.google.com/r/michelecomitini-facebookaccess/source/browse/#hg/applications/helloOAuth10a

*YES* i left the *consumer secret* in the code! :O
 don't worry! it is just for the OAuth Sandbox so just use it  ... or
ask for a new one. ;-)

*but first* be sure to easy_install or pip python-oauth2 lib into your
site-packages!


Re: [web2py] Re: My editor ...

2010-08-20 Thread Stef Mientki
 On 20-08-2010 12:20, mdipierro wrote:
>> No, and as I use commercial libs, I'm not even allowed to make a dll,
>> so I created an exe, which behaves more like a dll than like a exe ;-)
> does the license allows you to make an exe but not a dll?
I'm not sure about a DLL, but I meant an ActiveX component which is explictly 
excluded.
>  Which
> libraries are commercial?
Again I'm not aware which libs I always use, but at least this one is commercial
http://www.trichview.com/

cheers,
Stef


Re: [web2py] Re: My editor ...

2010-08-20 Thread Stef Mientki
 On 20-08-2010 12:20, mdipierro wrote:
>> No, and as I use commercial libs, I'm not even allowed to make a dll,
>> so I created an exe, which behaves more like a dll than like a exe ;-)
> does the license allows you to make an exe but not a dll? Which
> libraries are commercial?
forgot to say,
I just tested the windows demo from
http://wxwebkit.wxcommunity.com/index.php?n=Main.Downloads
and although it might miss some features it looks very good.
A quick try to run it from my Python distro, failed :-(

cheers,
Stef


[web2py] Re: auth.settings.retrieve_password_next not being honoured

2010-08-20 Thread Adi
Tried both. No change.

I think retrieve_password is the form where an email to reset password
is sent. After sending the mail I want to go to my own controller
function.

On Aug 20, 4:26 pm, mdipierro  wrote:
> I think you want to set reset_password_next
>
> auth.settings.retrieve_password_next
>
> On Aug 20, 6:01 am, Adi  wrote:
>
>
>
> > Hi,
>
> > I'm setting auth.settings.retrieve_password_next = my_custom_url so
> > that after sending out reset password mail, the my_custom_url page
> > should open. However, web2py is taking user to default/index.
>
> > Any help?


Re: [web2py] Re: Automatic Translator

2010-08-20 Thread Alfonso de la Guarda
Hello,


Just updated the version to 0.86, which fix a bug when text formatting
expresions are inside the dictionary.


Saludos,


Alfonso de la Guarda
Centro Open Source(COS)
http://www.cos-la.net
http://alfonsodg.net
   Telef. 991935157
1024D/B23B24A4
5469 ED92 75A3 BBDB FD6B  58A5 54A1 851D B23B 24A4



On Thu, Aug 19, 2010 at 15:13, mdipierro  wrote:
> really cool
>
> On Aug 19, 2:24 pm, Alfonso de la Guarda  wrote:
>> Hello,
>>
>> I have recently finish auto-translator, which allows translates any
>> language file from web2py to another.
>> It also translates any text file using the command line or through a
>> TkInter interface.
>> The project #sahana has started to use this tool
>>
>> http://pypi.python.org/pypi/auto-translator/
>>
>> Saludos,
>>
>> 
>> Alfonso de la Guarda
>> Centro Open Source(COS)http://www.cos-la.nethttp://alfonsodg.net
>>    Telef. 991935157
>> 1024D/B23B24A4
>> 5469 ED92 75A3 BBDB FD6B  58A5 54A1 851D B23B 24A4


[web2py] strange problem

2010-08-20 Thread Richard Vézina
Hello Massimo,

I face a new problem. I have a postgresql text field that serves to store a
multiple referenced id. I don't use jquery plugin or anything else in my
form to make the selection of the element (only CTRL+mouse clic over the
representation of the id in the nav). No problem when the field is populated
by web2py form... I am getting |1|2| in my text field and when I crud.update
over the record I get my selected ID representation highligthed. *But when I
update manually the field at the postgresql database level I loose the
highligthed ID representation on crud.update.*

For example

UPDATE mytab
SET othertab_id='|529|'

I hope I am clear.

Thanks

Richard


Re: [web2py] Re: currval psycopg2.OperationalError

2010-08-20 Thread Richard Vézina
I will have a look at it and coming back to close the thread.

Thanks

Richard

2010/8/19 mdipierro 

> It is a bug. Now fixed in trunk. Please give it a try.
>
> On Aug 19, 4:38 pm, Richard Vézina 
> wrote:
> > Here the w2p model :
> >
> > db.define_table('table1',
> > Field('table1_id','id'),
> > Field('field1'),
> > migrate=False,
> > sequence_name='table1_table1_id_seq')
> >
> > Here the postgresql SQL creation script :
> >
> > CREATE TABLE table1
> > (
> >   table1_id serial NOT NULL,
> >   field1 character varying,
> >   CONSTRAINT table1_id PRIMARY KEY (table1_id)
> > )
> > WITH (
> >   OIDS=FALSE
> >
> > I just test it, the importation with table1.table1_id in SQLite works...
> I
> > mean I don't exactly know what is in sqlite...
> >
> > But it not workin with postgresql except if you change table1.table1_id
> for
> > table1.id
> >
> > Regards
> >
> > Richard
> >
> > 2010/8/19 mdipierro 
> >
> > > Can you post the model and the first two lines of the generated csv
> > > file?
> >
> > > On Aug 19, 3:34 pm, Richard Vézina 
> > > wrote:
> > > > Web2py admin interface exported csv file... Try to import the exact
> > > exported
> > > > csv file it fails.
> >
> > > > Richard
> >
> > > > 2010/8/19 mdipierro 
> >
> > > > > Does table1 have a column called "table1_id"? Seems strange. Who
> > > > > created the csv file?
> >
> > > > > On Aug 19, 2:06 pm, Richard Vézina 
> > > > > wrote:
> > > > > > I got it... Wrong model definition caused by a search an
> replace...
> > > > > Sorry!
> >
> > > > > > But there is still a problem with the importation as detailed in
> the
> > > PS.:
> > > > > > section of my intial emai.
> >
> > > > > > Here a copy :
> >
> > > > > > PS.: There is a problem on importation of exported csv file from
> the
> > > > > admin
> > > > > > interface... The id field of exported csv is : table1.table1_id
> that
> > > > > > correct, but the importation fail if I am not changing the
> > > > > *table1.table1_id
> > > > > > * header for *table1.id*
> >
> > > > > > 2010/8/19 Richard Vézina 
> >
> > > > > > > Ok, the problem is not coming from the postgresql manipulation
> as I
> > > > > thought
> > > > > > > it
> > > > > > > was...
> >
> > > > > > > I did the manipulation on an other table and got no problem.
> The
> > > > > problem
> > > > > > > seems to be
> > > > > > > presente since some time, but I didn't detected it..
> >
> > > > > > > Richard
> >
> > > > > > > 2010/8/19 Richard Vézina 
> >
> > > > > > > Hello,
> >
> > > > > > >> I am stuck on a problem about which I don't have a clue how to
> > > > > solve...
> >
> > > > > > >> I explain what I did :
> >
> > > > > > >> I would reload my entire database tables with fresh manually
> > > generated
> > > > > > >> data, so I flush out all the data that were in the database. I
> > > would
> > > > > have
> > > > > > >> the Postgresql sequence to be reseted so I ALTER SEQUENCE
> > > > > > >> table1_table1_id_seq RESTART WITH 1;
> >
> > > > > > >> I import my newly generated data from csv file with the admin
> > > > > interface.
> > > > > > >> No problem until there...
> >
> > > > > > >> I can add new data to the table with my app form...
> >
> > > > > > >> But when I link table1_id from other table FK I get this error
> > > ticket
> > > > > :
> >
> > > > > > >> Traceback (most recent call last):
> >
> > > > > > >>   File "/version_183-2/web2py/gluon/restricted.py", line 186,
> in
> > > > > restricted
> >
> > > > > > >> exec ccode in environment
> >
> > > > > > >>   File
> > > "/version_183-2/web2py/applications/app/controllers/default.py"
> > > > > , line
> 261,
> > > in
> > > > > 
> >
> > > > > > >>   File "/version_183-2/web2py/gluon/globals.py", line 96, in
> > > 
> >
> > > > > > >> self._caller = lambda f: f()
> >
> > > > > > >>   File "/version_183-2/web2py/gluon/tools.py", line 2219, in f
> >
> > > > > > >> return action(*a, **b)
> >
> > > > > > >>   File
> > > "/version_183-2/web2py/applications/app/controllers/default.py"
> > > > > , line
> 17,
> > > in
> > > > > create
> >
> > > > > > >> if form.accepts(request.vars, session):
> >
> > > > > > >>   File "/version_183-2/web2py/gluon/sqlhtml.py", line 1049, in
> > > accepts
> >
> > > > > > >> self.vars.id = self.table.insert(**fields)
> >
> > > > > > >>   File "/version_183-2/web2py/gluon/sql.py", line 2009, in
> insert
> >
> > > > > > >> self._db._execute("select currval('%s')" %
> > > self._sequence_name)
> >
> > > > > > >>   File "/version_183-2/web2py/gluon/sql.py", line 1010, in
> > > 
> >
> > > > > > >> self._execute = lambda *a, **b: self._cursor.execute(*a,
> **b)
> >
> > > > > > >> OperationalError: ERREUR:  la valeur courante (currval) de la
> > > séquence
> > > > > « table1_table1_id_seq » n'est pas encore définie
> >
> > > > > > >> dans cette session
> >
> > > > > > >> I use the to define my postgresql sequence name in 

Re: [web2py] Re: currval psycopg2.OperationalError CLOSED

2010-08-20 Thread Richard Vézina
I just test the trunk, the problem it gone!

Thank a lot.

Regard

Richard

2010/8/20 Richard Vézina 

> I will have a look at it and coming back to close the thread.
>
> Thanks
>
> Richard
>
> 2010/8/19 mdipierro 
>
> It is a bug. Now fixed in trunk. Please give it a try.
>>
>> On Aug 19, 4:38 pm, Richard Vézina 
>> wrote:
>> > Here the w2p model :
>> >
>> > db.define_table('table1',
>> > Field('table1_id','id'),
>> > Field('field1'),
>> > migrate=False,
>> > sequence_name='table1_table1_id_seq')
>> >
>> > Here the postgresql SQL creation script :
>> >
>> > CREATE TABLE table1
>> > (
>> >   table1_id serial NOT NULL,
>> >   field1 character varying,
>> >   CONSTRAINT table1_id PRIMARY KEY (table1_id)
>> > )
>> > WITH (
>> >   OIDS=FALSE
>> >
>> > I just test it, the importation with table1.table1_id in SQLite works...
>> I
>> > mean I don't exactly know what is in sqlite...
>> >
>> > But it not workin with postgresql except if you change table1.table1_id
>> for
>> > table1.id
>> >
>> > Regards
>> >
>> > Richard
>> >
>> > 2010/8/19 mdipierro 
>> >
>> > > Can you post the model and the first two lines of the generated csv
>> > > file?
>> >
>> > > On Aug 19, 3:34 pm, Richard Vézina 
>> > > wrote:
>> > > > Web2py admin interface exported csv file... Try to import the exact
>> > > exported
>> > > > csv file it fails.
>> >
>> > > > Richard
>> >
>> > > > 2010/8/19 mdipierro 
>> >
>> > > > > Does table1 have a column called "table1_id"? Seems strange. Who
>> > > > > created the csv file?
>> >
>> > > > > On Aug 19, 2:06 pm, Richard Vézina 
>> > > > > wrote:
>> > > > > > I got it... Wrong model definition caused by a search an
>> replace...
>> > > > > Sorry!
>> >
>> > > > > > But there is still a problem with the importation as detailed in
>> the
>> > > PS.:
>> > > > > > section of my intial emai.
>> >
>> > > > > > Here a copy :
>> >
>> > > > > > PS.: There is a problem on importation of exported csv file from
>> the
>> > > > > admin
>> > > > > > interface... The id field of exported csv is : table1.table1_id
>> that
>> > > > > > correct, but the importation fail if I am not changing the
>> > > > > *table1.table1_id
>> > > > > > * header for *table1.id*
>> >
>> > > > > > 2010/8/19 Richard Vézina 
>> >
>> > > > > > > Ok, the problem is not coming from the postgresql manipulation
>> as I
>> > > > > thought
>> > > > > > > it
>> > > > > > > was...
>> >
>> > > > > > > I did the manipulation on an other table and got no problem.
>> The
>> > > > > problem
>> > > > > > > seems to be
>> > > > > > > presente since some time, but I didn't detected it..
>> >
>> > > > > > > Richard
>> >
>> > > > > > > 2010/8/19 Richard Vézina 
>> >
>> > > > > > > Hello,
>> >
>> > > > > > >> I am stuck on a problem about which I don't have a clue how
>> to
>> > > > > solve...
>> >
>> > > > > > >> I explain what I did :
>> >
>> > > > > > >> I would reload my entire database tables with fresh manually
>> > > generated
>> > > > > > >> data, so I flush out all the data that were in the database.
>> I
>> > > would
>> > > > > have
>> > > > > > >> the Postgresql sequence to be reseted so I ALTER SEQUENCE
>> > > > > > >> table1_table1_id_seq RESTART WITH 1;
>> >
>> > > > > > >> I import my newly generated data from csv file with the admin
>> > > > > interface.
>> > > > > > >> No problem until there...
>> >
>> > > > > > >> I can add new data to the table with my app form...
>> >
>> > > > > > >> But when I link table1_id from other table FK I get this
>> error
>> > > ticket
>> > > > > :
>> >
>> > > > > > >> Traceback (most recent call last):
>> >
>> > > > > > >>   File "/version_183-2/web2py/gluon/restricted.py", line 186,
>> in
>> > > > > restricted
>> >
>> > > > > > >> exec ccode in environment
>> >
>> > > > > > >>   File
>> > > "/version_183-2/web2py/applications/app/controllers/default.py"
>> > > > > , line
>> 261,
>> > > in
>> > > > > 
>> >
>> > > > > > >>   File "/version_183-2/web2py/gluon/globals.py", line 96, in
>> > > 
>> >
>> > > > > > >> self._caller = lambda f: f()
>> >
>> > > > > > >>   File "/version_183-2/web2py/gluon/tools.py", line 2219, in
>> f
>> >
>> > > > > > >> return action(*a, **b)
>> >
>> > > > > > >>   File
>> > > "/version_183-2/web2py/applications/app/controllers/default.py"
>> > > > > , line
>> 17,
>> > > in
>> > > > > create
>> >
>> > > > > > >> if form.accepts(request.vars, session):
>> >
>> > > > > > >>   File "/version_183-2/web2py/gluon/sqlhtml.py", line 1049,
>> in
>> > > accepts
>> >
>> > > > > > >> self.vars.id = self.table.insert(**fields)
>> >
>> > > > > > >>   File "/version_183-2/web2py/gluon/sql.py", line 2009, in
>> insert
>> >
>> > > > > > >> self._db._execute("select currval('%s')" %
>> > > self._sequence_name)
>> >
>> > > > > > >>   File "/version_183-2/web2py/gluon/sql.py", line 1010, in
>> > > 
>> >
>> > > > > > >> self._execute = lambda *a, **b: s

[web2py] Re: strange problem

2010-08-20 Thread Richard Vézina
Wrong report... I made some other test and I don't get anymore the
highlighted multiselection with crud.update...

I change of version recently (1.81.4 -> 1.83.2). I look in my older app
version and I have the highlighted multiselection with crud.update...

Not sure if it comes from my app or the web2py update... I look further.

Richard

2010/8/20 Richard Vézina 

> Hello Massimo,
>
> I face a new problem. I have a postgresql text field that serves to store
> a
> multiple referenced id. I don't use jquery plugin or anything else in my
> form to make the selection of the element (only CTRL+mouse clic over the
> representation of the id in the nav). No problem when the field is populated
> by web2py form... I am getting |1|2| in my text field and when I crud.update
> over the record I get my selected ID representation highligthed. *But when
> I update manually the field at the postgresql database level I loose the
> highligthed ID representation on crud.update.*
>
> For example
>
> UPDATE mytab
> SET othertab_id='|529|'
>
> I hope I am clear.
>
> Thanks
>
> Richard
>


[web2py] Re: strange problem

2010-08-20 Thread Richard Vézina
Ok, I made a few more check and I am pretty sure it coming from web2py
version... Do we lost this cause of list:integer, list:reference, etc.??

Richard

2010/8/20 Richard Vézina 

> Wrong report... I made some other test and I don't get anymore the
> highlighted multiselection with crud.update...
>
> I change of version recently (1.81.4 -> 1.83.2). I look in my older app
> version and I have the highlighted multiselection with crud.update...
>
> Not sure if it comes from my app or the web2py update... I look further.
>
> Richard
>
> 2010/8/20 Richard Vézina 
>
>> Hello Massimo,
>>
>> I face a new problem. I have a postgresql text field that serves to store
>> a
>> multiple referenced id. I don't use jquery plugin or anything else in my
>> form to make the selection of the element (only CTRL+mouse clic over the
>> representation of the id in the nav). No problem when the field is populated
>> by web2py form... I am getting |1|2| in my text field and when I crud.update
>> over the record I get my selected ID representation highligthed. *But
>> when I update manually the field at the postgresql database level I loose
>> the highligthed ID representation on crud.update.*
>>
>> For example
>>
>> UPDATE mytab
>> SET othertab_id='|529|'
>>
>> I hope I am clear.
>>
>> Thanks
>>
>> Richard
>>
>
>


[web2py] Re: Trying to multiprocess

2010-08-20 Thread mdipierro
No problems but be careful that if a user request triggers the
creation of a process you must have some mechanism to prevent
proliferation of these processes else they eat memory and can cause a
memory leak. Consider the web server may also kill the parent process
and you have no control.

On Aug 20, 7:59 am, Phyo Arkar  wrote:
> i use with subprocess.Popen(shell=False) and it works fine tho,
>
> can you point me what are the problems?
> i really need to call commands from web2py so what i should use ?
>
> On 8/20/10, mdipierro  wrote:
>
> > You should not use subprocess in a web2py application (if you really
> > need too, look into the admin/controllers/shell.py) but you can use it
> > in a web2py program running from shell (web2py.py -R myprogram.py).
>
> > Massimo
>
> > On Aug 20, 7:01 am, Phyo Arkar  wrote:
> >> well
>
> >> lets say i have about a thounsand files to be proccessed  .. i need to
> >> extract text out of them , whatever file type it is (i use Linux
> >> "strings") command .
>
> >> i want to do in multi processed way , which works on multi-core pcs too.
>
> >> this is my current implementation :
>
> >> import subprocess,shlex
>
> >> def __forcedParsing(fname):
> >>         cmd = 'strings "%s"' % (fname)
> >>         #print cmd
> >>         args= shlex.split(cmd)
> >>         try:
> >>                 sp = subprocess.Popen( args, shell = False, stdout =
> >> subprocess.PIPE, stderr = subprocess.PIPE )
> >>                 out, err = sp.communicate()
> >>         except OSError:
> >>                 print "Error no %s  Message %s" %
> >> (OSError.errno,OSError.message)
> >>                 pass
>
> >>         if sp.returncode== 0:
> >>                 #print "Processed %s" %fname
> >>                 return out
>
> >> def parseDocs():
> >>         rows_to_parse = [i for i in range( 0,len(SESSION.all_docs))]
> >>         row_ids = [x[0] for x in SESSION.all_docs  ]
> >>         res=[]
> >>         for rowID in rows_to_parse:
>
> >>                 file_id, fname, ftype, dir  = SESSION.all_docs[int( rowID
> >> ) ]
> >>                 fp = os.path.join( dir, fname )
> >>                 res.append(__forcedParsing(fp))
>
> >> well the problem is i need output from subprocess so i have to read
> >> using sp.communicate(). i need that to be multiprocessed (via forking?
> >> poll?)
>
> >> so here are my thoughs :
>
> >> 1) without using fork() ,  could I  do multiple ajax posts by
> >> iterating the huge list of files at client side to server   , each
> >> processes will be multi-threaded because of Rocket right? But may this
> >> suffer performace issue on client side?
>
> >> 2) Forking Current implementation, and read output via polling?
> >> subprocess.poll()
>
> >> any ideas?


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

2010-08-20 Thread mdipierro
I changed and changed back. I am waiting for comments form other
developers. I am not sure what the best course of action is.

Massimo

On Aug 20, 8:23 am, Phyo Arkar  wrote:
> So the way it worked before was a bug and now (rev 853) it is a feature?
>
> On 8/20/10, mdipierro  wrote:
>
> > On a second thought we should leave it alone. Else we break the
> > scaffolding app, i.e. 90% os apps out there.. Anyway,... I'd still
> > like to hear your opinions.
>
> > On Aug 19, 8:38 pm, mdipierro  wrote:
> >> There is a problem (in 1.83.2 and earlier version)
>
> >> URL()
>
> >> returns a string, not a helper. If you want to include the string
> >> without escaping twice you have to do
>
> >> {{=XML(URL(...))}}
>
> >> In trunk, I modified the definition of URL so that it returns the
> >> XML(..) helper wrapping the string. This will prevent
>
> >> {{=URL(...)}}
>
> >> from double escaping but will prevent you from doing
>
> >> 'http://127.0.0.:8000'+URL(..)
>
> >> you would have to do
>
> >> 'http://127.0.0.:8000%s'%URL(..)
>
> >> we cannot have it both ways.
>
> >> URL is either a helper or a string... The more I think about it the
> >> more I am convinced URL should be a helper not a string otherwise all
> >> the examples in which we use {{=URL(...)}} are buggy. Therefore this
> >> change should be considered a bug fix and not a breaking of backward
> >> compatibility.
>
> >> What do other people think? Should we change this as in trunk or leave
> >> it alone?
>
> >> Massimo
>
> >> On Aug 19, 1:39 pm, Phyo Arkar  wrote:
>
> >> > Trunk version Rev 853
>
> >> > in view:
> >> > $("#list").jqGrid({
>
> >> > url:"{{=URL(r=request,f='listMIME.json',vars={'extracted_path':extracted_path,'source_path':source_path})}}",
>
> >> > HTML Result:
> >> >     $("#list").jqGrid({
> >> >     url:"/sExtract/extraction/listMIME.json?source_path=home*&*
> >> > ;extracted_path=target",
>
> >> > it insert  &instead of &
>
> >> > that screwed up all my sites :D ..
>
> >> > have not tested with released version ..


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

2010-08-20 Thread Jonathan Lundell
On Aug 20, 2010, at 8:29 AM, mdipierro wrote:

> I changed and changed back. I am waiting for comments form other
> developers. I am not sure what the best course of action is.

What's an example of the framework breakage using the helper form of URL?


> 
> Massimo
> 
> On Aug 20, 8:23 am, Phyo Arkar  wrote:
>> So the way it worked before was a bug and now (rev 853) it is a feature?
>> 
>> On 8/20/10, mdipierro  wrote:
>> 
>>> On a second thought we should leave it alone. Else we break the
>>> scaffolding app, i.e. 90% os apps out there.. Anyway,... I'd still
>>> like to hear your opinions.
>> 
>>> On Aug 19, 8:38 pm, mdipierro  wrote:
 There is a problem (in 1.83.2 and earlier version)
>> 
 URL()
>> 
 returns a string, not a helper. If you want to include the string
 without escaping twice you have to do
>> 
 {{=XML(URL(...))}}
>> 
 In trunk, I modified the definition of URL so that it returns the
 XML(..) helper wrapping the string. This will prevent
>> 
 {{=URL(...)}}
>> 
 from double escaping but will prevent you from doing
>> 
 'http://127.0.0.:8000'+URL(..)
>> 
 you would have to do
>> 
 'http://127.0.0.:8000%s'%URL(..)
>> 
 we cannot have it both ways.
>> 
 URL is either a helper or a string... The more I think about it the
 more I am convinced URL should be a helper not a string otherwise all
 the examples in which we use {{=URL(...)}} are buggy. Therefore this
 change should be considered a bug fix and not a breaking of backward
 compatibility.
>> 
 What do other people think? Should we change this as in trunk or leave
 it alone?
>> 
 Massimo
>> 
 On Aug 19, 1:39 pm, Phyo Arkar  wrote:
>> 
> Trunk version Rev 853
>> 
> in view:
> $("#list").jqGrid({
>> 
> url:"{{=URL(r=request,f='listMIME.json',vars={'extracted_path':extracted_path,'source_path':source_path})}}",
>> 
> HTML Result:
> $("#list").jqGrid({
> url:"/sExtract/extraction/listMIME.json?source_path=home*&*
> ;extracted_path=target",
>> 
> it insert  &instead of &
>> 
> that screwed up all my sites :D ..
>> 
> have not tested with released version ..




[web2py] integrate editarea in application

2010-08-20 Thread Cory Coager
How would I integrate editarea in my application without going through
the admin interface?


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

2010-08-20 Thread Jonathan Lundell
On Aug 19, 2010, at 6:38 PM, mdipierro wrote:

> In trunk, I modified the definition of URL so that it returns the
> XML(..) helper wrapping the string. This will prevent
> 
> {{=URL(...)}}
> 
> from double escaping but will prevent you from doing
> 
> 'http://127.0.0.:8000'+URL(..)

Couldn't this be fixed by implementing URL.__radd__() ?

def __add__(self,other):
return '%s%s' % (self,other)

def __radd__(self,other):
return '%s%s' % (other,self)



> 
> you would have to do
> 
> 'http://127.0.0.:8000%s' % URL(..)
> 
> we cannot have it both ways.




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

2010-08-20 Thread Jonathan Lundell
On Aug 20, 2010, at 9:22 AM, Jonathan Lundell wrote:

> On Aug 19, 2010, at 6:38 PM, mdipierro wrote:
> 
>> In trunk, I modified the definition of URL so that it returns the
>> XML(..) helper wrapping the string. This will prevent
>> 
>> {{=URL(...)}}
>> 
>> from double escaping but will prevent you from doing
>> 
>> 'http://127.0.0.:8000'+URL(..)
> 
> Couldn't this be fixed by implementing URL.__radd__() ?

I meant XML.__radd__()

> 
>def __add__(self,other):
>return '%s%s' % (self,other)
> 
>def __radd__(self,other):
>return '%s%s' % (other,self)
> 
> 
> 
>> 
>> you would have to do
>> 
>> 'http://127.0.0.:8000%s' % URL(..)
>> 
>> we cannot have it both ways.
> 
> 




Re: [web2py] Re: My editor ...

2010-08-20 Thread Stef Mientki
 On 20-08-2010 12:54, Martin.Mulone wrote:
> in linux gwibber use http://code.google.com/p/pywebkitgtk/, I think
> you are right, there is no good way to support windows/linux/mac.
I think webkit might be a good replacement.
>  Any
> chances that you make the movie, in format movie and upload to
> youtube?.
Sorry, I''ve no "youtube converter" and my experineces in the past with movie 
converters,
with my past adventures with viedo converters, I don't want to start another 
trial and error session ;-)
cheers,
Stef


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

2010-08-20 Thread mdipierro
I did as you suggest. I also had to add lower(), upper() and __len__
methods to the XML class.
I think this is a good solution. Thanks Jonathan.

Massimo

On Aug 20, 11:31 am, Jonathan Lundell  wrote:
> On Aug 20, 2010, at 9:22 AM, Jonathan Lundell wrote:
>
> > On Aug 19, 2010, at 6:38 PM, mdipierro wrote:
>
> >> In trunk, I modified the definition of URL so that it returns the
> >> XML(..) helper wrapping the string. This will prevent
>
> >> {{=URL(...)}}
>
> >> from double escaping but will prevent you from doing
>
> >> 'http://127.0.0.:8000'+URL(..)
>
> > Couldn't this be fixed by implementing URL.__radd__() ?
>
> I meant XML.__radd__()
>
>
>
> >    def __add__(self,other):
> >        return '%s%s' % (self,other)
>
> >    def __radd__(self,other):
> >        return '%s%s' % (other,self)
>
> >> you would have to do
>
> >> 'http://127.0.0.:8000%s'% URL(..)
>
> >> we cannot have it both ways.


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

2010-08-20 Thread Jonathan Lundell
On Aug 20, 2010, at 10:17 AM, mdipierro wrote:

> I did as you suggest. I also had to add lower(), upper() and __len__
> methods to the XML class.
> I think this is a good solution. Thanks Jonathan.

oops:

+def upper(self):
+return str(self).lower()



> 
> Massimo
> 
> On Aug 20, 11:31 am, Jonathan Lundell  wrote:
>> On Aug 20, 2010, at 9:22 AM, Jonathan Lundell wrote:
>> 
>>> On Aug 19, 2010, at 6:38 PM, mdipierro wrote:
>> 
 In trunk, I modified the definition of URL so that it returns the
 XML(..) helper wrapping the string. This will prevent
>> 
 {{=URL(...)}}
>> 
 from double escaping but will prevent you from doing
>> 
 'http://127.0.0.:8000'+URL(..)
>> 
>>> Couldn't this be fixed by implementing URL.__radd__() ?
>> 
>> I meant XML.__radd__()
>> 
>> 
>> 
>>>def __add__(self,other):
>>>return '%s%s' % (self,other)
>> 
>>>def __radd__(self,other):
>>>return '%s%s' % (other,self)
>> 
 you would have to do
>> 
 'http://127.0.0.:8000%s'% URL(..)
>> 
 we cannot have it both ways.




[web2py] Plugin example

2010-08-20 Thread lddn...@gmail.com
I try the plugin comments example but it loads the content 2 times in
the same page. Dont know how to remove it.


[web2py] Re: Plugin example

2010-08-20 Thread mdipierro
Please use the {{=plugin_wiki.widget('comments',)}} from plugin
wiki instead.

On Aug 20, 10:50 am, "lddn...@gmail.com"  wrote:
> I try the plugin comments example but it loads the content 2 times in
> the same page. Dont know how to remove it.


[web2py] Facebook oauth

2010-08-20 Thread Narendran
Hello all,
I picked the Facebook oauth submitted by mcm from
https://code.google.com/r/michelecomitini-facebookaccess/source/browse/gluon/contrib/login_methods/facebook_account.py
 (referred in this thread:
http://groups.google.com/group/web2py/browse_thread/thread/be441047bf237f9/6ea33cf0d4bfba63?lnk=gst&q=facebook+oauth#6ea33cf0d4bfba63)

I am facing one isse:
1. I've placed require_login decoration on a method say a(). After the
authentication is complete, the page always gets redirected to default/
index, whereas the ideal behaviour would be to go to a(). It works as
intended if I use default auth instead of Facebook auth.

Also, is there any plugin/package that would provide full-fledged
support for using Facebook Graph API with web2py?

--
Thanks
Narendran


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

2010-08-20 Thread mdipierro
fixed. ;-)

On Aug 20, 12:25 pm, Jonathan Lundell  wrote:
> On Aug 20, 2010, at 10:17 AM, mdipierro wrote:
>
> > I did as you suggest. I also had to add lower(), upper() and __len__
> > methods to the XML class.
> > I think this is a good solution. Thanks Jonathan.
>
> oops:
>
> +    def upper(self):
> +        return str(self).lower()
>
>
>
>
>
>
>
> > Massimo
>
> > On Aug 20, 11:31 am, Jonathan Lundell  wrote:
> >> On Aug 20, 2010, at 9:22 AM, Jonathan Lundell wrote:
>
> >>> On Aug 19, 2010, at 6:38 PM, mdipierro wrote:
>
>  In trunk, I modified the definition of URL so that it returns the
>  XML(..) helper wrapping the string. This will prevent
>
>  {{=URL(...)}}
>
>  from double escaping but will prevent you from doing
>
>  'http://127.0.0.:8000'+URL(..)
>
> >>> Couldn't this be fixed by implementing URL.__radd__() ?
>
> >> I meant XML.__radd__()
>
> >>>    def __add__(self,other):
> >>>        return '%s%s' % (self,other)
>
> >>>    def __radd__(self,other):
> >>>        return '%s%s' % (other,self)
>
>  you would have to do
>
>  'http://127.0.0.:8000%s'%URL(..)
>
>  we cannot have it both ways.


Re: [web2py] Facebook oauth

2010-08-20 Thread Michele Comitini
Hello Narendran,

Do not use that it is old..

now facebook is supported inside web2py distribution with oauth20_account.py
you can find an example app here:
http://code.google.com/r/michelecomitini-facebookaccess/source/browse/#hg/applications/helloFacebook

for a simple example usage of graph api look here:
http://code.google.com/r/michelecomitini-facebookaccess/source/browse/applications/helloFacebook/models/grafb.py
http://code.google.com/r/michelecomitini-facebookaccess/source/browse/applications/helloFacebook/controllers/graph.py
http://code.google.com/r/michelecomitini-facebookaccess/source/browse/#hg/applications/helloFacebook/views/graph


for the redirection after login I am investigating...

mic

2010/8/20 Narendran :
> Hello all,
> I picked the Facebook oauth submitted by mcm from
> https://code.google.com/r/michelecomitini-facebookaccess/source/browse/gluon/contrib/login_methods/facebook_account.py
>  (referred in this thread:
> http://groups.google.com/group/web2py/browse_thread/thread/be441047bf237f9/6ea33cf0d4bfba63?lnk=gst&q=facebook+oauth#6ea33cf0d4bfba63)
>
> I am facing one isse:
> 1. I've placed require_login decoration on a method say a(). After the
> authentication is complete, the page always gets redirected to default/
> index, whereas the ideal behaviour would be to go to a(). It works as
> intended if I use default auth instead of Facebook auth.
>
> Also, is there any plugin/package that would provide full-fledged
> support for using Facebook Graph API with web2py?
>
> --
> Thanks
> Narendran


[web2py] patch for auth to work with web2py_component ajaxing

2010-08-20 Thread Jurgis Pralgauskis

hello, by default, if some function needs auth, w2p gives back some
text/html:
When I work with components ajax way, I don't want my content parts to
get mangled with it...
1) if I am not logged in, it would flood my tiny content area with big
login page clone :)
2) in my case, I want my current content (of target div) to stay in
place if I don't have permisions,  (and new  content should replace it
only if accessible).

so I made a small patch, You can test it hear
https://web2py-gae-test.appspot.com/auth_for_web2py_components/default/test
its default new app with several changes in
/controllers/default.py : user()
/views/web2py_ajax.html  : web2py_ajax_page()

is it a good way? or how would be better?

/controllers/default.py

def user():
if request.ajax:
result = auth()
if not auth.user:
return "ERROR" +" You should %s first \n" %
( A('login',  _target="blank", _href=auth.settings.login_url).xml())
if isinstance(result, str):
response.flash = result
return "ERROR"
return result # no dict(form=result)
else:
return dict(form=auth())


/views/web2py_ajax.html

'success': function(text) {
if (text.startsWith( "ERROR" )) {
  jQuery('#'+target).prepend( text.substr( "ERROR".length ) );
}
else {
jQuery('#'+target).html(text);
}


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

2010-08-20 Thread Phyo Arkar
cool

so =XML(=URL(,,,)) is the way to go?

On Sat, Aug 21, 2010 at 1:20 AM, mdipierro  wrote:

> fixed. ;-)
>
> On Aug 20, 12:25 pm, Jonathan Lundell  wrote:
> > On Aug 20, 2010, at 10:17 AM, mdipierro wrote:
> >
> > > I did as you suggest. I also had to add lower(), upper() and __len__
> > > methods to the XML class.
> > > I think this is a good solution. Thanks Jonathan.
> >
> > oops:
> >
> > +def upper(self):
> > +return str(self).lower()
> >
> >
> >
> >
> >
> >
> >
> > > Massimo
> >
> > > On Aug 20, 11:31 am, Jonathan Lundell  wrote:
> > >> On Aug 20, 2010, at 9:22 AM, Jonathan Lundell wrote:
> >
> > >>> On Aug 19, 2010, at 6:38 PM, mdipierro wrote:
> >
> >  In trunk, I modified the definition of URL so that it returns the
> >  XML(..) helper wrapping the string. This will prevent
> >
> >  {{=URL(...)}}
> >
> >  from double escaping but will prevent you from doing
> >
> >  'http://127.0.0.:8000'+URL(..)
> >
> > >>> Couldn't this be fixed by implementing URL.__radd__() ?
> >
> > >> I meant XML.__radd__()
> >
> > >>>def __add__(self,other):
> > >>>return '%s%s' % (self,other)
> >
> > >>>def __radd__(self,other):
> > >>>return '%s%s' % (other,self)
> >
> >  you would have to do
> >
> >  'http://127.0.0.:8000%s'%URL(..)
> >
> >  we cannot have it both ways.
>


[web2py] Re: error when changing field type from float to decimal

2010-08-20 Thread Philip
I am using SQLite.
Thanks,
Philip

On Aug 17, 5:54 pm, mdipierro  wrote:
> The problem is that web2py relies on the database to perform the data
> conversion. Which database do you use?
>
> Massimo
>
> On Aug 17, 4:38 pm, Philip  wrote:
>
>
>
> > I have an application that is up and running (which is relevant
> > because I don't want to erase all the data already in it), in which I
> > want to change a field type from float to decimal.  As soon as I
> > change my model file and refresh the app, I get the following error:
>
> > ValueError: invalid literal for int() with base 10: '
>
> > As I understand it, that error should arise from trying to convert a
> > string to an integer (and having a non-numeric character).  In this
> > case, all the existing values in the database are floats, so when the
> > field type is changed, the values should be converted from float to
> > decimal - I don't see how that conversion would cause the above error.
>
> > Is there anything about the migration of data that happens when a
> > field type is changed that would cause an issue like this? Also, I am
> > using SQLite as the DB; is that in some way contributing to the
> > problem?
>
> > Any suggestions?
>
> > The reason for the switch was that the DB includes a lot of financial
> > data, so the rounding errors that were resulting from using floats
> > were unfortunately material.  If there's a better way to solve this
> > problem, I'm all ears.
>
> > Thanks,
> > Philip


[web2py] Should we have a feature freeze and stability maintenance period in future?

2010-08-20 Thread Phyo Arkar
Like some projects , (what i saw is KDE4) should we go into Feature Freeze
period?

Well lets say , when web2py hit 1.90 version , stop developing about new
features and we will go into
-bug-squishing-contest ,
-Stress test, Test everything , try to crash web2py etc.
-fix bugs, fix performance issues , improve performance
-code cleanup , documentation.

For a month (or any period)

after that we will get a Stable (Production/Mature) version of web2py.

how that sounds?


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

2010-08-20 Thread mdipierro
With stable {{=XML(URL(...))}}.
With the last trunk {{=URL(...)}}.

If no major objection this new trunk feature will become stable.

On Aug 20, 3:47 pm, Phyo Arkar  wrote:
> cool
>
> so =XML(=URL(,,,)) is the way to go?
>
> On Sat, Aug 21, 2010 at 1:20 AM, mdipierro  wrote:
> > fixed. ;-)
>
> > On Aug 20, 12:25 pm, Jonathan Lundell  wrote:
> > > On Aug 20, 2010, at 10:17 AM, mdipierro wrote:
>
> > > > I did as you suggest. I also had to add lower(), upper() and __len__
> > > > methods to the XML class.
> > > > I think this is a good solution. Thanks Jonathan.
>
> > > oops:
>
> > > +    def upper(self):
> > > +        return str(self).lower()
>
> > > > Massimo
>
> > > > On Aug 20, 11:31 am, Jonathan Lundell  wrote:
> > > >> On Aug 20, 2010, at 9:22 AM, Jonathan Lundell wrote:
>
> > > >>> On Aug 19, 2010, at 6:38 PM, mdipierro wrote:
>
> > >  In trunk, I modified the definition of URL so that it returns the
> > >  XML(..) helper wrapping the string. This will prevent
>
> > >  {{=URL(...)}}
>
> > >  from double escaping but will prevent you from doing
>
> > >  'http://127.0.0.:8000'+URL(..)
>
> > > >>> Couldn't this be fixed by implementing URL.__radd__() ?
>
> > > >> I meant XML.__radd__()
>
> > > >>>    def __add__(self,other):
> > > >>>        return '%s%s' % (self,other)
>
> > > >>>    def __radd__(self,other):
> > > >>>        return '%s%s' % (other,self)
>
> > >  you would have to do
>
> > >  'http://127.0.0.:8000%s'%URL(..)
>
> > >  we cannot have it both ways.


[web2py] Re: error when changing field type from float to decimal

2010-08-20 Thread mdipierro
sqlite does not support dropping columns. That prevents the migration
from moving the data into a dummy columns to perform the conversion.

If you do not have important data in the database I suggest you delete
the databases/* files. Else give me some details about the model and I
can provide a script to do this conversion.

On Aug 20, 3:50 pm, Philip  wrote:
> I am using SQLite.
> Thanks,
> Philip
>
> On Aug 17, 5:54 pm, mdipierro  wrote:
>
> > The problem is that web2py relies on the database to perform the data
> > conversion. Which database do you use?
>
> > Massimo
>
> > On Aug 17, 4:38 pm, Philip  wrote:
>
> > > I have an application that is up and running (which is relevant
> > > because I don't want to erase all the data already in it), in which I
> > > want to change a field type from float to decimal.  As soon as I
> > > change my model file and refresh the app, I get the following error:
>
> > > ValueError: invalid literal for int() with base 10: '
>
> > > As I understand it, that error should arise from trying to convert a
> > > string to an integer (and having a non-numeric character).  In this
> > > case, all the existing values in the database are floats, so when the
> > > field type is changed, the values should be converted from float to
> > > decimal - I don't see how that conversion would cause the above error.
>
> > > Is there anything about the migration of data that happens when a
> > > field type is changed that would cause an issue like this? Also, I am
> > > using SQLite as the DB; is that in some way contributing to the
> > > problem?
>
> > > Any suggestions?
>
> > > The reason for the switch was that the DB includes a lot of financial
> > > data, so the rounding errors that were resulting from using floats
> > > were unfortunately material.  If there's a better way to solve this
> > > problem, I'm all ears.
>
> > > Thanks,
> > > Philip


[web2py] XML+URL continuing problem

2010-08-20 Thread Michael Wolfe
Look at revisions 804, 808, and 811 in web2py's hg repos.


R804:
URL+XML, and oauth1.0 from Michele

=== (+6,-3) gluon/html.py ===
@@ -201,8 +201,8 @@

 if regex_crlf.search(url):
 raise SyntaxError, 'CRLF Injection Detected'
-return rewrite.filter_out(url, env)
-
+return XML(rewrite.filter_out(url, env))
+


R808:
no more XML in URL, breaks scaffoling app

=== (+2,-2) gluon/html.py ===
@@ -201,7 +201,7 @@

 if regex_crlf.search(url):
 raise SyntaxError, 'CRLF Injection Detected'
-return XML(rewrite.filter_out(url, env))
+return rewrite.filter_out(url, env)


R811:
fixed problem with URL, thanks Jonathan

=== (+14,-2) gluon/html.py ===
@@ -201,7 +201,7 @@

 if regex_crlf.search(url):
 raise SyntaxError, 'CRLF Injection Detected'
-return rewrite.filter_out(url, env)
+return XML(rewrite.filter_out(url, env))


So which way is it?  I think this still needs to be sorted out.  I'm
going back to R803 for the time being.  It looks like more than just
that one line needs to be changed, since both versions apparently
cause problems in different areas.

-Mike


[web2py] Re: Should we have a feature freeze and stability maintenance period in future?

2010-08-20 Thread mdipierro
yes and no.

For example Michele just send me a new gluon/contrib/login_methods/
oauth10_account.py which provides OAuth 1.0 authentication. It did not
affect anything else in web2py and I see no reason from freezing
adding features like this.
Mariano is working on a PDF library for web2py. Same argument applies.

I see a lot of value in

- bug-squishing-contest ,
- Stress test, Test everything , try to crash web2py etc.
- fix bugs, fix performance issues , improve performance
- code cleanup , documentation.

we can set deadlines for that. This means we would stress test and
improve features existing at a certain date and we would only add new
features tagged as "experimental" that do not interfere with parts
that are being stress tested. Makes sense?

Massimo

On Aug 20, 3:54 pm, Phyo Arkar  wrote:
> Like some projects , (what i saw is KDE4) should we go into Feature Freeze
> period?
>
> Well lets say , when web2py hit 1.90 version , stop developing about new
> features and we will go into
> -bug-squishing-contest ,
> -Stress test, Test everything , try to crash web2py etc.
> -fix bugs, fix performance issues , improve performance
> -code cleanup , documentation.
>
> For a month (or any period)
>
> after that we will get a Stable (Production/Mature) version of web2py.
>
> how that sounds?


[web2py] Re: XML+URL continuing problem

2010-08-20 Thread mdipierro
This was discussed in a separate thread:

1) we changed in order to fix a bug
2) we found that broke backward compatibility and reverted the change
3) we changed again together with other parts of web2py in order to
make sure that it does not break backward compatibility

People should test it and if no object the change will stay because it
fixes a bug.

massimo

On Aug 20, 4:35 pm, Michael Wolfe 
wrote:
> Look at revisions 804, 808, and 811 in web2py's hg repos.
>
> R804:
> URL+XML, and oauth1.0 from Michele
>
> === (+6,-3) gluon/html.py ===
> @@ -201,8 +201,8 @@
>
>      if regex_crlf.search(url):
>          raise SyntaxError, 'CRLF Injection Detected'
> -    return rewrite.filter_out(url, env)
> -
> +    return XML(rewrite.filter_out(url, env))
> +
>
> R808:
> no more XML in URL, breaks scaffoling app
>
> === (+2,-2) gluon/html.py ===
> @@ -201,7 +201,7 @@
>
>      if regex_crlf.search(url):
>          raise SyntaxError, 'CRLF Injection Detected'
> -    return XML(rewrite.filter_out(url, env))
> +    return rewrite.filter_out(url, env)
>
> R811:
> fixed problem with URL, thanks Jonathan
>
> === (+14,-2) gluon/html.py ===
> @@ -201,7 +201,7 @@
>
>      if regex_crlf.search(url):
>          raise SyntaxError, 'CRLF Injection Detected'
> -    return rewrite.filter_out(url, env)
> +    return XML(rewrite.filter_out(url, env))
>
> So which way is it?  I think this still needs to be sorted out.  I'm
> going back to R803 for the time being.  It looks like more than just
> that one line needs to be changed, since both versions apparently
> cause problems in different areas.
>
> -Mike


[web2py] Re: patch for auth to work with web2py_component ajaxing

2010-08-20 Thread mdipierro
I see the problem. Let me think about your solution.

On Aug 20, 3:36 pm, Jurgis Pralgauskis 
wrote:
> hello, by default, if some function needs auth, w2p gives back some
> text/html:
> When I work with components ajax way, I don't want my content parts to
> get mangled with it...
> 1) if I am not logged in, it would flood my tiny content area with big
> login page clone :)
> 2) in my case, I want my current content (of target div) to stay in
> place if I don't have permisions,  (and new  content should replace it
> only if accessible).
>
> so I made a small patch, You can test it 
> hearhttps://web2py-gae-test.appspot.com/auth_for_web2py_components/defaul...
> its default new app with several changes in
> /controllers/default.py : user()
> /views/web2py_ajax.html  : web2py_ajax_page()
>
> is it a good way? or how would be better?
>
> /controllers/default.py
>
> def user():
>     if request.ajax:
>         result = auth()
>         if not auth.user:
>             return "ERROR" +" You should %s first \n" %
> ( A('login',  _target="blank", _href=auth.settings.login_url).xml())
>         if isinstance(result, str):
>             response.flash = result
>             return "ERROR"
>         return result # no dict(form=result)
>     else:
>         return dict(form=auth())
>
> /views/web2py_ajax.html
>
>     'success': function(text) {
>         if (text.startsWith( "ERROR" )) {
>           jQuery('#'+target).prepend( text.substr( "ERROR".length ) );
>         }
>         else {
>             jQuery('#'+target).html(text);
>         }


[web2py] polymaps

2010-08-20 Thread mdipierro
http://polymaps.org


Re: [web2py] Re: My editor ...

2010-08-20 Thread Alexandre Andrade
>The wysiwyg html editor is a docked Delphi application, so only suited for
windows.

Since Delphi is Pascal language, maybe it can reworked as a Lazarus project

http://www.lazarus.freepascal.org/

2010/8/19 Stef Mientki 

>  On 19-08-2010 22:24, mdipierro wrote:
> > This is impressive.
> thanks
> >  I would like to distribute this with web2py (under
> > contrib with its own license)
> > What do you think?
> I feel honored,
> so sounds like a good idea to me.
> > What are the prerequisites?
> AFAIK (I always use a very full blown Python version, and I'm totally not
> aware of which parts I'm
> using),
> but the most important things are Python 2.6 and wxPython 2.8.
> The wysiwyg html editor is a docked Delphi application, so only suited for
> windows.
> For Mac and Linux this should be replaced by something else, maybe webkit,
> but that doesn't run
> (easy) under windows
> >  Do you have binaries for windows and mac?
> No,
> I can only make binaries for windows and even these are not very suitable
> for distro,
> because my builder always include the whole full blown python sources.
> As I see there's enough interest, here is my global plan
> - fix some bugs
> - remove the non-standard libs
> - make wysiswyg editor only included in windows
> - make some basic doc
> - make a windows binary + source distro (due to way my builder works,
> that's almost the same)
> Depending on my spare time, this should take a couple of weeks.
>
> then I need someone to test it (and probably make some changes) under Linux
> and Mac
>
> then we can distibute it.
> I mentioned BSD, because it's the easiest I know,
> but any license is good for me, as long as it's free enough.
>
> cheers,
> Stef
>
>
>
> > Massimo
> >
> >
> > On Aug 19, 3:12 pm, Stef Mientki  wrote:
> >>  hello,
> >>
> >> I made a movie about the most important features of the editor I'm
> using, you can see it here:
> >>
> >> http://mientki.ruhosting.nl/movies/web2py_1.html
> >>
> >> If there's enough interest, I'll make the application available under
> BSD license.
> >> At this moment, only under windows all features are available.
> >>
> >> cheers,
> >> Stef
>
>


-- 
Atenciosamente

-- 
=
Alexandre Andrade
Hipercenter.com


Re: [web2py] Re: My editor ...

2010-08-20 Thread Stef Mientki
 On 21-08-2010 00:42, Alexandre Andrade wrote:
> >The wysiwyg html editor is a docked Delphi application, so only suited for 
> >windows.
>
> Since Delphi is Pascal language, maybe it can reworked as a Lazarus project
well that doesn't solve the problem with the RichView license,
ok you could rewrite the RichView library, but I estimate it at 2-3 menyears of 
work,
besides a Pythonic solution would be much better, so I would say WebKit is the 
way to go.

But anyway thanks for the suggestion.

cheers,
Stef


[web2py] Re: My editor ...

2010-08-20 Thread mdipierro
Qt includes this http://doc.trolltech.com/3.3/qtextbrowser.html
would it help?

Massimo

On Aug 19, 6:04 pm, Stef Mientki  wrote:
>  On 19-08-2010 22:24, mdipierro wrote:> This is impressive.
> thanks
> >  I would like to distribute this with web2py (under
> > contrib with its own license)
> > What do you think?
>
> I feel honored,
> so sounds like a good idea to me.> What are the prerequisites?
>
> AFAIK (I always use a very full blown Python version, and I'm totally not 
> aware of which parts I'm
> using),
> but the most important things are Python 2.6 and wxPython 2.8.
> The wysiwyg html editor is a docked Delphi application, so only suited for 
> windows.
> For Mac and Linux this should be replaced by something else, maybe webkit, 
> but that doesn't run
> (easy) under windows>  Do you have binaries for windows and mac?
>
> No,
> I can only make binaries for windows and even these are not very suitable for 
> distro,
> because my builder always include the whole full blown python sources.
> As I see there's enough interest, here is my global plan
> - fix some bugs
> - remove the non-standard libs
> - make wysiswyg editor only included in windows
> - make some basic doc
> - make a windows binary + source distro (due to way my builder works, that's 
> almost the same)
> Depending on my spare time, this should take a couple of weeks.
>
> then I need someone to test it (and probably make some changes) under Linux 
> and Mac
>
> then we can distibute it.
> I mentioned BSD, because it's the easiest I know,
> but any license is good for me, as long as it's free enough.
>
> cheers,
> Stef
>
> > Massimo
>
> > On Aug 19, 3:12 pm, Stef Mientki  wrote:
> >>  hello,
>
> >> I made a movie about the most important features of the editor I'm using, 
> >> you can see it here:
>
> >>http://mientki.ruhosting.nl/movies/web2py_1.html
>
> >> If there's enough interest, I'll make the application available under BSD 
> >> license.
> >> At this moment, only under windows all features are available.
>
> >> cheers,
> >> Stef


Re: [web2py] Re: My editor ...

2010-08-20 Thread Michele Comitini
pyQt:

http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtextedit.html
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwebpage.html#details

Also wxPython:
http://docs.wxwidgets.org/stable/wx_wxview.html#wxview

they are stable and ported on many platforms

2010/8/21 mdipierro :
> Qt includes this http://doc.trolltech.com/3.3/qtextbrowser.html
> would it help?
>
> Massimo
>
> On Aug 19, 6:04 pm, Stef Mientki  wrote:
>>  On 19-08-2010 22:24, mdipierro wrote:> This is impressive.
>> thanks
>> >  I would like to distribute this with web2py (under
>> > contrib with its own license)
>> > What do you think?
>>
>> I feel honored,
>> so sounds like a good idea to me.> What are the prerequisites?
>>
>> AFAIK (I always use a very full blown Python version, and I'm totally not 
>> aware of which parts I'm
>> using),
>> but the most important things are Python 2.6 and wxPython 2.8.
>> The wysiwyg html editor is a docked Delphi application, so only suited for 
>> windows.
>> For Mac and Linux this should be replaced by something else, maybe webkit, 
>> but that doesn't run
>> (easy) under windows>  Do you have binaries for windows and mac?
>>
>> No,
>> I can only make binaries for windows and even these are not very suitable 
>> for distro,
>> because my builder always include the whole full blown python sources.
>> As I see there's enough interest, here is my global plan
>> - fix some bugs
>> - remove the non-standard libs
>> - make wysiswyg editor only included in windows
>> - make some basic doc
>> - make a windows binary + source distro (due to way my builder works, that's 
>> almost the same)
>> Depending on my spare time, this should take a couple of weeks.
>>
>> then I need someone to test it (and probably make some changes) under Linux 
>> and Mac
>>
>> then we can distibute it.
>> I mentioned BSD, because it's the easiest I know,
>> but any license is good for me, as long as it's free enough.
>>
>> cheers,
>> Stef
>>
>> > Massimo
>>
>> > On Aug 19, 3:12 pm, Stef Mientki  wrote:
>> >>  hello,
>>
>> >> I made a movie about the most important features of the editor I'm using, 
>> >> you can see it here:
>>
>> >>http://mientki.ruhosting.nl/movies/web2py_1.html
>>
>> >> If there's enough interest, I'll make the application available under BSD 
>> >> license.
>> >> At this moment, only under windows all features are available.
>>
>> >> cheers,
>> >> Stef


[web2py] Re: oposite to XML operation or how to escape string

2010-08-20 Thread KMax
Yes, thanks.
xmlescape(s)  - makes tags safe

On 20 авг, 17:16, mdipierro  wrote:
> something like this?
>
> ''.join(xmlescape(s) for s in t.split('&&'))
>
> On Aug 19, 11:25 pm, KMax  wrote:
>
>
>
> > Hello
> >  I have a string with '&&' which must be replaced by 
> >  If I change all && with  and XML it, it could miss other html
> > tag in a string
> >  I could join  ''.join(DIV(substr)), but I do not need div tag
> > in output.
>
> >  So how to escaped string without DIV or other HTML helper?
>
> >  I look at web2py source, but miss that thing.
>
> > Thank you.


[web2py] Re: My editor ...

2010-08-20 Thread mdipierro
Anyway... some food for thought... the paned windows can be achieved
with jQuery UI plugins. The auto completion features can be provided
by the Amy Editor (which is already in web2py admin but disabled
because not supported by all browsers).

Long term it would be nice to port what Stef has done to the browser.
Investing time to redo it Qt may not be the best course of action if
we could make if fully web based.

Massimo


On Aug 20, 7:01 pm, Michele Comitini 
wrote:
> pyQt:
>
> http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtextedithttp://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwebpage.h...
>
> Also wxPython:http://docs.wxwidgets.org/stable/wx_wxview.html#wxview
>
> they are stable and ported on many platforms
>
> 2010/8/21 mdipierro :
>
> > Qt includes thishttp://doc.trolltech.com/3.3/qtextbrowser.html
> > would it help?
>
> > Massimo
>
> > On Aug 19, 6:04 pm, Stef Mientki  wrote:
> >>  On 19-08-2010 22:24, mdipierro wrote:> This is impressive.
> >> thanks
> >> >  I would like to distribute this with web2py (under
> >> > contrib with its own license)
> >> > What do you think?
>
> >> I feel honored,
> >> so sounds like a good idea to me.> What are the prerequisites?
>
> >> AFAIK (I always use a very full blown Python version, and I'm totally not 
> >> aware of which parts I'm
> >> using),
> >> but the most important things are Python 2.6 and wxPython 2.8.
> >> The wysiwyg html editor is a docked Delphi application, so only suited for 
> >> windows.
> >> For Mac and Linux this should be replaced by something else, maybe webkit, 
> >> but that doesn't run
> >> (easy) under windows>  Do you have binaries for windows and mac?
>
> >> No,
> >> I can only make binaries for windows and even these are not very suitable 
> >> for distro,
> >> because my builder always include the whole full blown python sources.
> >> As I see there's enough interest, here is my global plan
> >> - fix some bugs
> >> - remove the non-standard libs
> >> - make wysiswyg editor only included in windows
> >> - make some basic doc
> >> - make a windows binary + source distro (due to way my builder works, 
> >> that's almost the same)
> >> Depending on my spare time, this should take a couple of weeks.
>
> >> then I need someone to test it (and probably make some changes) under 
> >> Linux and Mac
>
> >> then we can distibute it.
> >> I mentioned BSD, because it's the easiest I know,
> >> but any license is good for me, as long as it's free enough.
>
> >> cheers,
> >> Stef
>
> >> > Massimo
>
> >> > On Aug 19, 3:12 pm, Stef Mientki  wrote:
> >> >>  hello,
>
> >> >> I made a movie about the most important features of the editor I'm 
> >> >> using, you can see it here:
>
> >> >>http://mientki.ruhosting.nl/movies/web2py_1.html
>
> >> >> If there's enough interest, I'll make the application available under 
> >> >> BSD license.
> >> >> At this moment, only under windows all features are available.
>
> >> >> cheers,
> >> >> Stef


Re: [web2py] Re: My editor ...

2010-08-20 Thread Jason Brower
As much as I agree I don't.  I feel there are a lot of features we could
implement in an editor built for Web2Py.  I would love to see features
like the following:
When in a method I can press a key and my browser (or the one built in)
would jump to that page.
Debug and stepping tools. (They exist, but they would be weird in a
browser.)
Live session and variable information. (It would be nice to see what
users session information is at any moment without having to print it.
A file browser that devides only the models, views, and controllers in a
nice way.
Graphical representation of links or pages that don't get linked to.
I know some of these features could be implemented browser wise, but it
would be so nice if we could push features forward and let the browser
catch up rather than wait on the browser.
BR,
Jason
On Fri, 2010-08-20 at 19:31 -0700, mdipierro wrote: 
> Anyway... some food for thought... the paned windows can be achieved
> with jQuery UI plugins. The auto completion features can be provided
> by the Amy Editor (which is already in web2py admin but disabled
> because not supported by all browsers).
> 
> Long term it would be nice to port what Stef has done to the browser.
> Investing time to redo it Qt may not be the best course of action if
> we could make if fully web based.
> 
> Massimo
> 
> 
> On Aug 20, 7:01 pm, Michele Comitini 
> wrote:
> > pyQt:
> >
> > http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qtextedithttp://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qwebpage.h...
> >
> > Also wxPython:http://docs.wxwidgets.org/stable/wx_wxview.html#wxview
> >
> > they are stable and ported on many platforms
> >
> > 2010/8/21 mdipierro :
> >
> > > Qt includes thishttp://doc.trolltech.com/3.3/qtextbrowser.html
> > > would it help?
> >
> > > Massimo
> >
> > > On Aug 19, 6:04 pm, Stef Mientki  wrote:
> > >>  On 19-08-2010 22:24, mdipierro wrote:> This is impressive.
> > >> thanks
> > >> >  I would like to distribute this with web2py (under
> > >> > contrib with its own license)
> > >> > What do you think?
> >
> > >> I feel honored,
> > >> so sounds like a good idea to me.> What are the prerequisites?
> >
> > >> AFAIK (I always use a very full blown Python version, and I'm totally 
> > >> not aware of which parts I'm
> > >> using),
> > >> but the most important things are Python 2.6 and wxPython 2.8.
> > >> The wysiwyg html editor is a docked Delphi application, so only suited 
> > >> for windows.
> > >> For Mac and Linux this should be replaced by something else, maybe 
> > >> webkit, but that doesn't run
> > >> (easy) under windows>  Do you have binaries for windows and mac?
> >
> > >> No,
> > >> I can only make binaries for windows and even these are not very 
> > >> suitable for distro,
> > >> because my builder always include the whole full blown python sources.
> > >> As I see there's enough interest, here is my global plan
> > >> - fix some bugs
> > >> - remove the non-standard libs
> > >> - make wysiswyg editor only included in windows
> > >> - make some basic doc
> > >> - make a windows binary + source distro (due to way my builder works, 
> > >> that's almost the same)
> > >> Depending on my spare time, this should take a couple of weeks.
> >
> > >> then I need someone to test it (and probably make some changes) under 
> > >> Linux and Mac
> >
> > >> then we can distibute it.
> > >> I mentioned BSD, because it's the easiest I know,
> > >> but any license is good for me, as long as it's free enough.
> >
> > >> cheers,
> > >> Stef
> >
> > >> > Massimo
> >
> > >> > On Aug 19, 3:12 pm, Stef Mientki  wrote:
> > >> >>  hello,
> >
> > >> >> I made a movie about the most important features of the editor I'm 
> > >> >> using, you can see it here:
> >
> > >> >>http://mientki.ruhosting.nl/movies/web2py_1.html
> >
> > >> >> If there's enough interest, I'll make the application available under 
> > >> >> BSD license.
> > >> >> At this moment, only under windows all features are available.
> >
> > >> >> cheers,
> > >> >> Stef




[web2py] Re: integrate editarea in application

2010-08-20 Thread KMax
What does mean 'without going through the admin interface' ?
Try search TEXTAREA in book?
On 20 авг, 23:12, Cory Coager  wrote:
> How would I integrate editarea in my application without going through
> the admin interface?


[web2py] Re: I fixed a bug in web2py!

2010-08-20 Thread Iceberg
I have to say, good catch, but bad fix from i18n point of view. Your
"insert new " (one blank space at the end) string makes all current
language translations for "insert new" become broken. As a general
rule, please don't insert leading or trailing or any unnecessary space
inside a T("blah") content.

Didn't you see the string concatenate code in the same line of source?
The correct fix would be concatenate a space outside of the T("...").
Like this:
A(str(T('insert new'))+' '+table, ...

Regards,
Iceberg

On Aug 14, 12:52 am, Jason Brower  wrote:
> It was 'insert new' and now it's 'insert new '
> Small one, but important for that polished look.
> BR,
> Jason Brower
>
>
>
> On Fri, 2010-08-13 at 09:39 -0700, mdipierro wrote:
> > Sorry. I do not see the difference
>
> > On Aug 13, 11:26 am, Jason Brower  wrote:
> > > Oh yeah!  Haven't a clue how to do a patch file, but here is the
> > > change...
> > > Line 33 in the appadmin.html
> > >       [ {{=A(str(T('insert
> > > new'))+''+table,_href=URL(r=request,f='insert',args=[db,table]))}} ]
> > > should be:
> > >       [ {{=A(str(T('insert new
> > > '))+''+table,_href=URL(r=request,f='insert',args=[db,table]))}} ]
> > > Just a small formating issue. (: But it feels good to actual give
> > > SOMETHING.
> > > BR,
> > > Jason Brower


[web2py] Re: widget.py: -f folder

2010-08-20 Thread Iceberg
On Aug 13, 11:49 pm, Jonathan Lundell  wrote:
> Remind me, please, what the function of the -f folder command line option is. 
> All the other startup method appear to use the location of the startup file 
> (eg wsgihandler.py).

There was a discussion "When and how to use command line option -f
FOLDER?" in this maillist group. Somehow even google can not find out
that thread in this group, but I managed to find a copy here.
http://osdir.com/ml/web2py/2010-04/msg00891.html

Regards,
Iceberg