Re: [web2py] cron ignores PYTHONPATH

2010-11-03 Thread Jonathan Lundell
On Nov 3, 2010, at 8:45 PM, Leo wrote:
> 
> I am running web2py 1.88.2.
> 
> I have some modules I import that are not under the application's
> directory. These are moduled developed for other projects.
> 
> Accessing the modules works fine within the app itself, since they are
> on the PYTHONPATH. However, running the following cron command:
> 
> @reboot username **default/function
> 
> I get an ImportError:
> 
> ImportError: No module named mymodule.
> 
> Is this by design? Is there a workaround?

Did this ever work?

Are you using hardcron?

Conjecture: PYTHONPATH isn't in the environment of the shell that cron launches.

Possible workaround: create a directory site-packages in the web2py root 
(sibling of gluon) and create a link from site-packages/mymodule to the actual 
location of mymodule.

Re: [web2py] Re: new admin layout

2010-11-03 Thread Jonathan Lundell
On Nov 3, 2010, at 8:21 PM, mdipierro wrote:
> 
> Here is the latest work by Branko (with minor edits by me):

This scales up (cmd +) rather badly under Safari, the buttons especially. 

> 
>   http://web2py.com/demo_admin
> 
> (also in trunk)
> 
> This is the older one
> 
>   http://web2py.com/demo_admin_halloween
> 
> My edits are:
> 1) I have made all edit buttons orange
> 2) links files and no longer buttons (consistently with original
> version)
> 3) changed order from [file,edit,delete] to [edit,delete,file] since
> alignment is cleaner
> 4) moved all green links to right
> 
> TODO:
> - I would prefer no shadow under icons.
> - Text like "No models" under design does not appear aligned properly.
> 
> I really like this new admin.




[web2py] cron ignores PYTHONPATH

2010-11-03 Thread Leo
Hi,

I am running web2py 1.88.2.

I have some modules I import that are not under the application's
directory. These are moduled developed for other projects.

Accessing the modules works fine within the app itself, since they are
on the PYTHONPATH. However, running the following cron command:

@reboot username **default/function

I get an ImportError:

ImportError: No module named mymodule.

Is this by design? Is there a workaround?

Thanks,
Leo.


[web2py] Re: new admin layout

2010-11-03 Thread mdipierro
This is now better in trunk. Please check it there.

On Nov 3, 10:53 pm, Bruno Rocha  wrote:
> in this 
> pagehttp://web2py.com/demo_admin/default/edit/demo_app1/controllers/defau...
>
> too much space used above the edit area, intead having 'save' and 'versions'
> below, this could be aside, or within a toggle/accordion space. space
> matters when editing files in admin.
>
> 2010/11/4 mdipierro 
>
>
>
> > Here is the latest work by Branko (with minor edits by me):
>
> >  http://web2py.com/demo_admin
>
> > (also in trunk)
>
> > This is the older one
>
> >  http://web2py.com/demo_admin_halloween
>
> > My edits are:
> > 1) I have made all edit buttons orange
> > 2) links files and no longer buttons (consistently with original
> > version)
> > 3) changed order from [file,edit,delete] to [edit,delete,file] since
> > alignment is cleaner
> > 4) moved all green links to right
>
> > TODO:
> > - I would prefer no shadow under icons.
> > - Text like "No models" under design does not appear aligned properly.
>
> > I really like this new admin.
>
> --
>
> http://rochacbruno.com.br


Re: [web2py] Re: new admin layout

2010-11-03 Thread Bruno Rocha
in this page
http://web2py.com/demo_admin/default/edit/demo_app1/controllers/default.py

too much space used above the edit area, intead having 'save' and 'versions'
below, this could be aside, or within a toggle/accordion space. space
matters when editing files in admin.

2010/11/4 mdipierro 

> Here is the latest work by Branko (with minor edits by me):
>
>   http://web2py.com/demo_admin
>
> (also in trunk)
>
> This is the older one
>
>   http://web2py.com/demo_admin_halloween
>
> My edits are:
> 1) I have made all edit buttons orange
> 2) links files and no longer buttons (consistently with original
> version)
> 3) changed order from [file,edit,delete] to [edit,delete,file] since
> alignment is cleaner
> 4) moved all green links to right
>
> TODO:
> - I would prefer no shadow under icons.
> - Text like "No models" under design does not appear aligned properly.
>
> I really like this new admin.
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: new admin layout

2010-11-03 Thread Bruno Rocha
The Edit button is pointing to /peek

2010/11/4 Bruno Rocha 

> I think the accordion top bars are too much rounded, better to keep the
> same rounded degree as buttons have.
>
>
>
> 2010/11/4 mdipierro 
>
> Here is the latest work by Branko (with minor edits by me):
>>
>>   http://web2py.com/demo_admin
>>
>> (also in trunk)
>>
>> This is the older one
>>
>>   http://web2py.com/demo_admin_halloween
>>
>> My edits are:
>> 1) I have made all edit buttons orange
>> 2) links files and no longer buttons (consistently with original
>> version)
>> 3) changed order from [file,edit,delete] to [edit,delete,file] since
>> alignment is cleaner
>> 4) moved all green links to right
>>
>> TODO:
>> - I would prefer no shadow under icons.
>> - Text like "No models" under design does not appear aligned properly.
>>
>> I really like this new admin.
>>
>
>
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: new admin layout

2010-11-03 Thread Bruno Rocha
I think the accordion top bars are too much rounded, better to keep the same
rounded degree as buttons have.



2010/11/4 mdipierro 

> Here is the latest work by Branko (with minor edits by me):
>
>   http://web2py.com/demo_admin
>
> (also in trunk)
>
> This is the older one
>
>   http://web2py.com/demo_admin_halloween
>
> My edits are:
> 1) I have made all edit buttons orange
> 2) links files and no longer buttons (consistently with original
> version)
> 3) changed order from [file,edit,delete] to [edit,delete,file] since
> alignment is cleaner
> 4) moved all green links to right
>
> TODO:
> - I would prefer no shadow under icons.
> - Text like "No models" under design does not appear aligned properly.
>
> I really like this new admin.
>



-- 

http://rochacbruno.com.br


[web2py] Re: new admin layout

2010-11-03 Thread mdipierro
Here is the latest work by Branko (with minor edits by me):

   http://web2py.com/demo_admin

(also in trunk)

This is the older one

   http://web2py.com/demo_admin_halloween

My edits are:
1) I have made all edit buttons orange
2) links files and no longer buttons (consistently with original
version)
3) changed order from [file,edit,delete] to [edit,delete,file] since
alignment is cleaner
4) moved all green links to right

TODO:
- I would prefer no shadow under icons.
- Text like "No models" under design does not appear aligned properly.

I really like this new admin.


[web2py] Re: Custom Authentication Template

2010-11-03 Thread mdipierro
errata

views/default/user.html

On Nov 3, 6:51 pm, Andrew Evans  wrote:
> How can I implement my own html template for the authentication/login to use
> throughout my site. I thought about redirecting it but that doesn't make
> sense... any ideas


[web2py] Re: Custom Authentication Template

2010-11-03 Thread mdipierro
I think you just want to edit the views/default/user.py

On Nov 3, 6:51 pm, Andrew Evans  wrote:
> How can I implement my own html template for the authentication/login to use
> throughout my site. I thought about redirecting it but that doesn't make
> sense... any ideas


[web2py] Re: new web2py appliance: File Manager

2010-11-03 Thread mdipierro
It should be easy to turn it into a plugin. Any takers?

On Nov 3, 6:20 pm, yamandu  wrote:
> Is there a way to integrate into my app?
>
> On Nov 3, 8:39 pm, mdipierro  wrote:
>
> > I just posted it. User Jeevan did it.
>
> > On Nov 3, 4:24 pm, Christopher Steel  wrote:
>
> > > Wow, this seems to work really well!
>
> > > Thanks!!! Great work
>
> > > On Nov 2, 6:09 pm, mdipierro  wrote:
>
> > > > This is CoreFive's Filemanager integrated with web2py. Also included
> > > > ckeditor to edit text and html files.
>
> > > > Developed by Jeevan
>
> > > > License: BSD
>
> > > >http://web2py.com/appliances/default/show/70
>
>


[web2py] GAE GQL count patch

2010-11-03 Thread howesc
Massimo and others,

Google claims that count() does not have an enforced limit, though
they have mis-documented the feature.  see
http://code.google.com/p/googleappengine/issues/detail?id=4001 if you
are curious.  in order to get count to be truly limitless, you need to
pass limit=None to count.  Now, i like my count to really be my count
so i would like to change line 772 of gql.py from:
return items.count()
to:
return items.count(limit=None)

I know that when my count is greater than the default limit of 1000
that google says it might be slow, but i think an accurate count is
more correct than a fast one.

thoughts?  if you agree do you mind updating gql.py?

thanks,

christian


[web2py] Custom Authentication Template

2010-11-03 Thread Andrew Evans
How can I implement my own html template for the authentication/login to use
throughout my site. I thought about redirecting it but that doesn't make
sense... any ideas


[web2py] Re: new web2py appliance: File Manager

2010-11-03 Thread yamandu
Is there a way to integrate into my app?

On Nov 3, 8:39 pm, mdipierro  wrote:
> I just posted it. User Jeevan did it.
>
> On Nov 3, 4:24 pm, Christopher Steel  wrote:
>
> > Wow, this seems to work really well!
>
> > Thanks!!! Great work
>
> > On Nov 2, 6:09 pm, mdipierro  wrote:
>
> > > This is CoreFive's Filemanager integrated with web2py. Also included
> > > ckeditor to edit text and html files.
>
> > > Developed by Jeevan
>
> > > License: BSD
>
> > >http://web2py.com/appliances/default/show/70
>
>


[web2py] Re: MENU improvements

2010-11-03 Thread mdipierro
Ok, in trunk, this should work:

response.menu = [
(T('Home'), False,
A('hello',_href=URL(request.application,'default','index')))
]

Please let me know since I did not check it.

On Nov 3, 5:52 pm, Martín Mulone  wrote:
> Or pass an A() instead of a url and you have all the elements.
>
> 2010/11/3 mdipierro 
>
> > I guess we can modify MENU so that is we pass a fifth argument, it
> > will be used for _onclick
>
> > On Nov 3, 4:43 pm, "Martin.Mulone"  wrote:
> > > I want to pass to classical menu
>
> > > response.menu = [
> > >     (T('Home'), False, URL(request.application,'default','index'),'',
> > > [])
> > >     ]
>
> > > something like _onclick="" to make an ajax call. I implement myself my
> > > own menu class, but broke the compatibility. There are any way to do
> > > this?, because is very usefull to have this.
>
> --
> My blog:http://martin.tecnodoc.com.ar
> My portfolio *spanish*:http://www.tecnodoc.com.ar
> Checkout my last proyect instant-press:http://www.instant2press.com


Re: [web2py] Re: MENU improvements

2010-11-03 Thread Martín Mulone
Or pass an A() instead of a url and you have all the elements.

2010/11/3 mdipierro 

> I guess we can modify MENU so that is we pass a fifth argument, it
> will be used for _onclick
>
> On Nov 3, 4:43 pm, "Martin.Mulone"  wrote:
> > I want to pass to classical menu
> >
> > response.menu = [
> > (T('Home'), False, URL(request.application,'default','index'),'',
> > [])
> > ]
> >
> > something like _onclick="" to make an ajax call. I implement myself my
> > own menu class, but broke the compatibility. There are any way to do
> > this?, because is very usefull to have this.
>



-- 
My blog: http://martin.tecnodoc.com.ar
My portfolio *spanish*: http://www.tecnodoc.com.ar
Checkout my last proyect instant-press: http://www.instant2press.com


Re: [web2py] Re: web2py as a cross-platform mobile application platform

2010-11-03 Thread Martín Mulone
Yes, the new welcome is based in htmlboilerplate and has some things for
mobile but you have to test and make proper changes to
static/css/handheld.css and not all mobiles support media="handheld". Other
thing is the new jquery has improvements for mobile. Also there are a new
project in alpha http://jquerymobile.com.

2010/11/3 mdipierro 

> There is something in the new welcome in trunk. Martin did it. I am
> not sure what it does thou.
>
> On Nov 3, 4:16 pm, Christopher Steel  wrote:
> > Anyone know if someone has setup Web2py with device detection and/or
> > created a mobile.css for web2py display on small displays?
> >
> > Chris
> >
> > On Nov 3, 2:21 am, Johann Spies  wrote:
> >
> > > It runs on the Nokia N900.
> >
> > > Regards
> > > Johann
> > > --
> > >  May grace and peace be yours in abundance through the full knowledge
> > > of God and of Jesus our Lord!  His divine power has given us
> > > everything we need for life and godliness through the full knowledge
> > > of the one who called us by his own glory and excellence.
> > > 2 Pet. 1:2b,3a
> >
> >
>



-- 
My blog: http://martin.tecnodoc.com.ar
My portfolio *spanish*: http://www.tecnodoc.com.ar
Checkout my last proyect instant-press: http://www.instant2press.com


[web2py] Re: Execution Environment

2010-11-03 Thread mdipierro
Hello Uolter,

the use of exec_environment is really discouraged and rarely needed.
moreover cas is now integrated with web2py in gluon/contrib/
login_methods.

Before we do this... what do you need to do?

Massimo


