[web2py] Re: PIL under web2py test server

2010-02-08 Thread pistacchio
thanks, running from source solved the problem

On Feb 9, 1:41 am, Richard  wrote:
> on Linux I would try starting the server with "python2.6 web2py.py"
>
> On Feb 9, 10:25 am, pistacchio  wrote:
>
>
>
> > i checked it via the web shell. indeed it's a different version..
> > can't i get web2py server to run on system's python instance?
>
> > On 8 Feb, 22:26, Thadeus Burgess  wrote:
>
> > > Probably will get a better reply from a Mac user.
>
> > > To verify the python version
>
> > > >>> import sys
> > > >>> print sys.version
>
> > > Make sure web2py is running on the same version that you installed PIL.
>
> > > -Thadeus
>
> > > On Mon, Feb 8, 2010 at 3:13 PM, pistacchio  wrote:
> > > > oh... how to check and set?
>
> > > > On 8 Feb, 22:09, Thadeus Burgess  wrote:
> > > >> is web2py running on python 2.6.1 or the built-in python 2.4? ?
> > > >> -Thadeus
>
> > > >> On Mon, Feb 8, 2010 at 3:02 PM, pistacchio  
> > > >> wrote:
> > > >> > Hi to all,
> > > >> > I'm running python 2.6.1 on MacOSX Snow Leopard. I installed PIL (the
> > > >> > image manipulation library) with easy_install.
>
> > > >> > If I run python in terminal, import Image is accepted. When trying
> > > >> > import Image in a controller of web2py (its own test server), it 
> > > >> > tells
> > > >> > me that there's no library called Image. Any help? Thanks
>
> > > >> > --
> > > >> > You received this message because you are subscribed to the Google 
> > > >> > Groups "web2py-users" group.
> > > >> > To post to this group, send email to web...@googlegroups.com.
> > > >> > To unsubscribe from this group, send email to 
> > > >> > web2py+unsubscr...@googlegroups.com.
> > > >> > For more options, visit this group 
> > > >> > athttp://groups.google.com/group/web2py?hl=en.
>
> > > > --
> > > > You received this message because you are subscribed to the Google 
> > > > Groups "web2py-users" group.
> > > > To post to this group, send email to web...@googlegroups.com.
> > > > To unsubscribe from this group, send email to 
> > > > web2py+unsubscr...@googlegroups.com.
> > > > For more options, visit this group 
> > > > athttp://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Customize classes or ids on SQLFORM submit button...

2010-02-08 Thread Jason Brower
I can see the customized forms and other what not, but is there a way to
set the classes for the submit buttons and other what not.  I just want
to change the styling, not validations or anything like that.
---
Best Regards,
Jason Brower

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Needed Validation: A-F or 0 but A-F are unique...

2010-02-08 Thread Jason Brower
Don't know if I can discribe this in type but...
I need a validator that can alow only one A B C D E F other wise it
should be 0
I haven't figure out how to make IS_IN_SET(["A","B","C","D","E","F"])
unique=True and default=0 all at the same time... 
Best Regards,
Jason Brower


-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Multi user development on web2py

2010-02-08 Thread Thadeus Burgess
What is the recommended way of developing on a team with a web2py
application using mercurial.

The main issue is that we would like to share the sqlite database and
.table files, however whenever any changes are made to these
table files, mercurial complains with merge conflicts for every .table
file that was changed between merges. Is there a way around this ?

Should we be developing with fake_migrate = True and not including the
.table files in version control?

-Thadeus

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: form - redirect - where are the variables?

2010-02-08 Thread Johann Spies
> You have a few problems, fixed below hopefully

Thanks Massimo!


Regards
Johann

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: function that lists all members of a group

2010-02-08 Thread mr.freeze
I don't think there is one built in but it should be simple. Something
like this maybe:

def get_members(role):
try:
group = db(db.auth_group.role==role).select()[0]
members = db(db.auth_membership.group_id==group.id).select()
return members
except:
return None

On Feb 7, 1:03 am, weheh  wrote:
> Is there a built-in function that will list all members of a group, or
> do I need to write a query to do that? Seems like such a function
> should exist, but I can't find it in the doc.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: this thing runs web2py?

2010-02-08 Thread Thadeus Burgess
They are advertising that the embedded device runs linux and is
powerful enough to run a web framework like web2py.

Massimo is saying that he is impressed that the device that small can
run web2py.

-Thadeus





On Mon, Feb 8, 2010 at 11:27 PM, Mengu  wrote:
> nope, it's wordpress.
>
> On 9 Şubat, 04:18, mdipierro  wrote:
>> The page says this thing runs web2py. I am impressed.
>>
>> http://bec-systems.com/site/587/gumstix-overo-review?utm_source=feedb...
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: this thing runs web2py?

2010-02-08 Thread Mengu
nope, it's wordpress.

On 9 Şubat, 04:18, mdipierro  wrote:
> The page says this thing runs web2py. I am impressed.
>
> http://bec-systems.com/site/587/gumstix-overo-review?utm_source=feedb...

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: PDF manual soon available online in HTML (maybe)

2010-02-08 Thread Mariano Reingart
For the web2py spanish documentation wiki (btw using web2py-wiki) we
are working in several features, including wyswyg editing and pdf
output, to organize and translate some kind of manual (and other minor
updates to make the wiki more user friendly).

To convert html to reST, using html2rst.py seems to work (but some
minor fixes are needed with preformated blocks).

And, here in Argentina, rst2pdf was used to make the pdf from the
translated official python tutorial (who is in reST):

- http://docs.python.org.ar/tutorial/contenido.html
- 
http://python.org.ar/pyar/Tutorial?action=AttachFile&do=get&target=TutorialPython.pdf

Indeed, the spanish python tutorial was finally printed (in paper with
a soft cover) as a nice and cheap book.

IMHO, a user-friendly wiki is a good way to do this work, and fixing
web2py-wiki is a must.

Regards
Mariano Reingart

On Mon, Feb 8, 2010 at 11:08 PM, mdipierro  wrote:
> Perhaps the wiki should be in latex. ;-)
>
> On Feb 8, 7:43 pm, Jonathan Lundell  wrote:
>> On Feb 8, 2010, at 5:33 PM, mdipierro wrote:
>>
>> > I just tried pandoc (latex->rst>latex) and I end up with something
>> > that does not look at all like the original.
>>
>> It's the Second Law of Thermodynamics. Latex and rst (or html) are not 
>> equivalent, and conversions in either direction are lossy (unless you manage 
>> to use only the compatible intersection of their features).
>>
>> You couldn't convert your PDF back to Latex, either, without losing a lot.
>>
>>
>>
>> > On Feb 8, 7:22 pm, Jonathan Lundell  wrote:
>> >> On Feb 8, 2010, at 4:58 PM, mdipierro wrote:
>>
>> >>> If people know of a good tool to convert latex to wiki format and vice
>> >>> versa, I could use that.
>>
>> >>http://hutchinson.belmont.ma.us/tth/lookslike the best bet for latex to 
>> >>html; you could probably get from there to wiki. Back again? I could be 
>> >>wrong, but I think you're dreaming
>>
>>
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: AutocompleteWidget: experimental, magic, RFC

2010-02-08 Thread mdipierro
In gluon/sqlhtml.py in two places, there is a delay(1000). Does it
help if you increase that number to 2000 or 3000 or 5000?

On Feb 8, 8:22 pm, villas  wrote:
> Firefox 3.5.7 (Win):
>   Appear to be unchanged since my last report.
>   Conclusion: Good.
>
> IE8 (Win):
>   The drop-down opens,  but then closes after a second.
>   However, there is now just enough time to click-select an option.
>   The selected option is transferred correctly to the input field.
>   Arrow keys do not appear to work.
>   Conclusion: Better, at least now functions to a degree. But the drop-
> down does not stay down properly to allow selection.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: this thing runs web2py?

2010-02-08 Thread Wes James
the device they are showing can run web2py

On Mon, Feb 8, 2010 at 8:16 PM, Richard  wrote:
> are you sure? The article mentions web2py but the site itself uses a
> Wordpress layout.
>
>
> On Feb 9, 1:18 pm, mdipierro  wrote:
>> The page says this thing runs web2py. I am impressed.
>>
>> http://bec-systems.com/site/587/gumstix-overo-review?utm_source=feedb...
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: this thing runs web2py?

2010-02-08 Thread Richard
are you sure? The article mentions web2py but the site itself uses a
Wordpress layout.


On Feb 9, 1:18 pm, mdipierro  wrote:
> The page says this thing runs web2py. I am impressed.
>
> http://bec-systems.com/site/587/gumstix-overo-review?utm_source=feedb...

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: PDF manual soon available online in HTML (maybe)

2010-02-08 Thread Richard
On Feb 9, 11:58 am, mdipierro  wrote:
> I am not sure this is something people should vote on.

to clarify, I wasn't calling for a vote on what to do with the manual
- I acknowledge it is your IP. But ideas and feedback might be helpful.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: cron issue

2010-02-08 Thread John Heenan
Hi AchipA

I think most of the work is done already with regard to how to set up
the environment and do an exec without Popen. If you take a look at
the run function in gluon\shell.py it has the signature below.

I don't see why the run function cannot be copied and edited with a
small number of changes to allow for a Python internal exec (without a
shell) of an arbitrary python file or string, with an expected
environment.

I agree there is more potential for users to shoot themselves in the
foot with cron jobs! The door has been opened. Why stop now? The world
is still revolving, the sun is still shining and the sky has not
fallen down because of users misbehaving!

John Heenan

def run(
appname,
plain=False,
import_models=False,
startfile=None,
):
"""
Start interactive shell or run Python script (startfile) in web2py
controller environment. appname is formatted like:

a  web2py application name
a/cexec the controller c into the application environment
"""


On Feb 9, 12:34 pm, AchipA  wrote:
> John, I did not mean fight about principles or dismiss your
> suggestion.
> I perfectly understand what you need and see that rationale in it.
> It's
> just that if I'm doing an overhaul, I'd like to do it right - leaving
> to the users to 'behave' and not shoot themselves in the foot is
> something I'd like to avoid. Exec is not as easy as it sounds as cron
> operates really really low, in a separate thread on the level just
> above
> WSGI/webserver. I have access to very little of web2py's features
> 'down
> there' so things get tricky real fast (especially if you want to
> include
> models in the story) - that's why calling a new web2py process to sort
> or controller/model issues was a simple way of doing it in a
> foolproof manner.
>
> On Feb 9, 3:14 am, John Heenan  wrote:
>
> > Since AchipA is working on other changes to cron.py and cron.py is
> > his, I think I should wait to see if AchipA includes additons with
> > Massimo's preferred format below before being so bold as to submit a
> > patch myself.
>
> > John Heenan
>
> > On Feb 9, 10:54 am, mdipierro  wrote:
>
> > > I have no objection to adding this feature. I do not like the !*"
> > > prefix.
>
> > > I think we can do:
>
> > > @hourly root file -> exec file in Popen
> > > @hourly root file.py -> exec file in Popen with python
> > > @hourly root *file.py -> exec file in Popen with python -S  -M -R
> > > 
> > > @hourly root **file.py -> exec file in Popen with python -S  -R
> > > 
> > > @hourly root *file -> exec file in Popen with python -S  -M
> > > @hourly root **file -> exec file in Popen with python -S 
> > > @hourly root *"data" -> exec "data" without Popen with environment as -
> > > M
> > > @hourly root **"data" -> exec "data" without Popen without environment
> > > as -M
> > > @hourly root *"filename" -> execfile filename without Popen with
> > > environment as -M
> > > @hourly root **"filename" -> execfile filename without Popen without
> > > environment as -M
> > > (we can distinguish data from filename checking if "..." starts with
> > > './' or '/'.)
>
> > > I would take a patch in this direction. You only add the last 4
> > > options at the end of the cron file. There is nothing else that needs
> > > to be done I think.
>
> > > Massimo
>
> > > All is needed it a
>
> > > On Feb 8, 6:30 pm, John Heenan  wrote:
>
> > > > Hi
>
> > > > I stated "My point is can we have an option to:"
>
> > > > Maybe I should code up a patch for cron.py and submit it for
> > > > examination. Cron.py is impressive, I am not criticising it or
> > > > attacking its approach.
>
> > > > The option I am requesting are ADDITIONS to cron.py that are TRIVIAL
> > > > to code in as additions to cron.py. Web2py already has a prepared
> > > > environment ready to be passed for exec use.
>
> > > > To reiterate, the option I am requesting is an additional option (not
> > > > a replacement) to do an exec (or execfile) on a file that ends
> > > > with .py (or .pyc) AND an option to do an exec on a string (such as
> > > > "import a; a.mycronaction()")
>
> > > > For example, suppose ! is chosen to indicate not to use the default of
> > > > the Popen class wrapper but to use exec instead, then the following is
> > > > an example of use:
>
> > > > */10****root !
> > > > **expire_sessions.py  #use the web2py environment with execfile on
> > > > the .py file but do not execute models
> > > > or
> > > > */10****root !*"import a;
> > > > a.mycronaction()" #use the web2py environment with exec on the string
> > > > and include execution of models
>
> > > > I do not want to become involved in a grand philosophical or
> > > > ideological debate about the merits or otherwise of using the Popen
> > > > wrapper class verses the internal Python exec (or execfile) function.
> > > > For trivial tasks (such as deleting stale session files) the Popen
> > > > class wr

[web2py] Re: cron issue

2010-02-08 Thread AchipA
John, I did not mean fight about principles or dismiss your
suggestion.
I perfectly understand what you need and see that rationale in it.
It's
just that if I'm doing an overhaul, I'd like to do it right - leaving
to the users to 'behave' and not shoot themselves in the foot is
something I'd like to avoid. Exec is not as easy as it sounds as cron
operates really really low, in a separate thread on the level just
above
WSGI/webserver. I have access to very little of web2py's features
'down
there' so things get tricky real fast (especially if you want to
include
models in the story) - that's why calling a new web2py process to sort
or controller/model issues was a simple way of doing it in a
foolproof manner.

On Feb 9, 3:14 am, John Heenan  wrote:
> Since AchipA is working on other changes to cron.py and cron.py is
> his, I think I should wait to see if AchipA includes additons with
> Massimo's preferred format below before being so bold as to submit a
> patch myself.
>
> John Heenan
>
> On Feb 9, 10:54 am, mdipierro  wrote:
>
> > I have no objection to adding this feature. I do not like the !*"
> > prefix.
>
> > I think we can do:
>
> > @hourly root file -> exec file in Popen
> > @hourly root file.py -> exec file in Popen with python
> > @hourly root *file.py -> exec file in Popen with python -S  -M -R
> > 
> > @hourly root **file.py -> exec file in Popen with python -S  -R
> > 
> > @hourly root *file -> exec file in Popen with python -S  -M
> > @hourly root **file -> exec file in Popen with python -S 
> > @hourly root *"data" -> exec "data" without Popen with environment as -
> > M
> > @hourly root **"data" -> exec "data" without Popen without environment
> > as -M
> > @hourly root *"filename" -> execfile filename without Popen with
> > environment as -M
> > @hourly root **"filename" -> execfile filename without Popen without
> > environment as -M
> > (we can distinguish data from filename checking if "..." starts with
> > './' or '/'.)
>
> > I would take a patch in this direction. You only add the last 4
> > options at the end of the cron file. There is nothing else that needs
> > to be done I think.
>
> > Massimo
>
> > All is needed it a
>
> > On Feb 8, 6:30 pm, John Heenan  wrote:
>
> > > Hi
>
> > > I stated "My point is can we have an option to:"
>
> > > Maybe I should code up a patch for cron.py and submit it for
> > > examination. Cron.py is impressive, I am not criticising it or
> > > attacking its approach.
>
> > > The option I am requesting are ADDITIONS to cron.py that are TRIVIAL
> > > to code in as additions to cron.py. Web2py already has a prepared
> > > environment ready to be passed for exec use.
>
> > > To reiterate, the option I am requesting is an additional option (not
> > > a replacement) to do an exec (or execfile) on a file that ends
> > > with .py (or .pyc) AND an option to do an exec on a string (such as
> > > "import a; a.mycronaction()")
>
> > > For example, suppose ! is chosen to indicate not to use the default of
> > > the Popen class wrapper but to use exec instead, then the following is
> > > an example of use:
>
> > > */10        *        *        *        *        root !
> > > **expire_sessions.py  #use the web2py environment with execfile on
> > > the .py file but do not execute models
> > > or
> > > */10        *        *        *        *        root !*"import a;
> > > a.mycronaction()" #use the web2py environment with exec on the string
> > > and include execution of models
>
> > > I do not want to become involved in a grand philosophical or
> > > ideological debate about the merits or otherwise of using the Popen
> > > wrapper class verses the internal Python exec (or execfile) function.
> > > For trivial tasks (such as deleting stale session files) the Popen
> > > class wrapper is overkill. Using Popen involves unnecessary extra RAM
> > > use and process invocation. Invoking a Python process is very
> > > expensive in CPU and RAM terms. In fact Python is impractical in a web
> > > environment unless the Python process remains persistent, This is the
> > > reason why hosting is relatively expensive for python web solutions
> > > compared to PHP and Perl.
>
> > > While such concerns might seem trivial for tasks that are not repeated
> > > often, it is not trivial if hosting is in an environment where there
> > > are penalties for exceeding allocated RAM, such as I believe occurs at
> > > Webfaction, popular with those trialling web2py.
>
> > > For trivial housekeeping tasks, just a minimal (non models)
> > > environment associated with the application is adequate, such as is
> > > currently passed in for use with Popen.
>
> > > If tasks are so involved that processes are at a non negligible risk
> > > of choking then users will hardly be concerned about using execfile
> > > instead of Popen and will instead code up an independent supervisory
> > > process outside web2py.
>
> > > Deadlock or race conditions are not any more of an issue using exec
> > > than with normal c

[web2py] Re: AutocompleteWidget: experimental, magic, RFC

2010-02-08 Thread villas
Firefox 3.5.7 (Win):
  Appear to be unchanged since my last report.
  Conclusion: Good.

IE8 (Win):
  The drop-down opens,  but then closes after a second.
  However, there is now just enough time to click-select an option.
  The selected option is transferred correctly to the input field.
  Arrow keys do not appear to work.
  Conclusion: Better, at least now functions to a degree. But the drop-
down does not stay down properly to allow selection.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: cron issue

2010-02-08 Thread AchipA
On Feb 8, 8:22 pm, mdipierro  wrote:
> On Feb 8, 11:43 am, AchipA  wrote:
>
> > 1) ok
> > 2) this would be the cron.master file. Sadly, it must be a file as
> > otherwise multiprocess setups (like wsgi) would trip over each other.
>
> ok. but there should be a function to check its status.
> to make sure... what I mean is a way to check not if it is running
> "right now" but if a) it was set to run; and b) it failed somehow.

Detecting fails is tricky, sure, within the cron code we can try/catch
(I'm under the impression I do that a lot more that you'd like :), but
it's hard to tell why exactly something we called failed, due to cron
problems, parametrization, some unrelated error, etc. Improving stderr
handling could improve this, but that is also an issue on it's own.

> > 3) I'm thinking of deprecating posttasks in favor of being able to
> > daisy-chain controllers. So you would not have posttasks, but you
> > could specify a controller that would be called automatically after
> > the current controller is finished. That would be a lot cleaner
> > but would keep the functionality.
>
> Look into tools.py @completion. Not quite what you want but perhaps
> you can keep the syntax.

Will take a look.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] this thing runs web2py?

2010-02-08 Thread mdipierro
The page says this thing runs web2py. I am impressed.

http://bec-systems.com/site/587/gumstix-overo-review?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+bec-systems+%28The+Embedded+Perspective%29

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: cron issue

2010-02-08 Thread John Heenan
Since AchipA is working on other changes to cron.py and cron.py is
his, I think I should wait to see if AchipA includes additons with
Massimo's preferred format below before being so bold as to submit a
patch myself.

John Heenan

On Feb 9, 10:54 am, mdipierro  wrote:
> I have no objection to adding this feature. I do not like the !*"
> prefix.
>
> I think we can do:
>
> @hourly root file -> exec file in Popen
> @hourly root file.py -> exec file in Popen with python
> @hourly root *file.py -> exec file in Popen with python -S  -M -R
> 
> @hourly root **file.py -> exec file in Popen with python -S  -R
> 
> @hourly root *file -> exec file in Popen with python -S  -M
> @hourly root **file -> exec file in Popen with python -S 
> @hourly root *"data" -> exec "data" without Popen with environment as -
> M
> @hourly root **"data" -> exec "data" without Popen without environment
> as -M
> @hourly root *"filename" -> execfile filename without Popen with
> environment as -M
> @hourly root **"filename" -> execfile filename without Popen without
> environment as -M
> (we can distinguish data from filename checking if "..." starts with
> './' or '/'.)
>
> I would take a patch in this direction. You only add the last 4
> options at the end of the cron file. There is nothing else that needs
> to be done I think.
>
> Massimo
>
> All is needed it a
>
> On Feb 8, 6:30 pm, John Heenan  wrote:
>
> > Hi
>
> > I stated "My point is can we have an option to:"
>
> > Maybe I should code up a patch for cron.py and submit it for
> > examination. Cron.py is impressive, I am not criticising it or
> > attacking its approach.
>
> > The option I am requesting are ADDITIONS to cron.py that are TRIVIAL
> > to code in as additions to cron.py. Web2py already has a prepared
> > environment ready to be passed for exec use.
>
> > To reiterate, the option I am requesting is an additional option (not
> > a replacement) to do an exec (or execfile) on a file that ends
> > with .py (or .pyc) AND an option to do an exec on a string (such as
> > "import a; a.mycronaction()")
>
> > For example, suppose ! is chosen to indicate not to use the default of
> > the Popen class wrapper but to use exec instead, then the following is
> > an example of use:
>
> > */10        *        *        *        *        root !
> > **expire_sessions.py  #use the web2py environment with execfile on
> > the .py file but do not execute models
> > or
> > */10        *        *        *        *        root !*"import a;
> > a.mycronaction()" #use the web2py environment with exec on the string
> > and include execution of models
>
> > I do not want to become involved in a grand philosophical or
> > ideological debate about the merits or otherwise of using the Popen
> > wrapper class verses the internal Python exec (or execfile) function.
> > For trivial tasks (such as deleting stale session files) the Popen
> > class wrapper is overkill. Using Popen involves unnecessary extra RAM
> > use and process invocation. Invoking a Python process is very
> > expensive in CPU and RAM terms. In fact Python is impractical in a web
> > environment unless the Python process remains persistent, This is the
> > reason why hosting is relatively expensive for python web solutions
> > compared to PHP and Perl.
>
> > While such concerns might seem trivial for tasks that are not repeated
> > often, it is not trivial if hosting is in an environment where there
> > are penalties for exceeding allocated RAM, such as I believe occurs at
> > Webfaction, popular with those trialling web2py.
>
> > For trivial housekeeping tasks, just a minimal (non models)
> > environment associated with the application is adequate, such as is
> > currently passed in for use with Popen.
>
> > If tasks are so involved that processes are at a non negligible risk
> > of choking then users will hardly be concerned about using execfile
> > instead of Popen and will instead code up an independent supervisory
> > process outside web2py.
>
> > Deadlock or race conditions are not any more of an issue using exec
> > than with normal code (provided the code passed in for exec does
> > nothing out of the ordinary). A new thread is not invoked.
>
> > As is, cron.py waits for a Popen invoked process to end without a
> > supervisor which can result in a lock up of web2py.
>
> > It can be argued that there is a lack of hard quantified information
> > about the resources used by Python based web frameworks. Those who
> > develop websites and GUIs have frequently little care about boring
> > issues of resource usage. I bothered to take a look and was horrified
> > by the memory usage of Python. We need to show respect for practical
> > issues associated with using Python. Otherwise web2py and other
> > frameworks risk becoming relegated to academic toys that are from
> > 'enterprise' class. Java based frameworks are fighting back. Sun is
> > pushing GlassFish heavily into the enterprise environment.
>
> > Python based frameworks cannot expec

[web2py] Re: PDF manual soon available online in HTML (maybe)

2010-02-08 Thread mdipierro
Perhaps the wiki should be in latex. ;-)

On Feb 8, 7:43 pm, Jonathan Lundell  wrote:
> On Feb 8, 2010, at 5:33 PM, mdipierro wrote:
>
> > I just tried pandoc (latex->rst>latex) and I end up with something
> > that does not look at all like the original.
>
> It's the Second Law of Thermodynamics. Latex and rst (or html) are not 
> equivalent, and conversions in either direction are lossy (unless you manage 
> to use only the compatible intersection of their features).
>
> You couldn't convert your PDF back to Latex, either, without losing a lot.
>
>
>
> > On Feb 8, 7:22 pm, Jonathan Lundell  wrote:
> >> On Feb 8, 2010, at 4:58 PM, mdipierro wrote:
>
> >>> If people know of a good tool to convert latex to wiki format and vice
> >>> versa, I could use that.
>
> >>http://hutchinson.belmont.ma.us/tth/lookslike the best bet for latex to 
> >>html; you could probably get from there to wiki. Back again? I could be 
> >>wrong, but I think you're dreaming
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: PDF manual soon available online in HTML (maybe)

2010-02-08 Thread Jonathan Lundell
On Feb 8, 2010, at 5:33 PM, mdipierro wrote:

> I just tried pandoc (latex->rst>latex) and I end up with something
> that does not look at all like the original.

It's the Second Law of Thermodynamics. Latex and rst (or html) are not 
equivalent, and conversions in either direction are lossy (unless you manage to 
use only the compatible intersection of their features).

You couldn't convert your PDF back to Latex, either, without losing a lot.

> 
> 
> 
> 
> On Feb 8, 7:22 pm, Jonathan Lundell  wrote:
>> On Feb 8, 2010, at 4:58 PM, mdipierro wrote:
>> 
>>> If people know of a good tool to convert latex to wiki format and vice
>>> versa, I could use that.
>> 
>> http://hutchinson.belmont.ma.us/tth/looks like the best bet for latex to 
>> html; you could probably get from there to wiki. Back again? I could be 
>> wrong, but I think you're dreaming


-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: PDF manual soon available online in HTML (maybe)

2010-02-08 Thread mdipierro
I just tried pandoc (latex->rst>latex) and I end up with something
that does not look at all like the original.




On Feb 8, 7:22 pm, Jonathan Lundell  wrote:
> On Feb 8, 2010, at 4:58 PM, mdipierro wrote:
>
> > If people know of a good tool to convert latex to wiki format and vice
> > versa, I could use that.
>
> http://hutchinson.belmont.ma.us/tth/looks like the best bet for latex to 
> html; you could probably get from there to wiki. Back again? I could be 
> wrong, but I think you're dreaming

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: PDF manual soon available online in HTML (maybe)

2010-02-08 Thread Jonathan Lundell
On Feb 8, 2010, at 4:58 PM, mdipierro wrote:

> If people know of a good tool to convert latex to wiki format and vice
> versa, I could use that.

http://hutchinson.belmont.ma.us/tth/ looks like the best bet for latex to html; 
you could probably get from there to wiki. Back again? I could be wrong, but I 
think you're dreaming

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: powered by drupal?

2010-02-08 Thread Mengu
It's not that hard to build a blogging software on top of something
you build you know. :)

On Feb 9, 1:36 am, Jonathan Lundell  wrote:
> On Feb 8, 2010, at 3:13 PM, Mengu wrote:
>
> > Actually, I saw that this guy wrote Erlyweb framework for the Erlang
> > language and was using wordpress on his blog. Isn't this weird?
>
> Not really. I don't think that there's blogging software written in Erlang 
> (or Python, for that matter) that compares with WordPress and its ecology.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: PDF manual soon available online in HTML (maybe)

2010-02-08 Thread mdipierro
I am not sure this is something people should vote on.
Let me resolve some of the issues on my side first.
This should not be stopping anybody from writing howtos, examples and
tutorials.
this is complementary and putting everything together is a secondary
step.

If people know of a good tool to convert latex to wiki format and vice
versa, I could use that.

Massimo

On Feb 8, 6:39 pm, Richard  wrote:
> In case you missed it Massimo is considering making the manual
> available online in HTML:
>
> On Feb 9, 3:33 am, mdipierro  wrote:
>
> > I am considering posting most of the book on line in HTML. This may be
> > possible with a disclaimer about "do not reproduce in print". The main
> > issue is that the book is in latex and not easy to convert.
>
> http://groups.google.com/group/web2py/browse_thread/thread/ce1c7614ce...
>
> There have been a number of complaints lately about the documentation
> so it is good this is being considered.
>
> Some points to ponder:
> - How would the online manual best be hosted? - the wiki app? A
> djangobook clone?
> - Should the PDF/latex be manually inserted into this app, or is there
> an automatic method?
> - How would online edits be fed back into the official PDF version?
>
> Richard

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: cron issue

2010-02-08 Thread mdipierro
I have no objection to adding this feature. I do not like the !*"
prefix.

I think we can do:

@hourly root file -> exec file in Popen
@hourly root file.py -> exec file in Popen with python
@hourly root *file.py -> exec file in Popen with python -S  -M -R

@hourly root **file.py -> exec file in Popen with python -S  -R

@hourly root *file -> exec file in Popen with python -S  -M
@hourly root **file -> exec file in Popen with python -S 
@hourly root *"data" -> exec "data" without Popen with environment as -
M
@hourly root **"data" -> exec "data" without Popen without environment
as -M
@hourly root *"filename" -> execfile filename without Popen with
environment as -M
@hourly root **"filename" -> execfile filename without Popen without
environment as -M
(we can distinguish data from filename checking if "..." starts with
'./' or '/'.)

I would take a patch in this direction. You only add the last 4
options at the end of the cron file. There is nothing else that needs
to be done I think.

Massimo



All is needed it a

On Feb 8, 6:30 pm, John Heenan  wrote:
> Hi
>
> I stated "My point is can we have an option to:"
>
> Maybe I should code up a patch for cron.py and submit it for
> examination. Cron.py is impressive, I am not criticising it or
> attacking its approach.
>
> The option I am requesting are ADDITIONS to cron.py that are TRIVIAL
> to code in as additions to cron.py. Web2py already has a prepared
> environment ready to be passed for exec use.
>
> To reiterate, the option I am requesting is an additional option (not
> a replacement) to do an exec (or execfile) on a file that ends
> with .py (or .pyc) AND an option to do an exec on a string (such as
> "import a; a.mycronaction()")
>
> For example, suppose ! is chosen to indicate not to use the default of
> the Popen class wrapper but to use exec instead, then the following is
> an example of use:
>
> */10        *        *        *        *        root !
> **expire_sessions.py  #use the web2py environment with execfile on
> the .py file but do not execute models
> or
> */10        *        *        *        *        root !*"import a;
> a.mycronaction()" #use the web2py environment with exec on the string
> and include execution of models
>
> I do not want to become involved in a grand philosophical or
> ideological debate about the merits or otherwise of using the Popen
> wrapper class verses the internal Python exec (or execfile) function.
> For trivial tasks (such as deleting stale session files) the Popen
> class wrapper is overkill. Using Popen involves unnecessary extra RAM
> use and process invocation. Invoking a Python process is very
> expensive in CPU and RAM terms. In fact Python is impractical in a web
> environment unless the Python process remains persistent, This is the
> reason why hosting is relatively expensive for python web solutions
> compared to PHP and Perl.
>
> While such concerns might seem trivial for tasks that are not repeated
> often, it is not trivial if hosting is in an environment where there
> are penalties for exceeding allocated RAM, such as I believe occurs at
> Webfaction, popular with those trialling web2py.
>
> For trivial housekeeping tasks, just a minimal (non models)
> environment associated with the application is adequate, such as is
> currently passed in for use with Popen.
>
> If tasks are so involved that processes are at a non negligible risk
> of choking then users will hardly be concerned about using execfile
> instead of Popen and will instead code up an independent supervisory
> process outside web2py.
>
> Deadlock or race conditions are not any more of an issue using exec
> than with normal code (provided the code passed in for exec does
> nothing out of the ordinary). A new thread is not invoked.
>
> As is, cron.py waits for a Popen invoked process to end without a
> supervisor which can result in a lock up of web2py.
>
> It can be argued that there is a lack of hard quantified information
> about the resources used by Python based web frameworks. Those who
> develop websites and GUIs have frequently little care about boring
> issues of resource usage. I bothered to take a look and was horrified
> by the memory usage of Python. We need to show respect for practical
> issues associated with using Python. Otherwise web2py and other
> frameworks risk becoming relegated to academic toys that are from
> 'enterprise' class. Java based frameworks are fighting back. Sun is
> pushing GlassFish heavily into the enterprise environment.
>
> Python based frameworks cannot expect to be competitive with PHP at
> what PHP is best at (low resource usage) if Python frameworks don't
> address issues in a practical way that are holding back their adoption
> (such as resource usage leading to expensive hosting).
>
> John Heenan
>
> On Feb 8, 11:40 pm, AchipA  wrote:
>
> > Fiddling with this now, but have a few concerns, so I'd like Massimo
> > to chime is as the exec expert. The main reason for going POpen is to
> > have 

[web2py] Re: PIL under web2py test server

2010-02-08 Thread Richard
on Linux I would try starting the server with "python2.6 web2py.py"


On Feb 9, 10:25 am, pistacchio  wrote:
> i checked it via the web shell. indeed it's a different version..
> can't i get web2py server to run on system's python instance?
>
> On 8 Feb, 22:26, Thadeus Burgess  wrote:
>
> > Probably will get a better reply from a Mac user.
>
> > To verify the python version
>
> > >>> import sys
> > >>> print sys.version
>
> > Make sure web2py is running on the same version that you installed PIL.
>
> > -Thadeus
>
> > On Mon, Feb 8, 2010 at 3:13 PM, pistacchio  wrote:
> > > oh... how to check and set?
>
> > > On 8 Feb, 22:09, Thadeus Burgess  wrote:
> > >> is web2py running on python 2.6.1 or the built-in python 2.4? ?
> > >> -Thadeus
>
> > >> On Mon, Feb 8, 2010 at 3:02 PM, pistacchio  wrote:
> > >> > Hi to all,
> > >> > I'm running python 2.6.1 on MacOSX Snow Leopard. I installed PIL (the
> > >> > image manipulation library) with easy_install.
>
> > >> > If I run python in terminal, import Image is accepted. When trying
> > >> > import Image in a controller of web2py (its own test server), it tells
> > >> > me that there's no library called Image. Any help? Thanks
>
> > >> > --
> > >> > You received this message because you are subscribed to the Google 
> > >> > Groups "web2py-users" group.
> > >> > To post to this group, send email to web...@googlegroups.com.
> > >> > To unsubscribe from this group, send email to 
> > >> > web2py+unsubscr...@googlegroups.com.
> > >> > For more options, visit this group 
> > >> > athttp://groups.google.com/group/web2py?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "web2py-users" group.
> > > To post to this group, send email to web...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > web2py+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: AutocompleteWidget: experimental, magic, RFC

2010-02-08 Thread mdipierro
please try once more.

On Feb 8, 2:04 pm, villas  wrote:
> Running my manual test-suite :)
>
> Firefox 3.5.7 (Win):
>   Single Click OK.
>   Multi-select fixed.
>   Up and Down arrow keys also work.
>   Suggestion:  when dropped-down,  it would be nice if  key
> completed the selection and closed the drop-down, instead of
> submitting form.
>   Good to go!
>
> IE8 (Win):
>   No good.
>   The drop-down opens and closes even faster than before.  Selection
> not poss. Arrow keys and clicking does not work.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] PDF manual soon available online in HTML (maybe)

2010-02-08 Thread Richard
In case you missed it Massimo is considering making the manual
available online in HTML:

On Feb 9, 3:33 am, mdipierro  wrote:
> I am considering posting most of the book on line in HTML. This may be
> possible with a disclaimer about "do not reproduce in print". The main
> issue is that the book is in latex and not easy to convert.

http://groups.google.com/group/web2py/browse_thread/thread/ce1c7614ceb92a7c#07d7e012362e1490


There have been a number of complaints lately about the documentation
so it is good this is being considered.

Some points to ponder:
- How would the online manual best be hosted? - the wiki app? A
djangobook clone?
- Should the PDF/latex be manually inserted into this app, or is there
an automatic method?
- How would online edits be fed back into the official PDF version?

Richard

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: cron issue

2010-02-08 Thread John Heenan
Hi

I stated "My point is can we have an option to:"

Maybe I should code up a patch for cron.py and submit it for
examination. Cron.py is impressive, I am not criticising it or
attacking its approach.

The option I am requesting are ADDITIONS to cron.py that are TRIVIAL
to code in as additions to cron.py. Web2py already has a prepared
environment ready to be passed for exec use.

To reiterate, the option I am requesting is an additional option (not
a replacement) to do an exec (or execfile) on a file that ends
with .py (or .pyc) AND an option to do an exec on a string (such as
"import a; a.mycronaction()")

For example, suppose ! is chosen to indicate not to use the default of
the Popen class wrapper but to use exec instead, then the following is
an example of use:

*/10****root !
**expire_sessions.py  #use the web2py environment with execfile on
the .py file but do not execute models
or
*/10****root !*"import a;
a.mycronaction()" #use the web2py environment with exec on the string
and include execution of models

I do not want to become involved in a grand philosophical or
ideological debate about the merits or otherwise of using the Popen
wrapper class verses the internal Python exec (or execfile) function.
For trivial tasks (such as deleting stale session files) the Popen
class wrapper is overkill. Using Popen involves unnecessary extra RAM
use and process invocation. Invoking a Python process is very
expensive in CPU and RAM terms. In fact Python is impractical in a web
environment unless the Python process remains persistent, This is the
reason why hosting is relatively expensive for python web solutions
compared to PHP and Perl.

While such concerns might seem trivial for tasks that are not repeated
often, it is not trivial if hosting is in an environment where there
are penalties for exceeding allocated RAM, such as I believe occurs at
Webfaction, popular with those trialling web2py.

For trivial housekeeping tasks, just a minimal (non models)
environment associated with the application is adequate, such as is
currently passed in for use with Popen.

If tasks are so involved that processes are at a non negligible risk
of choking then users will hardly be concerned about using execfile
instead of Popen and will instead code up an independent supervisory
process outside web2py.

Deadlock or race conditions are not any more of an issue using exec
than with normal code (provided the code passed in for exec does
nothing out of the ordinary). A new thread is not invoked.

As is, cron.py waits for a Popen invoked process to end without a
supervisor which can result in a lock up of web2py.

It can be argued that there is a lack of hard quantified information
about the resources used by Python based web frameworks. Those who
develop websites and GUIs have frequently little care about boring
issues of resource usage. I bothered to take a look and was horrified
by the memory usage of Python. We need to show respect for practical
issues associated with using Python. Otherwise web2py and other
frameworks risk becoming relegated to academic toys that are from
'enterprise' class. Java based frameworks are fighting back. Sun is
pushing GlassFish heavily into the enterprise environment.