On Nov 3, 3:52 pm, Uolter  wrote:
> Can someone help me with the Execution Environment?
>
> Is the example on the book correct?
>
> I'm talking about:
>
> from gluon.shell import exec_environment
> cas = exec_environment('applications/cas/models/db.py')
> rows = cas.db().select(cas.db.user.ALL)
>
> I gave it a go, but cas application does not exist anymore.
>
> Cheers
>
> Uolter


[web2py] Execution Environment

2010-11-03 Thread Uolter
Can someone help me with the Execution Environment?

Is the example on the book correct?

I'm talking about:

from gluon.shell import exec_environment
cas = exec_environment('applications/cas/models/db.py')
rows = cas.db().select(cas.db.user.ALL)

I gave it a go, but cas application does not exist anymore.


Cheers

Uolter


[web2py] Re: MENU improvements

2010-11-03 Thread mdipierro
I guess we can modify MENU so that is we pass a fifth argument, it
will be used for _onclick

On Nov 3, 4:43 pm, "Martin.Mulone"  wrote:
> I want to pass to classical menu
>
> response.menu = [
>     (T('Home'), False, URL(request.application,'default','index'),'',
> [])
>     ]
>
> something like _onclick="" to make an ajax call. I implement myself my
> own menu class, but broke the compatibility. There are any way to do
> this?, because is very usefull to have this.


[web2py] Re: new web2py appliance: File Manager

2010-11-03 Thread mdipierro
I just posted it. User Jeevan did it.

On Nov 3, 4:24 pm, Christopher Steel  wrote:
> Wow, this seems to work really well!
>
> Thanks!!! Great work
>
> On Nov 2, 6:09 pm, mdipierro  wrote:
>
> > This is CoreFive's Filemanager integrated with web2py. Also included
> > ckeditor to edit text and html files.
>
> > Developed by Jeevan
>
> > License: BSD
>
> >http://web2py.com/appliances/default/show/70
>
>


[web2py] Re: web2py as a cross-platform mobile application platform

2010-11-03 Thread mdipierro
There is something in the new welcome in trunk. Martin did it. I am
not sure what it does thou.

On Nov 3, 4:16 pm, Christopher Steel  wrote:
> Anyone know if someone has setup Web2py with device detection and/or
> created a mobile.css for web2py display on small displays?
>
> Chris
>
> On Nov 3, 2:21 am, Johann Spies  wrote:
>
> > It runs on the Nokia N900.
>
> > Regards
> > Johann
> > --
> >  May grace and peace be yours in abundance through the full knowledge
> > of God and of Jesus our Lord!  His divine power has given us
> > everything we need for life and godliness through the full knowledge
> > of the one who called us by his own glory and excellence.
> >                                                     2 Pet. 1:2b,3a
>
>


[web2py] Re: Learning Management System survey

2010-11-03 Thread mdipierro
We need to assemble a team.

On Nov 3, 3:00 pm, jnowl  wrote:
> I keep an eye on python web frameworks.
>
> Here at Carleton a pilot has just begun:
>
> http://www2.carleton.ca/ccs/this-month-ccs/october-2010/learning-mana...
>
> Looking at the LMS's you mention (BB, D2L, Moodle). I don't work in
> the LMS area but would like to see python used more.
>
> To that end, I think the web development tools are just beginning to
> mature to where client-server tools were 10yrs ago, i.e. with ui
> builders & widget toolkits. And still lots of impedance mismatch - I'd
> rather work in python than javascript.
>
> But I'd like to help work on a python lms, time allowing!
> So one thing needed would be mechanism to export/import btwn systems.


[web2py] Re: Large file Upload Froze Web2py. version 1.83

2010-11-03 Thread mdipierro
I have no idea what this does but this line looks very suspicious to
me:

maxSize = self._options['uploadMaxSize'] * 1024 * 1024 * 1024

On Nov 3, 3:42 pm, Phyo Arkar  wrote:
> Maybe thats why.I was using elfinder , which i made web2py integration.
> The code is here:
>
>     def __upload(self):
>         """Upload files"""
>         try: # Windows needs stdio set for binary mode.
>             import msvcrt
>             msvcrt.setmode (0, os.O_BINARY) # stdin  = 0
>             msvcrt.setmode (1, os.O_BINARY) # stdout = 1
>         except ImportError:
>             pass
> ###DONE: Fix Upload's Response
>         if 'current' in self._request:
>             curDir = self.__findDir(self._request['current'], None)
>             if not curDir:
>                 self._response['error'] = 'Invalid parameters'
>                 return
>             if not self.__isAllowed(curDir, 'write'):
>                 self._response['error'] = 'Access denied'
>                 return
>             if not 'upload[]' in self._request:
>                 self._response['error'] = 'No file to upload'
>                 return
>
>             upFiles = self._request['upload[]']
>             # invalid format
>             # must be dict('filename1': 'filedescriptor1', 'filename2':
> 'filedescriptor2', ...)
>             if not isinstance(upFiles, dict):
>                 self._response['error'] = 'Invalid parameters'
>                 return
>
> #            self._response['select'] = []
>             total = 0
>             upSize = 0
>             maxSize = self._options['uploadMaxSize'] * 1024 * 1024 * 1024
>             for name, data in upFiles.iteritems():
>                 if name:
>                     total += 1
>                     name = os.path.basename(name)
>                     if not self.__checkName(name):
>                         self.__errorData(name, 'Invalid name')
>                     else:
>                         name = os.path.join(curDir, name)
>                         try:
>                             f = open(name, 'wb',
> self._options['uploadWriteChunk'])
>                             for chunk in self.__fbuffer(data):
>                                 f.write(chunk)
>                             f.close()
>                             upSize += os.lstat(name).st_size
>                             if self.__isUploadAllow(name):
>                                 os.chmod(name, self._options['fileMode'])
> #
> self._response['select'].append(self.__hash(name))
>                             else:
>                                 self.__errorData(name, 'Not allowed file
> type')
>                                 try:
>                                     os.unlink(name)
>                                 except:
>                                     pass
>                         except:
>                             self.__errorData(name, 'Unable to save uploaded
> file')
>                         if upSize > maxSize:
>                             try:
>                                 os.unlink(name)
>                                 self.__errorData(name, 'File exceeds the
> maximum allowed filesize')
>                             except:
>                                 pass
>                                 # TODO ?
>                                 self.__errorData(name, 'File was only
> partially uploaded')
>                             break
>
>             if self._errorData:
>                 if len(self._errorData) == total:
>                     self._response['error'] = 'Unable to upload files'
>                 else:
>                     self._response['error'] = 'Some files was not uploaded'
>
>             self.__content(curDir, False)
>             return
>
> As it has to be in module how can i use Web2py's upload function there? I
> will check web2py's upload code.
>
> Thanks a lot.
>
> Oh , also this can you list as appliance for web2py ? I made it a few months
> ago and you ask me to make it plugin but i do't know how to make it plugin
> so hmm but can run directly as appliance.
>
> http://code.google.com/p/*elfinder*-*web2py*/
>
> On Wed, Nov 3, 2010 at 4:30 AM, mdipierro  wrote:
> > web2py was tested extensively with large files (up to 2GB, the max
> > browsers can handle) on machines with low memory (256MB).
>
> > Can you post the code you use for uploading?
>
> > The only way I can see this problem is if you upload into a blob.
>
> > On Nov 2, 3:46 pm, Phyo Arkar  wrote:
> > > Hello all;
>
> > > If i upload a large file (800 MB) and  closed the browser tab while
> > > uploading , it freeze the whole web2py. Anyone have this problem?
>
> > > Tried on Local Web2py. Not without using any http server.
>
>


[web2py] Re: validators order

2010-11-03 Thread mdipierro
The oreder is important because validators are filters.

requires=[A,B,C]

input -> A -> B -> C -> database
database -> ~C -> ~B ->~A -> output

You get a dropdown if there is a single validator that has an options
attribute.


On Nov 3, 2:52 pm, andrej burja  wrote:
> hi
>
> why is order of validators important?
> i have
>
> db.tecaj.voditelj.requires=IS_NOT_EMPTY()
> db.tecaj.voditelj.requires=IS_IN_DB(db,'person.id','%(name)s')
>
> why does putting the IS_NOT_EMPTY() at the end doesn't produce
> dropdown list?
> do i need the IS_NOT_EMPTY() if i have IS_IN_DB validator?
>
> andrej


[web2py] Re: new welcome app in trunk but minor problem...

2010-11-03 Thread mdipierro
... for completeness.. there are tests in there but they are not tests
of the web2py app. they are JS tests for HTML5 compliance of the
browser. That is useful but does not belong to a scaffolding app in my
opinion.

On Nov 3, 5:23 pm, mdipierro  wrote:
> Yes but what we are talking about here are not tests. We are talking
> about a folder called test that provides examples of hos to customize
> the layout. These examples may confuse new users since they require
> extra modules, views and controllers.
>
> On Nov 3, 2:50 pm, Branko Vukelic  wrote:
>
> > I've randomly read this topic in between CSS and short cigarette
> > breaks, and noted this part:
>
> > "About the tests. They are not heavy in the bandwidth sense. They just
> > clutter the design page and new users get lost. There is aleady too
> > much stuff in the design page. I am even considering hiding
> > appadmin.py and appadmin.html." -- Massimo
>
> > Some simple test suites included in the default app is not a bad idea,
> > imho. It helps newbies acquire some testing skills and more
> > importantly, learn how tests are done in _real-life_ as opposed to
> > testing "hello world" applications.
>
> > In my 2 years as programming hobbyist, I've gotten the impression that
> > testing is for advanced users, and have never seen a complete beginner
> > tutorial include any testing. So, after 2 years, I still haven't done
> > serious testing myself.
>
> > And I see no reason why this should be the case. From the little
> > testing I've done so far, I don't see any reason why testing shouldn't
> > be introduced as early as possible, especially since it solves lots of
> > problems during development. So I think it would be great if test
> > suites are included in sample web2py app or two.
>
> > Speaking of clutter, would it be possible to hide the "test"
> > icon/button for files that do not really include any tests? That would
> > clear the clutter.
>
> > --
> > Branko Vukelić
>
> > bg.bra...@gmail.com
> > stu...@brankovukelic.com
>
> > Check out my blog:http://www.brankovukelic.com/
> > Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> > Registered Linux user #438078 (http://counter.li.org/)
> > I hang out on identi.ca:http://identi.ca/foxbunny
>
> > Gimp Brushmakers Guildhttp://bit.ly/gbg-group
>
>


[web2py] Re: new welcome app in trunk but minor problem...

2010-11-03 Thread mdipierro
Yes but what we are talking about here are not tests. We are talking
about a folder called test that provides examples of hos to customize
the layout. These examples may confuse new users since they require
extra modules, views and controllers.

On Nov 3, 2:50 pm, Branko Vukelic  wrote:
> I've randomly read this topic in between CSS and short cigarette
> breaks, and noted this part:
>
> "About the tests. They are not heavy in the bandwidth sense. They just
> clutter the design page and new users get lost. There is aleady too
> much stuff in the design page. I am even considering hiding
> appadmin.py and appadmin.html." -- Massimo
>
> Some simple test suites included in the default app is not a bad idea,
> imho. It helps newbies acquire some testing skills and more
> importantly, learn how tests are done in _real-life_ as opposed to
> testing "hello world" applications.
>
> In my 2 years as programming hobbyist, I've gotten the impression that
> testing is for advanced users, and have never seen a complete beginner
> tutorial include any testing. So, after 2 years, I still haven't done
> serious testing myself.
>
> And I see no reason why this should be the case. From the little
> testing I've done so far, I don't see any reason why testing shouldn't
> be introduced as early as possible, especially since it solves lots of
> problems during development. So I think it would be great if test
> suites are included in sample web2py app or two.
>
> Speaking of clutter, would it be possible to hide the "test"
> icon/button for files that do not really include any tests? That would
> clear the clutter.
>
> --
> Branko Vukelić
>
> bg.bra...@gmail.com
> stu...@brankovukelic.com
>
> Check out my blog:http://www.brankovukelic.com/
> Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> Registered Linux user #438078 (http://counter.li.org/)
> I hang out on identi.ca:http://identi.ca/foxbunny
>
> Gimp Brushmakers Guildhttp://bit.ly/gbg-group


[web2py] MENU improvements

2010-11-03 Thread Martin.Mulone
I want to pass to classical menu

response.menu = [
(T('Home'), False, URL(request.application,'default','index'),'',
[])
]

something like _onclick="" to make an ajax call. I implement myself my
own menu class, but broke the compatibility. There are any way to do
this?, because is very usefull to have this.


Re: [web2py] Web2py Application Exhibition ( Version 2.0 )

2010-11-03 Thread Martín Mulone
I'm not going to participate this time!!!, but i'm going to help netadmin
with the submittion application.

2010/11/3 rochacbruno 

> Nice! Until december I will finish one of my open projects.
>
> Enviado via iPhone
>
> Em 03/11/2010, às 19:18, NetAdmin  escreveu:
>
> > Web2py Application Exhibition Version 2.0
> >
> > Do you have a Web2py app that you'd like to show the world?
> > If so, you may be interested in the Web2py Application Exhibition.
> >
> > The WAE is a way to...
> > 1. Demonstrate what can be done with Web2py.
> > 2. Share and learn about useful web2py, python, Javascript, jQuery
> > etc. techniques.
> > 3. Earn some money toward that new  you've been craving.
> >
> > Projects will be judged in the following areas.
> >
> > Ease of use
> > Usefulness
> > Visual Appeal
> >
> > The Rules
> > 1. Applications must be submitted no later than December 15, 2010
> > 2. Source must be included with your submissions.
> > 3. If the application is written by a team, Massimo can NOT be part of
> > the team.
> > 4. After a 2 week review period, on December 31, 2010, the winners
> > will
> > be announced on the web2py-users list.
> > 5. The 1st place winner will receive $100 US Dollars, 2nd place will
> > receive $50
> > 6. You must enjoy using Web2py!
> > 7. Previous winners must wait 365 days before being eligible to win
> > again.
> >
> > Martin Mulone, the winner of the last Exhibition with his entry titled
> > "Instant Press", has volunteered to help tally your votes using an
> > application
> > he wrote. ( Using Web2py of course! )
> >
> >
> > Submissions must be mailed to mr.netad...@gmail.com
> >
> > Good Luck!
> >
> > Mr.NetAdmin at gmail.com
> >
> >
> >
>



-- 
My blog: http://martin.tecnodoc.com.ar
My portfolio *spanish*: http://www.tecnodoc.com.ar
Checkout my last proyect instant-press: http://www.instant2press.com


Re: [web2py] Web2py Application Exhibition ( Version 2.0 )

2010-11-03 Thread rochacbruno
Nice! Until december I will finish one of my open projects. 

Enviado via iPhone

Em 03/11/2010, às 19:18, NetAdmin  escreveu:

> Web2py Application Exhibition Version 2.0
> 
> Do you have a Web2py app that you'd like to show the world?
> If so, you may be interested in the Web2py Application Exhibition.
> 
> The WAE is a way to...
> 1. Demonstrate what can be done with Web2py.
> 2. Share and learn about useful web2py, python, Javascript, jQuery
> etc. techniques.
> 3. Earn some money toward that new  you've been craving.
> 
> Projects will be judged in the following areas.
> 
> Ease of use
> Usefulness
> Visual Appeal
> 
> The Rules
> 1. Applications must be submitted no later than December 15, 2010
> 2. Source must be included with your submissions.
> 3. If the application is written by a team, Massimo can NOT be part of
> the team.
> 4. After a 2 week review period, on December 31, 2010, the winners
> will
> be announced on the web2py-users list.
> 5. The 1st place winner will receive $100 US Dollars, 2nd place will
> receive $50
> 6. You must enjoy using Web2py!
> 7. Previous winners must wait 365 days before being eligible to win
> again.
> 
> Martin Mulone, the winner of the last Exhibition with his entry titled
> "Instant Press", has volunteered to help tally your votes using an
> application
> he wrote. ( Using Web2py of course! )
> 
> 
> Submissions must be mailed to mr.netad...@gmail.com
> 
> Good Luck!
> 
> Mr.NetAdmin at gmail.com
> 
> 
> 


[web2py] Re: new web2py appliance: File Manager

2010-11-03 Thread Christopher Steel
Wow, this seems to work really well!

Thanks!!! Great work

On Nov 2, 6:09 pm, mdipierro  wrote:
> This is CoreFive's Filemanager integrated with web2py. Also included
> ckeditor to edit text and html files.
>
> Developed by Jeevan
>
> License: BSD
>
> http://web2py.com/appliances/default/show/70


[web2py] Web2py Application Exhibition ( Version 2.0 )

2010-11-03 Thread NetAdmin
Web2py Application Exhibition Version 2.0

Do you have a Web2py app that you'd like to show the world?
If so, you may be interested in the Web2py Application Exhibition.

The WAE is a way to...
1. Demonstrate what can be done with Web2py.
2. Share and learn about useful web2py, python, Javascript, jQuery
etc. techniques.
3. Earn some money toward that new  you've been craving.

Projects will be judged in the following areas.

Ease of use
Usefulness
Visual Appeal

The Rules
1. Applications must be submitted no later than December 15, 2010
2. Source must be included with your submissions.
3. If the application is written by a team, Massimo can NOT be part of
the team.
4. After a 2 week review period, on December 31, 2010, the winners
will
be announced on the web2py-users list.
5. The 1st place winner will receive $100 US Dollars, 2nd place will
receive $50
6. You must enjoy using Web2py!
7. Previous winners must wait 365 days before being eligible to win
again.

Martin Mulone, the winner of the last Exhibition with his entry titled
"Instant Press", has volunteered to help tally your votes using an
application
he wrote. ( Using Web2py of course! )


Submissions must be mailed to mr.netad...@gmail.com

Good Luck!

Mr.NetAdmin at gmail.com





[web2py] Re: web2py as a cross-platform mobile application platform

2010-11-03 Thread Christopher Steel
Anyone know if someone has setup Web2py with device detection and/or
created a mobile.css for web2py display on small displays?

Chris

On Nov 3, 2:21 am, Johann Spies  wrote:
> It runs on the Nokia N900.
>
> Regards
> Johann
> --
>  May grace and peace be yours in abundance through the full knowledge
> of God and of Jesus our Lord!  His divine power has given us
> everything we need for life and godliness through the full knowledge
> of the one who called us by his own glory and excellence.
>                                                     2 Pet. 1:2b,3a


Re: [web2py] [Tip] How to get people who does not follow you on twitter

2010-11-03 Thread Albert Abril
Meanwhile, and only If you want, send me or post here your nicknames of
twitter and I'll make a web2py twitter-list.
my twitter is @desmondo.


On Wed, Nov 3, 2010 at 10:06 PM, rochacbruno  wrote:

> Do you mean showing who follows @web2py?
>
> I think it is a good idea, even to create some kind of web2pyers network
> based on twitter.
>
> Enviado via iPhone
>
> Em 03/11/2010, às 18:18, Michele Comitini 
> escreveu:
>
> > Don't you think some components using this on web2py.com home page
> > would be nice?
> >
> >
> >
> > 2010/11/3 Bruno Rocha :
> >> Maybe it can be usefull for someone building a twitter app with web2py,
> >> I take this form an example posted by @gwidion on twitter.
> >> 
> >> # -*- coding: utf-8 -*-
> >> import urllib, json
> >> # Author: João S. O. Bueno
> >> # License: LGPL V 3.0
> >> def get_people_set(method, id, update=None):
> >> url = "http://api.twitter.com/1/statuses/%s/%s.json";  % (method,
> id)
> >> people = set()
> >> cursor = "-1"
> >> while True:
> >> data = json.loads(urllib.urlopen(url + "?cursor=%s" %
> >> cursor).read())
> >> cursor = data["next_cursor"]
> >> if update:
> >> update(cursor)
> >> these_people = set(person["screen_name"] for person in
> >> data["users"])
> >> people.update(these_people)
> >> if not cursor  or not these_people :
> >> break
> >> return people
> >> 
> >> As it returns a set, it is easy to get its intersection/union and rest.
> >> 
> >> friends = get_people_set("friends", id, self.status)
> >> followers = get_people_set("followers", id, self.status)
> >> 
> >> To get who does not follow you, simple do:
> >> 
> >> noFollowers = sorted(friends - followers)
> >> 
> >> I am building my own twitter client, using @michelecomitini example,
> >> including some more options as this one.
> >>
> >> Bruno Rocha
> >> http://flavors.me/rochacbruno
> >>
> >>
> >>
> >>
>


Re: [web2py] [Tip] How to get people who does not follow you on twitter

2010-11-03 Thread rochacbruno
Do you mean showing who follows @web2py? 

I think it is a good idea, even to create some kind of web2pyers network based 
on twitter. 

Enviado via iPhone

Em 03/11/2010, às 18:18, Michele Comitini  escreveu:

> Don't you think some components using this on web2py.com home page
> would be nice?
> 
> 
> 
> 2010/11/3 Bruno Rocha :
>> Maybe it can be usefull for someone building a twitter app with web2py,
>> I take this form an example posted by @gwidion on twitter.
>> 
>> # -*- coding: utf-8 -*-
>> import urllib, json
>> # Author: João S. O. Bueno
>> # License: LGPL V 3.0
>> def get_people_set(method, id, update=None):
>> url = "http://api.twitter.com/1/statuses/%s/%s.json";  % (method, id)
>> people = set()
>> cursor = "-1"
>> while True:
>> data = json.loads(urllib.urlopen(url + "?cursor=%s" %
>> cursor).read())
>> cursor = data["next_cursor"]
>> if update:
>> update(cursor)
>> these_people = set(person["screen_name"] for person in
>> data["users"])
>> people.update(these_people)
>> if not cursor  or not these_people :
>> break
>> return people
>> 
>> As it returns a set, it is easy to get its intersection/union and rest.
>> 
>> friends = get_people_set("friends", id, self.status)
>> followers = get_people_set("followers", id, self.status)
>> 
>> To get who does not follow you, simple do:
>> 
>> noFollowers = sorted(friends - followers)
>> 
>> I am building my own twitter client, using @michelecomitini example,
>> including some more options as this one.
>> 
>> Bruno Rocha
>> http://flavors.me/rochacbruno
>> 
>> 
>> 
>> 


[web2py] Re: Learning Management System survey

2010-11-03 Thread jnowl
I keep an eye on python web frameworks.

Here at Carleton a pilot has just begun:

http://www2.carleton.ca/ccs/this-month-ccs/october-2010/learning-management-system-trials-have-begun/

Looking at the LMS's you mention (BB, D2L, Moodle). I don't work in
the LMS area but would like to see python used more.

To that end, I think the web development tools are just beginning to
mature to where client-server tools were 10yrs ago, i.e. with ui
builders & widget toolkits. And still lots of impedance mismatch - I'd
rather work in python than javascript.

But I'd like to help work on a python lms, time allowing!
So one thing needed would be mechanism to export/import btwn systems.


Re: [web2py] Re: Large file Upload Froze Web2py. version 1.83

2010-11-03 Thread Phyo Arkar
Maybe thats why.I was using elfinder , which i made web2py integration.
The code is here:


def __upload(self):
"""Upload files"""
try: # Windows needs stdio set for binary mode.
import msvcrt
msvcrt.setmode (0, os.O_BINARY) # stdin  = 0
msvcrt.setmode (1, os.O_BINARY) # stdout = 1
except ImportError:
pass
###DONE: Fix Upload's Response
if 'current' in self._request:
curDir = self.__findDir(self._request['current'], None)
if not curDir:
self._response['error'] = 'Invalid parameters'
return
if not self.__isAllowed(curDir, 'write'):
self._response['error'] = 'Access denied'
return
if not 'upload[]' in self._request:
self._response['error'] = 'No file to upload'
return

upFiles = self._request['upload[]']
# invalid format
# must be dict('filename1': 'filedescriptor1', 'filename2':
'filedescriptor2', ...)
if not isinstance(upFiles, dict):
self._response['error'] = 'Invalid parameters'
return

#self._response['select'] = []
total = 0
upSize = 0
maxSize = self._options['uploadMaxSize'] * 1024 * 1024 * 1024
for name, data in upFiles.iteritems():
if name:
total += 1
name = os.path.basename(name)
if not self.__checkName(name):
self.__errorData(name, 'Invalid name')
else:
name = os.path.join(curDir, name)
try:
f = open(name, 'wb',
self._options['uploadWriteChunk'])
for chunk in self.__fbuffer(data):
f.write(chunk)
f.close()
upSize += os.lstat(name).st_size
if self.__isUploadAllow(name):
os.chmod(name, self._options['fileMode'])
#
self._response['select'].append(self.__hash(name))
else:
self.__errorData(name, 'Not allowed file
type')
try:
os.unlink(name)
except:
pass
except:
self.__errorData(name, 'Unable to save uploaded
file')
if upSize > maxSize:
try:
os.unlink(name)
self.__errorData(name, 'File exceeds the
maximum allowed filesize')
except:
pass
# TODO ?
self.__errorData(name, 'File was only
partially uploaded')
break

if self._errorData:
if len(self._errorData) == total:
self._response['error'] = 'Unable to upload files'
else:
self._response['error'] = 'Some files was not uploaded'

self.__content(curDir, False)
return

As it has to be in module how can i use Web2py's upload function there? I
will check web2py's upload code.

Thanks a lot.


Oh , also this can you list as appliance for web2py ? I made it a few months
ago and you ask me to make it plugin but i do't know how to make it plugin
so hmm but can run directly as appliance.

http://code.google.com/p/*elfinder*-*web2py*/



On Wed, Nov 3, 2010 at 4:30 AM, mdipierro  wrote:

> web2py was tested extensively with large files (up to 2GB, the max
> browsers can handle) on machines with low memory (256MB).
>
> Can you post the code you use for uploading?
>
> The only way I can see this problem is if you upload into a blob.
>
> On Nov 2, 3:46 pm, Phyo Arkar  wrote:
> > Hello all;
> >
> > If i upload a large file (800 MB) and  closed the browser tab while
> > uploading , it freeze the whole web2py. Anyone have this problem?
> >
> > Tried on Local Web2py. Not without using any http server.
>


Re: [web2py] [Tip] How to get people who does not follow you on twitter

2010-11-03 Thread Michele Comitini
Don't you think some components using this on web2py.com home page
would be nice?



2010/11/3 Bruno Rocha :
> Maybe it can be usefull for someone building a twitter app with web2py,
> I take this form an example posted by @gwidion on twitter.
> 
> # -*- coding: utf-8 -*-
> import urllib, json
> # Author: João S. O. Bueno
> # License: LGPL V 3.0
> def get_people_set(method, id, update=None):
>     url = "http://api.twitter.com/1/statuses/%s/%s.json";  % (method, id)
>     people = set()
>     cursor = "-1"
>     while True:
>         data = json.loads(urllib.urlopen(url + "?cursor=%s" %
> cursor).read())
>         cursor = data["next_cursor"]
>         if update:
>             update(cursor)
>         these_people = set(person["screen_name"] for person in
> data["users"])
>         people.update(these_people)
>         if not cursor  or not these_people :
>             break
>     return people
> 
> As it returns a set, it is easy to get its intersection/union and rest.
> 
> friends = get_people_set("friends", id, self.status)
> followers = get_people_set("followers", id, self.status)
> 
> To get who does not follow you, simple do:
> 
> noFollowers = sorted(friends - followers)
> 
> I am building my own twitter client, using @michelecomitini example,
> including some more options as this one.
>
> Bruno Rocha
> http://flavors.me/rochacbruno
>
>
>
>


Re: [web2py] validators order

2010-11-03 Thread Branko Vukelic
On Wed, Nov 3, 2010 at 9:10 PM, Branko Vukelic  wrote:
> 2010/11/3 Kenneth Lundström :
>> IS_IN_DB takes out the need for IS_NOT_EMPTY as the value has to be in the
>> database it can´t be empty.
>
> IS_THAT_TRUE? Because, I know for sure there's a use-case for
>
>     IS_EMPTY_OR(IS_IN_DB())
>
> I've used the above pattern a lot in a web.py app I've recently
> created, and it traslates to: Can be NULL or be a foreign key.

Ok, ignore my remark. :P I wasn't thinking.



-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] validators order

2010-11-03 Thread Branko Vukelic
2010/11/3 Kenneth Lundström :
> IS_IN_DB takes out the need for IS_NOT_EMPTY as the value has to be in the
> database it can´t be empty.

IS_THAT_TRUE? Because, I know for sure there's a use-case for

 IS_EMPTY_OR(IS_IN_DB())

I've used the above pattern a lot in a web.py app I've recently
created, and it traslates to: Can be NULL or be a foreign key.


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] validators order

2010-11-03 Thread Kenneth Lundström
This is a educated guess but I think you can only have one requires, 
when you write two the second is used. So if you put IS_NOT_EMPTY last 
web2py only uses that one, and that alone is not enough for web2py to 
build a dropdown.


IS_IN_DB takes out the need for IS_NOT_EMPTY as the value has to be in 
the database it can´t be empty.



Kenneth


hi

why is order of validators important?
i have

db.tecaj.voditelj.requires=IS_NOT_EMPTY()
db.tecaj.voditelj.requires=IS_IN_DB(db,'person.id','%(name)s')

why does putting the IS_NOT_EMPTY() at the end doesn't produce
dropdown list?
do i need the IS_NOT_EMPTY() if i have IS_IN_DB validator?

andrej




[web2py] validators order

2010-11-03 Thread andrej burja
hi

why is order of validators important?
i have

db.tecaj.voditelj.requires=IS_NOT_EMPTY()
db.tecaj.voditelj.requires=IS_IN_DB(db,'person.id','%(name)s')

why does putting the IS_NOT_EMPTY() at the end doesn't produce
dropdown list?
do i need the IS_NOT_EMPTY() if i have IS_IN_DB validator?

andrej


Re: [web2py] Re: new welcome app in trunk but minor problem...

2010-11-03 Thread Branko Vukelic
I've randomly read this topic in between CSS and short cigarette
breaks, and noted this part:

"About the tests. They are not heavy in the bandwidth sense. They just
clutter the design page and new users get lost. There is aleady too
much stuff in the design page. I am even considering hiding
appadmin.py and appadmin.html." -- Massimo

Some simple test suites included in the default app is not a bad idea,
imho. It helps newbies acquire some testing skills and more
importantly, learn how tests are done in _real-life_ as opposed to
testing "hello world" applications.

In my 2 years as programming hobbyist, I've gotten the impression that
testing is for advanced users, and have never seen a complete beginner
tutorial include any testing. So, after 2 years, I still haven't done
serious testing myself.

And I see no reason why this should be the case. From the little
testing I've done so far, I don't see any reason why testing shouldn't
be introduced as early as possible, especially since it solves lots of
problems during development. So I think it would be great if test
suites are included in sample web2py app or two.

Speaking of clutter, would it be possible to hide the "test"
icon/button for files that do not really include any tests? That would
clear the clutter.

-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] Re: ymacs editor

2010-11-03 Thread Michele Comitini
2010/11/3 mdipierro :
> Should I wait for a patch about this?
>
yes

> On Nov 2, 4:08 pm, Michele Comitini 
> wrote:
>> Bruno Rochas pointed this out:
>>
>> http://www.ymacs.org/demo/
>>
>> cool!
>>
>> mic


Re: [web2py] Re: new welcome app in trunk but minor problem...

2010-11-03 Thread rochacbruno
Cool! And much easier than I tought. 
I can simply create my own helper if I need position and other JS 

BTW. Its a good idea to promote flash in to a built in helper and the mode arg.



Enviado via iPhone

Em 03/11/2010, às 16:27, mdipierro  escreveu:

> One thing we can do is a FLASH helper that allows:
> 
> response.flash=flash('test',mode='warn')
> 
> This is already in the new welcome app but we could promote flash to a
> FLASH helper.  Pros? Cons?
> It would link a helper to some image static files that may not be
> there.
> 
> We could add some JS code insider that can reposition it but I do not
> think that is a good idea. The position should be fixed and determined
> by the CSS.
> 
> Massimo
> 
> 
> On Nov 3, 12:09 pm, rochacbruno  wrote:
>> Would be a good idea to have more options for flash.
>> 
>> I.e: response.flash('hello world',position='top-right')
>> 
>> Enviado via iPhone
>> 
>> Em 03/11/2010, às 14:56, Martín Mulone  escreveu:
>> 
>>> Massimo I think welcome is broken in trunk, there no files in views/ :O
>> 
>>> Often the user does not notice that something has just appeared in the 
>>> flash box
>> 
>>> Perhaps a variation of flash 'silen', that goes like an application 
>>> statusbar, on bottom and thin.
>> 
>>> 2010/11/3 mdipierro 
>>> I think this is fixed and layouts now work with both old welcome and
>>> new welcome.
>> 
>>> Can somebody try it please?
>> 
>>> Just install one random layout (old welcome and new welcome) and use
>>> firebug to make sure superfish.js is found.
>> 
>>> Massimo
>> 
>>> On Nov 3, 4:37 am, Branko Vukelic  wrote:
 On Wed, Nov 3, 2010 at 6:00 AM, mdipierro  wrote:
> We have two solutions:
> 1) change all layouts w2p files to look for superfish in static/ or in
> static/js
> 2) move all the current static files in static/ and our of static/css,
> static/js, static/images/.
>> 
> Probably 1) is a better option.
>> 
 If you can customize it anyway you want in a custom template, I really
 see no problem with 1).