Python based frameworks cannot expect to be competitive with PHP at
what PHP is best at (low resource usage) if Python frameworks don't
address issues in a practical way that are holding back their adoption
(such as resource usage leading to expensive hosting).

John Heenan


On Feb 8, 11:40 pm, AchipA  wrote:
> Fiddling with this now, but have a few concerns, so I'd like Massimo
> to chime is as the exec expert. The main reason for going POpen is to
> have a clean, thread safe environment, and with exec I'm not sure we
> won't hit race conditions or deadlock possibilities, especially if we
> touch on models. Some help how to exec stuff with the proper
> environment would be welcome :)
>
> Another thing to note is that when execing, we no longer have control
> over what we execute - i.e. while we can kill/clean zombie POpened
> processes, if we get stuck in just another thread (=with exec) it's
> stuck there until the whole web2py/webserver is restarted.
>
> On Jan 31, 7:27 am, John Heenan  wrote:
>
> > I have not get my point across.
>
> > By 'Python exec' I mean using the 'exec' internal Python command. I
> > don't mean 'Python exec' as a shorthand for 'execute a new Unix,
> > Windows or Mac OS process under the ownership of the cron code written
> > in Python'.
>
> > I have just examined the most recent trunk version of cron.py 
> > inhttp://code.google.com/p/web2py/source/browse/gluon/contrib/cron.py
>
> > For .py files the Popen command is still executed using the
> > cronlauncher class that uses Popen
>
> > For those of us trying ot keep RAM usage down, who don't want to use a
> > regular crontab and who only want to run Python files, using Popen 

[web2py] Re: powered by drupal?

2010-02-08 Thread mdipierro
Let me clarify my point of view. Anybody here can create any
documentation in any system they like and if it gets to decent quality
I just link it.

If I have to put any effort into it I would like a system that can
automatically read my latex, generate new one, be editable as a wiki,
introspect code in real time, extract docstring/docstests and allow
users to edit them. Something like but better than this:
http://www.web2py.com/examples/global/vars/T.
I think this is doable.

Why?

Because every single person on this list over the last 3 years has
proposed a new wiki solution. Almost nobody has actually written any
documentation (except those people who contributed with docstring
patches, web2pyslices and wiki.web2py.com). Most of what was
documented (outside the book) are examples and they get outdated soon
as new APIs are added to web2py.
I believe the solution must come from liking documentation to the
code.

Massimo

On Feb 8, 5:28 pm, Brian M  wrote:
> Insisting on having to use web2py for the documentation is silly.
> Sorry, but there are a bunch of wikis out there that are better/more
> complete than the one in web2py. Yeah we can try to built the perfect
> wiki in web2py but waiting to do the community documentation until
> that happens is a waste.  Wiki syntax is pretty standard, when the day
> comes to move to a web2py powered wiki the content can be migrated,
> but in the mean time I say put something out there with MoinMoin or
> DokuWiki or whatever and start getting some quality content.
> Credibility wise I should think that having what's preceived as "poor"
> documentation is worse than having good documentation that just
> happens to not be powered by the framework being documented. I think
> people will understand that the best tool for the job that was
> currently available was used.
>
> Just my 2 cents (or less) worth.
>
> ~Brian
>
> On Feb 8, 4:12 pm, mikech  wrote:
>
> > Seriously?
>
> > On Feb 8, 1:47 pm, "ma...@rockiger.com" 
> > wrote:
>
> > > From the web2py marketing department:
>
> > > Using anything different than web2py is a no go.
> > > Practice what you preach. Otherwise you are not credible
>
> > > On Feb 5, 5:21 am, Anand Vaidya  wrote:
>
> > > > On Feb 5, 10:44 am, mdipierro  wrote:
>
> > > > > Do you want me to endorse a web2py wiki make with Drupal?
>
> > > > > Massimo
>
> > > > Hi Massimo,
>
> > > > I think should not be a problem.  I am declaring the site as
> > > > unofficial until you get comfortable with it. You could probably wait
> > > > a bit longer and see how it evolves.
>
> > > > My thoughts:
>
> > > > * web2py is optimized for apps , Drupal is optimized for CMS. We could
> > > > implement a CMS app with w2py but I think that will be so against DRY.
>
> > > > * Both are Open Source software
>
> > > > * We will be wasting our time if we try to duplicate Drupal (or
> > > > Joomla) functionality with web2py. CMS  is a problem that has been
> > > > solved many times (esp. in the PHP / Java world)
>
> > > > * Drupal is absolutely wonderful ( at the cost of being a bit complex
> > > > to understand) has tons of themes, addon modules and a huge community
> > > > etc.
>
> > > > * I have not seen a Markdown/RST based wiki / CMS that is very easy to
> > > > use AND works well/looks good .  Drupal uses HTML for content and with
> > > > CKeditor JS GUI editor, it is as easy as editing a MSWord (or
> > > > OpenOffice) document
>
> > > > * Many projects do host their docs "elsewhere" eg: Earlier, I had
> > > > actively used Gridsphere (http://www.gridsphere.org) - a Java Portlet
> > > > Server which used to host their docs/bugs with Atlassian Confluence /
> > > > Jira.
>
> > > > My opinion is that right now, we need to get something that is very
> > > > easy to enable everyone, irrespective of their skill level to be able
> > > > to contribute. And have a functional, visually appealing docs site.
>
> > > > We can always migrate to a better app on python or web2py when it is
> > > > ready for prime time.
>
> > > > Do you have  any specific issues with Drupal. (eg: security etc)
>
> > > > Regards
> > > > anand
>
> > > > > On Feb 4, 5:56 pm, Anand Vaidya  wrote:
>
> > > > > > Yes, Drupal CMS.http://www.drupal.org/
>
> > > > > > I don't think there is anything in Python as good and easy to use.
> > > > > > esp.for end users who are familiar with WYSISYG HTML editing but may
> > > > > > be not familiar with RST, Markdown etc.
>
> > > > > > I tried MoinMoin with the RST/Markdown plugin, seems very buggy 
> > > > > > still
> > > > > > (or maybe due to the fact that I am using 1.8-plugin in Moin-1.9.1?)
>
> > > > > > Regards
> > > > > > Anand
>
> > > > > > On Feb 5, 7:00 am, mdipierro  wrote:
>
> > > > > > >http://webtopy.org/community/tips-examples
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@g

[web2py] Re: PIL under web2py test server

2010-02-08 Thread mdipierro
Make sure you run web2py from source. If you use the binary version it
comes with its own python.

On Feb 8, 5:25 pm, pistacchio  wrote:
> i checked it via the web shell. indeed it's a different version..
> can't i get web2py server to run on system's python instance?
>
> On 8 Feb, 22:26, Thadeus Burgess  wrote:
>
> > Probably will get a better reply from a Mac user.
>
> > To verify the python version
>
> > >>> import sys
> > >>> print sys.version
>
> > Make sure web2py is running on the same version that you installed PIL.
>
> > -Thadeus
>
> > On Mon, Feb 8, 2010 at 3:13 PM, pistacchio  wrote:
> > > oh... how to check and set?
>
> > > On 8 Feb, 22:09, Thadeus Burgess  wrote:
> > >> is web2py running on python 2.6.1 or the built-in python 2.4? ?
> > >> -Thadeus
>
> > >> On Mon, Feb 8, 2010 at 3:02 PM, pistacchio  wrote:
> > >> > Hi to all,
> > >> > I'm running python 2.6.1 on MacOSX Snow Leopard. I installed PIL (the
> > >> > image manipulation library) with easy_install.
>
> > >> > If I run python in terminal, import Image is accepted. When trying
> > >> > import Image in a controller of web2py (its own test server), it tells
> > >> > me that there's no library called Image. Any help? Thanks
>
> > >> > --
> > >> > You received this message because you are subscribed to the Google 
> > >> > Groups "web2py-users" group.
> > >> > To post to this group, send email to web...@googlegroups.com.
> > >> > To unsubscribe from this group, send email to 
> > >> > web2py+unsubscr...@googlegroups.com.
> > >> > For more options, visit this group 
> > >> > athttp://groups.google.com/group/web2py?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups 
> > > "web2py-users" group.
> > > To post to this group, send email to web...@googlegroups.com.
> > > To unsubscribe from this group, send email to 
> > > web2py+unsubscr...@googlegroups.com.
> > > For more options, visit this group 
> > > athttp://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: for your info

2010-02-08 Thread Richard
On Feb 9, 3:33 am, mdipierro  wrote:
> I am considering posting most of the book on line in HTML. This may be
> possible with a disclaimer about "do not reproduce in print". The main
> issue is that the book is in latex and not easy to convert.

this is fantastic news!!


On Feb 9, 4:01 am, mdipierro  wrote:
> Lookin into that but I am not sure they work as good as they should.
> Moreover they are not reversible so changes in the wiki would not
> easily propagate into the latex book (which I consider the master
> documentation).

An automated solution sounds difficult and time consuming. If you
permitted, I could manually copy the PDF into a wiki or some other
app. And I'm sure others would be willing to help too.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: powered by drupal?

2010-02-08 Thread Jonathan Lundell
On Feb 8, 2010, at 3:28 PM, Brian M wrote:

> Insisting on having to use web2py for the documentation is silly.
> Sorry, but there are a bunch of wikis out there that are better/more
> complete than the one in web2py. Yeah we can try to built the perfect
> wiki in web2py but waiting to do the community documentation until
> that happens is a waste.  Wiki syntax is pretty standard, when the day
> comes to move to a web2py powered wiki the content can be migrated,
> but in the mean time I say put something out there with MoinMoin or
> DokuWiki or whatever and start getting some quality content.
> Credibility wise I should think that having what's preceived as "poor"
> documentation is worse than having good documentation that just
> happens to not be powered by the framework being documented. I think
> people will understand that the best tool for the job that was
> currently available was used.

I think that's right. I'm not a fan of DokuWiki. I prefer MediaWiki, but it 
looks like MoinMoin is pretty similar in syntax.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: powered by drupal?

2010-02-08 Thread Jonathan Lundell
On Feb 8, 2010, at 3:13 PM, Mengu wrote:

> Actually, I saw that this guy wrote Erlyweb framework for the Erlang
> language and was using wordpress on his blog. Isn't this weird?

Not really. I don't think that there's blogging software written in Erlang (or 
Python, for that matter) that compares with WordPress and its ecology. 

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: powered by drupal?

2010-02-08 Thread Brian M
Insisting on having to use web2py for the documentation is silly.
Sorry, but there are a bunch of wikis out there that are better/more
complete than the one in web2py. Yeah we can try to built the perfect
wiki in web2py but waiting to do the community documentation until
that happens is a waste.  Wiki syntax is pretty standard, when the day
comes to move to a web2py powered wiki the content can be migrated,
but in the mean time I say put something out there with MoinMoin or
DokuWiki or whatever and start getting some quality content.
Credibility wise I should think that having what's preceived as "poor"
documentation is worse than having good documentation that just
happens to not be powered by the framework being documented. I think
people will understand that the best tool for the job that was
currently available was used.

Just my 2 cents (or less) worth.

~Brian

On Feb 8, 4:12 pm, mikech  wrote:
> Seriously?
>
> On Feb 8, 1:47 pm, "ma...@rockiger.com" 
> wrote:
>
>
>
> > From the web2py marketing department:
>
> > Using anything different than web2py is a no go.
> > Practice what you preach. Otherwise you are not credible
>
> > On Feb 5, 5:21 am, Anand Vaidya  wrote:
>
> > > On Feb 5, 10:44 am, mdipierro  wrote:
>
> > > > Do you want me to endorse a web2py wiki make with Drupal?
>
> > > > Massimo
>
> > > Hi Massimo,
>
> > > I think should not be a problem.  I am declaring the site as
> > > unofficial until you get comfortable with it. You could probably wait
> > > a bit longer and see how it evolves.
>
> > > My thoughts:
>
> > > * web2py is optimized for apps , Drupal is optimized for CMS. We could
> > > implement a CMS app with w2py but I think that will be so against DRY.
>
> > > * Both are Open Source software
>
> > > * We will be wasting our time if we try to duplicate Drupal (or
> > > Joomla) functionality with web2py. CMS  is a problem that has been
> > > solved many times (esp. in the PHP / Java world)
>
> > > * Drupal is absolutely wonderful ( at the cost of being a bit complex
> > > to understand) has tons of themes, addon modules and a huge community
> > > etc.
>
> > > * I have not seen a Markdown/RST based wiki / CMS that is very easy to
> > > use AND works well/looks good .  Drupal uses HTML for content and with
> > > CKeditor JS GUI editor, it is as easy as editing a MSWord (or
> > > OpenOffice) document
>
> > > * Many projects do host their docs "elsewhere" eg: Earlier, I had
> > > actively used Gridsphere (http://www.gridsphere.org) - a Java Portlet
> > > Server which used to host their docs/bugs with Atlassian Confluence /
> > > Jira.
>
> > > My opinion is that right now, we need to get something that is very
> > > easy to enable everyone, irrespective of their skill level to be able
> > > to contribute. And have a functional, visually appealing docs site.
>
> > > We can always migrate to a better app on python or web2py when it is
> > > ready for prime time.
>
> > > Do you have  any specific issues with Drupal. (eg: security etc)
>
> > > Regards
> > > anand
>
> > > > On Feb 4, 5:56 pm, Anand Vaidya  wrote:
>
> > > > > Yes, Drupal CMS.http://www.drupal.org/
>
> > > > > I don't think there is anything in Python as good and easy to use.
> > > > > esp.for end users who are familiar with WYSISYG HTML editing but may
> > > > > be not familiar with RST, Markdown etc.
>
> > > > > I tried MoinMoin with the RST/Markdown plugin, seems very buggy still
> > > > > (or maybe due to the fact that I am using 1.8-plugin in Moin-1.9.1?)
>
> > > > > Regards
> > > > > Anand
>
> > > > > On Feb 5, 7:00 am, mdipierro  wrote:
>
> > > > > >http://webtopy.org/community/tips-examples

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: PIL under web2py test server

2010-02-08 Thread pistacchio
i checked it via the web shell. indeed it's a different version..
can't i get web2py server to run on system's python instance?

On 8 Feb, 22:26, Thadeus Burgess  wrote:
> Probably will get a better reply from a Mac user.
>
> To verify the python version
>
> >>> import sys
> >>> print sys.version
>
> Make sure web2py is running on the same version that you installed PIL.
>
> -Thadeus
>
>
>
> On Mon, Feb 8, 2010 at 3:13 PM, pistacchio  wrote:
> > oh... how to check and set?
>
> > On 8 Feb, 22:09, Thadeus Burgess  wrote:
> >> is web2py running on python 2.6.1 or the built-in python 2.4? ?
> >> -Thadeus
>
> >> On Mon, Feb 8, 2010 at 3:02 PM, pistacchio  wrote:
> >> > Hi to all,
> >> > I'm running python 2.6.1 on MacOSX Snow Leopard. I installed PIL (the
> >> > image manipulation library) with easy_install.
>
> >> > If I run python in terminal, import Image is accepted. When trying
> >> > import Image in a controller of web2py (its own test server), it tells
> >> > me that there's no library called Image. Any help? Thanks
>
> >> > --
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "web2py-users" group.
> >> > To post to this group, send email to web...@googlegroups.com.
> >> > To unsubscribe from this group, send email to 
> >> > web2py+unsubscr...@googlegroups.com.
> >> > For more options, visit this group 
> >> > athttp://groups.google.com/group/web2py?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: powered by drupal?

2010-02-08 Thread Mengu
Actually, I saw that this guy wrote Erlyweb framework for the Erlang
language and was using wordpress on his blog. Isn't this weird?