>> 
 --
 Branko Vukelić
>> 
 bg.bra...@gmail.com
 stu...@brankovukelic.com
>> 
 Check out my blog:http://www.brankovukelic.com/
 Check out my portfolio:http://www.flickr.com/photos/foxbunny/
 Registered Linux user #438078 (http://counter.li.org/)
 I hang out on identi.ca:http://identi.ca/foxbunny
>> 
 Gimp Brushmakers Guildhttp://bit.ly/gbg-group
>> 
>>> --
>>> My blog:http://martin.tecnodoc.com.ar
>>> My portfolio *spanish*:http://www.tecnodoc.com.ar
>>> Checkout my last proyect instant-press:http://www.instant2press.com
>> 
>> 


[web2py] Re: new welcome app in trunk but minor problem...

2010-11-03 Thread mdipierro
One thing we can do is a FLASH helper that allows:

response.flash=flash('test',mode='warn')

This is already in the new welcome app but we could promote flash to a
FLASH helper.  Pros? Cons?
It would link a helper to some image static files that may not be
there.

We could add some JS code insider that can reposition it but I do not
think that is a good idea. The position should be fixed and determined
by the CSS.

Massimo


On Nov 3, 12:09 pm, rochacbruno  wrote:
> Would be a good idea to have more options for flash.
>
> I.e: response.flash('hello world',position='top-right')
>
> Enviado via iPhone
>
> Em 03/11/2010, às 14:56, Martín Mulone  escreveu:
>
> > Massimo I think welcome is broken in trunk, there no files in views/ :O
>
> > Often the user does not notice that something has just appeared in the 
> > flash box
>
> > Perhaps a variation of flash 'silen', that goes like an application 
> > statusbar, on bottom and thin.
>
> > 2010/11/3 mdipierro 
> > I think this is fixed and layouts now work with both old welcome and
> > new welcome.
>
> > Can somebody try it please?
>
> > Just install one random layout (old welcome and new welcome) and use
> > firebug to make sure superfish.js is found.
>
> > Massimo
>
> > On Nov 3, 4:37 am, Branko Vukelic  wrote:
> > > On Wed, Nov 3, 2010 at 6:00 AM, mdipierro  wrote:
> > > > We have two solutions:
> > > > 1) change all layouts w2p files to look for superfish in static/ or in
> > > > static/js
> > > > 2) move all the current static files in static/ and our of static/css,
> > > > static/js, static/images/.
>
> > > > Probably 1) is a better option.
>
> > > If you can customize it anyway you want in a custom template, I really
> > > see no problem with 1).
>
> > > --
> > > Branko Vukelić
>
> > > bg.bra...@gmail.com
> > > stu...@brankovukelic.com
>
> > > Check out my blog:http://www.brankovukelic.com/
> > > Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> > > Registered Linux user #438078 (http://counter.li.org/)
> > > I hang out on identi.ca:http://identi.ca/foxbunny
>
> > > Gimp Brushmakers Guildhttp://bit.ly/gbg-group
>
> > --
> > My blog:http://martin.tecnodoc.com.ar
> > My portfolio *spanish*:http://www.tecnodoc.com.ar
> > Checkout my last proyect instant-press:http://www.instant2press.com
>
>


[web2py] Re: Some beginner questions on form

2010-11-03 Thread pierreth
On Nov 2, 7:38 pm, Jonathan Lundell  wrote:
> On Nov 2, 2010, at 4:09 PM, pierreth wrote:
>
> A tuple works fine, but zero=None isn't part of the tuple.
>
> IS_IN_SET(("Dr", "Dre", "M.", "Me", "Mme", "Mlle", "Mr", "Miss", "Mrs", 
> "hon"), zero=None)
>

You are right. I was wrong.


Re: [web2py] Re: new welcome app in trunk but minor problem...

2010-11-03 Thread rochacbruno
Would be a good idea to have more options for flash.

I.e: response.flash('hello world',position='top-right')


Enviado via iPhone

Em 03/11/2010, às 14:56, Martín Mulone  escreveu:

> Massimo I think welcome is broken in trunk, there no files in views/ :O
> 
> Often the user does not notice that something has just appeared in the flash 
> box
> 
> Perhaps a variation of flash 'silen', that goes like an application 
> statusbar, on bottom and thin.
> 
> 2010/11/3 mdipierro 
> I think this is fixed and layouts now work with both old welcome and
> new welcome.
> 
> Can somebody try it please?
> 
> Just install one random layout (old welcome and new welcome) and use
> firebug to make sure superfish.js is found.
> 
> Massimo
> 
> On Nov 3, 4:37 am, Branko Vukelic  wrote:
> > On Wed, Nov 3, 2010 at 6:00 AM, mdipierro  wrote:
> > > We have two solutions:
> > > 1) change all layouts w2p files to look for superfish in static/ or in
> > > static/js
> > > 2) move all the current static files in static/ and our of static/css,
> > > static/js, static/images/.
> >
> > > Probably 1) is a better option.
> >
> > If you can customize it anyway you want in a custom template, I really
> > see no problem with 1).
> >
> > --
> > Branko Vukelić
> >
> > bg.bra...@gmail.com
> > stu...@brankovukelic.com
> >
> > Check out my blog:http://www.brankovukelic.com/
> > Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> > Registered Linux user #438078 (http://counter.li.org/)
> > I hang out on identi.ca:http://identi.ca/foxbunny
> >
> > Gimp Brushmakers Guildhttp://bit.ly/gbg-group
> 
> 
> 
> -- 
> My blog: http://martin.tecnodoc.com.ar
> My portfolio *spanish*: http://www.tecnodoc.com.ar
> Checkout my last proyect instant-press: http://www.instant2press.com
> 
> 
> 


Re: [web2py] Re: new welcome app in trunk but minor problem...

2010-11-03 Thread Martín Mulone
Massimo I think welcome is broken in trunk, there no files in views/ :O

Often the user does not notice that something has just appeared in the flash
> box


Perhaps a variation of flash 'silen', that goes like an application
statusbar, on bottom and thin.

2010/11/3 mdipierro 