On Feb 9, 12:12 am, mikech  wrote:
> Seriously?
>
> On Feb 8, 1:47 pm, "ma...@rockiger.com" 
> wrote:
>
>
>
> > From the web2py marketing department:
>
> > Using anything different than web2py is a no go.
> > Practice what you preach. Otherwise you are not credible
>
> > On Feb 5, 5:21 am, Anand Vaidya  wrote:
>
> > > On Feb 5, 10:44 am, mdipierro  wrote:
>
> > > > Do you want me to endorse a web2py wiki make with Drupal?
>
> > > > Massimo
>
> > > Hi Massimo,
>
> > > I think should not be a problem.  I am declaring the site as
> > > unofficial until you get comfortable with it. You could probably wait
> > > a bit longer and see how it evolves.
>
> > > My thoughts:
>
> > > * web2py is optimized for apps , Drupal is optimized for CMS. We could
> > > implement a CMS app with w2py but I think that will be so against DRY.
>
> > > * Both are Open Source software
>
> > > * We will be wasting our time if we try to duplicate Drupal (or
> > > Joomla) functionality with web2py. CMS  is a problem that has been
> > > solved many times (esp. in the PHP / Java world)
>
> > > * Drupal is absolutely wonderful ( at the cost of being a bit complex
> > > to understand) has tons of themes, addon modules and a huge community
> > > etc.
>
> > > * I have not seen a Markdown/RST based wiki / CMS that is very easy to
> > > use AND works well/looks good .  Drupal uses HTML for content and with
> > > CKeditor JS GUI editor, it is as easy as editing a MSWord (or
> > > OpenOffice) document
>
> > > * Many projects do host their docs "elsewhere" eg: Earlier, I had
> > > actively used Gridsphere (http://www.gridsphere.org) - a Java Portlet
> > > Server which used to host their docs/bugs with Atlassian Confluence /
> > > Jira.
>
> > > My opinion is that right now, we need to get something that is very
> > > easy to enable everyone, irrespective of their skill level to be able
> > > to contribute. And have a functional, visually appealing docs site.
>
> > > We can always migrate to a better app on python or web2py when it is
> > > ready for prime time.
>
> > > Do you have  any specific issues with Drupal. (eg: security etc)
>
> > > Regards
> > > anand
>
> > > > On Feb 4, 5:56 pm, Anand Vaidya  wrote:
>
> > > > > Yes, Drupal CMS.http://www.drupal.org/
>
> > > > > I don't think there is anything in Python as good and easy to use.
> > > > > esp.for end users who are familiar with WYSISYG HTML editing but may
> > > > > be not familiar with RST, Markdown etc.
>
> > > > > I tried MoinMoin with the RST/Markdown plugin, seems very buggy still
> > > > > (or maybe due to the fact that I am using 1.8-plugin in Moin-1.9.1?)
>
> > > > > Regards
> > > > > Anand
>
> > > > > On Feb 5, 7:00 am, mdipierro  wrote:
>
> > > > > >http://webtopy.org/community/tips-examples

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: How to create patch for welcome app?

2010-02-08 Thread mdipierro
Accepted and in trunk! Thank you.

On Feb 8, 3:41 pm, Alex  wrote:
> I've changed models/menu.py of welcome application
> This is original code:
> ...
> response.menu_edit=[
>   [T('Edit'), False, URL('admin', 'default', 'design/%s' %
> request.application),
>    [
>             [T('Controller'), False,
>              URL('admin', 'default', 'edit/%s/controllers/default.py'
> \
>                      % request.application)],
> ...
>
> 2 last lines of this code was changed to:
> ...
> response.menu_edit=[
>   [T('Edit'), False, URL('admin', 'default', 'design/%s' %
> request.application),
>    [
>             [T('Controller'), False,
>              URL('admin', 'default', 'edit/%s/controllers/%s.py' \
>                      % (request.application, request.controller))],
> ...
>
> It seems to me that it would be comfortable to edit current controller
> not the default one ) But this code is located in welcome.w2p archive
> file. I dont know how to send this changes to repo. Help me, please...
>
> Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: powered by drupal?

2010-02-08 Thread mdipierro
+1

On Feb 8, 3:47 pm, "ma...@rockiger.com" 
wrote:
> From the web2py marketing department:
>
> Using anything different than web2py is a no go.
> Practice what you preach. Otherwise you are not credible
>
> On Feb 5, 5:21 am, Anand Vaidya  wrote:
>
> > On Feb 5, 10:44 am, mdipierro  wrote:
>
> > > Do you want me to endorse a web2py wiki make with Drupal?
>
> > > Massimo
>
> > Hi Massimo,
>
> > I think should not be a problem.  I am declaring the site as
> > unofficial until you get comfortable with it. You could probably wait
> > a bit longer and see how it evolves.
>
> > My thoughts:
>
> > * web2py is optimized for apps , Drupal is optimized for CMS. We could
> > implement a CMS app with w2py but I think that will be so against DRY.
>
> > * Both are Open Source software
>
> > * We will be wasting our time if we try to duplicate Drupal (or
> > Joomla) functionality with web2py. CMS  is a problem that has been
> > solved many times (esp. in the PHP / Java world)
>
> > * Drupal is absolutely wonderful ( at the cost of being a bit complex
> > to understand) has tons of themes, addon modules and a huge community
> > etc.
>
> > * I have not seen a Markdown/RST based wiki / CMS that is very easy to
> > use AND works well/looks good .  Drupal uses HTML for content and with
> > CKeditor JS GUI editor, it is as easy as editing a MSWord (or
> > OpenOffice) document
>
> > * Many projects do host their docs "elsewhere" eg: Earlier, I had
> > actively used Gridsphere (http://www.gridsphere.org) - a Java Portlet
> > Server which used to host their docs/bugs with Atlassian Confluence /
> > Jira.
>
> > My opinion is that right now, we need to get something that is very
> > easy to enable everyone, irrespective of their skill level to be able
> > to contribute. And have a functional, visually appealing docs site.
>
> > We can always migrate to a better app on python or web2py when it is
> > ready for prime time.
>
> > Do you have  any specific issues with Drupal. (eg: security etc)
>
> > Regards
> > anand
>
> > > On Feb 4, 5:56 pm, Anand Vaidya  wrote:
>
> > > > Yes, Drupal CMS.http://www.drupal.org/
>
> > > > I don't think there is anything in Python as good and easy to use.
> > > > esp.for end users who are familiar with WYSISYG HTML editing but may
> > > > be not familiar with RST, Markdown etc.
>
> > > > I tried MoinMoin with the RST/Markdown plugin, seems very buggy still
> > > > (or maybe due to the fact that I am using 1.8-plugin in Moin-1.9.1?)
>
> > > > Regards
> > > > Anand
>
> > > > On Feb 5, 7:00 am, mdipierro  wrote:
>
> > > > >http://webtopy.org/community/tips-examples
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Sahana project: how to make JOINs in web2py while keeping current re-usable field pointers?

2010-02-08 Thread mdipierro
can you show the model?

On Feb 8, 3:24 pm, sunneach  wrote:
> There are two tables:
>
> or_organisation (id, name, sector_id, ...)
> and
> or_sector(id, name, ...)
>
> And the sector_id is pointing to or_sector.id through the "reusable"
> field concept.
>
> It is all fine when I pull the or_organisation records and then use
> method represent to fill in the or_sector.name to display.
>
> But if we want the MySQL (or any other engine) to get the right
> related or_sector.name to
>
> a) order it via           ... ORDER BY or_sector.name DESC       and
> b) search it via             WHERE or_sector.LIKE '%context%
>
> the DAL 'left' construct does not work because the type of reusable
> field is 'string' and not numeric:
>
>          left=or_sector.on(or_sector.id = or_organisation.sector_id)
>
> What's more,  it is having, say, u'|1|' which can be converted to 1
> via specific CAST and TRIM.
>
> Is there any way to do that for table.on method?
> OR how do we pull joins otherwise?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Submenus and IE6

2010-02-08 Thread mdipierro
uploading to trunk in welcome layout.html thanks.

On Feb 8, 2:57 pm, Bob_in_Comox  wrote:
> Boring, useless time-waster of a subject, but I do have a significant
> number if IE6 users on my site who cannot view my submenus.
>
> I used the base.css, layout, and response.menu system that came with
> the welcome application. The base.css is not easy to follow, at least
> for me, but I did notice that there is a 'sfhover' class used like:
>
> ul.web2py-menu li.sfhover a:active,
> ul.web2py-menu li:hover a:active
>
> Since IE6 (and earlier) cannot handle ':hover' for anything other than
> '' tags, the .sfhover class is a fix. Unfortunately whoever wrote
> the 'base.css' did not include a bit of script in views/
> web2py_ajax.html to make it work. I added the following:
>
> 
> 
> 
>
> This addition makes the stock welcome menu system work for IE6. I
> checked this onhttps://crossbrowsertesting.com/
>
> Hope this helps others. Would like to find a pure html-css solution,
> but at least I have something.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: form - redirect - where are the variables?

2010-02-08 Thread mdipierro
You have a few problems, fixed below hopefully

def index():
form = FORM(TABLE(TR('Field:','',
 SELECT(
 OPTION('title', _value = 1),
 OPTION('affiliation', _value = 2),
 OPTION('country', _value = 3),
 OPTION('year', _value = 4),
 OPTION('research_field', _value = 5),
 OPTION('journal', _value= 6),
 OPTION('keywords', _value = 7),
 OPTION('author',_value = 8),
 OPTION('source', _value 8), value =
1,_name='field')),
  TR('Operator:', '',
 SELECT(
 OPTION('equals', _value= 1),
 OPTION('starts with', _value = 2),
 OPTION('contains', _value = 3), value
=1,_name='operator')),
   TR('Value:', '',
 INPUT(_name = 'searchfor')),
  TR('', '', INPUT(_type = 'submit' 
if form.accepts(request.vars, session):
redirect(URL(r=request, f='list_records',vars=request.vars))
elif form.errors:
response.flash = 'form has errors'
else:
response.flash = 'Please select the field, operator and type
in the search field'
return dict(form=form)

And
def list_records():
db.sarua.id.represent = lambda value: UL(
LI(A(T('edit'),_href=URL(r=request,c='default',f='data/update/
sarua', args=str(value,
LI(A(T('remove'),_href=URL(r=request, c='default',f='data/
delete/sarua', args=str(value)

ss = session.vars.searchfor
if not ss :
query = None
elif session.vars.operator == 'equals':
query = db.sarua[session.vars.field]==ss.upper()
elif session.vars.operator == 'starts with':
query = db.sarua[session.vars.field]>=ss.upper()
else:
query = db.sarua[session.vars.field].like('%'+ss+'%')
session.flash = query
rows = db(query).select(db.sarua.ALL,limitby = (0,25))
records = SQLTABLE(rows,
headers=dict([('sarua.'+f,db.sarua[f].label)
 for f in db.sarua.fields]))
return dict(records=records)


On Feb 8, 2:56 pm, Johann Spies  wrote:
> I want to use a form to build a query for a search function and do not
> understand the communication between the different functions.  I have:
>
> def index():
>     form = FORM(TABLE(TR('Field:','',
>                          SELECT(
>                              OPTION('title', _field = 1),
>                              OPTION('affiliation', field = 2),
>                              OPTION('country', field = 3),
>                              OPTION('year', field = 4),
>                              OPTION('research_field', field = 5),
>                              OPTION('journal', field = 6),
>                              OPTION('keywords', field = 7),
>                              OPTION('author',field = 8),
>                              OPTION('source', field= 8), field = 1)),
>                       TR('Operator:', '',
>                          SELECT(
>                              OPTION('equals', operator = 1),
>                              OPTION('starts with', operator = 2),
>                              OPTION('contains', operator = 3), operator =1)),
>                        TR('Value:', '',
>                          INPUT(_searchfor = '')),
>                       TR('', '', INPUT(_type = 'submit' 
>     if form.accepts(request.vars, session):
>         redirect(URL(r=request, f='list_records'))
>     elif form.errors:
>         response.flash = 'form has errors'
>     else:
>         response.flash = 'Please select the field, operator and type
> in the search field'
>     return dict(form=form)
>
> And
> def list_records():
>     db.sarua.id.represent = lambda value: UL(
>         LI(A(T('edit'),_href=URL(r=request,
> c='default',f='data/update/sarua', args=str(value,
>         LI(A(T('remove'),_href=URL(r=request,
> c='default',f='data/delete/sarua', args=str(value)
>
>     try:
>         ss = session.vars.searchfor.upper()
>     except:
>         ss = session.vars.searchfor
>     if not ss :
>         query = ''
>     elif session.vars.operator == 'equals':
>         query = "db.sarua.%s == %s" % (session.vars.field, ss)
>     elif session.vars.operator == 'starts with':
>         query = "db.sarua.%s >= %s" % (session.vars.field, ss)
>     else:
>         query = "db.sarua.%s.like( '%' + %s + '%')" % (session.vars.field, ss)
>     session.flash = query
>     rows = db(query).select(db.sarua.ALL,limitby = (0,25))
>     records = SQLTABLE(rows, headers=dict([('sarua.'+f,db.sarua[f].label)
>                                      for f in db.sarua.fields]))
>     return dict(records=records)
>
> But the variables do not arrive in list_records(). 

[web2py] Re: form - redirect - where are the variables?

2010-02-08 Thread Mengu
Massimo,

Is there any method that we can check if the instance is valid instead
of checking with the form instance?

On Feb 8, 10:56 pm, Johann Spies  wrote:
> I want to use a form to build a query for a search function and do not
> understand the communication between the different functions.  I have:
>
> def index():
>     form = FORM(TABLE(TR('Field:','',
>                          SELECT(
>                              OPTION('title', _field = 1),
>                              OPTION('affiliation', field = 2),
>                              OPTION('country', field = 3),
>                              OPTION('year', field = 4),
>                              OPTION('research_field', field = 5),
>                              OPTION('journal', field = 6),
>                              OPTION('keywords', field = 7),
>                              OPTION('author',field = 8),
>                              OPTION('source', field= 8), field = 1)),
>                       TR('Operator:', '',
>                          SELECT(
>                              OPTION('equals', operator = 1),
>                              OPTION('starts with', operator = 2),
>                              OPTION('contains', operator = 3), operator =1)),
>                        TR('Value:', '',
>                          INPUT(_searchfor = '')),
>                       TR('', '', INPUT(_type = 'submit' 
>     if form.accepts(request.vars, session):
>         redirect(URL(r=request, f='list_records'))
>     elif form.errors:
>         response.flash = 'form has errors'
>     else:
>         response.flash = 'Please select the field, operator and type
> in the search field'
>     return dict(form=form)
>
> And
> def list_records():
>     db.sarua.id.represent = lambda value: UL(
>         LI(A(T('edit'),_href=URL(r=request,
> c='default',f='data/update/sarua', args=str(value,
>         LI(A(T('remove'),_href=URL(r=request,
> c='default',f='data/delete/sarua', args=str(value)
>
>     try:
>         ss = session.vars.searchfor.upper()
>     except:
>         ss = session.vars.searchfor
>     if not ss :
>         query = ''
>     elif session.vars.operator == 'equals':
>         query = "db.sarua.%s == %s" % (session.vars.field, ss)
>     elif session.vars.operator == 'starts with':
>         query = "db.sarua.%s >= %s" % (session.vars.field, ss)
>     else:
>         query = "db.sarua.%s.like( '%' + %s + '%')" % (session.vars.field, ss)
>     session.flash = query
>     rows = db(query).select(db.sarua.ALL,limitby = (0,25))
>     records = SQLTABLE(rows, headers=dict([('sarua.'+f,db.sarua[f].label)
>                                      for f in db.sarua.fields]))
>     return dict(records=records)
>
> But the variables do not arrive in list_records().  I am missing
> something about request vars, return(form) and session vars().
>
> If I replace "session" in list_records with "response" I do not get
> any error but also no query content.
>
> How am I supposed to do it?
>
> Regards
> Johann

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: IS_IN_SET multiple=True with non-ASCII character failed

2010-02-08 Thread DenesL
On Feb 4, 4:26 pm, DenesL  wrote:
> You need to lookup each character that is not in the x00-xFF range in
> a table:
that should have read: is not in the x00-x7F range

Anyway, I gave this some thought and it all depends on how you type in
the characters.
For example in Windows, to get "LATIN SMALL LETTER A WITH ACUTE" up on
the screen I would type Alt160 or Alt0225 and I end up with '\xa0' in
both cases, both wrong.

So what can you do?
1) As previously said, type '\xc3\xa1' (the utf8 code for á).
2) Use a function. Note that in this case the function has to be typed
in and not copy-pasted, so that you get the proper code when you type
in the source.

Sample function using string:

def u8(s):
  import string
  # translation table to get the proper unicode char
  t=string.maketrans('áéíóú','\xe1\xe9\xed\xf3\xfa\xf1\xd1\xbf\xa1')
  return
string.translate(s,t).decode('unicode_escape').encode('utf-8')

Sample function using dictionary:

def u8(s):
  d={'á':'\xc3\xa1',
 'é':'\xc3\xa9',
 'í':'\xc3\xad',
 'ó':'\xc3\xb3',
 'ú':'\xc3\xba'}
  return ''.join([d[x] if x in d.keys() else x for x in s])
# note that the if statement above requires python 2.5 but it can be
rewritten for previous versions.

and then just type away:

IS_IN_SET( [ u8('adiós'), ... ] )

Denes.


-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: powered by drupal?

2010-02-08 Thread mikech
Seriously?

On Feb 8, 1:47 pm, "ma...@rockiger.com" 
wrote:
> From the web2py marketing department:
>
> Using anything different than web2py is a no go.
> Practice what you preach. Otherwise you are not credible
>
> On Feb 5, 5:21 am, Anand Vaidya  wrote:
>
>
>
> > On Feb 5, 10:44 am, mdipierro  wrote:
>
> > > Do you want me to endorse a web2py wiki make with Drupal?
>
> > > Massimo
>
> > Hi Massimo,
>
> > I think should not be a problem.  I am declaring the site as
> > unofficial until you get comfortable with it. You could probably wait
> > a bit longer and see how it evolves.
>
> > My thoughts:
>
> > * web2py is optimized for apps , Drupal is optimized for CMS. We could
> > implement a CMS app with w2py but I think that will be so against DRY.
>
> > * Both are Open Source software
>
> > * We will be wasting our time if we try to duplicate Drupal (or
> > Joomla) functionality with web2py. CMS  is a problem that has been
> > solved many times (esp. in the PHP / Java world)
>
> > * Drupal is absolutely wonderful ( at the cost of being a bit complex
> > to understand) has tons of themes, addon modules and a huge community
> > etc.
>
> > * I have not seen a Markdown/RST based wiki / CMS that is very easy to
> > use AND works well/looks good .  Drupal uses HTML for content and with
> > CKeditor JS GUI editor, it is as easy as editing a MSWord (or
> > OpenOffice) document
>
> > * Many projects do host their docs "elsewhere" eg: Earlier, I had
> > actively used Gridsphere (http://www.gridsphere.org) - a Java Portlet
> > Server which used to host their docs/bugs with Atlassian Confluence /
> > Jira.
>
> > My opinion is that right now, we need to get something that is very
> > easy to enable everyone, irrespective of their skill level to be able
> > to contribute. And have a functional, visually appealing docs site.
>
> > We can always migrate to a better app on python or web2py when it is
> > ready for prime time.
>
> > Do you have  any specific issues with Drupal. (eg: security etc)
>
> > Regards
> > anand
>
> > > On Feb 4, 5:56 pm, Anand Vaidya  wrote:
>
> > > > Yes, Drupal CMS.http://www.drupal.org/
>
> > > > I don't think there is anything in Python as good and easy to use.
> > > > esp.for end users who are familiar with WYSISYG HTML editing but may
> > > > be not familiar with RST, Markdown etc.
>
> > > > I tried MoinMoin with the RST/Markdown plugin, seems very buggy still
> > > > (or maybe due to the fact that I am using 1.8-plugin in Moin-1.9.1?)
>
> > > > Regards
> > > > Anand
>
> > > > On Feb 5, 7:00 am, mdipierro  wrote:
>
> > > > >http://webtopy.org/community/tips-examples

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Soaplib problem.

2010-02-08 Thread Matt
Thanks for both or your replies will take a look at suds.

Matt

On Feb 8, 7:01 pm, mdipierro  wrote:
> It may work. Seems to use only basic libraries.
>
> On Feb 7, 11:34 pm, "mr.freeze"  wrote:
>
> > I've heard good things about SUDS:https://fedorahosted.org/suds/
>
> > I've never used it and I don't know if it works on GAE but might be
> > worth a shot.
>
> > On Feb 7, 9:07 pm, Matt  wrote:
>
> > > So realistically the soaplib package won't work on GAE due to the lxml
> > > dependency.
>
> > > Do you know of any other products that I should consider? I only need
> > > to consume web services.
>
> > > Potentially I could hack soaplib but that seems a little extreme.
>
> > > Thanks,
> > > Matt
>
> > > On Feb 8, 3:42 pm, mdipierro  wrote:
>
> > > > I just tried.
> > > > wget http:///...soaplib-0.8.1 -o ~/Downloads/soaplib-0.8.1.tar
> > > > cd ~/Downloads/
> > > > tar zxvf soaplib-0.8.1.tar
> > > > cd ~/web2py
> > > > cp -r ~/Downloads/soaplib-0.8.1/soaplib site-packages
>
> > > > It works but requires
> > > >     import lxml.etree as ElementTree
>
> > > > and I think that is a binary package that does not work on GAE. I do
> > > > not know if it is already there.
>
> > > > unzipping it into web2py/site-packages should be the way to go.
>
> > > > On Feb 7, 6:38 pm, Matt  wrote:
>
> > > > > Hi there,
>
> > > > > I'm trying to install soaplib as per the following:
>
> > > > >http://www.web2py.com/AlterEgo/default/show/165
>
> > > > > I've downloaded soaplib 0.8.1 from
>
> > > > >http://github.com/jkp/soaplib/downloads
>
> > > > > Now the one step _crucial_ that is missing from the AlterEgo example
> > > > > is where to place the untared soaplib files.
>
> > > > > I've tried both putting it under site-packages and my applications
> > > > > module directory but i still get errors:
>
> > > > > Traceback (most recent call last):
> > > > >   File "/Apps/web2py/gluon/restricted.py", line 173, in restricted
> > > > >     exec ccode in environment
> > > > >   File "/Apps/web2py/applications/testing/controllers/
> > > > > default.py:index", line 3, in 
> > > > > ImportError: No module named soaplib.client
>
> > > > > [I'm running this with the GAE launcher]
>
> > > > > Any suggestions?
>
> > > > > Thanks in advance,
> > > > > Matt
>
> > > > > PS: Really impressed with what I've seen in web2py.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: powered by drupal?

2010-02-08 Thread ma...@rockiger.com
>From the web2py marketing department:

Using anything different than web2py is a no go.
Practice what you preach. Otherwise you are not credible

On Feb 5, 5:21 am, Anand Vaidya  wrote:
> On Feb 5, 10:44 am, mdipierro  wrote:
>
> > Do you want me to endorse a web2py wiki make with Drupal?
>
> > Massimo
>
> Hi Massimo,
>
> I think should not be a problem.  I am declaring the site as
> unofficial until you get comfortable with it. You could probably wait
> a bit longer and see how it evolves.
>
> My thoughts:
>
> * web2py is optimized for apps , Drupal is optimized for CMS. We could
> implement a CMS app with w2py but I think that will be so against DRY.
>
> * Both are Open Source software
>
> * We will be wasting our time if we try to duplicate Drupal (or
> Joomla) functionality with web2py. CMS  is a problem that has been
> solved many times (esp. in the PHP / Java world)
>
> * Drupal is absolutely wonderful ( at the cost of being a bit complex
> to understand) has tons of themes, addon modules and a huge community
> etc.
>
> * I have not seen a Markdown/RST based wiki / CMS that is very easy to
> use AND works well/looks good .  Drupal uses HTML for content and with
> CKeditor JS GUI editor, it is as easy as editing a MSWord (or
> OpenOffice) document
>
> * Many projects do host their docs "elsewhere" eg: Earlier, I had
> actively used Gridsphere (http://www.gridsphere.org) - a Java Portlet
> Server which used to host their docs/bugs with Atlassian Confluence /
> Jira.
>
> My opinion is that right now, we need to get something that is very
> easy to enable everyone, irrespective of their skill level to be able
> to contribute. And have a functional, visually appealing docs site.
>
> We can always migrate to a better app on python or web2py when it is
> ready for prime time.
>
> Do you have  any specific issues with Drupal. (eg: security etc)
>
> Regards
> anand
>
>
>
>
>
> > On Feb 4, 5:56 pm, Anand Vaidya  wrote:
>
> > > Yes, Drupal CMS.http://www.drupal.org/
>
> > > I don't think there is anything in Python as good and easy to use.
> > > esp.for end users who are familiar with WYSISYG HTML editing but may
> > > be not familiar with RST, Markdown etc.
>
> > > I tried MoinMoin with the RST/Markdown plugin, seems very buggy still
> > > (or maybe due to the fact that I am using 1.8-plugin in Moin-1.9.1?)
>
> > > Regards
> > > Anand
>
> > > On Feb 5, 7:00 am, mdipierro  wrote:
>
> > > >http://webtopy.org/community/tips-examples

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] How to create patch for welcome app?

2010-02-08 Thread Alex
I've changed models/menu.py of welcome application
This is original code:
...
response.menu_edit=[
  [T('Edit'), False, URL('admin', 'default', 'design/%s' %
request.application),
   [
[T('Controller'), False,
 URL('admin', 'default', 'edit/%s/controllers/default.py'
\
 % request.application)],
...

2 last lines of this code was changed to:
...
response.menu_edit=[
  [T('Edit'), False, URL('admin', 'default', 'design/%s' %
request.application),
   [
[T('Controller'), False,
 URL('admin', 'default', 'edit/%s/controllers/%s.py' \
 % (request.application, request.controller))],
...

It seems to me that it would be comfortable to edit current controller
not the default one ) But this code is located in welcome.w2p archive
file. I dont know how to send this changes to repo. Help me, please...

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: PIL under web2py test server

2010-02-08 Thread Thadeus Burgess
Probably will get a better reply from a Mac user.

To verify the python version

>>> import sys
>>> print sys.version

Make sure web2py is running on the same version that you installed PIL.

-Thadeus





On Mon, Feb 8, 2010 at 3:13 PM, pistacchio  wrote:
> oh... how to check and set?
>
> On 8 Feb, 22:09, Thadeus Burgess  wrote:
>> is web2py running on python 2.6.1 or the built-in python 2.4? ?
>> -Thadeus
>>
>>
>>
>> On Mon, Feb 8, 2010 at 3:02 PM, pistacchio  wrote:
>> > Hi to all,
>> > I'm running python 2.6.1 on MacOSX Snow Leopard. I installed PIL (the
>> > image manipulation library) with easy_install.
>>
>> > If I run python in terminal, import Image is accepted. When trying
>> > import Image in a controller of web2py (its own test server), it tells
>> > me that there's no library called Image. Any help? Thanks
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "web2py-users" group.
>> > To post to this group, send email to web...@googlegroups.com.
>> > To unsubscribe from this group, send email to 
>> > web2py+unsubscr...@googlegroups.com.
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/web2py?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Sahana project: how to make JOINs in web2py while keeping current re-usable field pointers?

2010-02-08 Thread sunneach
There are two tables:

or_organisation (id, name, sector_id, ...)
and
or_sector(id, name, ...)

And the sector_id is pointing to or_sector.id through the "reusable"
field concept.

It is all fine when I pull the or_organisation records and then use
method represent to fill in the or_sector.name to display.

But if we want the MySQL (or any other engine) to get the right
related or_sector.name to

a) order it via   ... ORDER BY or_sector.name DESC   and
b) search it via WHERE or_sector.LIKE '%context%

the DAL 'left' construct does not work because the type of reusable
field is 'string' and not numeric:

 left=or_sector.on(or_sector.id = or_organisation.sector_id)

What's more,  it is having, say, u'|1|' which can be converted to 1
via specific CAST and TRIM.

Is there any way to do that for table.on method?
OR how do we pull joins otherwise?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: PIL under web2py test server

2010-02-08 Thread pistacchio
oh... how to check and set?

On 8 Feb, 22:09, Thadeus Burgess  wrote:
> is web2py running on python 2.6.1 or the built-in python 2.4? ?
> -Thadeus
>
>
>
> On Mon, Feb 8, 2010 at 3:02 PM, pistacchio  wrote:
> > Hi to all,
> > I'm running python 2.6.1 on MacOSX Snow Leopard. I installed PIL (the
> > image manipulation library) with easy_install.
>
> > If I run python in terminal, import Image is accepted. When trying
> > import Image in a controller of web2py (its own test server), it tells
> > me that there's no library called Image. Any help? Thanks
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] PIL under web2py test server

2010-02-08 Thread Thadeus Burgess
is web2py running on python 2.6.1 or the built-in python 2.4? ?
-Thadeus





On Mon, Feb 8, 2010 at 3:02 PM, pistacchio  wrote:
> Hi to all,
> I'm running python 2.6.1 on MacOSX Snow Leopard. I installed PIL (the
> image manipulation library) with easy_install.
>
> If I run python in terminal, import Image is accepted. When trying
> import Image in a controller of web2py (its own test server), it tells
> me that there's no library called Image. Any help? Thanks
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] PIL under web2py test server

2010-02-08 Thread pistacchio
Hi to all,
I'm running python 2.6.1 on MacOSX Snow Leopard. I installed PIL (the
image manipulation library) with easy_install.

If I run python in terminal, import Image is accepted. When trying
import Image in a controller of web2py (its own test server), it tells
me that there's no library called Image. Any help? Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: web2py vs. customizing existing e-commerce app

2010-02-08 Thread snfctech
Initial Phase 1 requirements.  Phase 2 may include on-line public
access and a few other features.

1. The system will provide a means to create; edit; track; and print
product orders.

2. Look up customer by:
1) Contact Info.; 2) Owner Number; 3) Non-owner Number; 4) Past
Purchases
Is customer on file as previous shopper (either owner or non-owner)?

3. The central database will be populated with
product data from a POS register system. (ETL)

4. Clean up old "Initiated" orders by researching individually.
Delete orders when:
1) older than 14 days and no payment can be found
2) older than one day and customer approves deletion

5. Search products against:
1) Description; 2) customer Purchase history; 3) Brand; 4) Department;
5) Category; 6) Attribute; 7) PLU; UPC; UNFI Order; Shelf Tag; Case
Lot PLU/UPC; 8) All fields
- OR -
Browse by:
1) Purchase history; 2) Brand; 3) Department; 4) Category

6. The system will provide a means to create; edit; track; update
status on; and print product invoices.

7. System will provide a method for reporting on and tracking product
which has languished in our warehouse past the retrieval window.

8. Create a holding time field for each type of product that we
order.  Make it reviewable and editable and make it kick off flags to
definable email targets when holding time is exceeded.

9. System will generate electronic notifications (such as updates) and
hard documents; such as hard copy of orders and invoices; as well as
offer a method by which customers can easily contacting staff and visa
versa.

10. Create (non-member) account by entering:
1) Full Name
2) Email
3) Main phone
4) Cell phone
5) Work phone
System generates unique non-member number.

11. vendor index will be created and maintained for generating item
shipping time estimates (and other item deliver factors?)

12. system must have ability to print out paper work orders for
customer's use at register

13. System generates emailed status update to customer indicating that
order has been placed (and updating the estimated of arrival date?).

14. vendor index gui; whether an imported file with a column or a
browser gui to the db; will allow department managers to opt certain
vendors out of case availability


On Feb 8, 12:29 pm, mdipierro  wrote:
> If you can post some specs of what you need perhaps we can help.
>
> Massimo
>
> On Feb 8, 1:22 pm, snfctech  wrote:
>
> > I need to build an order-entry and tracking system for a Food Co-op.
> > I was excited about using Python/web2py, but I'm struggling with the
> > fact that existing e-commerce systems seem to have about 70% of the
> > functionality I need.  I don't need stuff like shipping addresses,
> > postal prices and online features like a payment gateway - at least
> > initially.  And I think I will need to do a lot of customization -
> > complicated discounts for products and members, a store->producer
> > order/tracking flow (in addition to customer->store), printing
> > invoices with line-item UPCs that can be printed and brought to a
> > register for payment, and so on.  But all the rest of it is already
> > there - product catalog, customer_to_order relations, order status/
> > tracking, (some) notifications, etc.
>
> > My concern is that the 30% customization on the existing system will
> > be more of a headache than building a clean system from scratch with
> > nothing I don't need.  Or is it silly to build a system that is 70%
> > wheel-reinventing?  Should I try to work with an existing project like
> > Django/Satchmo and save my web2py project for something more unique?
>
> > Thanks in advance for any tips.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Submenus and IE6

2010-02-08 Thread Bob_in_Comox
Boring, useless time-waster of a subject, but I do have a significant
number if IE6 users on my site who cannot view my submenus.

I used the base.css, layout, and response.menu system that came with
the welcome application. The base.css is not easy to follow, at least
for me, but I did notice that there is a 'sfhover' class used like:

ul.web2py-menu li.sfhover a:active,
ul.web2py-menu li:hover a:active

Since IE6 (and earlier) cannot handle ':hover' for anything other than
'' tags, the .sfhover class is a fix. Unfortunately whoever wrote
the 'base.css' did not include a bit of script in views/
web2py_ajax.html to make it work. I added the following:





This addition makes the stock welcome menu system work for IE6. I
checked this on https://crossbrowsertesting.com/

Hope this helps others. Would like to find a pure html-css solution,
but at least I have something.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] form - redirect - where are the variables?

2010-02-08 Thread Johann Spies
I want to use a form to build a query for a search function and do not
understand the communication between the different functions.  I have:


def index():
form = FORM(TABLE(TR('Field:','',
 SELECT(
 OPTION('title', _field = 1),
 OPTION('affiliation', field = 2),
 OPTION('country', field = 3),
 OPTION('year', field = 4),
 OPTION('research_field', field = 5),
 OPTION('journal', field = 6),
 OPTION('keywords', field = 7),
 OPTION('author',field = 8),
 OPTION('source', field= 8), field = 1)),
  TR('Operator:', '',
 SELECT(
 OPTION('equals', operator = 1),
 OPTION('starts with', operator = 2),
 OPTION('contains', operator = 3), operator =1)),
   TR('Value:', '',
 INPUT(_searchfor = '')),
  TR('', '', INPUT(_type = 'submit' 
if form.accepts(request.vars, session):
redirect(URL(r=request, f='list_records'))
elif form.errors:
response.flash = 'form has errors'
else:
response.flash = 'Please select the field, operator and type
in the search field'
return dict(form=form)

And
def list_records():
db.sarua.id.represent = lambda value: UL(
LI(A(T('edit'),_href=URL(r=request,
c='default',f='data/update/sarua', args=str(value,
LI(A(T('remove'),_href=URL(r=request,
c='default',f='data/delete/sarua', args=str(value)

try:
ss = session.vars.searchfor.upper()
except:
ss = session.vars.searchfor
if not ss :
query = ''
elif session.vars.operator == 'equals':
query = "db.sarua.%s == %s" % (session.vars.field, ss)
elif session.vars.operator == 'starts with':
query = "db.sarua.%s >= %s" % (session.vars.field, ss)
else:
query = "db.sarua.%s.like( '%' + %s + '%')" % (session.vars.field, ss)
session.flash = query
rows = db(query).select(db.sarua.ALL,limitby = (0,25))
records = SQLTABLE(rows, headers=dict([('sarua.'+f,db.sarua[f].label)
 for f in db.sarua.fields]))
return dict(records=records)


But the variables do not arrive in list_records().  I am missing
something about request vars, return(form) and session vars().

If I replace "session" in list_records with "response" I do not get
any error but also no query content.

How am I supposed to do it?

Regards
Johann

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: web2py vs. customizing existing e-commerce app

2010-02-08 Thread mdipierro
If you can post some specs of what you need perhaps we can help.

Massimo

On Feb 8, 1:22 pm, snfctech  wrote:
> I need to build an order-entry and tracking system for a Food Co-op.
> I was excited about using Python/web2py, but I'm struggling with the
> fact that existing e-commerce systems seem to have about 70% of the
> functionality I need.  I don't need stuff like shipping addresses,
> postal prices and online features like a payment gateway - at least
> initially.  And I think I will need to do a lot of customization -
> complicated discounts for products and members, a store->producer
> order/tracking flow (in addition to customer->store), printing
> invoices with line-item UPCs that can be printed and brought to a
> register for payment, and so on.  But all the rest of it is already
> there - product catalog, customer_to_order relations, order status/
> tracking, (some) notifications, etc.
>
> My concern is that the 30% customization on the existing system will
> be more of a headache than building a clean system from scratch with
> nothing I don't need.  Or is it silly to build a system that is 70%
> wheel-reinventing?  Should I try to work with an existing project like
> Django/Satchmo and save my web2py project for something more unique?
>
> Thanks in advance for any tips.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Customizing Auth

2010-02-08 Thread mdipierro
It is combinations of two things:
1) a bug (just fixed in trunk)
2) the example is missing something (I fixed it). Should be:

auth.settings.table_user = db.define_table('auth_user',
Field('first_name', length=512,default=''),
Field('last_name', length=512,default=''),
Field('email', length=512,default='',
  requires = [IS_EMAIL(),IS_NOT_IN_DB(db,'auth_user.email')]),
Field('password', 'password',
  readable=False, label='Password',
  requires=CRYPT(auth.settings.hmac_key)),
Field('registration_key', length=512,
  writable=False, readable=False,default=''),
Field('reset_password_key', length=512,
  writable=False, readable=False, default=''))

Sorry about this and thanks for help in debugging.

Massimo

On Feb 8, 1:42 pm, Alexandre Andrade  wrote:
> I used the sample code 
> ofhttp://www.web2py.com/examples/default/tools#authentication:
>
> ---
> auth=Auth(globals(),db)                      # authentication/authorization
> auth.settings.hmac_key='sha512:e2976f55-309d-40fc-b69d-59fc032a6438'
>
> auth.messages.access_denied = 'Insufficient privileges'
> auth.messages.logged_in = 'Logged in'
> auth.messages.email_sent = 'Email sent'
> auth.messages.unable_to_send_email = 'Unable to send email'
> auth.messages.email_verified = 'Email verified'
> auth.messages.logged_out = 'Logged out'
> auth.messages.registration_successful = 'Registration successful'
> auth.messages.invalid_email = 'Invalid email'
> auth.messages.invalid_login = 'Invalid login'
> auth.messages.invalid_user = 'Invalid user'
> auth.messages.mismatched_password = "As senhas não conferem"
> #auth.messages.verify_email =   'Click on the 
> linkhttp://...verify_email/%(key)s
> to verify your email'
> auth.messages.verify_email_subject = 'Password verify'
> auth.messages.username_sent = 'Seu nome de usuário foi enviado para você'
> auth.messages.new_password_sent = 'Uma nova senha foi enviada para você'
> auth.messages.password_changed = 'Senha Alterada'
> auth.messages.retrieve_username = 'Seu nome de usuário é: %(username)s'
> auth.messages.retrieve_username_subject = 'Recupear nome de usuário'
> auth.messages.retrieve_password = 'Sua Senha: %(password)s'
> auth.messages.retrieve_password_subject = 'Recuperar senha'
> auth.messages.profile_updated = 'Perfil atualizado'
> auth.messages.new_password = 'Nova senha'
> auth.messages.old_password = 'Senha atual'
>
> auth.settings.table_user = db.define_table(
>     auth.settings.table_user_name,
>     Field('first_name', length=512,default=''),
>     Field('last_name', length=512,default=''),
>     Field('email', length=512,default='',
>              requires = [IS_EMAIL(),
>
> IS_NOT_IN_DB(db,'%s.email'%auth.settings.table_user_name)]),
>     Field('password', 'password', readable=False,
>              label='Password', requires=CRYPT()),
>     Field('registration_key', length=512,
>              writable=False, readable=False,default=''))
>
> auth.define_tables()                         # creates all needed tables
> 
>
> and I just get flash (from session.flash) responding: "invalid login" when
> trying to login.
>
> When I try to retrieve password, Is when I get:
>
> Traceback (most recent call last):
>   File "gluon/restricted.py", line 173, in restricted
>     exec ccode in environment
>   File "/home/web2py/applications/convenios/controllers/default.py"
> ,
> line 354, in 
>   File "gluon/globals.py", line 96, in 
>     self._caller = lambda f: f()
>   File "/home/web2py/applications/convenios/controllers/default.py"
> ,
> line 321, in user
>     return dict(form=auth())
>   File "gluon/tools.py", line 729, in __call__
>     return self.retrieve_password()
>   File "gluon/tools.py", line 1621, in retrieve_password
>     return self.reset_password_deprecated(next,onvalidation,onaccept,log)
>   File "gluon/tools.py", line 1460, in reset_password_deprecated
>     d = {passfield: user[passfield].validate(password)[0],
>
> I'm using postgresql 8.3.8 and the field in postgresl is character
> varying(512)
>
> When I drops the code above, the auth works perfectly.
>
> 2010/2/8 mdipierro 
>
>
>
> > I am going to need your help here. from tools.py
>
> >            user = self.db(table_user.email ==
> > form.vars.email).select().first()
> >            
> >             d = {passfield: user[passfield].validate(password)[0],
> >                  'registration_key': ''}
>
> > according to your error it says user[passfield] is a str. It cannot be
> > be. From the code above it is clearly a record. Can you add a print
> > statement as see what is going on?
>
> > Can you also print your code for custom auth?
>
> > Massimo
>
> > On Feb 8, 12:03 pm, Alexandre Andrade 
> > wrote:
> > > Now, using the other example, get the error:
>
> > > Traceback

[web2py] Re: AutocompleteWidget: experimental, magic, RFC

2010-02-08 Thread villas
Running my manual test-suite :)

Firefox 3.5.7 (Win):
  Single Click OK.
  Multi-select fixed.
  Up and Down arrow keys also work.
  Suggestion:  when dropped-down,  it would be nice if  key
completed the selection and closed the drop-down, instead of
submitting form.
  Good to go!

IE8 (Win):
  No good.
  The drop-down opens and closes even faster than before.  Selection
not poss. Arrow keys and clicking does not work.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: web2py vs. customizing existing e-commerce app

2010-02-08 Thread Thadeus Burgess
Django is a beast.

You can always use the existing web2py app as a basis, and create one
of your own but copying over functionality as needed ?

Nothing will ever suit the food co-op purposes 100% unless it is a
system hand written by you.

-Thadeus





On Mon, Feb 8, 2010 at 1:40 PM, snfctech  wrote:
> I admit that I didn't spend more than a half hour on it - but it broke
> on some dependencies when I tried to install.  I was dazzled by the
> complexity of the install/configuration requirements - but maybe
> that's just because I don't know Django.
>
> On Feb 8, 11:25 am, Thadeus Burgess  wrote:
>> It may just be me, but I never could get satchmo to work.
>>
>> -Thadeus
>>
>> On Mon, Feb 8, 2010 at 1:22 PM, snfctech  wrote:
>> > I need to build an order-entry and tracking system for a Food Co-op.
>> > I was excited about using Python/web2py, but I'm struggling with the
>> > fact that existing e-commerce systems seem to have about 70% of the
>> > functionality I need.  I don't need stuff like shipping addresses,
>> > postal prices and online features like a payment gateway - at least
>> > initially.  And I think I will need to do a lot of customization -
>> > complicated discounts for products and members, a store->producer
>> > order/tracking flow (in addition to customer->store), printing
>> > invoices with line-item UPCs that can be printed and brought to a
>> > register for payment, and so on.  But all the rest of it is already
>> > there - product catalog, customer_to_order relations, order status/
>> > tracking, (some) notifications, etc.
>>
>> > My concern is that the 30% customization on the existing system will
>> > be more of a headache than building a clean system from scratch with
>> > nothing I don't need.  Or is it silly to build a system that is 70%
>> > wheel-reinventing?  Should I try to work with an existing project like
>> > Django/Satchmo and save my web2py project for something more unique?
>>
>> > Thanks in advance for any tips.
>>
>> > --
>> > You received this message because you are subscribed to the Google Groups 
>> > "web2py-users" group.
>> > To post to this group, send email to web...@googlegroups.com.
>> > To unsubscribe from this group, send email to 
>> > web2py+unsubscr...@googlegroups.com.
>> > For more options, visit this group 
>> > athttp://groups.google.com/group/web2py?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: Customizing Auth

2010-02-08 Thread Alexandre Andrade
I used the sample code of
http://www.web2py.com/examples/default/tools#authentication:



---
auth=Auth(globals(),db)  # authentication/authorization
auth.settings.hmac_key='sha512:e2976f55-309d-40fc-b69d-59fc032a6438'

auth.messages.access_denied = 'Insufficient privileges'
auth.messages.logged_in = 'Logged in'
auth.messages.email_sent = 'Email sent'
auth.messages.unable_to_send_email = 'Unable to send email'
auth.messages.email_verified = 'Email verified'
auth.messages.logged_out = 'Logged out'
auth.messages.registration_successful = 'Registration successful'
auth.messages.invalid_email = 'Invalid email'
auth.messages.invalid_login = 'Invalid login'
auth.messages.invalid_user = 'Invalid user'
auth.messages.mismatched_password = "As senhas não conferem"
#auth.messages.verify_email =   'Click on the link
http://...verify_email/%(key)s
to verify your email'
auth.messages.verify_email_subject = 'Password verify'
auth.messages.username_sent = 'Seu nome de usuário foi enviado para você'
auth.messages.new_password_sent = 'Uma nova senha foi enviada para você'
auth.messages.password_changed = 'Senha Alterada'
auth.messages.retrieve_username = 'Seu nome de usuário é: %(username)s'
auth.messages.retrieve_username_subject = 'Recupear nome de usuário'
auth.messages.retrieve_password = 'Sua Senha: %(password)s'
auth.messages.retrieve_password_subject = 'Recuperar senha'
auth.messages.profile_updated = 'Perfil atualizado'
auth.messages.new_password = 'Nova senha'
auth.messages.old_password = 'Senha atual'


auth.settings.table_user = db.define_table(
auth.settings.table_user_name,
Field('first_name', length=512,default=''),
Field('last_name', length=512,default=''),
Field('email', length=512,default='',
 requires = [IS_EMAIL(),

IS_NOT_IN_DB(db,'%s.email'%auth.settings.table_user_name)]),
Field('password', 'password', readable=False,
 label='Password', requires=CRYPT()),
Field('registration_key', length=512,
 writable=False, readable=False,default=''))


auth.define_tables() # creates all needed tables


and I just get flash (from session.flash) responding: "invalid login" when
trying to login.

When I try to retrieve password, Is when I get:

Traceback (most recent call last):
  File "gluon/restricted.py", line 173, in restricted
exec ccode in environment
  File "/home/web2py/applications/convenios/controllers/default.py"
,
line 354, in 
  File "gluon/globals.py", line 96, in 
self._caller = lambda f: f()
  File "/home/web2py/applications/convenios/controllers/default.py"
,
line 321, in user
return dict(form=auth())
  File "gluon/tools.py", line 729, in __call__
return self.retrieve_password()
  File "gluon/tools.py", line 1621, in retrieve_password
return self.reset_password_deprecated(next,onvalidation,onaccept,log)
  File "gluon/tools.py", line 1460, in reset_password_deprecated
d = {passfield: user[passfield].validate(password)[0],


I'm using postgresql 8.3.8 and the field in postgresl is character
varying(512)

When I drops the code above, the auth works perfectly.





2010/2/8 mdipierro 

> I am going to need your help here. from tools.py
>
>user = self.db(table_user.email ==
> form.vars.email).select().first()
>
> d = {passfield: user[passfield].validate(password)[0],
>  'registration_key': ''}
>
> according to your error it says user[passfield] is a str. It cannot be
> be. From the code above it is clearly a record. Can you add a print
> statement as see what is going on?
>
> Can you also print your code for custom auth?
>
> Massimo
>
>
> On Feb 8, 12:03 pm, Alexandre Andrade 
> wrote:
> > Now, using the other example, get the error:
> >
> > Traceback (most recent call last):
> >   File "gluon/restricted.py", line 173, in restricted
> > exec ccode in environment
> >   File "/home/web2py/applications/convenios/controllers/default.py"
> >  .>,
> > line 354, in 
> >   File "gluon/globals.py", line 96, in 
> > self._caller = lambda f: f()
> >   File "/home/web2py/applications/convenios/controllers/default.py"
> >  .>,
> > line 321, in user
> > return dict(form=auth())
> >   File "gluon/tools.py", line 729, in __call__
> > return self.retrieve_password()
> >   File "gluon/tools.py", line 1621, in retrieve_password
> > return self.reset_password_deprecated(next,onvalidation,onaccept,log)
> >   File "gluon/tools.py", line 1460, in reset_password_deprecated
> > d = {passfield: user[passfield].validate(password)[0],
> > AttributeError: 'str' object has no a

[web2py] Re: web2py vs. customizing existing e-commerce app

2010-02-08 Thread snfctech
I admit that I didn't spend more than a half hour on it - but it broke
on some dependencies when I tried to install.  I was dazzled by the
complexity of the install/configuration requirements - but maybe
that's just because I don't know Django.

On Feb 8, 11:25 am, Thadeus Burgess  wrote:
> It may just be me, but I never could get satchmo to work.
>
> -Thadeus
>
> On Mon, Feb 8, 2010 at 1:22 PM, snfctech  wrote:
> > I need to build an order-entry and tracking system for a Food Co-op.
> > I was excited about using Python/web2py, but I'm struggling with the
> > fact that existing e-commerce systems seem to have about 70% of the
> > functionality I need.  I don't need stuff like shipping addresses,
> > postal prices and online features like a payment gateway - at least
> > initially.  And I think I will need to do a lot of customization -
> > complicated discounts for products and members, a store->producer
> > order/tracking flow (in addition to customer->store), printing
> > invoices with line-item UPCs that can be printed and brought to a
> > register for payment, and so on.  But all the rest of it is already
> > there - product catalog, customer_to_order relations, order status/
> > tracking, (some) notifications, etc.
>
> > My concern is that the 30% customization on the existing system will
> > be more of a headache than building a clean system from scratch with
> > nothing I don't need.  Or is it silly to build a system that is 70%
> > wheel-reinventing?  Should I try to work with an existing project like
> > Django/Satchmo and save my web2py project for something more unique?
>
> > Thanks in advance for any tips.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > web2py+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/web2py?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: AutocompleteWidget: experimental, magic, RFC

2010-02-08 Thread mdipierro
I posted a modified version. Can you check it it makes any difference?

On Feb 8, 12:48 pm, villas  wrote:
> > Can you give it one more try?
>
> Here are my results with latest sqlhtml.py
>
> Firefox 3.5.7: Works better, but not 100%.
>   The drop-down appears.   OK
>   Single click selection.  NO
>   Double click selection.  OK
>   Drop-down closes after selection. OK
>   Note: You can still select more than one option with control click,
> which leads to a ticket.
>
> IE8:  Unusable.
>   The drop-down appears, but then immediately fades away again.  It
> appears just long enough to be able to click on your selection but the
> item selected is not transferred into input box.
>   Single click selection. NO
>   Double click selection. NO

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: AutocompleteWidget: experimental, magic, RFC

2010-02-08 Thread mdipierro
Instead of clicking can you use the up, down, right arrows? DO they
work?

On Feb 8, 12:48 pm, villas  wrote:
> > Can you give it one more try?
>
> Here are my results with latest sqlhtml.py
>
> Firefox 3.5.7: Works better, but not 100%.
>   The drop-down appears.   OK
>   Single click selection.  NO
>   Double click selection.  OK
>   Drop-down closes after selection. OK
>   Note: You can still select more than one option with control click,
> which leads to a ticket.
>
> IE8:  Unusable.
>   The drop-down appears, but then immediately fades away again.  It
> appears just long enough to be able to click on your selection but the
> item selected is not transferred into input box.
>   Single click selection. NO
>   Double click selection. NO

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: Customizing Auth

2010-02-08 Thread mdipierro
I am going to need your help here. from tools.py

user = self.db(table_user.email ==
form.vars.email).select().first()

d = {passfield: user[passfield].validate(password)[0],
 'registration_key': ''}

according to your error it says user[passfield] is a str. It cannot be
be. From the code above it is clearly a record. Can you add a print
statement as see what is going on?

Can you also print your code for custom auth?

Massimo


On Feb 8, 12:03 pm, Alexandre Andrade 
wrote:
> Now, using the other example, get the error:
>
> Traceback (most recent call last):
>   File "gluon/restricted.py", line 173, in restricted
>     exec ccode in environment
>   File "/home/web2py/applications/convenios/controllers/default.py"
> ,
> line 354, in 
>   File "gluon/globals.py", line 96, in 
>     self._caller = lambda f: f()
>   File "/home/web2py/applications/convenios/controllers/default.py"
> ,
> line 321, in user
>     return dict(form=auth())
>   File "gluon/tools.py", line 729, in __call__
>     return self.retrieve_password()
>   File "gluon/tools.py", line 1621, in retrieve_password
>     return self.reset_password_deprecated(next,onvalidation,onaccept,log)
>   File "gluon/tools.py", line 1460, in reset_password_deprecated
>     d = {passfield: user[passfield].validate(password)[0],
> AttributeError: 'str' object has no attribute 'validate'
>
> 2010/2/8 mdipierro 
>
>
>
> > Please use the example in here:
> >http://www.web2py.com/examples/default/tools#authentication
>
> > you probably have a too short password length, should be 512.
>
> > On Feb 8, 8:16 am, Alexandre Andrade  wrote:
> > > I customize auth using the reference of page 245 (229 ) of the book, but
> > > after the login's of existents users  don't work.
>
> > > I tried with a new app, created a user, and works. Its not possible alter
> > it
> > > after.
>
> > > How make it work with a existent auth_user table?
>
> > > --
> > > Atenciosamente
>
> > > --
> > > =
> > > Alexandre Andrade
> > > Hipercenter.com
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > web2py+unsubscr...@googlegroups.com
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/web2py?hl=en.
>
> --
> Atenciosamente
>
> --
> =
> Alexandre Andrade
> Hipercenter.com

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] web2py vs. customizing existing e-commerce app

2010-02-08 Thread Thadeus Burgess
It may just be me, but I never could get satchmo to work.

-Thadeus





On Mon, Feb 8, 2010 at 1:22 PM, snfctech  wrote:
> I need to build an order-entry and tracking system for a Food Co-op.
> I was excited about using Python/web2py, but I'm struggling with the
> fact that existing e-commerce systems seem to have about 70% of the
> functionality I need.  I don't need stuff like shipping addresses,
> postal prices and online features like a payment gateway - at least
> initially.  And I think I will need to do a lot of customization -
> complicated discounts for products and members, a store->producer
> order/tracking flow (in addition to customer->store), printing
> invoices with line-item UPCs that can be printed and brought to a
> register for payment, and so on.  But all the rest of it is already
> there - product catalog, customer_to_order relations, order status/
> tracking, (some) notifications, etc.
>
> My concern is that the 30% customization on the existing system will
> be more of a headache than building a clean system from scratch with
> nothing I don't need.  Or is it silly to build a system that is 70%
> wheel-reinventing?  Should I try to work with an existing project like
> Django/Satchmo and save my web2py project for something more unique?
>
> Thanks in advance for any tips.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: cron issue

2010-02-08 Thread mdipierro


On Feb 8, 11:43 am, AchipA  wrote:
> 1) ok
> 2) this would be the cron.master file. Sadly, it must be a file as
> otherwise multiprocess setups (like wsgi) would trip over each other.

ok. but there should be a function to check its status.
to make sure... what I mean is a way to check not if it is running
"right now" but if a) it was set to run; and b) it failed somehow.

> 3) I'm thinking of deprecating posttasks in favor of being able to
> daisy-chain controllers. So you would not have posttasks, but you
> could specify a controller that would be called automatically after
> the current controller is finished. That would be a lot cleaner
> but would keep the functionality.

Look into tools.py @completion. Not quite what you want but perhaps
you can keep the syntax.

> On Feb 8, 4:25 pm, mdipierro  wrote:
>
> > I agree that Popen is a better solution and I would not change
> > anything in cron.py.
>
> > I would only like:
> > 1) move crontype into gluon.settings and use the variable to determine
> > the type of cron. Currently this is a global variable almost useless
> > to determine which type of cron is on.
> > 2) add a variable that tells if cron is being executed
> > 3) remove posttasks since it is misleading (they are executed after
> > ever action for every app). May not be thread safe.
>
> > On Feb 8, 7:40 am, AchipA  wrote:
>
> > > Fiddling with this now, but have a few concerns, so I'd like Massimo
> > > to chime is as the exec expert. The main reason for going POpen is to
> > > have a clean, thread safe environment, and with exec I'm not sure we
> > > won't hit race conditions or deadlock possibilities, especially if we
> > > touch on models. Some help how to exec stuff with the proper
> > > environment would be welcome :)
>
> > > Another thing to note is that when execing, we no longer have control
> > > over what we execute - i.e. while we can kill/clean zombie POpened
> > > processes, if we get stuck in just another thread (=with exec) it's
> > > stuck there until the whole web2py/webserver is restarted.
>
> > > On Jan 31, 7:27 am, John Heenan  wrote:
>
> > > > I have not get my point across.
>
> > > > By 'Python exec' I mean using the 'exec' internal Python command. I
> > > > don't mean 'Python exec' as a shorthand for 'execute a new Unix,
> > > > Windows or Mac OS process under the ownership of the cron code written
> > > > in Python'.
>
> > > > I have just examined the most recent trunk version of cron.py 
> > > > inhttp://code.google.com/p/web2py/source/browse/gluon/contrib/cron.py
>
> > > > For .py files the Popen command is still executed using the
> > > > cronlauncher class that uses Popen
>
> > > > For those of us trying ot keep RAM usage down, who don't want to use a
> > > > regular crontab and who only want to run Python files, using Popen is
> > > > not necessasry.
>
> > > > My point is can we have an option to:
>
> > > > 1) Just do an Python exec on an opened file contents (with ot without
> > > > the models envrionment), instead of doing a Popen
> > > > 2) Have an option to do an Python exec on a string, such as on "import
> > > > a; a.mycronaction()"
>
> > > > Thanks
>
> > > > John Heenan
>
> > > > On Jan 31, 2:17 pm, mdipierro  wrote:
>
> > > > > Unless we misunderstand we have that already. The file just needs to
> > > > > end in .py as in
>
> > > > > * * * * * root myscript.py
>
> > > > > You can also call actions
>
> > > > > * * * * * root *myscript.py
>
> > > > > so that models are imported.
>
> > > > > On Jan 30, 8:36 pm, John Heenan  wrote:
>
> > > > > > Hi AchipA
>
> > > > > > Another feature request, if the cron file is a python file, how 
> > > > > > about
> > > > > > a cron option to open the file and do an exec on the file contents?
>
> > > > > > Thanks
>
> > > > > > John Heenan
>
> > > > > > On Jan 31, 12:33 pm, John Heenan  wrote:
>
> > > > > > > Hi AchipA
>
> > > > > > > Your cron is nice work and neatly deals with the messy side of
> > > > > > > launching an independent OS process and waiting for it to finish.
>
> > > > > > > For those of us who do not wish to launch an independent process 
> > > > > > > (to
> > > > > > > keep down memory use) and are happy to stick with Python for cron
> > > > > > > jobs, following is a request to add in the following feature to 
> > > > > > > your
> > > > > > > cron fpr web2py.
>
> > > > > > > Provide a mechanism to just perform a Python exec on a string
> > > > > > > statment.
>
> > > > > > > For example a string statement might be
> > > > > > > "import a; a.mycronaction()"
>
> > > > > > > Thanks
>
> > > > > > > John Heenan
>
> > > > > > > On Jan 31, 6:52 am, AchipA  wrote:
>
> > > > > > > > Just to chime in, I'm still alive and preparing an update to 
> > > > > > > > cron as
> > > > > > > > quite a few things changed since I last touched it. As for the
> > > > > > > > questions - all cron modes support the * and ** syntax, and 
> > > > > > > > yes, cron
> > > > > > > > files can be modified on the fly.
>
> > > > > > > > On

[web2py] web2py vs. customizing existing e-commerce app

2010-02-08 Thread snfctech
I need to build an order-entry and tracking system for a Food Co-op.
I was excited about using Python/web2py, but I'm struggling with the
fact that existing e-commerce systems seem to have about 70% of the
functionality I need.  I don't need stuff like shipping addresses,
postal prices and online features like a payment gateway - at least
initially.  And I think I will need to do a lot of customization -
complicated discounts for products and members, a store->producer
order/tracking flow (in addition to customer->store), printing
invoices with line-item UPCs that can be printed and brought to a
register for payment, and so on.  But all the rest of it is already
there - product catalog, customer_to_order relations, order status/
tracking, (some) notifications, etc.

My concern is that the 30% customization on the existing system will
be more of a headache than building a clean system from scratch with
nothing I don't need.  Or is it silly to build a system that is 70%
wheel-reinventing?  Should I try to work with an existing project like
Django/Satchmo and save my web2py project for something more unique?

Thanks in advance for any tips.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: AutocompleteWidget: experimental, magic, RFC

2010-02-08 Thread Thadeus Burgess
can we get an uncompressed version of the javascripts?

-Thadeus





On Mon, Feb 8, 2010 at 12:48 PM, villas  wrote:
>> Can you give it one more try?
>
> Here are my results with latest sqlhtml.py
>
> Firefox 3.5.7: Works better, but not 100%.
>  The drop-down appears.   OK
>  Single click selection.  NO
>  Double click selection.  OK
>  Drop-down closes after selection. OK
>  Note: You can still select more than one option with control click,
> which leads to a ticket.
>
> IE8:  Unusable.
>  The drop-down appears, but then immediately fades away again.  It
> appears just long enough to be able to click on your selection but the
> item selected is not transferred into input box.
>  Single click selection. NO
>  Double click selection. NO
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: for your info

2010-02-08 Thread Thadeus Burgess
I will document code that I contribute (such as sql reserved keywords
check). I just need somebody to tell me where to put it.

-Thadeus





On Mon, Feb 8, 2010 at 12:11 PM, Jonathan Lundell  wrote:
> On Feb 8, 2010, at 9:54 AM, Thadeus Burgess wrote:
>
>> the problem with pdf is it is not searchable.
>>
>> Take a look at http://www.cubicweb.org/doc/en/index.html
>>
>> That is nice, its in a tutorial style format, but it is a wiki so it
>> supports contextual searching via google.
>>
>> Its not all that special just a basic wiki where the pages are linked
>> together in order.
>
> I'm not arguing for pdf (though of course it *can* be searchable); only that 
> it's a better match for latex than html is.
>
> I do like having printable docs.
>
> Djangobook is nice.
>
> A problem with wiki.web2py is that the underlying wiki is limited, so it's 
> relatively hard to edit, and the appearance of the output leaves a lot to be 
> desired. (And no, I don't have time to work on it, though if web2py had a 
> first-class wiki, I'd seriously consider using for my CMS needs.)
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: AutocompleteWidget: experimental, magic, RFC

2010-02-08 Thread villas
> Can you give it one more try?

Here are my results with latest sqlhtml.py

Firefox 3.5.7: Works better, but not 100%.
  The drop-down appears.   OK
  Single click selection.  NO
  Double click selection.  OK
  Drop-down closes after selection. OK
  Note: You can still select more than one option with control click,
which leads to a ticket.

IE8:  Unusable.
  The drop-down appears, but then immediately fades away again.  It
appears just long enough to be able to click on your selection but the
item selected is not transferred into input box.
  Single click selection. NO
  Double click selection. NO

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: for your info

2010-02-08 Thread Jonathan Lundell
On Feb 8, 2010, at 9:54 AM, Thadeus Burgess wrote:

> the problem with pdf is it is not searchable.
> 
> Take a look at http://www.cubicweb.org/doc/en/index.html
> 
> That is nice, its in a tutorial style format, but it is a wiki so it
> supports contextual searching via google.
> 
> Its not all that special just a basic wiki where the pages are linked
> together in order.

I'm not arguing for pdf (though of course it *can* be searchable); only that 
it's a better match for latex than html is.

I do like having printable docs.

Djangobook is nice.

A problem with wiki.web2py is that the underlying wiki is limited, so it's 
relatively hard to edit, and the appearance of the output leaves a lot to be 
desired. (And no, I don't have time to work on it, though if web2py had a 
first-class wiki, I'd seriously consider using for my CMS needs.)

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: Customizing Auth

2010-02-08 Thread Alexandre Andrade
Now, using the other example, get the error:

Traceback (most recent call last):
  File "gluon/restricted.py", line 173, in restricted
exec ccode in environment
  File "/home/web2py/applications/convenios/controllers/default.py"
,
line 354, in 
  File "gluon/globals.py", line 96, in 
self._caller = lambda f: f()
  File "/home/web2py/applications/convenios/controllers/default.py"
,
line 321, in user
return dict(form=auth())
  File "gluon/tools.py", line 729, in __call__
return self.retrieve_password()
  File "gluon/tools.py", line 1621, in retrieve_password
return self.reset_password_deprecated(next,onvalidation,onaccept,log)
  File "gluon/tools.py", line 1460, in reset_password_deprecated
d = {passfield: user[passfield].validate(password)[0],
AttributeError: 'str' object has no attribute 'validate'



2010/2/8 mdipierro 

> Please use the example in here:
> http://www.web2py.com/examples/default/tools#authentication
>
> you probably have a too short password length, should be 512.
>
> On Feb 8, 8:16 am, Alexandre Andrade  wrote:
> > I customize auth using the reference of page 245 (229 ) of the book, but
> > after the login's of existents users  don't work.
> >
> > I tried with a new app, created a user, and works. Its not possible alter
> it
> > after.
> >
> > How make it work with a existent auth_user table?
> >
> > --
> > Atenciosamente
> >
> > --
> > =
> > Alexandre Andrade
> > Hipercenter.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to
> web2py+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/web2py?hl=en.
>
>


-- 
Atenciosamente

-- 
=
Alexandre Andrade
Hipercenter.com

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: for your info

2010-02-08 Thread Thadeus Burgess
Also, the ones who complain about the documentation, are not
knowledgeable enough in web2py to write documentation. The ones who
are knowledgeable enough in web2py are too busy (either with web2py or
real world) to write documentation.

I cannot stress enough the fact that any and all contributors
(including Massimo) needs to start documenting as you go, put it in
the source code, put it on the wiki.

As long as the information is there then english majors can come along
and format the docs correctly and in a logical manner.

We need to write documentation on how we are going to document web2py

A page needs to be added to the wiki, that will be a complete
structured document of how web2py will be documented, including coding
style, doctest style, and wikidoc style.

We don't need a non-web2py based system, we have web2py wiki system
that can do all that we need, we just need to use it.

-Thadeus





On Mon, Feb 8, 2010 at 11:54 AM, Thadeus Burgess  wrote:
> the problem with pdf is it is not searchable.
>
> Take a look at http://www.cubicweb.org/doc/en/index.html
>
> That is nice, its in a tutorial style format, but it is a wiki so it
> supports contextual searching via google.
>
> Its not all that special just a basic wiki where the pages are linked
> together in order.
>
> -Thadeus
>
>
>
>
>
> On Mon, Feb 8, 2010 at 11:07 AM, Jonathan Lundell  wrote:
>> On Feb 8, 2010, at 8:43 AM, DenesL wrote:
>>
>>> On Feb 8, 11:33 am, mdipierro  wrote:
 I am considering posting most of the book on line in HTML. This may be
>>> +1000!
 possible with a disclaimer about "do not reproduce in print". The main
 issue is that the book is in latex and not easy to convert.
>>> No latex to HTML conversion tools?.
>>
>> I investigated that a couple of years ago for an online journal. There are 
>> tools, but (at least at the time) they were not very good, and not 
>> maintained. So we gave up and stuck with pdf.
>>
>> How about a restricted-use PDF?
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To post to this group, send email to web...@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/web2py?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: for your info

2010-02-08 Thread Thadeus Burgess
the problem with pdf is it is not searchable.

Take a look at http://www.cubicweb.org/doc/en/index.html

That is nice, its in a tutorial style format, but it is a wiki so it
supports contextual searching via google.

Its not all that special just a basic wiki where the pages are linked
together in order.

-Thadeus





On Mon, Feb 8, 2010 at 11:07 AM, Jonathan Lundell  wrote:
> On Feb 8, 2010, at 8:43 AM, DenesL wrote:
>
>> On Feb 8, 11:33 am, mdipierro  wrote:
>>> I am considering posting most of the book on line in HTML. This may be
>> +1000!
>>> possible with a disclaimer about "do not reproduce in print". The main
>>> issue is that the book is in latex and not easy to convert.
>> No latex to HTML conversion tools?.
>
> I investigated that a couple of years ago for an online journal. There are 
> tools, but (at least at the time) they were not very good, and not 
> maintained. So we gave up and stuck with pdf.
>
> How about a restricted-use PDF?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to 
> web2py+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/web2py?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: for your info

2010-02-08 Thread pihentagy
Better, look at http://www.djangobook.com/en/2.0

I like especially the side notes...

The author would review each comment and decide what to do, so IMHO no
need for an automatic hypothetic html2latex tool...

On Feb 8, 6:16 pm, pistacchio  wrote:
> my two cents:
> decide where to host this new documentation (http://wiki.web2py.com/
> may be the most obvious bet). set up a page of links that reproduces
> the tree structure of the pdf summary. then one by one, anyone can
> copy / past text from the pdf to the new pages and format it.
>
> this is the most straight forward way to get it done, i think, and it
> leaves plenty of space for people to correct / add / update infos on
> all the topics.
>
> On Feb 8, 6:01 pm, mdipierro  wrote:
>
> > Lookin into that but I am not sure they work as good as they should.
> > Moreover they are not reversible so changes in the wiki would not
> > easily propagate into the latex book (which I consider the master
> > documentation).
>
> > On Feb 8, 10:43 am, DenesL  wrote:
>
> > > On Feb 8, 11:33 am, mdipierro  wrote:> I am 
> > > considering posting most of the book on line in HTML. This may be
> > > +1000!
> > > > possible with a disclaimer about "do not reproduce in print". The main
> > > > issue is that the book is in latex and not easy to convert.
>
> > > No latex to HTML conversion tools?.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: cron issue

2010-02-08 Thread AchipA
1) ok
2) this would be the cron.master file. Sadly, it must be a file as
otherwise multiprocess setups (like wsgi) would trip over each other.
3) I'm thinking of deprecating posttasks in favor of being able to
daisy-chain controllers. So you would not have posttasks, but you
could specify a controller that would be called automatically after
the current controller is finished. That would be a lot cleaner
but would keep the functionality.

On Feb 8, 4:25 pm, mdipierro  wrote:
> I agree that Popen is a better solution and I would not change
> anything in cron.py.
>
> I would only like:
> 1) move crontype into gluon.settings and use the variable to determine
> the type of cron. Currently this is a global variable almost useless
> to determine which type of cron is on.
> 2) add a variable that tells if cron is being executed
> 3) remove posttasks since it is misleading (they are executed after
> ever action for every app). May not be thread safe.
>
> On Feb 8, 7:40 am, AchipA  wrote:
>
> > Fiddling with this now, but have a few concerns, so I'd like Massimo
> > to chime is as the exec expert. The main reason for going POpen is to
> > have a clean, thread safe environment, and with exec I'm not sure we
> > won't hit race conditions or deadlock possibilities, especially if we
> > touch on models. Some help how to exec stuff with the proper
> > environment would be welcome :)
>
> > Another thing to note is that when execing, we no longer have control
> > over what we execute - i.e. while we can kill/clean zombie POpened
> > processes, if we get stuck in just another thread (=with exec) it's
> > stuck there until the whole web2py/webserver is restarted.
>
> > On Jan 31, 7:27 am, John Heenan  wrote:
>
> > > I have not get my point across.
>
> > > By 'Python exec' I mean using the 'exec' internal Python command. I
> > > don't mean 'Python exec' as a shorthand for 'execute a new Unix,
> > > Windows or Mac OS process under the ownership of the cron code written
> > > in Python'.
>
> > > I have just examined the most recent trunk version of cron.py 
> > > inhttp://code.google.com/p/web2py/source/browse/gluon/contrib/cron.py
>
> > > For .py files the Popen command is still executed using the
> > > cronlauncher class that uses Popen
>
> > > For those of us trying ot keep RAM usage down, who don't want to use a
> > > regular crontab and who only want to run Python files, using Popen is
> > > not necessasry.
>
> > > My point is can we have an option to:
>
> > > 1) Just do an Python exec on an opened file contents (with ot without
> > > the models envrionment), instead of doing a Popen
> > > 2) Have an option to do an Python exec on a string, such as on "import
> > > a; a.mycronaction()"
>
> > > Thanks
>
> > > John Heenan
>
> > > On Jan 31, 2:17 pm, mdipierro  wrote:
>
> > > > Unless we misunderstand we have that already. The file just needs to
> > > > end in .py as in
>
> > > > * * * * * root myscript.py
>
> > > > You can also call actions
>
> > > > * * * * * root *myscript.py
>
> > > > so that models are imported.
>
> > > > On Jan 30, 8:36 pm, John Heenan  wrote:
>
> > > > > Hi AchipA
>
> > > > > Another feature request, if the cron file is a python file, how about
> > > > > a cron option to open the file and do an exec on the file contents?
>
> > > > > Thanks
>
> > > > > John Heenan
>
> > > > > On Jan 31, 12:33 pm, John Heenan  wrote:
>
> > > > > > Hi AchipA
>
> > > > > > Your cron is nice work and neatly deals with the messy side of
> > > > > > launching an independent OS process and waiting for it to finish.
>
> > > > > > For those of us who do not wish to launch an independent process (to
> > > > > > keep down memory use) and are happy to stick with Python for cron
> > > > > > jobs, following is a request to add in the following feature to your
> > > > > > cron fpr web2py.
>
> > > > > > Provide a mechanism to just perform a Python exec on a string
> > > > > > statment.
>
> > > > > > For example a string statement might be
> > > > > > "import a; a.mycronaction()"
>
> > > > > > Thanks
>
> > > > > > John Heenan
>
> > > > > > On Jan 31, 6:52 am, AchipA  wrote:
>
> > > > > > > Just to chime in, I'm still alive and preparing an update to cron 
> > > > > > > as
> > > > > > > quite a few things changed since I last touched it. As for the
> > > > > > > questions - all cron modes support the * and ** syntax, and yes, 
> > > > > > > cron
> > > > > > > files can be modified on the fly.
>
> > > > > > > On Jan 26, 4:00 pm, mdipierro  wrote:
>
> > > > > > > > I did not write cron personally and I am still trying to 
> > > > > > > > understand
> > > > > > > > some of it, Attila did.
> > > > > > > > I am in the looking at cron these days to treamline it a bit 
> > > > > > > > and I am
> > > > > > > > trying to understand better as it works.
>
> > > > > > > > Since windows does not have cron, you should use web2py 
> > > > > > > > hardcron. It
> > > > > > > > should work on windows 7 but I have not tried it. The "root" is 
> > > > > > 

[web2py] Re: powered by drupal?

2010-02-08 Thread Pynthon
I suggest using DokuWiki. It is an awesome wiki, I admit it is PHP but
it is still very handy for this kinda of information.

On 5 feb, 05:34, "Zoom.Quiet"  wrote:
> On Fri, Feb 5, 2010 at 12:21, Anand Vaidya  wrote:
> > On Feb 5, 10:44 am, mdipierro  wrote:
> >> Do you want me to endorse a web2py wiki make with Drupal?
>
> Wiki ! Mnnn chk:http://www.wikimatrix.org/compare/DokuWiki+MediaWiki+MoinMoin
>
> Drupal is great CMS,not wiki engine;
> in Python MoinMoin is perfect!
> in fact running one wiki,need think about:
> - long time maintenance and upgrade ~ no DB is good
> - wiki syntax simple and pop and powered ~ MoinMoin is enough and so many 
> plugin
>
> iff want usage wiki to collection and publishing web2py knowledge,
> MoinMoin powered by Python,is nature and good choice!
>
>
>
>
>
> >> Massimo
>
> > Hi Massimo,
>
> > I think should not be a problem.  I am declaring the site as
> > unofficial until you get comfortable with it. You could probably wait
> > a bit longer and see how it evolves.
>
> > My thoughts:
>
> > * web2py is optimized for apps , Drupal is optimized for CMS. We could
> > implement a CMS app with w2py but I think that will be so against DRY.
>
> > * Both are Open Source software
>
> > * We will be wasting our time if we try to duplicate Drupal (or
> > Joomla) functionality with web2py. CMS  is a problem that has been
> > solved many times (esp. in the PHP / Java world)
>
> > * Drupal is absolutely wonderful ( at the cost of being a bit complex
> > to understand) has tons of themes, addon modules and a huge community
> > etc.
>
> > * I have not seen a Markdown/RST based wiki / CMS that is very easy to
> > use AND works well/looks good .  Drupal uses HTML for content and with
> > CKeditor JS GUI editor, it is as easy as editing a MSWord (or
> > OpenOffice) document
>
> > * Many projects do host their docs "elsewhere" eg: Earlier, I had
> > actively used Gridsphere (http://www.gridsphere.org) - a Java Portlet
> > Server which used to host their docs/bugs with Atlassian Confluence /
> > Jira.
>
> > My opinion is that right now, we need to get something that is very
> > easy to enable everyone, irrespective of their skill level to be able
> > to contribute. And have a functional, visually appealing docs site.
>
> > We can always migrate to a better app on python or web2py when it is
> > ready for prime time.
>
> > Do you have  any specific issues with Drupal. (eg: security etc)
>
> > Regards
> > anand
>
> ...
> >> > On Feb 5, 7:00 am, mdipierro  wrote:
>
> >> > >http://webtopy.org/community/tips-examples
>
> --http://zoomquiet.org人生苦短? Pythonic!
> Free as in Freedom! 哲思社区:http://zeuux.com

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: Customizing Auth

2010-02-08 Thread Alexandre Andrade
ok. thanks

2010/2/8 mdipierro 

> Please use the example in here:
> http://www.web2py.com/examples/default/tools#authentication
>
> you probably have a too short password length, should be 512.
>
> On Feb 8, 8:16 am, Alexandre Andrade  wrote:
> > I customize auth using the reference of page 245 (229 ) of the book, but
> > after the login's of existents users  don't work.
> >
> > I tried with a new app, created a user, and works. Its not possible alter
> it
> > after.
> >
> > How make it work with a existent auth_user table?
> >
> > --
> > Atenciosamente
> >
> > --
> > =
> > Alexandre Andrade
> > Hipercenter.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To post to this group, send email to web...@googlegroups.com.
> To unsubscribe from this group, send email to
> web2py+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/web2py?hl=en.
>
>


-- 
Atenciosamente

-- 
=
Alexandre Andrade
Hipercenter.com

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: validators, min and max

2010-02-08 Thread mdipierro
yes. better

On Feb 8, 11:04 am, Jonathan Lundell  wrote:
> On Feb 8, 2010, at 8:34 AM, mdipierro wrote:
>
> > send me a patch!
>
> I'd suggest otherwise--in particular interpreting None as "no limit" in the 
> min or max direction.
>
> Interpreting (4) as (0,4) saves the developer two characters of typing. But 
> interpreting (4, None) or (None, 4) as no limit extends the functionality of 
> the validator.
>
>
>
> > On Feb 8, 10:24 am, "KONTRA, Gergely"  wrote:
>  And does it makes sense to make all min and max values optional, so
>  you can have: enter an integer, which is larger than 2 (witout upper
>  limit)?
> >>> Having had the need recently, I would like to see:
> >>> IS_INT_IN_RANGE(1) # any integer>0 (up to sys.maxint)
> >>> IS_INT_IN_RANGE(max=10) # any integer less than 10
> >>> and similarly for IS_FLOAT_IN_RANGE().
>
> >> Following python's range() conventions, IS_INT_IN_RANGE(4) should
> >> accept ints between 0 and 3.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: for your info

2010-02-08 Thread pistacchio
my two cents:
decide where to host this new documentation (http://wiki.web2py.com/
may be the most obvious bet). set up a page of links that reproduces
the tree structure of the pdf summary. then one by one, anyone can
copy / past text from the pdf to the new pages and format it.

this is the most straight forward way to get it done, i think, and it
leaves plenty of space for people to correct / add / update infos on
all the topics.

On Feb 8, 6:01 pm, mdipierro  wrote:
> Lookin into that but I am not sure they work as good as they should.
> Moreover they are not reversible so changes in the wiki would not
> easily propagate into the latex book (which I consider the master
> documentation).
>
> On Feb 8, 10:43 am, DenesL  wrote:
>
>
>
> > On Feb 8, 11:33 am, mdipierro  wrote:> I am 
> > considering posting most of the book on line in HTML. This may be
> > +1000!
> > > possible with a disclaimer about "do not reproduce in print". The main
> > > issue is that the book is in latex and not easy to convert.
>
> > No latex to HTML conversion tools?.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: for your info

2010-02-08 Thread Jonathan Lundell
On Feb 8, 2010, at 8:43 AM, DenesL wrote:

> On Feb 8, 11:33 am, mdipierro  wrote:
>> I am considering posting most of the book on line in HTML. This may be
> +1000!
>> possible with a disclaimer about "do not reproduce in print". The main
>> issue is that the book is in latex and not easy to convert.
> No latex to HTML conversion tools?.

I investigated that a couple of years ago for an online journal. There are 
tools, but (at least at the time) they were not very good, and not maintained. 
So we gave up and stuck with pdf.

How about a restricted-use PDF?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: validators, min and max

2010-02-08 Thread Jonathan Lundell
On Feb 8, 2010, at 8:34 AM, mdipierro wrote:

> send me a patch!

I'd suggest otherwise--in particular interpreting None as "no limit" in the min 
or max direction.

Interpreting (4) as (0,4) saves the developer two characters of typing. But 
interpreting (4, None) or (None, 4) as no limit extends the functionality of 
the validator.

> 
> On Feb 8, 10:24 am, "KONTRA, Gergely"  wrote:
 And does it makes sense to make all min and max values optional, so
 you can have: enter an integer, which is larger than 2 (witout upper
 limit)?
>>> Having had the need recently, I would like to see:
>>> IS_INT_IN_RANGE(1) # any integer>0 (up to sys.maxint)
>>> IS_INT_IN_RANGE(max=10) # any integer less than 10
>>> and similarly for IS_FLOAT_IN_RANGE().
>> 
>> Following python's range() conventions, IS_INT_IN_RANGE(4) should
>> accept ints between 0 and 3.
> 


-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: for your info

2010-02-08 Thread mdipierro
Lookin into that but I am not sure they work as good as they should.
Moreover they are not reversible so changes in the wiki would not
easily propagate into the latex book (which I consider the master
documentation).

On Feb 8, 10:43 am, DenesL  wrote:
> On Feb 8, 11:33 am, mdipierro  wrote:> I am 
> considering posting most of the book on line in HTML. This may be
> +1000!
> > possible with a disclaimer about "do not reproduce in print". The main
> > issue is that the book is in latex and not easy to convert.
>
> No latex to HTML conversion tools?.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: validators, min and max

2010-02-08 Thread mdipierro
I am for it.

On Feb 8, 10:41 am, Jonathan Lundell  wrote:
> On Feb 8, 2010, at 8:13 AM, DenesL wrote:
>
> > Having had the need recently, I would like to see:
> > IS_INT_IN_RANGE(1) # any integer>0 (up to sys.maxint)
> > IS_INT_IN_RANGE(max=10) # any integer less than 10
> > and similarly for IS_FLOAT_IN_RANGE().
>
> Suggestion: interpret None as no limit. So your two examples would be:
>
>         IS_INT_IN_RANGE(1, None)
>         IS_INT_IN_RANGE(None, 10)
>
> The error message would have to adjust, of course.
>
> Similarly for float.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: for your info

2010-02-08 Thread DenesL

On Feb 8, 11:33 am, mdipierro  wrote:
> I am considering posting most of the book on line in HTML. This may be
+1000!
> possible with a disclaimer about "do not reproduce in print". The main
> issue is that the book is in latex and not easy to convert.
No latex to HTML conversion tools?.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: validators, min and max

2010-02-08 Thread Jonathan Lundell
On Feb 8, 2010, at 8:13 AM, DenesL wrote:

> Having had the need recently, I would like to see:
> IS_INT_IN_RANGE(1) # any integer>0 (up to sys.maxint)
> IS_INT_IN_RANGE(max=10) # any integer less than 10
> and similarly for IS_FLOAT_IN_RANGE().
> 

Suggestion: interpret None as no limit. So your two examples would be:

IS_INT_IN_RANGE(1, None)
IS_INT_IN_RANGE(None, 10)

The error message would have to adjust, of course.

Similarly for float.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: validators, min and max

2010-02-08 Thread pihentagy
On Feb 8, 5:13 pm, DenesL  wrote:
> On Feb 8, 4:15 am, "KONTRA, Gergely"  wrote:> Hi!
> > IS_FLOAT_IN_RANGE(0,10) will accept 10, and will accept 0.
>
> Since there is no equivalent in Python this one works as one would
> normally expect.

Errr, so, INTs works as python ranges, and contrary, floats as
"normally expect"?

And what if I normally expect all numeric range validators work the
same?
Regardless of it is decimal or integer?

So what about just ONE range validator for all kind of numbers? (a
one, which is just number validator, so you could have another
validator, which validates / coerces the type, if explicitly needed?)

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: validators, min and max

2010-02-08 Thread mdipierro
send me a patch!

On Feb 8, 10:24 am, "KONTRA, Gergely"  wrote:
> >> And does it makes sense to make all min and max values optional, so
> >> you can have: enter an integer, which is larger than 2 (witout upper
> >> limit)?
> > Having had the need recently, I would like to see:
> > IS_INT_IN_RANGE(1) # any integer>0 (up to sys.maxint)
> > IS_INT_IN_RANGE(max=10) # any integer less than 10
> > and similarly for IS_FLOAT_IN_RANGE().
>
> Following python's range() conventions, IS_INT_IN_RANGE(4) should
> accept ints between 0 and 3.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: for your info

2010-02-08 Thread mdipierro
I am considering posting most of the book on line in HTML. This may be
possible with a disclaimer about "do not reproduce in print". The main
issue is that the book is in latex and not easy to convert.

On Feb 8, 10:18 am, Jonathan Lundell  wrote:
> On Feb 8, 2010, at 2:46 AM, Beerc wrote:
>
> > I ***LOVE*** the tight integration of web2py components.
>
> > I ***LOVE*** the compactness of web2py.
>
> These are by far the two biggest reasons I started using web2py, mainly over 
> Django and its kin.
>
> Now that I have a little more experience, I'd add this mailing list to my 
> list of reasons.
>
> My biggest complaint is what has been referred to as "magic" behavior, and in 
> particular the relative opaqueness of some of that magic. Documentation could 
> help there by making more clear what's going on inside; there's a little too 
> much "do this and it just works" right now. But that's true of (say) RoR, 
> too, so web2py isn't alone.
>
> I like the idea of a wiki that parallels the structure of the book. I'd also 
> like to see a page each for all (or at least the important) classes, linked 
> to their mentions in the mainline docs, where among other things magic 
> behavior is explained.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: wrong decisions and backward compatibility

2010-02-08 Thread mdipierro
Mind that all validators are filters in one way or another. The
representation of the input data is not alwasy tha same as the
representation of the data that goes in db. date is an example.

On Feb 8, 10:10 am, Jonathan Lundell  wrote:
> On Feb 8, 2010, at 12:59 AM, KONTRA, Gergely wrote:
>
> > Hi!
>
> > Yes, I must admit it, that a validator like IS_UPPER(), which checks
> > only whether the input is uppercase is less useful, than an another,
> > which actually converts to uppercase.
>
> > OTOH if you haven't used the function, you expect the former.
>
> It might be appropriate to provide aliases for filter-only validators along 
> the lines of TO_UPPER(), change the docs, and deprecate IS_UPPER() on the 
> grounds of ambiguity. But I don't see a motivation for changing the semantics 
> of IS_UPPER(), since there's no real benefit to be had, and it would break a 
> lot of existing code.
>
> Notice that some validators do both. That is, they validate their input, and 
> also transform it. This is one of those cases where it's advisable for a 
> developer to read the docs.
>
>
>
> > +-[ Gergely Kontra  ]--+
> > |                                                           |
> > | Mobile:(+36 20)356 9656                                   |
> > |                                                           |
> > +- "Olyan lángész vagyok, hogy poroltóval kellene járnom!" -+
>
> > On Mon, Feb 8, 2010 at 04:17, Jonathan Lundell  wrote:
> >> On Feb 7, 2010, at 6:32 PM, mdipierro wrote:
>
> >>> We could add an option like "strict=False" that if true does what you
> >>> ask.
>
> >> What's the use case? I'm having trouble seeing what such an option would 
> >> do for you.
>
> >> Sure, IS_UPPER() should probably have been named TO_UPPER(). But at this 
> >> point
>
> >>> On Feb 7, 8:22 pm, Iceberg  wrote:
>  But in this case (provided that we really change IS_UPPER() as
>  Pihentagy suggested), you can rely on the human, because they can not
>  input lower case. Your app still need not to edit a single line. :)
>
>  Well, sounds like I support changing IS_UPPER() 's behavior. But
>  actually I am neutral to this proposal.
>
>  On Feb7, 3:24pm, Thadeus Burgess  wrote:
>
> > It will break backwards compatibility.
>
> > I have apps that rely on the functionality of IS_UPPER applying
> > .upper() to the incoming variables. Anything that requires me to edit
> > a single line of code on my app to just upgrade web2py breaks
> > backwards compatibility, unless it was a bug to begin with.
>
> > -Thadeus
>
> > On Sat, Feb 6, 2010 at 11:33 PM, Iceberg  wrote:
> >> @Pihentagy:
>
> >> Besides, the current IS_UPPER() (and IS_LOWER()) is not that bad,
> >> IMHO. What is the real difference between alarm end user to change his
> >> input into upper case, or just silently change his input into upper
> >> case?
>
> >> To say the least, we can really change IS_UPPER() to just warning, and
> >> perhaps another UPPERCASE() to uppercase. As long as the old apps do
> >> not really break, but just sightly change its behavior in acceptable
> >> range, I consider web2py is still backward compatible.
>
> >> About web3py, Renato says all. :)
>
> >> On Feb6, 8:24pm, Renato-ES-Brazil  wrote:
> >>> Web3py is an alternative, check this:
>
>  When GAE moves to 3.0 and the database drivers for all supported
>  backends become available we will release something like web3py (TM).
>  Since we are going to break language backward compatibility that will
>  also be a good time to include other non-backward compatible changes.
>  2010-2011 are reasonable dates but just a guess.
>
> >>> URL:http://www.mail-archive.com/web2py@googlegroups.com/msg09344.html
>
> >>> On 6 fev, 08:12, pihentagy  wrote:
>
>  Hi!
>
>  Looking into the code of IS_UPPER I realized, that this function does
>  not do, what I expect to do.
>  I thought it only allows strings, which does not have lowercase
>  letters, but it actually converts the string to uppercase.
>
>  Since web2py promises backwards compatibility, and here IMHO this
>  method is mis-named, how would you solve the situation?
>
>  BTW when I come across the fact, that web2py will be always backwards
>  compatible, a loud alarm began to horn in my head: then how would you
>  maintain the code in 2, 3, 10 years? It will blow up.
>
>  Or, when it becomes hard to maintain, you began a new project named
>  web3py? :)
>
>  Gergo
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


[web2py] Re: validators, min and max

2010-02-08 Thread DenesL
LOL, you got me there...
Can we make an exception?
...
just kidding.

On Feb 8, 11:24 am, "KONTRA, Gergely"  wrote:
> >> And does it makes sense to make all min and max values optional, so
> >> you can have: enter an integer, which is larger than 2 (witout upper
> >> limit)?
> > Having had the need recently, I would like to see:
> > IS_INT_IN_RANGE(1) # any integer>0 (up to sys.maxint)
> > IS_INT_IN_RANGE(max=10) # any integer less than 10
> > and similarly for IS_FLOAT_IN_RANGE().
>
> Following python's range() conventions, IS_INT_IN_RANGE(4) should
> accept ints between 0 and 3.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: calling form through ajax fails even using formname=None

2010-02-08 Thread mdipierro
It sets the action attribute of the  object.

On Feb 8, 10:09 am, "hamdy.a.farag"  wrote:
> ًWell, Thanks alot it worked just fine :)
>
> I changeed request.args(0) to request.vars.gov_id which I'm using
>
> I've a question though, what does
> form['_action']=URL(r=request,f='governorate',vars=request.vars)  do
> exactly ?
>
> Thank you

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: improvement in web2py compatibility with legacy postgresql datbases column sequence name

2010-02-08 Thread mdipierro
You know I would take a patch

On Feb 8, 9:49 am, DenesL  wrote:
> On Feb 8, 5:02 am, kralin  wrote:> well, a 
> primary key is always a good thing in a table, but
> > not everybody seems to use it, particularly in many to many tables.
>
> > while this is not in the web2py specifications( by not requiring a
> > unique autoincremental  id),
> > being able to read and write form this tables, can be very very useful
> > for legacy db support.
>
> I agree completely. Previously I was just pointing out that the
> current legacy support was designed to work with keyed tables only.
> Keyless table support would be a welcome addition.> I know that a something 
> like crud cannot work in this tables since you
> > are not guaranteed to
> > select a single entry, but making it work at a lower level can be
> > useful...
>
> It might be the case, I just have not thought about it.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: AutocompleteWidget: experimental, magic, RFC

2010-02-08 Thread Jason Brower
I will try it when it's in a release, I want to test the ÖÄÅ features as
I can't get it to work in my setup.
Best Regards,
Jason
On Sun, 2010-02-07 at 14:26 -0800, mdipierro wrote: 
> 
> On Feb 7, 3:12 pm, "mr.freeze"  wrote:
> > Nice! I like this but I think it needs a few more tweaks. Can you
> > modify it to allow the arrow keys to select an item? Also, when you
> > clear the input after typing something, all of the options show.
> 
> Yes it can be done. It is on my to do list.
> 
> >
> > I personally think that javascript should be used more in the
> > framework (with proper attention paid so that things degrade
> > gracefully when it's off).
> 
> Something like auto-completion is just going to break if jQuery is not
> present. I am not sure if it is possible to make degrade gracefully.
> 
> 
> >
> > On Feb 7, 2:11 pm, mdipierro  wrote:
> >
> > > How about we change IS_IN_DB so that, if the number of referenced
> > > records exceeds a maximum the auto complete widget is on by default?
> >
> > > Massimo
> >
> > > On Feb 7, 1:02 am, mdipierro  wrote:
> >
> > > > I do not know that. I am still playing with it...
> >
> > > > On Feb 6, 11:40 pm, Jason Brower  wrote:
> >
> > > > > I have my current autocomplete but it doesn't do öäå in a search.  
> > > > > Does
> > > > > this handle that?
> > > > > Best Regards,
> > > > > Jason
> >
> > > > > On Sat, 2010-02-06 at 12:30 -0800, mdipierro wrote:
> > > > > > People say there is some magic in web2py.
> > > > > > Here is some real magic now in trunk that I am sure you have never
> > > > > > seen.
> >
> > > > > > Caveats:
> > > > > > 0) requires latest trunk (bzr 1603, hg 175:e42b559254f6)
> > > > > > 1) this is an experiment, not sure it is a good idea
> > > > > > 2) this is the first function in web2py that REQUIRES jQuery
> > > > > > 3) works but I am not yet convinced it should stay there
> > > > > > 4) even if it stays, I am sure the API should stay
> >
> > > > > > Example:
> >
> > > > > > ### assume this model
> > > > > > db.define_table('target',Field('name'))
> > > > > > if not db(db.target.id>0).count():
> > > > > > db.target.insert(name="Klingon")
> > > > > > db.target.insert(name="Romulans")
> > > > > > db.target.insert(name="Borg")
> > > > > > db.target.insert(name="Borg2")
> > > > > > db.define_table('photon_torpedo',Field('target',db.target))
> >
> > > > > > ### assume this action in controller default.py
> > > > > > def launch():
> > > > > > db.photon_torpedo.target.represent=lambda target: target.name
> > > > > > return dict(new_torpedo=crud.create(db.photon_torpedo),
> > > > > > 
> > > > > > launched_torpedos=db().select(db.photon_torpedo.ALL))
> >
> > > > > > So far nothing new.
> >
> > > > > > Now append to the model or insert at top of controller the 
> > > > > > following:
> >
> > > > > > from gluon.sqlhtml import AutocompleteWidget
> > > > > > db.photon_torpedo.target.widget=AutocompleteWidget(request,db.target.name,db.target.id)
> >
> > > > > > No need to define any callback action (there is no callback action!)
> > > > > > No plugin required (perhaps some optional css to style).
> > > > > > No js coding required.
> > > > > > Applies to existing apps, including those that use custom forms.
> >
> > > > > > Let's see who can figure out how it works!
> >
> > > > > > Massimo
> >
> >
> 


-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: AutocompleteWidget: experimental, magic, RFC

2010-02-08 Thread mdipierro
Can you give it one more try?

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: validators, min and max

2010-02-08 Thread KONTRA, Gergely
>> And does it makes sense to make all min and max values optional, so
>> you can have: enter an integer, which is larger than 2 (witout upper
>> limit)?
> Having had the need recently, I would like to see:
> IS_INT_IN_RANGE(1) # any integer>0 (up to sys.maxint)
> IS_INT_IN_RANGE(max=10) # any integer less than 10
> and similarly for IS_FLOAT_IN_RANGE().

Following python's range() conventions, IS_INT_IN_RANGE(4) should
accept ints between 0 and 3.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



Re: [web2py] Re: for your info

2010-02-08 Thread Jonathan Lundell
On Feb 8, 2010, at 2:46 AM, Beerc wrote:

> I ***LOVE*** the tight integration of web2py components.
> 
> I ***LOVE*** the compactness of web2py.

These are by far the two biggest reasons I started using web2py, mainly over 
Django and its kin.

Now that I have a little more experience, I'd add this mailing list to my list 
of reasons.

My biggest complaint is what has been referred to as "magic" behavior, and in 
particular the relative opaqueness of some of that magic. Documentation could 
help there by making more clear what's going on inside; there's a little too 
much "do this and it just works" right now. But that's true of (say) RoR, too, 
so web2py isn't alone.

I like the idea of a wiki that parallels the structure of the book. I'd also 
like to see a page each for all (or at least the important) classes, linked to 
their mentions in the mainline docs, where among other things magic behavior is 
explained.

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: validators, min and max

2010-02-08 Thread DenesL
On Feb 8, 4:15 am, "KONTRA, Gergely"  wrote:
> Hi!
>
> I found another inconsistency in validators:
>
> IS_INT_IN_RANGE:
>
> IS_INT_IN_RANGE(0,10) does not accepts 10.
That is by design so that it works as the Python range built-in
function.
range(0,10) = [0,1,2,3,4,5,6,7,8,9]
>
> Yes, this is in the docs, but using using args minimum and maximum,
> how would one know, that it includes the start/end point?
> Similarly, IS_LENGTH, IS_DECIMAL_IN_RANGE and so on...?
>
> OTOH:
> IS_FLOAT_IN_RANGE(0,10) will accept 10, and will accept 0.
Since there is no equivalent in Python this one works as one would
normally expect.
> BTW equality comparision between floating points can be tricky, if the
> endpoints are not represented exactly.
> One, who worked with floating points may know this,but...
>
> So: being backward compatible, what about new possibilities:
> minInclusive, minExclusive, maxInclusive and maxExclusive, like in the
> xsd definition?
>
> And does it makes sense to make all min and max values optional, so
> you can have: enter an integer, which is larger than 2 (witout upper
> limit)?
Having had the need recently, I would like to see:
IS_INT_IN_RANGE(1) # any integer>0 (up to sys.maxint)
IS_INT_IN_RANGE(max=10) # any integer less than 10
and similarly for IS_FLOAT_IN_RANGE().
>
> +-[ Gergely Kontra  ]--+
> |   |
> | Mobile:(+36 20)356 9656   |
> |   |
> +- "Olyan lángész vagyok, hogy poroltóval kellene járnom!" -+

-- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



  1   2   >