> I think this is fixed and layouts now work with both old welcome and
> new welcome.
>
> Can somebody try it please?
>
> Just install one random layout (old welcome and new welcome) and use
> firebug to make sure superfish.js is found.
>
> Massimo
>
> On Nov 3, 4:37 am, Branko Vukelic  wrote:
> > On Wed, Nov 3, 2010 at 6:00 AM, mdipierro 
> wrote:
> > > We have two solutions:
> > > 1) change all layouts w2p files to look for superfish in static/ or in
> > > static/js
> > > 2) move all the current static files in static/ and our of static/css,
> > > static/js, static/images/.
> >
> > > Probably 1) is a better option.
> >
> > If you can customize it anyway you want in a custom template, I really
> > see no problem with 1).
> >
> > --
> > Branko Vukelić
> >
> > bg.bra...@gmail.com
> > stu...@brankovukelic.com
> >
> > Check out my blog:http://www.brankovukelic.com/
> > Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> > Registered Linux user #438078 (http://counter.li.org/)
> > I hang out on identi.ca:http://identi.ca/foxbunny
> >
> > Gimp Brushmakers Guildhttp://bit.ly/gbg-group
>



-- 
My blog: http://martin.tecnodoc.com.ar
My portfolio *spanish*: http://www.tecnodoc.com.ar
Checkout my last proyect instant-press: http://www.instant2press.com


[web2py] Re: ymacs editor

2010-11-03 Thread mdipierro
Should I wait for a patch about this?

On Nov 2, 4:08 pm, Michele Comitini 
wrote:
> Bruno Rochas pointed this out:
>
> http://www.ymacs.org/demo/
>
> cool!
>
> mic


[web2py] Re: new welcome app in trunk but minor problem...

2010-11-03 Thread mdipierro
I think this is fixed and layouts now work with both old welcome and
new welcome.

Can somebody try it please?

Just install one random layout (old welcome and new welcome) and use
firebug to make sure superfish.js is found.

Massimo

On Nov 3, 4:37 am, Branko Vukelic  wrote:
> On Wed, Nov 3, 2010 at 6:00 AM, mdipierro  wrote:
> > We have two solutions:
> > 1) change all layouts w2p files to look for superfish in static/ or in
> > static/js
> > 2) move all the current static files in static/ and our of static/css,
> > static/js, static/images/.
>
> > Probably 1) is a better option.
>
> If you can customize it anyway you want in a custom template, I really
> see no problem with 1).
>
> --
> Branko Vukelić
>
> bg.bra...@gmail.com
> stu...@brankovukelic.com
>
> Check out my blog:http://www.brankovukelic.com/
> Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> Registered Linux user #438078 (http://counter.li.org/)
> I hang out on identi.ca:http://identi.ca/foxbunny
>
> Gimp Brushmakers Guildhttp://bit.ly/gbg-group


Re: [web2py] new welcome app in trunk but minor problem...

2010-11-03 Thread Jonathan Lundell
On Nov 3, 2010, at 8:40 AM, Bruno Rocha wrote:
> 
> In my applications, sometimes I realize that the flash goes unnoticed.
> 
> Often the user does not notice that something has just appeared in the flash 
> box
> 
> To fix this I usually put the flash centered, or use some kind of 'Expose' 
> feature, I am using expose from Jquery Tools

Centered would work OK with this layout. It could also live inside the top or 
bottom bar; there's lots of unused real estate there. Or leave it where it is, 
and move the login-register links to the lower bar. Or add another drop-down 
menu, "Login" with the three links in it. Or something.

> 
> 2010/11/3 Jonathan Lundell 
> On Nov 3, 2010, at 6:12 AM, Martín Mulone wrote:
>> Online new version:
>> 
>> http://web2pytesting.appspot.com/
> 
> Nice and simple. With all that room at the top, though, it'd be nice if the 
> flash didn't obscure the top-right navigation links.
> 
>> 
>> 
>> 
>> 2010/11/3 Martín Mulone 
>> - removed the tests (because make it un-necessarily heavy)
>> 
>> Why do you think is heavy, yes there are new things, but none of them is 
>> loaded, only loaded by controller test. And test can be removed without 
>> affecting anything. The test are for a web developer, perhaps i don't 
>> explain what the meaning of each test. Perhaps you can keep only test 
>> elements I think this is  important for a web developer. And test layout is 
>> a guide of using sidebars. 
>> 
>> - removed jgrowl
>> 
>> I put jgrowl because is a way better than the default one, can be customize, 
>> and have and little important thing has a close button.
>> 
>> - moved the ok, warn, error login into the controller
>> 
>> ok
>> 
>> - moved the left_sidebar_enabled and right_sidebar_enabled logic into 
>> layout.html
>> 
>> I put it on view following what you said about the user can have different 
>> sidebars depending of the view. Your logic is right.
>> 
>> - renamed noti_ok.png to ok.png (same for error and warn).
>> 
>> Ok
>> 
>> -Now we have a minor problem...
>> This breaks all layouts (web2py.com/layouts) and the wizard.
>> 
>> I forget to test layout. But yes its gonna break some things. But I dont 
>> think, hard to fix.
>> 
>> -They all assume superfish.js is in the static/ folder but now it is in
>> static/js/superfish.js
>> I put a new version of superfish, preserving the original package of the 
>> developers, this is important, because when you are going to update to a new 
>> version, you only have to overwrite files, and you don't have to edit 
>> manually base.css. the same to jgrowl, and others third party javascript.
>> 
>> I think this is scaffold application, are for new application, how many 
>> people are going to update your apps to the new layout?. For me I think 0. A 
>> Good practice tell me that need the organization on static, put all the 
>> files in one dir sorry but it is not for me. We have in time to star doing 
>> this. What i propose is simple: 3 directorys as a base: 
>> 
>> static/css/
>> static/images/
>> static/js/
>> 
>> Supossed I have a bit complex with others third party js.
>> 
>> static/css/jgrowl/jgrowl.css
>> static/images/jgrwol/somelogo.png
>> static/js/jgrowl/jgrowl.js
>> 
>> All the css when refering to an image instead of doing url('myimage.png') 
>> has to be change to url('../image/myimage.png')
>> 
>> Perhaps some modification in admin, you can do a new button that let the 
>> user to start new application, called new layout, and option for legacy.
>> 
>> 2010/11/3 mdipierro 
>> 
>> The new welcome app proposed by Martin (in HTML5) is in trunk.
>> 
>> Excellent job Martin.
>> 
>> I made some changes:
>> - removed the tests (because make it un-necessarily heavy)
>> - removed jgrowl
>> - moved the ok, warn, error login into the controller
>> - moved the left_sidebar_enabled and right_sidebar_enabled logic into
>> layout.html
>> - moved the flash back to the top-right corner
>> - renamed noti_ok.png to ok.png (same for error and warn).
>> 
>> Now we have a minor problem...
>> This breaks all layouts (web2py.com/layouts) and the wizard.
>> They all assume superfish.js is in the static/ folder but now it is in
>> static/js/superfish.js
>> 
>> We have two solutions:
>> 1) change all layouts w2p files to look for superfish in static/ or in
>> static/js
>> 2) move all the current static files in static/ and our of static/css,
>> static/js, static/images/.
>> 
>> Probably 1) is a better option.
>> 
>> Massimo
>> 
>> 
>> 
>> 
>> -- 
>> My blog: http://martin.tecnodoc.com.ar
>> My portfolio *spanish*: http://www.tecnodoc.com.ar
>> Checkout my last proyect instant-press: http://www.instant2press.com
>> 
>> 
>> 
> 
> 
> 
> 
> 
> 
> -- 
> 
> http://rochacbruno.com.br




Re: [web2py] new welcome app in trunk but minor problem...

2010-11-03 Thread Bruno Rocha
In my applications, sometimes I realize that the flash goes unnoticed.

Often the user does not notice that something has just appeared in the flash
box

To fix this I usually put the flash centered, or use some kind of 'Expose'
feature, I am using expose from Jquery Tools

2010/11/3 Jonathan Lundell 

> On Nov 3, 2010, at 6:12 AM, Martín Mulone wrote:
>
> Online new version:
>
> http://web2pytesting.appspot.com/
>
>
> Nice and simple. With all that room at the top, though, it'd be nice if the
> flash didn't obscure the top-right navigation links.
>
>
>
>
> 2010/11/3 Martín Mulone 
>
>> - removed the tests (because make it un-necessarily heavy)
>>
>>
>> Why do you think is heavy, yes there are new things, but none of them is
>> loaded, only loaded by controller test. And test can be removed without
>> affecting anything. The test are for a web developer, perhaps i don't
>> explain what the meaning of each test. Perhaps you can keep only test
>> elements I think this is  important for a web developer. And test layout is
>> a guide of using sidebars.
>>
>> - removed jgrowl
>>
>>
>> I put jgrowl because is a way better than the default one, can be
>> customize, and have and little important thing has a close button.
>>
>> - moved the ok, warn, error login into the controller
>>
>>
>> ok
>>
>> - moved the left_sidebar_enabled and right_sidebar_enabled logic
>>> into layout.html
>>
>>
>> I put it on view following what you said about the user can have different
>> sidebars depending of the view. Your logic is right.
>>
>> - renamed noti_ok.png to ok.png (same for error and warn).
>>
>>
>> Ok
>>
>> -Now we have a minor problem...
>>
>> This breaks all layouts (web2py.com/layouts) and the wizard.
>>
>>
>> I forget to test layout. But yes its gonna break some things. But I dont
>> think, hard to fix.
>>
>> -They all assume superfish.js is in the static/ folder but now it is in
>>
>> static/js/superfish.js
>>
>> I put a new version of superfish, preserving the original package of the
>> developers, this is important, because when you are going to update to a new
>> version, you only have to overwrite files, and you don't have to edit
>> manually base.css. the same to jgrowl, and others third party javascript.
>>
>> I think this is scaffold application, are for new application, how many
>> people are going to update your apps to the new layout?. For me I think 0. A
>> Good practice tell me that need the organization on static, put all the
>> files in one dir sorry but it is not for me. We have in time to star doing
>> this. What i propose is simple: 3 directorys as a base:
>>
>> static/css/
>> static/images/
>> static/js/
>>
>> Supossed I have a bit complex with others third party js.
>>
>> static/css/jgrowl/jgrowl.css
>> static/images/jgrwol/somelogo.png
>> static/js/jgrowl/jgrowl.js
>>
>> All the css when refering to an image instead of doing url('myimage.png')
>> has to be change to url('../image/myimage.png')
>>
>> Perhaps some modification in admin, you can do a new button that let the
>> user to start new application, called new layout, and option for legacy.
>>
>> 2010/11/3 mdipierro 
>>
>> The new welcome app proposed by Martin (in HTML5) is in trunk.
>>>
>>> Excellent job Martin.
>>>
>>> I made some changes:
>>> - removed the tests (because make it un-necessarily heavy)
>>> - removed jgrowl
>>> - moved the ok, warn, error login into the controller
>>> - moved the left_sidebar_enabled and right_sidebar_enabled logic into
>>> layout.html
>>> - moved the flash back to the top-right corner
>>> - renamed noti_ok.png to ok.png (same for error and warn).
>>>
>>> Now we have a minor problem...
>>> This breaks all layouts (web2py.com/layouts) and the wizard.
>>> They all assume superfish.js is in the static/ folder but now it is in
>>> static/js/superfish.js
>>>
>>> We have two solutions:
>>> 1) change all layouts w2p files to look for superfish in static/ or in
>>> static/js
>>> 2) move all the current static files in static/ and our of static/css,
>>> static/js, static/images/.
>>>
>>> Probably 1) is a better option.
>>>
>>> Massimo
>>>
>>>
>>
>>
>> --
>> My blog: http://martin.tecnodoc.com.ar
>> My portfolio *spanish*: http://www.tecnodoc.com.ar
>> Checkout my last proyect instant-press: http://www.instant2press.com
>>
>>
>>
>>
>
>
>


-- 

http://rochacbruno.com.br


Re: [web2py] new welcome app in trunk but minor problem...

2010-11-03 Thread Jonathan Lundell
On Nov 3, 2010, at 6:12 AM, Martín Mulone wrote:
> Online new version:
> 
> http://web2pytesting.appspot.com/

Nice and simple. With all that room at the top, though, it'd be nice if the 
flash didn't obscure the top-right navigation links.

> 
> 
> 
> 2010/11/3 Martín Mulone 
> - removed the tests (because make it un-necessarily heavy)
> 
> Why do you think is heavy, yes there are new things, but none of them is 
> loaded, only loaded by controller test. And test can be removed without 
> affecting anything. The test are for a web developer, perhaps i don't explain 
> what the meaning of each test. Perhaps you can keep only test elements I 
> think this is  important for a web developer. And test layout is a guide of 
> using sidebars. 
> 
> - removed jgrowl
> 
> I put jgrowl because is a way better than the default one, can be customize, 
> and have and little important thing has a close button.
> 
> - moved the ok, warn, error login into the controller
> 
> ok
> 
> - moved the left_sidebar_enabled and right_sidebar_enabled logic into 
> layout.html
> 
> I put it on view following what you said about the user can have different 
> sidebars depending of the view. Your logic is right.
> 
> - renamed noti_ok.png to ok.png (same for error and warn).
> 
> Ok
> 
> -Now we have a minor problem...
> This breaks all layouts (web2py.com/layouts) and the wizard.
> 
> I forget to test layout. But yes its gonna break some things. But I dont 
> think, hard to fix.
> 
> -They all assume superfish.js is in the static/ folder but now it is in
> static/js/superfish.js
> I put a new version of superfish, preserving the original package of the 
> developers, this is important, because when you are going to update to a new 
> version, you only have to overwrite files, and you don't have to edit 
> manually base.css. the same to jgrowl, and others third party javascript.
> 
> I think this is scaffold application, are for new application, how many 
> people are going to update your apps to the new layout?. For me I think 0. A 
> Good practice tell me that need the organization on static, put all the files 
> in one dir sorry but it is not for me. We have in time to star doing this. 
> What i propose is simple: 3 directorys as a base: 
> 
> static/css/
> static/images/
> static/js/
> 
> Supossed I have a bit complex with others third party js.
> 
> static/css/jgrowl/jgrowl.css
> static/images/jgrwol/somelogo.png
> static/js/jgrowl/jgrowl.js
> 
> All the css when refering to an image instead of doing url('myimage.png') has 
> to be change to url('../image/myimage.png')
> 
> Perhaps some modification in admin, you can do a new button that let the user 
> to start new application, called new layout, and option for legacy.
> 
> 2010/11/3 mdipierro 
> 
> The new welcome app proposed by Martin (in HTML5) is in trunk.
> 
> Excellent job Martin.
> 
> I made some changes:
> - removed the tests (because make it un-necessarily heavy)
> - removed jgrowl
> - moved the ok, warn, error login into the controller
> - moved the left_sidebar_enabled and right_sidebar_enabled logic into
> layout.html
> - moved the flash back to the top-right corner
> - renamed noti_ok.png to ok.png (same for error and warn).
> 
> Now we have a minor problem...
> This breaks all layouts (web2py.com/layouts) and the wizard.
> They all assume superfish.js is in the static/ folder but now it is in
> static/js/superfish.js
> 
> We have two solutions:
> 1) change all layouts w2p files to look for superfish in static/ or in
> static/js
> 2) move all the current static files in static/ and our of static/css,
> static/js, static/images/.
> 
> Probably 1) is a better option.
> 
> Massimo
> 
> 
> 
> 
> -- 
> My blog: http://martin.tecnodoc.com.ar
> My portfolio *spanish*: http://www.tecnodoc.com.ar
> Checkout my last proyect instant-press: http://www.instant2press.com
> 
> 
> 





Re: [web2py] Re: new welcome app in trunk but minor problem...

2010-11-03 Thread Martín Mulone
Ok

2010/11/3 mdipierro 

> I agree jgrowl is better but not for a scaffold app. It requires
> downloading 3 more files and the advantages are minimal.
>
> About the tests. They are not heavy in the bandwidth sense. They just
> clutter the design page and new users get lost. There is aleady too
> much stuff in the design page. I am even considering hiding
> appadmin.py and appadmin.html.
>
> Moreover those tests are more example than tests and I can be shipped
> separately.
>
> Massimo
>
> On Nov 3, 7:34 am, Martín Mulone  wrote:
> > > - removed the tests (because make it un-necessarily heavy)
> >
> > Why do you think is heavy, yes there are new things, but none of them is
> > loaded, only loaded by controller test. And test can be removed without
> > affecting anything. The test are for a web developer, perhaps i don't
> > explain what the meaning of each test. Perhaps you can keep only test
> > elements I think this is  important for a web developer. And test layout
> is
> > a guide of using sidebars.
> >
> > - removed jgrowl
> >
> > I put jgrowl because is a way better than the default one, can be
> customize,
> > and have and little important thing has a close button.
> >
> > - moved the ok, warn, error login into the controller
> >
> > ok
> >
> > - moved the left_sidebar_enabled and right_sidebar_enabled logic
> >
> > > into layout.html
> >
> > I put it on view following what you said about the user can have
> different
> > sidebars depending of the view. Your logic is right.
> >
> > - renamed noti_ok.png to ok.png (same for error and warn).
> >
> > Ok
> >
> > -Now we have a minor problem...
> >
> > This breaks all layouts (web2py.com/layouts) and the wizard.
> >
> > I forget to test layout. But yes its gonna break some things. But I dont
> > think, hard to fix.
> >
> > -They all assume superfish.js is in the static/ folder but now it is in
> >
> > static/js/superfish.js
> >
> > I put a new version of superfish, preserving the original package of the
> > developers, this is important, because when you are going to update to a
> new
> > version, you only have to overwrite files, and you don't have to edit
> > manually base.css. the same to jgrowl, and others third party javascript.
> >
> > I think this is scaffold application, are for new application, how many
> > people are going to update your apps to the new layout?. For me I think
> 0. A
> > Good practice tell me that need the organization on static, put all the
> > files in one dir sorry but it is not for me. We have in time to star
> doing
> > this. What i propose is simple: 3 directorys as a base:
> >
> > static/css/
> > static/images/
> > static/js/
> >
> > Supossed I have a bit complex with others third party js.
> >
> > static/css/jgrowl/jgrowl.css
> > static/images/jgrwol/somelogo.png
> > static/js/jgrowl/jgrowl.js
> >
> > All the css when refering to an image instead of doing url('myimage.png')
> > has to be change to url('../image/myimage.png')
> >
> > Perhaps some modification in admin, you can do a new button that let the
> > user to start new application, called new layout, and option for legacy.
> >
> > 2010/11/3 mdipierro 
> >
> >
> >
> > > The new welcome app proposed by Martin (in HTML5) is in trunk.
> >
> > > Excellent job Martin.
> >
> > > I made some changes:
> > > - removed the tests (because make it un-necessarily heavy)
> > > - removed jgrowl
> > > - moved the ok, warn, error login into the controller
> > > - moved the left_sidebar_enabled and right_sidebar_enabled logic into
> > > layout.html
> > > - moved the flash back to the top-right corner
> > > - renamed noti_ok.png to ok.png (same for error and warn).
> >
> > > Now we have a minor problem...
> > > This breaks all layouts (web2py.com/layouts) and the wizard.
> > > They all assume superfish.js is in the static/ folder but now it is in
> > > static/js/superfish.js
> >
> > > We have two solutions:
> > > 1) change all layouts w2p files to look for superfish in static/ or in
> > > static/js
> > > 2) move all the current static files in static/ and our of static/css,
> > > static/js, static/images/.
> >
> > > Probably 1) is a better option.
> >
> > > Massimo
> >
> > --
> > My blog:http://martin.tecnodoc.com.ar
> > My portfolio *spanish*:http://www.tecnodoc.com.ar
> > Checkout my last proyect instant-press:http://www.instant2press.com
>



-- 
My blog: http://martin.tecnodoc.com.ar
My portfolio *spanish*: http://www.tecnodoc.com.ar
Checkout my last proyect instant-press: http://www.instant2press.com


[web2py] Re: new welcome app in trunk but minor problem...

2010-11-03 Thread mdipierro
I agree jgrowl is better but not for a scaffold app. It requires
downloading 3 more files and the advantages are minimal.

About the tests. They are not heavy in the bandwidth sense. They just
clutter the design page and new users get lost. There is aleady too
much stuff in the design page. I am even considering hiding
appadmin.py and appadmin.html.

Moreover those tests are more example than tests and I can be shipped
separately.

Massimo

On Nov 3, 7:34 am, Martín Mulone  wrote:
> > - removed the tests (because make it un-necessarily heavy)
>
> Why do you think is heavy, yes there are new things, but none of them is
> loaded, only loaded by controller test. And test can be removed without
> affecting anything. The test are for a web developer, perhaps i don't
> explain what the meaning of each test. Perhaps you can keep only test
> elements I think this is  important for a web developer. And test layout is
> a guide of using sidebars.
>
> - removed jgrowl
>
> I put jgrowl because is a way better than the default one, can be customize,
> and have and little important thing has a close button.
>
> - moved the ok, warn, error login into the controller
>
> ok
>
> - moved the left_sidebar_enabled and right_sidebar_enabled logic
>
> > into layout.html
>
> I put it on view following what you said about the user can have different
> sidebars depending of the view. Your logic is right.
>
> - renamed noti_ok.png to ok.png (same for error and warn).
>
> Ok
>
> -Now we have a minor problem...
>
> This breaks all layouts (web2py.com/layouts) and the wizard.
>
> I forget to test layout. But yes its gonna break some things. But I dont
> think, hard to fix.
>
> -They all assume superfish.js is in the static/ folder but now it is in
>
> static/js/superfish.js
>
> I put a new version of superfish, preserving the original package of the
> developers, this is important, because when you are going to update to a new
> version, you only have to overwrite files, and you don't have to edit
> manually base.css. the same to jgrowl, and others third party javascript.
>
> I think this is scaffold application, are for new application, how many
> people are going to update your apps to the new layout?. For me I think 0. A
> Good practice tell me that need the organization on static, put all the
> files in one dir sorry but it is not for me. We have in time to star doing
> this. What i propose is simple: 3 directorys as a base:
>
> static/css/
> static/images/
> static/js/
>
> Supossed I have a bit complex with others third party js.
>
> static/css/jgrowl/jgrowl.css
> static/images/jgrwol/somelogo.png
> static/js/jgrowl/jgrowl.js
>
> All the css when refering to an image instead of doing url('myimage.png')
> has to be change to url('../image/myimage.png')
>
> Perhaps some modification in admin, you can do a new button that let the
> user to start new application, called new layout, and option for legacy.
>
> 2010/11/3 mdipierro 
>
>
>
> > The new welcome app proposed by Martin (in HTML5) is in trunk.
>
> > Excellent job Martin.
>
> > I made some changes:
> > - removed the tests (because make it un-necessarily heavy)
> > - removed jgrowl
> > - moved the ok, warn, error login into the controller
> > - moved the left_sidebar_enabled and right_sidebar_enabled logic into
> > layout.html
> > - moved the flash back to the top-right corner
> > - renamed noti_ok.png to ok.png (same for error and warn).
>
> > Now we have a minor problem...
> > This breaks all layouts (web2py.com/layouts) and the wizard.
> > They all assume superfish.js is in the static/ folder but now it is in
> > static/js/superfish.js
>
> > We have two solutions:
> > 1) change all layouts w2p files to look for superfish in static/ or in
> > static/js
> > 2) move all the current static files in static/ and our of static/css,
> > static/js, static/images/.
>
> > Probably 1) is a better option.
>
> > Massimo
>
> --
> My blog:http://martin.tecnodoc.com.ar
> My portfolio *spanish*:http://www.tecnodoc.com.ar
> Checkout my last proyect instant-press:http://www.instant2press.com


[web2py] Re: Spatial Database Modeling

2010-11-03 Thread Jose
I too am interested in participating in a project like this.

Jose


Re: [web2py] Countries as Python objects

2010-11-03 Thread Bruno Rocha
More difficult to get is a list of States/Cities

2010/11/3 Martín Mulone 

> Very usefull
>
> 2010/11/3 Jason Brower 
>
>  Yeah, I noticed that a few months ago.  It's very nice to use.
>>
>>
>> On Wed, 2010-11-03 at 10:49 -0200, Bruno Rocha wrote:
>>
>>
>>
>>  Countries as Python objects
>>
>>
>> http://opencountrycodes.appspot.com/python/
>>
>>
>>
>>
>
>
> --
> My blog: http://martin.tecnodoc.com.ar
> My portfolio *spanish*: http://www.tecnodoc.com.ar
> Checkout my last proyect instant-press: http://www.instant2press.com
>
>
>
>


-- 

http://rochacbruno.com.br


Re: [web2py] Countries as Python objects

2010-11-03 Thread Martín Mulone
Very usefull

2010/11/3 Jason Brower 

>  Yeah, I noticed that a few months ago.  It's very nice to use.
>
>
> On Wed, 2010-11-03 at 10:49 -0200, Bruno Rocha wrote:
>
>
>
>  Countries as Python objects
>
>
> http://opencountrycodes.appspot.com/python/
>
>
>
>


-- 
My blog: http://martin.tecnodoc.com.ar
My portfolio *spanish*: http://www.tecnodoc.com.ar
Checkout my last proyect instant-press: http://www.instant2press.com


Re: [web2py] new welcome app in trunk but minor problem...

2010-11-03 Thread Martín Mulone
Online new version:

http://web2pytesting.appspot.com/



2010/11/3 Martín Mulone 

> - removed the tests (because make it un-necessarily heavy)
>
>
> Why do you think is heavy, yes there are new things, but none of them is
> loaded, only loaded by controller test. And test can be removed without
> affecting anything. The test are for a web developer, perhaps i don't
> explain what the meaning of each test. Perhaps you can keep only test
> elements I think this is  important for a web developer. And test layout is
> a guide of using sidebars.
>
> - removed jgrowl
>
>
> I put jgrowl because is a way better than the default one, can be
> customize, and have and little important thing has a close button.
>
> - moved the ok, warn, error login into the controller
>
>
> ok
>
> - moved the left_sidebar_enabled and right_sidebar_enabled logic
>> into layout.html
>
>
> I put it on view following what you said about the user can have different
> sidebars depending of the view. Your logic is right.
>
> - renamed noti_ok.png to ok.png (same for error and warn).
>
>
> Ok
>
> -Now we have a minor problem...
>
> This breaks all layouts (web2py.com/layouts) and the wizard.
>
>
> I forget to test layout. But yes its gonna break some things. But I dont
> think, hard to fix.
>
> -They all assume superfish.js is in the static/ folder but now it is in
>
> static/js/superfish.js
>
> I put a new version of superfish, preserving the original package of the
> developers, this is important, because when you are going to update to a new
> version, you only have to overwrite files, and you don't have to edit
> manually base.css. the same to jgrowl, and others third party javascript.
>
> I think this is scaffold application, are for new application, how many
> people are going to update your apps to the new layout?. For me I think 0. A
> Good practice tell me that need the organization on static, put all the
> files in one dir sorry but it is not for me. We have in time to star doing
> this. What i propose is simple: 3 directorys as a base:
>
> static/css/
> static/images/
> static/js/
>
> Supossed I have a bit complex with others third party js.
>
> static/css/jgrowl/jgrowl.css
> static/images/jgrwol/somelogo.png
> static/js/jgrowl/jgrowl.js
>
> All the css when refering to an image instead of doing url('myimage.png')
> has to be change to url('../image/myimage.png')
>
> Perhaps some modification in admin, you can do a new button that let the
> user to start new application, called new layout, and option for legacy.
>
> 2010/11/3 mdipierro 
>
> The new welcome app proposed by Martin (in HTML5) is in trunk.
>>
>> Excellent job Martin.
>>
>> I made some changes:
>> - removed the tests (because make it un-necessarily heavy)
>> - removed jgrowl
>> - moved the ok, warn, error login into the controller
>> - moved the left_sidebar_enabled and right_sidebar_enabled logic into
>> layout.html
>> - moved the flash back to the top-right corner
>> - renamed noti_ok.png to ok.png (same for error and warn).
>>
>> Now we have a minor problem...
>> This breaks all layouts (web2py.com/layouts) and the wizard.
>> They all assume superfish.js is in the static/ folder but now it is in
>> static/js/superfish.js
>>
>> We have two solutions:
>> 1) change all layouts w2p files to look for superfish in static/ or in
>> static/js
>> 2) move all the current static files in static/ and our of static/css,
>> static/js, static/images/.
>>
>> Probably 1) is a better option.
>>
>> Massimo
>>
>>
>
>
> --
> My blog: http://martin.tecnodoc.com.ar
> My portfolio *spanish*: http://www.tecnodoc.com.ar
> Checkout my last proyect instant-press: http://www.instant2press.com
>
>
>
>


-- 
My blog: http://martin.tecnodoc.com.ar
My portfolio *spanish*: http://www.tecnodoc.com.ar
Checkout my last proyect instant-press: http://www.instant2press.com


Re: [web2py] Countries as Python objects

2010-11-03 Thread Jason Brower
Yeah, I noticed that a few months ago.  It's very nice to use.

On Wed, 2010-11-03 at 10:49 -0200, Bruno Rocha wrote:
> 
> 
> 
> Countries as Python objects
> 
> 
> http://opencountrycodes.appspot.com/python/
> 
> 



Re: [web2py] Re: Spatial Database Modeling

2010-11-03 Thread Manuele Pesenti
2010/11/2 mdipierro :
> Most of that work was done on a very old web2py version. I never had
> the time to merge with the most current version. I have the thesis and
> I should go back study it.

can I help you in some way? I'm interested in it...

>
> Massimo


-- 
Manuele Pesenti


[web2py] Re: new admin layout

2010-11-03 Thread joeriks
I'm new to Web2Py and like it a lot. I must say I was rather lost in
the admin UI at first. And still find it a bit slow to navigate
within. One thing I would like is to be able to have each section
(models/controllers/views et.c) on separate pages. In that case one
could easily open each one in a browser tab and switch between them
easily (with the tab named accordingly). I using that approach in
other web apps.

I like the bright greenish colors btw. :-)

Regards
Jonas Eriksson

On 3 Nov, 11:03, Branko Vukelic  wrote:
> Sorry, I meant more in the way of how it works, rather than how you
> like it. Since my initial idea was to solve the problem of
> readability, rather than just cosmetic.
>
> Once the whole template is done, we can discuss other aspects, sure.
>
>
>
> On Wed, Nov 3, 2010 at 12:15 AM, Anthony  wrote:
> > OK, point taken. But you did specifically ask what people thought of
> > the color scheme. That's my answer (I don't like reddish oranges with
> > that green).
>
> > Anyway, I really appreciate all your efforts.
>
> > Best,
> > Anthony
>
> > On Nov 2, 6:58 pm, Branko Vukelic  wrote:
> >> Bike shed![1]
>
> >> [1]http://bikeshed.com/
>
> >> On Tue, Nov 2, 2010 at 11:06 PM, Anthony  wrote:
> >> > I generally like orange as an accent color, but if we're going to go with
> >> > the main site color scheme, I'm not sure orange is the best complement to
> >> > the main green color. At least for me, I think the problem is with 
> >> > oranges
> >> > that have too much red -- so maybe move toward an orange with more yellow
> >> > (i.e., more of a gold or mustard color). I did a quick color 
> >> > substitution in
> >> > the attached mockup (could only replace the main orange color, not the
> >> > shades around the edges). Not sure this is quite right, but feels a 
> >> > little
> >> > better to me.
>
> >> > Anthony
>
> >> >> -- Forwarded message --
> >> >> From: Branko Vukelic 
> >> >> Date: Nov 2, 3:29 pm
> >> >> Subject: new admin layout
> >> >> To: web2py-users
>
> >> >> What do you people think about this color scheme? Trying out colors
> >> >> that match the main site + orange as an accent color to emphasize bits
> >> >> and pieces.
>
> >> >> On Tue, Nov 2, 2010 at 7:31 PM, Branko Vukelic 
> >> >> wrote:
> >> >> > On Tue, Nov 2, 2010 at 6:49 PM, mdipierro 
> >> >> > wrote:
> >> >> >> I'd rather have one layout for admin than a choice. I think we need
> >> >> >> this as simple as spossible.
>
> >> >> > I agree. This is not a question of preference, but utility. If bold
> >> >> > text fails to emphasize an important bit of information, but takes a
> >> >> > lot of space, that's a bug. That's the approach. Anyway, it's not the
> >> >> > end of the world if it took a little more space, as long as you find
> >> >> > what you're looking for with ease.
>
> >> >> > --
> >> >> > Branko Vukelić
>
> >> >> > bg.bra...@gmail.com
> >> >> > stu...@brankovukelic.com
>
> >> >> > Check out my blog:http://www.brankovukelic.com/
> >> >> > Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> >> >> > Registered Linux user #438078 (http://counter.li.org/)
> >> >> > I hang out on identi.ca:http://identi.ca/foxbunny
>
> >> >> > Gimp Brushmakers Guild
> >> >> >http://bit.ly/gbg-group
>
> >> >> --
> >> >> Branko Vukelić
>
> >> >> bg.bra...@gmail.com
> >> >> stu...@brankovukelic.com
>
> >> >> Check out my blog:http://www.brankovukelic.com/
> >> >> Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> >> >> Registered Linux user #438078 (http://counter.li.org/)
> >> >> I hang out on identi.ca:http://identi.ca/foxbunny
>
> >> >> Gimp Brushmakers Guildhttp://bit.ly/gbg-group
>
> >> >>  alt_mockup.png
> >> >> 98KViewDownload- Hide quoted text -
>
> >> >> - Show quoted text -
>
> >> --
> >> Branko Vukelić
>
> >> bg.bra...@gmail.com
> >> stu...@brankovukelic.com
>
> >> Check out my blog:http://www.brankovukelic.com/
> >> Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> >> Registered Linux user #438078 (http://counter.li.org/)
> >> I hang out on identi.ca:http://identi.ca/foxbunny
>
> >> Gimp Brushmakers Guildhttp://bit.ly/gbg-group-Hide quoted text -
>
> >> - Show quoted text -
>
> --
> Branko Vukelić
>
> bg.bra...@gmail.com
> stu...@brankovukelic.com
>
> Check out my blog:http://www.brankovukelic.com/
> Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> Registered Linux user #438078 (http://counter.li.org/)
> I hang out on identi.ca:http://identi.ca/foxbunny
>
> Gimp Brushmakers Guildhttp://bit.ly/gbg-group


Re: [web2py] Re: Spatial Database Modeling

2010-11-03 Thread Manuele Pesenti
2010/11/2 mdipierro :
> Most of that work was done on a very old web2py version. I never had
> the time to merge with the most current version. I have the thesis and
> I should go back study it.

can I help you in some way? I'm interested in it...

>
> Massimo

-- 
Manuele Pesenti


[web2py] A good approach for basic Ajax-functionality? (beginners question)

2010-11-03 Thread joeriks
I am a Web2Beginner and I am trying to learn how to use it in a proper
way.

I'd like to add some Ajax-functionality to some areas of a Web2Py
application. I'm not sure how to approach it best.

For an example : I have a list with items, and actionlinks "edit" to
open each item in a jQuery dialog and "delete" to delete the item.

First question : how to do the edit best? I guess using FORM helper
with the item id as a parameter? And then opening the jQuery dialog
with the html from the FORM helper. But will that do postbacks in the
right fashion automatically?

Second question : how can I delete a item with a "delete" actionlink?
Seems a bit over the bridge to link to a view for that matter?

Third question : Adding functionality to the form input fields, I'm
into using other jQuery UI controls. Is that a conveniant way? Or
should I better look for Web2PySlices / components?

Fourth question : to build really rich UI's, is a client framework
like Pyjamas or DynarchLib or ExtJs something Web2Py developers use
with success?

Many thanks!

Jonas


[web2py] [Tip] How to get people who does not follow you on twitter

2010-11-03 Thread Bruno Rocha
Maybe it can be usefull for someone building a twitter app with web2py,
I take this form an example posted by @gwidion on twitter.


# -*- coding: utf-8 -*-
import urllib, json
# Author: João S. O. Bueno
# License: LGPL V 3.0

def get_people_set(method, id, update=None):
url = "http://api.twitter.com/1/statuses/%s/%s.json";  % (method, id)
people = set()
cursor = "-1"
while True:
data = json.loads(urllib.urlopen(url + "?cursor=%s" %
cursor).read())
cursor = data["next_cursor"]
if update:
update(cursor)
these_people = set(person["screen_name"] for person in
data["users"])
people.update(these_people)
if not cursor  or not these_people :
break
return people


As it returns a set, it is easy to get its intersection/union and rest.


friends = get_people_set("friends", id, self.status)
followers = get_people_set("followers", id, self.status)


To get who does not follow you, simple do:



noFollowers = sorted(friends - followers)



I am building my own twitter client, using @michelecomitini example,
including some more options as this one.


Bruno Rocha
http://flavors.me/rochacbruno


[web2py] Countries as Python objects

2010-11-03 Thread Bruno Rocha
Countries as Python objects

http://opencountrycodes.appspot.com/python/


Re: [web2py] Subscription app

2010-11-03 Thread Bruno Rocha
I think you can use InstantPress or plugin_wiki for doing that.



2010/11/3 Kenneth 

> I´m thinking about setting up a site where anybody can post stories
> and then people can comment and maybe rate them.
>
> I looked through the Free Appliances but could not find a perfect fit
> for this.
>
> Would you make a new app from scratch, modify a Free Appliances or
> maybe somebody has something like this ready that you like to share?
>
>
> Kenneth
>



-- 

http://rochacbruno.com.br


[web2py] Subscription app

2010-11-03 Thread Kenneth
I´m thinking about setting up a site where anybody can post stories
and then people can comment and maybe rate them.

I looked through the Free Appliances but could not find a perfect fit
for this.

Would you make a new app from scratch, modify a Free Appliances or
maybe somebody has something like this ready that you like to share?


Kenneth


Re: [web2py] new welcome app in trunk but minor problem...

2010-11-03 Thread Martín Mulone
>
> - removed the tests (because make it un-necessarily heavy)


Why do you think is heavy, yes there are new things, but none of them is
loaded, only loaded by controller test. And test can be removed without
affecting anything. The test are for a web developer, perhaps i don't
explain what the meaning of each test. Perhaps you can keep only test
elements I think this is  important for a web developer. And test layout is
a guide of using sidebars.

- removed jgrowl


I put jgrowl because is a way better than the default one, can be customize,
and have and little important thing has a close button.

- moved the ok, warn, error login into the controller


ok

- moved the left_sidebar_enabled and right_sidebar_enabled logic
> into layout.html


I put it on view following what you said about the user can have different
sidebars depending of the view. Your logic is right.

- renamed noti_ok.png to ok.png (same for error and warn).


Ok

-Now we have a minor problem...

This breaks all layouts (web2py.com/layouts) and the wizard.


I forget to test layout. But yes its gonna break some things. But I dont
think, hard to fix.

-They all assume superfish.js is in the static/ folder but now it is in

static/js/superfish.js

I put a new version of superfish, preserving the original package of the
developers, this is important, because when you are going to update to a new
version, you only have to overwrite files, and you don't have to edit
manually base.css. the same to jgrowl, and others third party javascript.

I think this is scaffold application, are for new application, how many
people are going to update your apps to the new layout?. For me I think 0. A
Good practice tell me that need the organization on static, put all the
files in one dir sorry but it is not for me. We have in time to star doing
this. What i propose is simple: 3 directorys as a base:

static/css/
static/images/
static/js/

Supossed I have a bit complex with others third party js.

static/css/jgrowl/jgrowl.css
static/images/jgrwol/somelogo.png
static/js/jgrowl/jgrowl.js

All the css when refering to an image instead of doing url('myimage.png')
has to be change to url('../image/myimage.png')

Perhaps some modification in admin, you can do a new button that let the
user to start new application, called new layout, and option for legacy.

2010/11/3 mdipierro 

> The new welcome app proposed by Martin (in HTML5) is in trunk.
>
> Excellent job Martin.
>
> I made some changes:
> - removed the tests (because make it un-necessarily heavy)
> - removed jgrowl
> - moved the ok, warn, error login into the controller
> - moved the left_sidebar_enabled and right_sidebar_enabled logic into
> layout.html
> - moved the flash back to the top-right corner
> - renamed noti_ok.png to ok.png (same for error and warn).
>
> Now we have a minor problem...
> This breaks all layouts (web2py.com/layouts) and the wizard.
> They all assume superfish.js is in the static/ folder but now it is in
> static/js/superfish.js
>
> We have two solutions:
> 1) change all layouts w2p files to look for superfish in static/ or in
> static/js
> 2) move all the current static files in static/ and our of static/css,
> static/js, static/images/.
>
> Probably 1) is a better option.
>
> Massimo
>
>


-- 
My blog: http://martin.tecnodoc.com.ar
My portfolio *spanish*: http://www.tecnodoc.com.ar
Checkout my last proyect instant-press: http://www.instant2press.com


Re: [web2py] Hyperlink urls in comments

2010-11-03 Thread Bruno Rocha
Sorry, I did't send the compelte information, while I was on mobile.

The easy way to render the 'http://' urls in web2py, is using markmin.

lets say you have a text

text = "ths is a text with a link http://www.rochacbruno.com.br";

To render the link as an Hyperlink you can use markmin.

{{=MARKMIN(text)}}

I dont know a way to block another markmin keywords, so in your comment box
users could use any as **bold** , - List, # Title .

2010/11/3 rochacbruno 

> You can use MARKMIN()
>
>
> Enviado via iPhone
>
> Em 03/11/2010, às 06:12, Luther Goh Lu Feng  escreveu:
>
> > This probably isn't a web2py specific question but I thought I should
> > ask anyway in case there is something relevant in web2py that I have
> > missed.
> >
> > I have a comments form that is used to create comments based on user
> > input. I would like to parse this user input such that any URLs
> > included will be clickable, ie enclosed by  
> >
> > Any tips?
>



-- 

http://rochacbruno.com.br


Re: [web2py] Hyperlink urls in comments

2010-11-03 Thread rochacbruno
You can use MARKMIN()


Enviado via iPhone

Em 03/11/2010, às 06:12, Luther Goh Lu Feng  escreveu:

> This probably isn't a web2py specific question but I thought I should
> ask anyway in case there is something relevant in web2py that I have
> missed.
> 
> I have a comments form that is used to create comments based on user
> input. I would like to parse this user input such that any URLs
> included will be clickable, ie enclosed by  
> 
> Any tips?


Re: [web2py] Re: Question on IS_IN_DB and sort order

2010-11-03 Thread Johann Spies
Please ignore my previous email.  I made a stupid mistake.

Regards
Johann



-- 
 May grace and peace be yours in abundance through the full knowledge
of God and of Jesus our Lord!  His divine power has given us
everything we need for life and godliness through the full knowledge
of the one who called us by his own glory and excellence.
                                                    2 Pet. 1:2b,3a


[web2py] Re: A simple Whoosh integration approach (for searching)

2010-11-03 Thread Bernardo
Sure, the problem would have been solved that way. But if you want to
deploy your app in an external server or hosting, in my opinion is
easier to have it all integrated in the same application, than having
to run it in a sepparated one.

Thanks for your point of view!!
Bernardo

On 3 nov, 10:31, Branko Vukelic  wrote:
> On Wed, Nov 3, 2010 at 9:48 AM, Bernardo  wrote:
> > The problem comes when, reading whoosh documentation, we find out that
> > when indexing a document, whoosh lock the index (it is just locked to
> > write, you can read in while indexing). So, how to solve this
> > imposibility of concurrency? (Imagine that two users are performing
> > actions which require an indexation at the same time... one of them
> > would return an error).
>
> Wouldn't it be better if woosh was served by a separate application?
> If all it does is index things, you could easily have solved the
> problem by making an app that would be a search server with an
> external API.
>
> --
> Branko Vukelić
>
> bg.bra...@gmail.com
> stu...@brankovukelic.com
>
> Check out my blog:http://www.brankovukelic.com/
> Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> Registered Linux user #438078 (http://counter.li.org/)
> I hang out on identi.ca:http://identi.ca/foxbunny
>
> Gimp Brushmakers Guildhttp://bit.ly/gbg-group


Re: [web2py] Re: new admin layout

2010-11-03 Thread Branko Vukelic
Sorry, I meant more in the way of how it works, rather than how you
like it. Since my initial idea was to solve the problem of
readability, rather than just cosmetic.

Once the whole template is done, we can discuss other aspects, sure.

On Wed, Nov 3, 2010 at 12:15 AM, Anthony  wrote:
> OK, point taken. But you did specifically ask what people thought of
> the color scheme. That's my answer (I don't like reddish oranges with
> that green).
>
> Anyway, I really appreciate all your efforts.
>
> Best,
> Anthony
>
>
> On Nov 2, 6:58 pm, Branko Vukelic  wrote:
>> Bike shed![1]
>>
>> [1]http://bikeshed.com/
>>
>>
>>
>>
>>
>> On Tue, Nov 2, 2010 at 11:06 PM, Anthony  wrote:
>> > I generally like orange as an accent color, but if we're going to go with
>> > the main site color scheme, I'm not sure orange is the best complement to
>> > the main green color. At least for me, I think the problem is with oranges
>> > that have too much red -- so maybe move toward an orange with more yellow
>> > (i.e., more of a gold or mustard color). I did a quick color substitution 
>> > in
>> > the attached mockup (could only replace the main orange color, not the
>> > shades around the edges). Not sure this is quite right, but feels a little
>> > better to me.
>>
>> > Anthony
>>
>> >> -- Forwarded message --
>> >> From: Branko Vukelic 
>> >> Date: Nov 2, 3:29 pm
>> >> Subject: new admin layout
>> >> To: web2py-users
>>
>> >> What do you people think about this color scheme? Trying out colors
>> >> that match the main site + orange as an accent color to emphasize bits
>> >> and pieces.
>>
>> >> On Tue, Nov 2, 2010 at 7:31 PM, Branko Vukelic 
>> >> wrote:
>> >> > On Tue, Nov 2, 2010 at 6:49 PM, mdipierro 
>> >> > wrote:
>> >> >> I'd rather have one layout for admin than a choice. I think we need
>> >> >> this as simple as spossible.
>>
>> >> > I agree. This is not a question of preference, but utility. If bold
>> >> > text fails to emphasize an important bit of information, but takes a
>> >> > lot of space, that's a bug. That's the approach. Anyway, it's not the
>> >> > end of the world if it took a little more space, as long as you find
>> >> > what you're looking for with ease.
>>
>> >> > --
>> >> > Branko Vukelić
>>
>> >> > bg.bra...@gmail.com
>> >> > stu...@brankovukelic.com
>>
>> >> > Check out my blog:http://www.brankovukelic.com/
>> >> > Check out my portfolio:http://www.flickr.com/photos/foxbunny/
>> >> > Registered Linux user #438078 (http://counter.li.org/)
>> >> > I hang out on identi.ca:http://identi.ca/foxbunny
>>
>> >> > Gimp Brushmakers Guild
>> >> >http://bit.ly/gbg-group
>>
>> >> --
>> >> Branko Vukelić
>>
>> >> bg.bra...@gmail.com
>> >> stu...@brankovukelic.com
>>
>> >> Check out my blog:http://www.brankovukelic.com/
>> >> Check out my portfolio:http://www.flickr.com/photos/foxbunny/
>> >> Registered Linux user #438078 (http://counter.li.org/)
>> >> I hang out on identi.ca:http://identi.ca/foxbunny
>>
>> >> Gimp Brushmakers Guildhttp://bit.ly/gbg-group
>>
>> >>  alt_mockup.png
>> >> 98KViewDownload- Hide quoted text -
>>
>> >> - Show quoted text -
>>
>> --
>> Branko Vukelić
>>
>> bg.bra...@gmail.com
>> stu...@brankovukelic.com
>>
>> Check out my blog:http://www.brankovukelic.com/
>> Check out my portfolio:http://www.flickr.com/photos/foxbunny/
>> Registered Linux user #438078 (http://counter.li.org/)
>> I hang out on identi.ca:http://identi.ca/foxbunny
>>
>> Gimp Brushmakers Guildhttp://bit.ly/gbg-group- Hide quoted text -
>>
>> - Show quoted text -



-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] Re: Question on IS_IN_DB and sort order

2010-11-03 Thread Johann Spies
On 29 May 2010 03:38, Candid  wrote:
> db.your_table.your_field.requires = IS_IN_DB(db, 'person.id', '%
> (name)s', orderby='person.name'))
>
> On May 28, 9:38 am, David Marko  wrote:
>> Is there a way, how to specify order(sorting) in IS_IN_DB ? Its easy
>> to use it for validator and let web2py to generate combobox. How can I
>> specifiy 'order' form db query, so dropdown items are in good order?
>> Something like  db().select(db.person.ALL, orderby=db.person.name) ?

I have tried

  requires = IS_IN_DB(db, 'joernaal.id',
  '%(titel)s',
  orderby = db.joernaal.titel.lower(),
  groupby = db.joernaal.titel.lower())

but I still get an unsorted list.

Why?

Regards
Johann




-- 
 May grace and peace be yours in abundance through the full knowledge
of God and of Jesus our Lord!  His divine power has given us
everything we need for life and godliness through the full knowledge
of the one who called us by his own glory and excellence.
                                                    2 Pet. 1:2b,3a


Re: [web2py] new welcome app in trunk but minor problem...

2010-11-03 Thread Branko Vukelic
On Wed, Nov 3, 2010 at 6:00 AM, mdipierro  wrote:
> We have two solutions:
> 1) change all layouts w2p files to look for superfish in static/ or in
> static/js
> 2) move all the current static files in static/ and our of static/css,
> static/js, static/images/.
>
> Probably 1) is a better option.

If you can customize it anyway you want in a custom template, I really
see no problem with 1).


-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


Re: [web2py] A simple Whoosh integration approach (for searching)

2010-11-03 Thread Branko Vukelic
On Wed, Nov 3, 2010 at 9:48 AM, Bernardo  wrote:
> The problem comes when, reading whoosh documentation, we find out that
> when indexing a document, whoosh lock the index (it is just locked to
> write, you can read in while indexing). So, how to solve this
> imposibility of concurrency? (Imagine that two users are performing
> actions which require an indexation at the same time... one of them
> would return an error).

Wouldn't it be better if woosh was served by a separate application?
If all it does is index things, you could easily have solved the
problem by making an app that would be a search server with an
external API.

-- 
Branko Vukelić

bg.bra...@gmail.com
stu...@brankovukelic.com

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group


[web2py] A simple Whoosh integration approach (for searching)

2010-11-03 Thread Bernardo
Hi all,

I would like to share with you the integration process of this
searching code (Whoosh) in my web2py application. For those who don't
know it, Whoosh is a search engine fully written in python, so it is
easy to use in a framework such as web2py, but with some little
issues. Well, after placing the source code of Whoosh in modules
section, and writing the proper imports, we are ready to go using it.

The problem comes when, reading whoosh documentation, we find out that
when indexing a document, whoosh lock the index (it is just locked to
write, you can read in while indexing). So, how to solve this
imposibility of concurrency? (Imagine that two users are performing
actions which require an indexation at the same time... one of them
would return an error).

What I did is to create a queue, and a cron script that looks into
that queue and process it. The queue is a simple table in the
database, with all the fields to be indexed, that stores a record
everytime a user performs an action that needs to index something.

Then, the cron script reads that table, locks the index, indexes the
records in the queue, and frees the index.

I hope this help someone... if you have any doubts, please do not
hesitate in asking.

regards,
Bernardo


[web2py] Hyperlink urls in comments

2010-11-03 Thread Luther Goh Lu Feng
This probably isn't a web2py specific question but I thought I should
ask anyway in case there is something relevant in web2py that I have
missed.

I have a comments form that is used to create comments based on user
input. I would like to parse this user input such that any URLs
included will be clickable, ie enclosed by  

Any tips?


[web2py] Re: Return as unicode instead of str

2010-11-03 Thread cjrh
On Nov 1, 11:45 am, cjrh  wrote:
>     import gluon.contrib.simplejson as simplejson
>     return unicode(simplejson.dumps(make_result_list(msg_out, rows,
> success)), 'unicode-escape')

This is bad advice, because 'unicode-escape' will clobber all things
that have been escaped, including quotes. You can get it working just
using simplejson with better arguments:

simplejson.dumps(s, ensure_ascii=False, encoding='utf8')

Is there a reason why the json method in serializers.py doesn't do
this already?  Currently, it just says

return simplejson.dumps(s)

which will result in a non-unicode string with unicode characters
escaped.


[web2py] Re: new admin layout

2010-11-03 Thread annet
Yes, especially when you have a look at how this thread started ...
LOL


Kind regards,

Annet