[web2py] App Engine People

2010-07-01 Thread Bruno Rocha
Let's tell the world that we are "*web2pying"* on Google App Engine!

http://www.appenginepeople.net/users/tag/web2py/

{{ }}'s
--

http://rochacbruno.com.br


Re: [web2py] Re: App Engine People

2010-07-01 Thread Bruno Rocha
do'nt forget to check in with the tags 'python' and 'web2py'  !

2010/7/1 GoldenTiger :
> me too
>
> On 1 jul, 14:51, mdipierro  wrote:
>> good idea. I added myself.
>>
>> On 1 Lug, 07:13, Bruno Rocha  wrote:
>>
>> > Let's tell the world that we are "*web2pying"* on Google App Engine!
>>
>> >http://www.appenginepeople.net/users/tag/web2py/
>>
>> > {{ }}'s
>> > --
>>
>> >http://rochacbruno.com.br



-- 

http://rochacbruno.com.br


Re: [web2py] Beginner Question

2010-07-07 Thread Bruno Rocha
Take a look to the String Formating and String Interpolation in Python
Documentation

http://docs.python.org/library/stdtypes.html#string-formatting-operations

2010/7/7 ra3don :
> I apologize for a seemingly simple question, but what exactly does '%
> (title)s' do? I ran across it in the book in the wiki section, the
> whole line reads.
>
> db.document.page_id.requires = IS_IN_DB(db, 'page.id', '%(title)s')
>
> Thanks in advance,
>
> ra3don.
>



-- 

http://rochacbruno.com.br


Re: [web2py] Beginner Question

2010-07-07 Thread Bruno Rocha
Open a Python terminal, and try this example

>>> d = {'id':1,'title':'web2py'}
>>> d
{'id': 1, 'title': 'web2py'}
>>> "Title for id %(id)s is %(title)s " % d
'Title for id 1 is web2py '
>>>



2010/7/7 Bruno Rocha :
> Take a look to the String Formating and String Interpolation in Python
> Documentation
>
> http://docs.python.org/library/stdtypes.html#string-formatting-operations
>
> 2010/7/7 ra3don :
>> I apologize for a seemingly simple question, but what exactly does '%
>> (title)s' do? I ran across it in the book in the wiki section, the
>> whole line reads.
>>
>> db.document.page_id.requires = IS_IN_DB(db, 'page.id', '%(title)s')
>>
>> Thanks in advance,
>>
>> ra3don.
>>
>
>
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] new welcome (scaffolding) app

2010-07-09 Thread Bruno Rocha
Is there any chance to have that options for choose just at the moment
of app creation?

we put the name for the application, then check what do we want to have within.

May be choosing a completely blank new app or a complete one, choosing
the theme, to have or not things like Plugins, Wiki, Jquery UI etc..

and the new app based on scaffold app is created dinamically.

By the way my choice is:

2010/7/9 mdipierro :
> let's consider a new scaffolding app.
>
> What should be in it?
> What should not be in it?
>
> possible suggestions:
> [ ] js menu
I prefer a simple CSS menu
> [x] new layout (suggestions?)
I think default scaffold app needs to be clean, minimalist, a blank theme.
"Good design is as little design as possible."
< http://52weeksofux.com/tagged/week_8 >
> [x] more complex views/layout?
RSS, Json, XML examples too
> [ ] simpler views/layout.html
> [x ] example plugins
GRID plugin, it is usefull for most projects
> [ ] plugin_wiki from cube2py?
> [ ] jquery.ui
> [x] facebook, twitter, Gmail, openID authentication
> [x] webservices example
> [x] Sending mail examples
> Massimo



-- 

http://rochacbruno.com.br


Re: [web2py] Re: web2py Reference Manual -- a call to arms

2010-07-10 Thread Bruno Rocha
http://www.pyforum.org/ Pyforum, could be a start!

with little changes and putting it running on Google App Engine.



2010/7/10 weheh :
> How shall we do the hosting? Who should administer the site? What to
> call it? Shouldn't it be under web2py.com/reference_manual or some
> such?
>
> On Jul 10, 12:26 pm, mdipierro  wrote:
>> You can but set
>>
>> plugin_wiki_level=1 to disable embedded widgets for security
>>
>> On 10 Lug, 10:28, weheh  wrote:
>>
>> > Why not use cube2py as the 
>> > wiki?http://groups.google.com/group/web2py/browse_thread/thread/5b8481c484...



-- 

http://rochacbruno.com.br


Re: [web2py] Re: web2py Reference Manual -- a call to arms

2010-07-11 Thread Bruno Rocha
PHP manual is great, I always use, the information are easy to find, and
connections with related subjects are simple, one advantage is that it was
written in a way that allows various applications, badges, widgets etc using
your content

I think that information in the PHP manual is organized much like a forum,
the first post is a detailed explanation, with some examples. <
http://www.php.net/manual/en/language.operators.php > The replies below are
more examples of different scenarios for the same explained function.

With a good moderation, preventing unnecessary comments for each thread,
PyForum http://www.pyforum.org/ could be a great start, may be, changing
PyForum to accept Markmin, and a good way for publish live demo examples.

Simply gather a team, and start writing, in this way each person moderates
others.



2010/7/12 mdipierro 

> This issue issue comes up regularly and my answer does not change.
>
> I very much welcome a community effort to have a better documentation.
> It was attempted many times before and many times it has failed. It
> failed because people think it is a technological issue (which wiki do
> we use?) but it is not. The problem is keeping the docs in sync with
> code is a pedantic issue and there is not enough motivation.
>
> The problem with the book is that content is copyrighted and I have an
> agreement with the publisher. I have already lost $600/month in
> revenues from book sales since the book was posted online. This has
> not been bade up by donations.
>
> I am in the process of revising the online book online:
> - add new sections
> - move from markdown to markmin
> - include an automatic markmin to pdf (for download)
> - make it more friendly to users
>
> As far as I am concerned I need help with docstings, examples in
> docstrigns, and more tests.
>
> I will look into the php wiki you refer to.
>
> Massimo
>
> > Massimo, do you think 5M pageviews would be exceeded in any month for
> > the time being?
> >
> > ra3don: I like your idea of a download version. If we pack all into
> > a .w2p then the downloadable reference manual would be implemented.
> > Then you could install it on your local machine and access it later,
> > even if you didn't have an internet connection. Great for coding while
> > traveling!
> >
> > Massimo, is the cube2py wiki ready to take on this task on GAE? If
> > yes, I say we get on with it. We'd need volunteers to setup and
> > administer.
> >
> > Once set up, the first order of business would be to develop (wiki
> > pages, of course) a style guide for the various types of pages in the
> > Reference Manual. The pages I can think of three types of pages off
> > the top of my head:
> >
> > Index pages
> >   - organized alphabetically by function
> >   - organized alphabetically by parameter/attribute (non-statement)
> > Manual page for web2py function
> > Manual page for web2py parameter/attributes
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: web2py Reference Manual -- a call to arms

2010-07-11 Thread Bruno Rocha
Look what i am talking about, in action ->
http://www.pyforum.org/pyforum/default/view_topic/507

2010/7/12 Bruno Rocha 

> PHP manual is great, I always use, the information are easy to find, and
> connections with related subjects are simple, one advantage is that it was
> written in a way that allows various applications, badges, widgets etc using
> your content
>
> I think that information in the PHP manual is organized much like a forum,
> the first post is a detailed explanation, with some examples. <
> http://www.php.net/manual/en/language.operators.php > The replies below
> are more examples of different scenarios for the same explained function.
>
> With a good moderation, preventing unnecessary comments for each thread,
> PyForum http://www.pyforum.org/ could be a great start, may be, changing
> PyForum to accept Markmin, and a good way for publish live demo examples.
>
> Simply gather a team, and start writing, in this way each person moderates
> others.
>
>
>
> 2010/7/12 mdipierro 
>
> This issue issue comes up regularly and my answer does not change.
>>
>> I very much welcome a community effort to have a better documentation.
>> It was attempted many times before and many times it has failed. It
>> failed because people think it is a technological issue (which wiki do
>> we use?) but it is not. The problem is keeping the docs in sync with
>> code is a pedantic issue and there is not enough motivation.
>>
>> The problem with the book is that content is copyrighted and I have an
>> agreement with the publisher. I have already lost $600/month in
>> revenues from book sales since the book was posted online. This has
>> not been bade up by donations.
>>
>> I am in the process of revising the online book online:
>> - add new sections
>> - move from markdown to markmin
>> - include an automatic markmin to pdf (for download)
>> - make it more friendly to users
>>
>> As far as I am concerned I need help with docstings, examples in
>> docstrigns, and more tests.
>>
>> I will look into the php wiki you refer to.
>>
>> Massimo
>>
>> > Massimo, do you think 5M pageviews would be exceeded in any month for
>> > the time being?
>> >
>> > ra3don: I like your idea of a download version. If we pack all into
>> > a .w2p then the downloadable reference manual would be implemented.
>> > Then you could install it on your local machine and access it later,
>> > even if you didn't have an internet connection. Great for coding while
>> > traveling!
>> >
>> > Massimo, is the cube2py wiki ready to take on this task on GAE? If
>> > yes, I say we get on with it. We'd need volunteers to setup and
>> > administer.
>> >
>> > Once set up, the first order of business would be to develop (wiki
>> > pages, of course) a style guide for the various types of pages in the
>> > Reference Manual. The pages I can think of three types of pages off
>> > the top of my head:
>> >
>> > Index pages
>> >   - organized alphabetically by function
>> >   - organized alphabetically by parameter/attribute (non-statement)
>> > Manual page for web2py function
>> > Manual page for web2py parameter/attributes
>>
>
>
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: language

2010-07-12 Thread Bruno Rocha
Babel works very well for Pylons and TurboGears

http://pylonsbook.com/en/1.1/internationalization-and-localization.html

http://babel.edgewall.org/

What is Babel?

Babel is a collection of Python utilities that assist in
internationalizing and localizing Python applications, with an
emphasis on web-based applications.

What license governs the use of Babel?

Babel is released under the revised BSD license, which is a liberal
open source license that has been  approved by the  Open Source
Initiative (OSI).




2010/7/12 mdipierro 
>
> How about ## instead? ((...)) looks better but as I tried to implement
> it I realized that it ((opens and closes)) but there is no need to
> close unless we want to allow more than one set of ((..)). Do we?
> moreover it requires nasty regex.
>
>
>
>
>
> On 12 Lug, 17:56, Jonathan Lundell  wrote:
> > On Jul 12, 2010, at 3:50 PM, mdipierro wrote:
> >
> > > As a test, I implemented this in trunk
> >
> > >        T(' hello world ') -> ' hello world
> > > '
> > >        T(' hello world # token') -> 'hello
> > > world'
> > >        T('hello # world # token') -> 'hello # world'
> >
> > > I.e. if no # nothing changes. If one '#', everything on its right is
> > > not translated, everything is stripped. More than one '#' is ignored
> > > and this would allow to have '#' in the translated string.
> >
> > That seems about right. I'm a *little* wary of using #, since it's pretty 
> > likely that there are existing T strings with a # in them, and they'll have 
> > to be fixed, no?
> >
> >
> >
> > > What do you think?
> >
> > > On 12 Lug, 17:30, Jonathan Lundell  wrote:
> > >> On Jul 12, 2010, at 3:26 PM, mdipierro wrote:
> >
> > >>> I like ((...)). If I understand you suggest stripping the whitespaces
> > >>> ONLY inside ((..)). Did I understand?
> >
> > >> Stripping the main string, too--wasn't that the point of this exercise 
> > >> in the first place? I don't have a strong opinion, though.
> >
> > >>> On 12 Lug, 17:22, Jonathan Lundell  wrote:
> >  On Jul 12, 2010, at 3:15 PM, mdipierro wrote:
> >
> > > Ok but can I propose we use
> >
> > > T('canto /* my room */') instead of [[...]] to avoid confusion with
> > > markmin syntax? This would b easy to implement.
> >
> >  Or ((my room)).
> >
> >  Or <>.
> >
> >  Regardless, you'd want to specify what happens to white space. Strip 
> >  everything, I think, so T(' canto /* my room */') is equivalent to 
> >  T('canto/*my room*/').
> >
> >  (That's why I don't much like /*...*/, though; it's sort of ugly 
> >  without extra spaces.)
> >
> > > On 12 Lug, 15:39, Jonathan Lundell  wrote:
> > >> On Jul 12, 2010, at 1:32 PM, Álvaro Justen wrote:
> >
> > >>> On Mon, Jul 12, 2010 at 17:16, Jonathan Lundell 
> > >>>  wrote:
> >  On Jul 12, 2010, at 12:51 PM, mdipierro wrote:
> >
> > > suggestions? :-)
> >
> >  Ideally (from a usability pov), a variant="something" argument to 
> >  T(), I suppose. But I can't think of a non-messy way to do it.
> >
> >  How about something like this:
> >
> >  T('string to translate [[VARIANT something]]')
> >  T('string to translate [[VARIANT something else]]')
> >
> >  If there's no translation in effect, then [[VARIANT .*?]] *$ gets 
> >  stripped from the string. Otherwise it's part of the lookup. It 
> >  could just be
> >
> >  [[something]]
> >  [[something else]]
> >
> >  ...keeping in mind that if you really wanted that at the end of a 
> >  T() string, you could write:
> >
> >  T('blah blah [[blah]][[]]')
> >
> >  ...and only the trailing [[]] would be stripped.
> >
> >  BTW, there's a typo in languages.py:
> >
> >  # patter for a valid accept_language
> >
> >  (and the pattern could use a comment or three)
> >
> > >>> I don't like the idea of changing the string to be translated. We 
> > >>> can
> > >>> use a 'context' parameter as I said in other email some time ago,
> > >>> like:
> > >>> T('canto', context='my room') #translating from pt-BR to English
> > >>> should be 'corner'
> > >>> T('canto', context='music') #translating from pt-BR to English 
> > >>> should be 'sing'
> >
> > >> That is, btw, my 'variant=' suggestion, above. If it's practical, 
> > >> I'd prefer it. But embedding the variant/context into the string 
> > >> would be (I think) less disruptive.
> >
> > >> T('canto [[my room]]')
> > >> T('canto [[music]]')
> >
> > >> Not as pretty, but almost identical in effect.


--

http://rochacbruno.com.br


Re: [web2py] Re: openwysiwyg?

2010-07-13 Thread Bruno Rocha
Never used it

2010/7/13 MikeEllis :
> FWIW, openwysiwyg doesn't work in Chrome.
> Mike
>
> On Jul 13, 1:19 pm, Jean-Guy  wrote:
>> Never used it!
>>
>> Jonhy
>>
>> On 2010-07-13 13:02, mdipierro wrote:
>>
>>
>>
>> > on a view [htmledit]. Do you use it?



-- 

http://rochacbruno.com.br


Re: [web2py] Re: web2py Reference Manual -- a call to arms

2010-07-13 Thread Bruno Rocha
Massimo, could you provide a list with reference to the files that need docs?
any way or idea, to separate, distribute the tasks, manage the
versions and make the moderation of docstrings.

I can help with that, a little every day, I reserve some hours of my
day for this task, it would be interesting even to me, so I learn more
about the framework, and it helps me to formulate training material
for my Python-Web2py classes, and to write the articles to the blog
and IT-Magazine that I mentioned to you by mail.

I agree with you, and I believe in future the documentation generated
in docstring could be shifted toward an easy reference guide.

Furthermore, I advocate using a help forum (PyForum), instead of
concentrating everything in the group,I like most of the style of
organizing a forum, I'm pretty used to seek help in ubuntuforuns and
several others, IMHO Forum has much more effective role in providing
help than a list like this, forum is easy to search, best indexed by
search engines, best with usability, navigation etc.

How can we start with docstrings?



2010/7/13 mdipierro :
> That is the problem.
>
> for people who seriously want to help. Setting up another wiki is not
> help. Instead, adopt a web2py file, add docstrings to all functions.
>
> On 13 Lug, 16:38, ra3don  wrote:
>> Yeah i noticed its a little hard to comprehend sometime if you have no
>> idea whats going on. Some entries don't have descriptions at all, just
>> leaves you scratching your head.
>>
>> On Jul 12, 10:25 pm, weheh  wrote:
>>
>> > @MDP: No reason for GAE in particular other than it's free initially
>> > and because it's a showcase. Any server is good, as long as the url is
>> > something like web2py.com/reference. There is no performance issue
>> > with the current doc.
>>
>> > @ra3don: Epydocs have very little verbiage and is indecipherable to
>> > the average user, IMHO.



-- 

http://rochacbruno.com.br


Re: [web2py] Re: web2py 1.81.1 is OUT

2010-07-16 Thread Bruno Rocha
I ike the new visual style, just think it should be centralized or fluid.
strings of the README are not all being very well translated into
Portuguese, I can send you the language file for that.

why the administration interface does not have the same new visual
style of "welcome" app?

2010/7/16 Phyo Arkar :
> same to mee too.. i updated on my production site and screwed :(..
>
>
>
> On Fri, Jul 16, 2010 at 3:43 PM, VP  wrote:
>>
>> well, i should have read this thread before upgrading.  Hope to see
>> 1.81.2 soon.
>>
>>
>> On Jul 16, 8:53 am, "mr.freeze"  wrote:
>> > You can just change line 1401 of tools.py to 'else:' and it should
>> > work.
>> >
>> > On Jul 16, 8:48 am, Narendran  wrote:
>> >
>> > > Looks like there is no get_user method in default Auth. I find a
>> > > get_or_create_user. May be the name was modified in the recent
>> > > checkins.
>> >
>> > > On Jul 16, 6:34 pm, "mr.freeze"  wrote:
>> >
>> > > > Line 1401 of tools.py needs to be changed (back) from...
>> > > >     if self.settings.login_form:
>> > > > to...
>> > > >    else:
>> >
>> > > > It didn't affect my test app because it already used CAS.
>> >
>> > > > On Jul 16, 3:44 am, David Marko  wrote:
>> >
>> > > > > The same problem is on all apps I have.
>> >
>> > > > > David
>> >
>> > > > > On 16 čnc, 10:21, David Marko  wrote:
>> >
>> > > > > > I updated web2py but it breaks my app. This is what I got for
>> > > > > > standard
>> > > > > > login dialog. (no rpx_account login used, app remained
>> > > > > > unchanged)
>> >
>> > > > > > Traceback (most recent call last):
>> > > > > >   File "c:\java\google_appengine\web2py\gluon\restricted.py",
>> > > > > > line
>> > > > > > 178, in restricted
>> > > > > >     exec ccode in environment
>> > > > > >   File
>> > > > > > "c:/java/google_appengine/web2py/applications/tp/controllers/
>> > > > > > default.py", line 300, in 
>> > > > > >   File "c:\java\google_appengine\web2py\gluon\globals.py", line
>> > > > > > 96, in
>> > > > > > 
>> > > > > >     self._caller = lambda f: f()
>> > > > > >   File
>> > > > > > "c:/java/google_appengine/web2py/applications/tp/controllers/
>> > > > > > default.py", line 277, in user
>> > > > > >     return dict(form=auth())
>> > > > > >   File "c:\java\google_appengine\web2py\gluon\tools.py", line
>> > > > > > 967, in
>> > > > > > __call__
>> > > > > >     return self.login()
>> > > > > >   File "c:\java\google_appengine\web2py\gluon\tools.py", line
>> > > > > > 1404, in
>> > > > > > login
>> > > > > >     cas_user = cas.get_user()
>> > > > > > AttributeError: 'Auth' object has no attribute 'get_user'
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: cube2py news

2010-07-20 Thread Bruno Rocha
Massimo, what about custom fields, there is a way using a widget or I
have to change the model?

tks

2010/7/20 mdipierro :
> In the page/meta-code you can do
>
> response.meta.keywords='.'
> response.meta.description='' etc.
>
> they will find their way into the header of the page automatically
>
> On Jul 19, 9:14 pm, rochacbruno  wrote:
>> As a Brazilian I  agree with Julio, BTW I'm using the title field to
>> create a custom index.
>>
>> however it would be better if we had the option to include custom
>> fields, that way we could delete the title field, and create how many
>> custom fields as we need for a page.
>>
>> In my case, I am migrating my Blog from wordpress, to a new platform
>> that I'm developing with cube2py, the same way, just the Home Page
>> will be in blog style, and I am using TITLE to diff posts from pages,
>> custom field should be better.
>>
>> In wordpress I use a plugin called ALL-IN-ONE-SEO-PACK 
>> 
>> Generates META tags automatically, You can override any title and set
>> any META description and any META keywords you want, and provide a way
>> to change the SLUG from canonical URL.
>>
>> I need to implement this with cube2py, any idea?
>>
>> --
>> ** Custom FIelds for pages ( that fields, should be reference field to
>> render a dropdown, boolean to render a Chekbox, etc)
>> ** SEO Tools ( Just Like Wordpress-AIOSP)
>> --
>>
>> On Jul 19, 8:48 pm, Júlio Monteiro  wrote:
>>
>> > Hello,
>>
>> > In my opinion title should stay, specially for us Brazilians that use lots
>> > of accented letters on titles, and also it should be displayed by default 
>> > as
>> > H1 on the top of the page, then it would have more meaning.
>>
>> > Just my 2 cents,
>> > Julio Monteiro
>>
>> > On Mon, Jul 19, 2010 at 6:32 PM, mdipierro  wrote:
>> > > I could remove the title. You have a point. Anybody opposed?
>>
>> > > On Jul 19, 3:36 pm, Chris S  wrote:
>> > > > I've been looking through cube2py and just can not figure out what the
>> > > > "Title" field for a wiki_page is used for.
>>
>> > > > The slug is used when:
>> > > > -referencing a link
>> > > > -generating the URL (match against slug)
>>
>> > > > The title is used:
>> > > > -In the auto generated History page
>>
>> > > > So why not just always refer to a page by it's slug?  It just looks to
>> > > > me like this is going to confuse users who try to use the Title to
>> > > > link a page, or in the url when in fact it's almost never used at
>> > > > all.  I tried creating these various pages and was shocked how
>> > > > confusing the user could make it.  Here's a sample.
>>
>> > > > Slug:Title
>> > > > --
>> > > > Home:test
>> > > > test:Test
>> > > > home:Home
>> > > > Test:home
>>
>> > > > This is a completely valid combination of slugs and titles I'm just
>> > > > not sure why it would be allowed to get so confusing.  Is there an
>> > > > expectation to use the title in future, currently non developed,
>> > > > features?
>>
>> > > > On Jul 18, 5:50 am, mdipierro  wrote:
>>
>> > > > > thanks. In trunk!
>>
>> > > > > On Jul 17, 11:33 pm, Scott  wrote:
>>
>> > > > > > Better late than never!  Here are a few cosmetic changes for the
>> > > > > > Widget Builder page.  Please note that I've only included the lines
>> > > to
>> > > > > > be changed; the rest of the lines should remain as-is.
>>
>> > > > > > Thanks!
>>
>> > > > > > bar_chart: Uses Google charting API to embed a bar chart
>> > > > > > * names is a list of comma separated labels (one for data item)
>>
>> > > > > > create:
>> > > > > > * hidden_fields is a list of comma separated fields
>>
>> > > > > > jqgrid:
>> > > > > > * table is the table name
>> > > > > > * col_width is the width of each column (default)
>>
>> > > > > > latex: Uses Google charting API to embed LaTeX
>>
>> > > > > > map: Embeds a Google map
>> > > > > > The table must have columns: latidude, longitude and map_popup.
>> > > > > > When clicking on a dot, the map_popup message will appear.
>>
>> > > > > > pie_chart: Uses Google charting API to embed a pie chart
>> > > > > > * names is a list of comma separated labels (one for data item)
>>
>> > > > > > search:
>> > > > > > * fields is a list of comma separated fields to be displayed
>>
>> > > > > > slideshow:
>> > > > > > * transition determines the type of transition, e.g. fade, etc.
>> > > > > > (***look @ code!!)
>>
>> > > > > > tag_cloud: Embeds a tag cloud
>>
>> > > > > > update:
>> > > > > > * hidden_fields is a list of comma separated fields
>>
>> > > > > > On Jul 13, 10:46 pm, Scott  wrote:
>>
>> > > > > > > Massimo,
>>
>> > > > > > > I'll take a look at the arguments and instructions tomorrow and
>> > > give
>> > > > > > > you a report.
>>
>> > > > > > > Cheers,
>> > > > > > > --Scott
>>
>> > > > > > > On Jul 13, 5:49 am, mdipierro  wrote:
>>
>> > > > > > > > Please checkoutcube2pyagain. Now it has two new features:
>>
>> > > > > > > > 1) a button [widget builder] that allows you t

Re: [web2py] Re: cube2py news

2010-07-20 Thread Bruno Rocha
2010/7/20 mdipierro :
> response.meta.mycustomfield='bla bla bla'

I wasn't referring to custom fields in the header, It's about custom
fields in the wiki pages table.

if I need for example: create categories for pages, include more
information that are not part of the page body( and for that I am
using the title field).
Would like to have custom fields without having to change the model,
there is a ready way?

I am trying to create my own widget to do this by creating a new table
"page_custom_fields" related to the ID of the page. but, if there is
already an easy(ready) way.

just to clarify, I'm migrating my blog from wordpress to cube2py, so
I'm trying to implement what I have in wordpress using widgets.

I made changes in authentication, comments and tags are ok.
My needs now are: SEO (partially solved, because I want to do this
using db custom fields),
and obviously the way to create custom fields in database, using wiki
markup ( a widget) .



2010/7/20 mdipierro :
> response.meta.mycustomfield='bla bla bla'
>
> On Jul 20, 9:38 am, Bruno Rocha  wrote:
>> Massimo, what about custom fields, there is a way using a widget or I
>> have to change the model?
>>
>> tks
>>
>> 2010/7/20 mdipierro :
>>
>>
>>
>> > In the page/meta-code you can do
>>
>> > response.meta.keywords='.'
>> > response.meta.description='' etc.
>>
>> > they will find their way into the header of the page automatically
>>
>> > On Jul 19, 9:14 pm, rochacbruno  wrote:
>> >> As a Brazilian I  agree with Julio, BTW I'm using the title field to
>> >> create a custom index.
>>
>> >> however it would be better if we had the option to include custom
>> >> fields, that way we could delete the title field, and create how many
>> >> custom fields as we need for a page.
>>
>> >> In my case, I am migrating my Blog from wordpress, to a new platform
>> >> that I'm developing with cube2py, the same way, just the Home Page
>> >> will be in blog style, and I am using TITLE to diff posts from pages,
>> >> custom field should be better.
>>
>> >> In wordpress I use a plugin called ALL-IN-ONE-SEO-PACK 
>> >> <http://wordpress.org/extend/plugins/all-in-one-seo-pack/>
>> >> Generates META tags automatically, You can override any title and set
>> >> any META description and any META keywords you want, and provide a way
>> >> to change the SLUG from canonical URL.
>>
>> >> I need to implement this with cube2py, any idea?
>>
>> >> --
>> >> ** Custom FIelds for pages ( that fields, should be reference field to
>> >> render a dropdown, boolean to render a Chekbox, etc)
>> >> ** SEO Tools ( Just Like Wordpress-AIOSP)
>> >> --
>>
>> >> On Jul 19, 8:48 pm, Júlio Monteiro  wrote:
>>
>> >> > Hello,
>>
>> >> > In my opinion title should stay, specially for us Brazilians that use 
>> >> > lots
>> >> > of accented letters on titles, and also it should be displayed by 
>> >> > default as
>> >> > H1 on the top of the page, then it would have more meaning.
>>
>> >> > Just my 2 cents,
>> >> > Julio Monteiro
>>
>> >> > On Mon, Jul 19, 2010 at 6:32 PM, mdipierro  
>> >> > wrote:
>> >> > > I could remove the title. You have a point. Anybody opposed?
>>
>> >> > > On Jul 19, 3:36 pm, Chris S  wrote:
>> >> > > > I've been looking through cube2py and just can not figure out what 
>> >> > > > the
>> >> > > > "Title" field for a wiki_page is used for.
>>
>> >> > > > The slug is used when:
>> >> > > > -referencing a link
>> >> > > > -generating the URL (match against slug)
>>
>> >> > > > The title is used:
>> >> > > > -In the auto generated History page
>>
>> >> > > > So why not just always refer to a page by it's slug?  It just looks 
>> >> > > > to
>> >> > > > me like this is going to confuse users who try to use the Title to
>> >> > > > link a page, or in the url when in fact it's almost never used at
>> >> > > > all.  I tried creating these various pages and was shocked how
>> >> > > > confusing the user could make it.  Here's a sampl

Re: [web2py] Wiki in Chap 3 of Documentation

2010-07-21 Thread Bruno Rocha
I have this app working fine, but I had to change the search to:

controller:

def search():
 "an ajax wiki search page"
 return dict(form=FORM(INPUT(_id='keyword',
  _onkeyup="ajax('bg_find', ['keyword'], 'target');")),
  target_div=DIV(_id='target'))

def bg_find():
 "an ajax callback that returns a  of links to wiki pages"
 pattern = '+ request.vars.keyword.lower() + '
 pages = 
db(db.page.title.lower().like('%'+request.vars.keyword.lower()+'%')).select(orderby=db.page.title)
 items = [A(row.title, _href=URL(r=request, f=show, args=row.id))
for row in pages]
 return UL(*items).xml()
 #return UL(LI(request.vars.keyword.lower()))

View:

{{extend 'layout.html'}}
Search wiki pages
[ {{=A('listall', _href=URL(r=request, f='index'))}}]
{{=form}}{{=target_div}}


If you need, I can attach a w2p package here.


2010/7/21 Jeff S :
> Does someone have an uploadable version of the wiki application found
> in chapter 3?
>
> The search page does not work on my computer, but I can't understand
> why.  My best guess would be a security feature in Internet Explorer,
> but I would like to exclude the possibility of an error in my code.
>
> The behavior on my computer is that what ever I type in the input
> form, there is nothing happening.  I only see my own text.
>
> Thanks,



-- 

http://rochacbruno.com.br


Re: [web2py] Re: plugin_wiki

2010-07-21 Thread Bruno Rocha
Where can I download standalone plugin_wiki to include in my running web2py app?

2010/7/21 Tim Michelsen :
>> What does the roadmap look like for
>> the future?
> Yes, that's exactly my question at the moment.
>
> I mean there were a numbert of attempts:
> t1, t2, c9, cube2py and now just plugin_wiki.
>
> How much is the core team dedicated to make this more that just a demo
> project?
>
> Web development at my company is shaping again as decisions seem to be made.
>
> So before I invest another bunch of hours in yet the next show-off tool?
>
> I tried to convert my self-programmed site into T9 now it tuens out to
> be a senseless effort.
>
> So a clear statement is needed.
>
> Because the video is definately HOT STUFF that deserves to be used.
> But for production employment I need a statement that ensures future
> upgradability just like web2py development ensures backward compatibility.
>
> Thanks and regards,
> Timmie
>
>



-- 

http://rochacbruno.com.br


[web2py] [Plugin_wiki] - Manage categories for blog pages and posts

2010-07-23 Thread Bruno Rocha
Hello, I'm migrating my blog from wordpress to web2py, and to make
this possible, I'm creating and testing a series of widgets in
plugin_wiki.

My intention is to create a blog platform to be based only on the
plugin_wiki custom widgets, creating tables and defining widgets
through "meta-code.

I do not want to  change models, controllers and views, not touching
the core of the framework or plugin.

I already have several widgets almost ready, generally cloning
wordpress features.

The first widget I'm testing at GAE is the widget to manage the
categories of pages, and make possible to diff pages from posts, and
post categories

It is available at this link: http://web2pybrasil.appspot.com/c2p/

I need suggestions, am I going the right way?
could improve this code, save resources and etc?

Is running on GAE, and therefore needed to adapt some things

someone is willing to help?

Thank you.

{{ }}'s

http://web2pybrasil.appspot.com/c2p/

-- 

http://rochacbruno.com.br


[web2py] Re: [Plugin_wiki] - Manage categories for blog pages and posts

2010-07-23 Thread Bruno Rocha
I forget... How to use

``
name: categoryAdd
slug: {{=request.args(0)}}
categories: Page,Post,Food,Tech
message:  This page is under  %s 
category(ies)
showmessage: True
``:widget

2010/7/23 Bruno Rocha :
> Hello, I'm migrating my blog from wordpress to web2py, and to make
> this possible, I'm creating and testing a series of widgets in
> plugin_wiki.
>
> My intention is to create a blog platform to be based only on the
> plugin_wiki custom widgets, creating tables and defining widgets
> through "meta-code.
>
> I do not want to  change models, controllers and views, not touching
> the core of the framework or plugin.
>
> I already have several widgets almost ready, generally cloning
> wordpress features.
>
> The first widget I'm testing at GAE is the widget to manage the
> categories of pages, and make possible to diff pages from posts, and
> post categories
>
> It is available at this link: http://web2pybrasil.appspot.com/c2p/
>
> I need suggestions, am I going the right way?
> could improve this code, save resources and etc?
>
> Is running on GAE, and therefore needed to adapt some things
>
> someone is willing to help?
>
> Thank you.
>
> {{ }}'s
>
> http://web2pybrasil.appspot.com/c2p/
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] best way to take advantage of sidebar in layout.html

2010-07-23 Thread Bruno Rocha
if you define a function sidebar in your model

sidebar.py

def sidebar():
return SPAN('teste') #this could return anything to be rendered in sidebar

You can call that in any view, even yout layout.html:

default/index.html
...

README
{{=sidebar()}}

...





2010/7/23 Rob :
> Hi,
>
> I would really like to take advantage of the left sidebar in the stock
> layout.html.  After reading http://web2py.com/book/default/section/5/4,
> it says that {{include}} must come before any function calls.  I only
> want to use the left_sidebar on a single page.
>
> How do I rewrite this so it works (notice left_sidebar())?
>
>          
>            {{left_sidebar()}} div>
>          
>          
>            {{include}}
>          
>          
>            {{#-- unused
> space}}
>          
>
> I'd prefer not to have to go back and change all my views to be:
>
> {{def maincontent():}}
> < stuff >
> {{pass}}
>
> But if that's the only way, at least I know.
>
> Thanks!



-- 

http://rochacbruno.com.br


Re: [web2py] Re: book revision

2010-07-24 Thread Bruno Rocha
I would like more detailed information about testing, unittest,
docTest. explaining how it works in detail, and showing a good example
of a test using the 'test' in appadmin

2010/7/24 mdipierro :
> I have identified the following items that are missing from the book.
> Listed here in some random order.
>
> compute fields
> virtual fields
> crud.search
> RPXAccount
> new validators
> populate
> plugins
> LOAD and generic.load
> Field attributes (compute, virtualfield, uploadseparate)
> format, represent
> recursive queries
> MARKMIN syntax
> Informix support
> named id fields
> keyedtables
> DAL('gae')
> XHTML
> first() last()
> find(), sort(), exclude()
> as_dict(), as_list()
> request.meta
> request.wsgi
> IS_IN_DB(,and=)
> python web2py.py -S app -M -R script.py -A arg1 arg2 arg3
> New syntax T("%(a)s") % dict(a="hello")
> web2py.py -nogui
> SQLFORM.factory(...,table_name='no_table')
> new setup-web2py-ubuntu.sh
> new setup-web2py-fedora.sh
> autocomplete widget
> pam authentication
> auth.settings.login_captcha and auth.settings.register_captcha
> crud.settings.create_captcha and  crud.settings.update_captcha
> gluon/contrib/login_methods/linkedin_account.py (to be tested)
> cherrypy to rocket
> SQLFORM(...,formstyle='divs')
> SQLTABLE(...,headers='fieldname:capitalize')
> Field().with_alias
> has_membership(group=...,role=...)
> db.define_table(username=True)
> gluon.tools.prettydate, gluon.tools.geocode
> gluon.contrib.AuthorizeNet
> gluon.contrib.sms_utils
> can specify hostname in routes_out (same syntax as routes in)
> db.table.bulk_insert([...records...]) now works on GAE
> OPTGROUP helper
> fake_migrate to restore borken db metadata
> x509 emails
> attachment and html in Mail on GAE
> TAG(html) parese html into helpers (experimental, still some problems
> with unicode)
> DIV.elements(find=re.compile())
> DIV.flatten()
> DIV.elements('') supports jQuery syntax in ''
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: Step-by-step tutorial on getting Cube2py up and running?

2010-07-24 Thread Bruno Rocha
The admin group is 'editor'

but you can change that login in plugin_wiki.py model

I had to change it to run fine on GAE.

2010/7/24 Scott :
> What is the admin group name?  That is, the group to create where you
> can add users who can edit existing pages.  Thanks!
>
> On Jul 12, 11:47 am, mdipierro  wrote:
>> I posted 1.80.1 stable. If you just download that you can install the
>> latest cube2py from here using web2py admin
>>
>> http://www.web2py.com/examples/static/web2py.app.cube2py.w2p
>>
>> On 12 Lug, 04:56, Albert Abril  wrote:
>>
>> > mm.. just a typo in the url example -> examples :)
>> > the rest all ok.
>>
>> > regards!
>>
>> >http://www.web2py.com/examples/static/nightly/web2py_src.zip
>>
>> > On Mon, Jul 12, 2010 at 10:48 AM, mdipierro  
>> > wrote:
>> > > curlhttp://web2py.com/example/static/nightly/web2py_src.zip



-- 

http://rochacbruno.com.br


[web2py] Error after a page is deleted in plugin_wiki

2010-07-26 Thread Bruno Rocha
I found an error in the model plugin_wiki.
1. Create a new page
2. make some changes to include entries in the table
plugin_wiki_page_archive
3. Appadmin go through the table .. _archive and view the historic
4. Delete the page you created
5. Visit again .. _archive through appadmin

I guess that is related to cascate deletions, but in this case the archive
entry dont have to be deleted.

I'm trying to create a logic to excluding categories of pages that have
already been excluded from _page table. [1]

[1] http://www.web2pyslices.com/main/slices/take_slice/92




Error traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.

Traceback (most recent call last):
  File "/Users/brunomac/web2pydev/web2py/gluon/restricted.py", line
178, in restricted
exec ccode in environment
  File 
"/Users/brunomac/web2pydev/web2py/applications/rochacbruno/views/appadmin.html"
, line 156, in

{{pass}}
  File "/Users/brunomac/web2pydev/web2py/gluon/globals.py", line 105, in write
self.body.write(xmlescape(data))
  File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 106, in xmlescape
return data.xml()
  File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 557, in xml
"""
  File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 548, in _xml
# get the xml for the inner components
  File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 106, in xmlescape
return data.xml()
  File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 557, in xml
"""
  File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 548, in _xml
# get the xml for the inner components
  File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 106, in xmlescape
return data.xml()
  File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 557, in xml
"""
  File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 548, in _xml
# get the xml for the inner components
  File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 106, in xmlescape
return data.xml()
  File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 557, in xml
"""
  File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 548, in _xml
# get the xml for the inner components
  File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 106, in xmlescape
return data.xml()
  File "/Users/brunomac/web2pydev/web2py/gluon/sql.py", line 1467, in
__getattr__
self.__allocate()
  File "/Users/brunomac/web2pydev/web2py/gluon/sql.py", line 1462, in __allocate
raise Exception, "undefined record"
Exception: undefined record


-- 

http://rochacbruno.com.br


[web2py] Re: [Plugin_wiki] - Manage categories for blog pages and posts

2010-07-26 Thread Bruno Rocha
It is now posted in web2pySlices[1]

I Have a TO-DO List, and I really need help to make it:


   - remove blank spaces from items in category list (on Insert, in List, On
   Select)
   - make category list case unsensitive
   - Show a list of categories with links as return to categoryAdd
   - Show a counter on category list, showing how many pages is in each
   category
   - Create a Modal Box with JavaScript, to add categories, this modal will
   have a dropdown with categories, and a javascript: caller in menu



[1]http://www.web2pyslices.com/main/slices/take_slice/92


2010/7/23 Bruno Rocha 

> Hello, I'm migrating my blog from wordpress to web2py, and to make
> this possible, I'm creating and testing a series of widgets in
> plugin_wiki.
>
> My intention is to create a blog platform to be based only on the
> plugin_wiki custom widgets, creating tables and defining widgets
> through "meta-code.
>
> I do not want to  change models, controllers and views, not touching
> the core of the framework or plugin.
>
> I already have several widgets almost ready, generally cloning
> wordpress features.
>
> The first widget I'm testing at GAE is the widget to manage the
> categories of pages, and make possible to diff pages from posts, and
> post categories
>
> It is available at this link: http://web2pybrasil.appspot.com/c2p/
>
> I need suggestions, am I going the right way?
> could improve this code, save resources and etc?
>
> Is running on GAE, and therefore needed to adapt some things
>
> someone is willing to help?
>
> Thank you.
>
> {{ }}'s
>
> http://web2pybrasil.appspot.com/c2p/
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] CLI for Application

2010-07-27 Thread Bruno Rocha
You can do that with xml-rpc or SOAP

2010/7/26 James McMillan 

> I have written a simple application involving a single model and a
> single controller. I would also like to provide a CLI version for it.
> Is it possible to run the application and be able to interact (through
> print / input() or similar) with the controller? It would need to load
> the model, then execute the controller.
>
> Thanks,
> - James




-- 

http://rochacbruno.com.br


Re: [web2py] Re: Error after a page is deleted in plugin_wiki

2010-07-27 Thread Bruno Rocha
To solve my problem<http://www.web2pyslices.com/main/slices/take_slice/92>,
I did:

#Category CleanUp
def categoryClean():
"""
Check if a category exists for a deleted page, then delete the dead category
"""
#populate a set with pages in db
dbpages = set()
[dbpages.add(item.slug) for item in
db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug) ]
#populate a set with pages referenced by categories
dbcats = set()
[dbcats.add(item.slug) for item in
db(db.category.id>0).select(db.category.slug)]
#cleanup dead entries
if dbcats-dbpages:
[db(db.category.slug==page).delete() for page in dbcats-dbpages ]


It will be better if a page was disabled.

tks


2010/7/27 mdipierro 

> This needs some thought. Pages should disabled not deleted. Good
> catch.
>
> On Jul 26, 5:33 pm, Bruno Rocha  wrote:
> > I found an error in the model plugin_wiki.
> > 1. Create a new page
> > 2. make some changes to include entries in the table
> > plugin_wiki_page_archive
> > 3. Appadmin go through the table .. _archive and view the historic
> > 4. Delete the page you created
> > 5. Visit again .. _archive through appadmin
> >
> > I guess that is related to cascate deletions, but in this case the
> archive
> > entry dont have to be deleted.
> >
> > I'm trying to create a logic to excluding categories of pages that have
> > already been excluded from _page table. [1]
> >
> > [1]http://www.web2pyslices.com/main/slices/take_slice/92
> >
> > Error traceback
> >
> > 1.
> > 2.
> > 3.
> > 4.
> > 5.
> > 6.
> > 7.
> > 8.
> > 9.
> > 10.
> > 11.
> > 12.
> > 13.
> > 14.
> > 15.
> > 16.
> > 17.
> > 18.
> > 19.
> > 20.
> > 21.
> > 22.
> > 23.
> > 24.
> > 25.
> > 26.
> > 27.
> > 28.
> > 29.
> > 30.
> > 31.
> > 32.
> > 33.
> > 34.
> > 35.
> > 36.
> > 37.
> > 38.
> > 39.
> >
> > Traceback (most recent call last):
> >   File "/Users/brunomac/web2pydev/web2py/gluon/restricted.py", line
> > 178, in restricted
> > exec ccode in environment
> >   File
> "/Users/brunomac/web2pydev/web2py/applications/rochacbruno/views/appadmin.html"
> > , line 156, in
> > 
> > {{pass}}
> >   File "/Users/brunomac/web2pydev/web2py/gluon/globals.py", line 105, in
> write
> > self.body.write(xmlescape(data))
> >   File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 106, in
> xmlescape
> > return data.xml()
> >   File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 557, in xml
> > """
> >   File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 548, in
> _xml
> > # get the xml for the inner components
> >   File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 106, in
> xmlescape
> > return data.xml()
> >   File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 557, in xml
> > """
> >   File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 548, in
> _xml
> > # get the xml for the inner components
> >   File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 106, in
> xmlescape
> > return data.xml()
> >   File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 557, in xml
> > """
> >   File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 548, in
> _xml
> > # get the xml for the inner components
> >   File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 106, in
> xmlescape
> > return data.xml()
> >   File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 557, in xml
> > """
> >   File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 548, in
> _xml
> > # get the xml for the inner components
> >   File "/Users/brunomac/web2pydev/web2py/gluon/html.py", line 106, in
> xmlescape
> > return data.xml()
> >   File "/Users/brunomac/web2pydev/web2py/gluon/sql.py", line 1467, in
> > __getattr__
> > self.__allocate()
> >   File "/Users/brunomac/web2pydev/web2py/gluon/sql.py", line 1462, in
> __allocate
> > raise Exception, "undefined record"
> > Exception: undefined record
> >
> > --
> >
> > http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] call a function in another controller

2010-07-27 Thread Bruno Rocha
In a view:

{{=LOAD(url=URL(request.application,'controllerName','FunctionName.load'),
ajax=True)}}



2010/7/27 ilovesss2004 

> Hi,
>
> Can some one tell me how to call a function which is in another
> controller other than default controller by ajax?
>
> Thanks alot.




-- 

http://rochacbruno.com.br


Re: [web2py] Re: call a function in another controller

2010-07-27 Thread Bruno Rocha
Take a controller called math.py

def sum():
 return 1+2 #returns 3


In any view



 $(document).ready(function(){
   $('#button').click(function(){
ajax("{{=URL(r=request, c='math',f='sum.load')}}",'','target');
return false;
});
 });


CLICK HERE



The last tip, could be writen as:

{{=LOAD(url=URL(r=request,c='math',f='sum.load'), ajax=True)}}




2010/7/27 ilovesss2004 

> How to write it in javascript? e.g.
> onclick=URL(request.application,'controllerName','FunctionName.load'),
> ajax=True)?
>
> On Jul 27, 10:35 pm, Bruno Rocha  wrote:
> > In a view:
> >
> >
> {{=LOAD(url=URL(request.application,'controllerName','FunctionName.load'),
> > ajax=True)}}
> >
> > 2010/7/27 ilovesss2004 
> >
> > > Hi,
> >
> > > Can some one tell me how to call a function which is in another
> > > controller other than default controller by ajax?
> >
> > > Thanks alot.
> >
> > --
> >
> > http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] call a function in another controller

2010-07-27 Thread Bruno Rocha
Just as an example

teste.py

def sum():

return int(request.args(0)) + int(request.args(1))


any view:



 $(document).ready(function(){
   $('#button').click(function(){
ajax("{{=URL(r=request,
c='teste',f='sum.load',args=[1,2])}}",[],'target');
return false;
});
 });


CLICK HERE

RETURNS 3

With input fields:

teste.py

def sum():

return  request.vars.name*10

view



 $(document).ready(function(){
   $('#button').click(function(){
ajax("{{=URL(r=request, c='teste',f='sum.load')}}",['name'],'target');
return false;
});
 });





CLICK HERE

RETURNS name*10


2010/7/27 ilovesss2004 

> Hi,
>
> Can some one tell me how to call a function which is in another
> controller other than default controller by ajax?
>
> Thanks alot.




-- 

http://rochacbruno.com.br


[web2py] crud.search() fails on GAE with plugin_wiki

2010-07-27 Thread Bruno Rocha
Hi,

trying to use the search widget on GAE i got an error,

``
name: search
table: plugin_wiki_page
``:widget

Only EQUALS and NOT EQUALS runs ok, when I try CONTAINS, STARTSWITH or
ENDSWITH I got the error:

YOU CAN TRY HERE:
http://web2pybrasil.appspot.com/cursoweb2py/plugin_wiki/page/error-on-crud-search

THE ERROR:
Traceback (most recent call last): File
"/base/data/home/apps/web2pybrasil/3.343537232039186008/applications/cursoweb2py/models/plugin_wiki.py",
line 555, in render_widget html = getattr(PluginWikiWidgets,name)(**args)
File
"/base/data/home/apps/web2pybrasil/3.343537232039186008/applications/cursoweb2py/models/plugin_wiki.py",
line 226, in search search, results = crud.search(db[table]) File
"/base/data/home/apps/web2pybrasil/3.343537232039186008/gluon/tools.py",
line 2979, in search query &= self.get_query(field, opval, value) File
"/base/data/home/apps/web2pybrasil/3.343537232039186008/gluon/contrib/gql.py",
line 569, in __and__ if other.filters[0].one(): AttributeError: 'Query'
object has no attribute 'filters'

-- 

http://rochacbruno.com.br


[web2py] Re: crud.search() fails on GAE with plugin_wiki

2010-07-27 Thread Bruno Rocha
Also fails on JQGRID Search,
I Know GAE has some limitations performing LIKE, so I think if this have no
solution, may be disabled when running in GAE.

2010/7/28 Bruno Rocha 

> Hi,
>
> trying to use the search widget on GAE i got an error,
>
> ``
> name: search
> table: plugin_wiki_page
> ``:widget
>
> Only EQUALS and NOT EQUALS runs ok, when I try CONTAINS, STARTSWITH or
> ENDSWITH I got the error:
>
> YOU CAN TRY HERE:
> http://web2pybrasil.appspot.com/cursoweb2py/plugin_wiki/page/error-on-crud-search
>
> THE ERROR:
> Traceback (most recent call last): File
> "/base/data/home/apps/web2pybrasil/3.343537232039186008/applications/cursoweb2py/models/plugin_wiki.py",
> line 555, in render_widget html = getattr(PluginWikiWidgets,name)(**args)
> File
> "/base/data/home/apps/web2pybrasil/3.343537232039186008/applications/cursoweb2py/models/plugin_wiki.py",
> line 226, in search search, results = crud.search(db[table]) File
> "/base/data/home/apps/web2pybrasil/3.343537232039186008/gluon/tools.py",
> line 2979, in search query &= self.get_query(field, opval, value) File
> "/base/data/home/apps/web2pybrasil/3.343537232039186008/gluon/contrib/gql.py",
> line 569, in __and__ if other.filters[0].one(): AttributeError: 'Query'
> object has no attribute 'filters'
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


[web2py] Re: crud.search() fails on GAE with plugin_wiki

2010-07-27 Thread Bruno Rocha
I Solved my problem in a hard way with a custom widget, the only way I found
to perform %LIKE% on GAE

@staticmethod
def searchPages(string=None,nfmessage='Nothing found with %s'):
"""
string: string to be found
"""
found = set()
if string:
#search in slug
pages =
db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug)
for page in pages:
if page.slug.find(string) > -1:
found.add(page.slug)

if found:
return UL(*[LI(row) for row in found])
else:
    return nfmessage % string



2010/7/28 Bruno Rocha 

> Also fails on JQGRID Search,
> I Know GAE has some limitations performing LIKE, so I think if this have no
> solution, may be disabled when running in GAE.
>
> 2010/7/28 Bruno Rocha 
>
> Hi,
>>
>> trying to use the search widget on GAE i got an error,
>>
>> ``
>> name: search
>> table: plugin_wiki_page
>> ``:widget
>>
>> Only EQUALS and NOT EQUALS runs ok, when I try CONTAINS, STARTSWITH or
>> ENDSWITH I got the error:
>>
>> YOU CAN TRY HERE:
>> http://web2pybrasil.appspot.com/cursoweb2py/plugin_wiki/page/error-on-crud-search
>>
>> THE ERROR:
>> Traceback (most recent call last): File
>> "/base/data/home/apps/web2pybrasil/3.343537232039186008/applications/cursoweb2py/models/plugin_wiki.py",
>> line 555, in render_widget html = getattr(PluginWikiWidgets,name)(**args)
>> File
>> "/base/data/home/apps/web2pybrasil/3.343537232039186008/applications/cursoweb2py/models/plugin_wiki.py",
>> line 226, in search search, results = crud.search(db[table]) File
>> "/base/data/home/apps/web2pybrasil/3.343537232039186008/gluon/tools.py",
>> line 2979, in search query &= self.get_query(field, opval, value) File
>> "/base/data/home/apps/web2pybrasil/3.343537232039186008/gluon/contrib/gql.py",
>> line 569, in __and__ if other.filters[0].one(): AttributeError: 'Query'
>> object has no attribute 'filters'
>>
>> --
>>
>> http://rochacbruno.com.br
>>
>
>
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: crud.search() fails on GAE with plugin_wiki

2010-07-28 Thread Bruno Rocha
Thanks Massimo, however, using set() I assure distict elements, using your
LAMBDA solution, entries may duplicate.
SEARCH to plugin_wiki is running here :
http://web2pybrasil.appspot.com/cursoweb2py/

I need to search in different fields using a %LIKE% operator, my code now
needs some improvement to be more DRY,
and a way to cache search or create a table to store indexes.



search pages in GAE:

found = set()
string = request.vars.search

if string:
#need to encapsulate all search below in a single function
#search in slug
pages =
db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug)
#how to cache pages object?
for page in pages:
if page.slug.find(string) > -1:
found.add(page.slug)

#search in page body
pages =
db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug,db.plugin_wiki_page.body)
#how
to cache pages object?
for page in pages:
if page.body.find(string) > -1:
found.add(page.slug)

#search in page body
pages =
db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug,db.plugin_wiki_page.title)
#how
to cache pages object?
for page in pages:
if page.title.find(string) > -1:
found.add(page.slug)

#search in tags
#TO-DO

if found:
return UL(*[LI(*[A(db(db.plugin_wiki_page.slug==row)\

 .select(db.plugin_wiki_page.title)[0].title,\

_href=URL(r=request,f='page',args=[row,]))])\
for row in found])
else:
return nfmessage % string

else:
return ''

2010/7/28 mdipierro 

> contains and startwith do not work on GAE because they do not support
> it. I am looking into possible workaround. Instead of this:
>
> pages =
> db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug)
>for page in pages:
>if page.slug.find(string) > -1:
>found.add(page.slug)
>
> you can do this
>
> found =
> db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug).find(lambda
> r: r.slug.find(string)>=0)
>
>
>
> On Jul 27, 10:34 pm, Bruno Rocha  wrote:
> > I Solved my problem in a hard way with a custom widget, the only way I
> found
> > to perform %LIKE% on GAE
> >
> > @staticmethod
> > def searchPages(string=None,nfmessage='Nothing found with %s'):
> > """
> > string: string to be found
> > """
> > found = set()
> > if string:
> > #search in slug
> > pages =
> > db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug)
> > for page in pages:
> > if page.slug.find(string) > -1:
> > found.add(page.slug)
> >
> > if found:
> > return UL(*[LI(row) for row in found])
> > else:
> >     return nfmessage % string
> >
> > 2010/7/28 Bruno Rocha 
> >
> >
> >
> > > Also fails on JQGRID Search,
> > > I Know GAE has some limitations performing LIKE, so I think if this
> have no
> > > solution, may be disabled when running in GAE.
> >
> > > 2010/7/28 Bruno Rocha 
> >
> > > Hi,
> >
> > >> trying to use the search widget on GAE i got an error,
> >
> > >> ``
> > >> name: search
> > >> table: plugin_wiki_page
> > >> ``:widget
> >
> > >> Only EQUALS and NOT EQUALS runs ok, when I try CONTAINS, STARTSWITH or
> > >> ENDSWITH I got the error:
> >
> > >> YOU CAN TRY HERE:
> > >>http://web2pybrasil.appspot.com/cursoweb2py/plugin_wiki/page/error-on.
> ..
> >
> > >> THE ERROR:
> > >> Traceback (most recent call last): File
> > >>
> "/base/data/home/apps/web2pybrasil/3.343537232039186008/applications/cursoweb2py/models/plugin_wiki.py",
> > >> line 555, in render_widget html =
> getattr(PluginWikiWidgets,name)(**args)
> > >> File
> > >>
> "/base/data/home/apps/web2pybrasil/3.343537232039186008/applications/cursoweb2py/models/plugin_wiki.py",
> > >> line 226, in search search, results = crud.search(db[table]) File
> > >>
> "/base/data/home/apps/web2pybrasil/3.343537232039186008/gluon/tools.py",
> > >> line 2979, in search query &= self.get_query(field, opval, value) File
> > >>
> "/base/data/home/apps/web2pybrasil/3.343537232039186008/gluon/contrib/gql.py",
> > >> line 569, in __and__ if other.filters[0].one(): AttributeError:
> 'Query'
> > >> object has no attribute 'filters'
> >
> > >> --
> >
> > >>http://rochacbruno.com.br
> >
> > > --
> >
> > >http://rochacbruno.com.br
> >
> > --
> >
> > http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


[web2py] Doubt on plugin_wiki meta pages

2010-07-28 Thread Bruno Rocha
At plugin_wiki index there is:

InfoPages started with undescore are considered system pages. In particular:

>>> Can I create a page started with _ ? e.g _mycustomsystempage ?


   - meta-code  must contain code
   and it will be executed for every page.
   - meta-menu  must contain a
   description of the menu.
   - meta-header  conatins the
   content of the header.
   - meta-sidebar  conatins the
   content of the sidebar.
   - meta-footer  conatins the
   content of the footer.

>>> That means I can create any meta- page and it will be executed under
web2py env?

Tks


-- 

http://rochacbruno.com.br


Re: [web2py] Re: Doubt on plugin_wiki meta pages

2010-07-28 Thread Bruno Rocha
Thank you, I'll put my whole code into meta-code

2010/7/28 mdipierro 

> No. only meta-code with IF and ONLY IF plugin_wiki_level=3 (the
> default)
> if you set level to 2 you can use widgets but not code and if you
> lower to 1 no widgets, no code, only markmin.
>
> On Jul 28, 9:02 am, Bruno Rocha  wrote:
> > At plugin_wiki index there is:
> >
> > InfoPages started with undescore are considered system pages. In
> particular:
> >
> > >>> Can I create a page started with _ ? e.g _mycustomsystempage ?
> >
> >- meta-code  must contain
> code
> >and it will be executed for every page.
> >- meta-menu  must contain a
> >description of the menu.
> >- meta-header  conatins the
> >content of the header.
> >- meta-sidebar  conatins
> the
> >content of the sidebar.
> >- meta-footer  conatins the
> >content of the footer.
> >
> > >>> That means I can create any meta- page and it will be executed
> under
> >
> > web2py env?
> >
> > Tks
> >
> > --
> >
> > http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: cube2py system (meta) page example request

2010-07-28 Thread Bruno Rocha
TKS.
Explained a lot to me,
I'd be posting a thread pointing an error to render the sidebar in
plugin_wiki.
now I'll get with a widget.
(Addicting in widgets)

2010/7/28 mdipierro 

> mind that plugin_wiki in itself does not uses meta-header nor meta-
> footer not meta-sidebar.
>
> cube2py uses them because it has a special payout that does things
> like
>
>
>  {{=plugin_wiki.embed_page('meta-header') or XML('%s h1>%s' % (response.title, response.subtitle))}}
>
>
> So when you edit the meta-header you just put something like
>
> # my app title
> ## my app subtitle
>
> Massimo
>
> On Jul 28, 4:32 pm, Scott  wrote:
> > Massimo provided excellent examples of meta-menu and meta-code on
> > Vimeo.  However, could someone post examples of meta-header, meta-
> > sidebar, and meta-footer?
> >
> > Thanks!
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: cube2py system (meta) page example request

2010-07-28 Thread Bruno Rocha
>
> By The Way
> There are many differences between plugin_wiki and c2p? which are most
> important?
>
> 2010/7/28 Bruno Rocha 
> >
> > TKS.
> >
> > Explained a lot to me,
> > I'd be posting a thread pointing an error to render the sidebar in
> plugin_wiki.
> > now I'll get with a widget.
> > (Addicting in widgets)
>
> 2010/7/28 mdipierro 
>
> mind that plugin_wiki in itself does not uses meta-header nor meta-
>> footer not meta-sidebar.
>>
>> cube2py uses them because it has a special payout that does things
>> like
>>
>>
>>  {{=plugin_wiki.embed_page('meta-header') or XML('%s> h1>%s' % (response.title, response.subtitle))}}
>>
>>
>> So when you edit the meta-header you just put something like
>>
>> # my app title
>> ## my app subtitle
>>
>> Massimo
>>
>> On Jul 28, 4:32 pm, Scott  wrote:
>> > Massimo provided excellent examples of meta-menu and meta-code on
>> > Vimeo.  However, could someone post examples of meta-header, meta-
>> > sidebar, and meta-footer?
>> >
>> > Thanks!
>>
>
>
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


[web2py] Plugin_wiki - the URL() helper has changed in version 1.81.5?

2010-07-28 Thread Bruno Rocha
##plugin_wiki
There was some change in the URL() helper, from 1.81.4 to 1.81.5?

To the search widget in <
http://web2pybrasil.appspot.com/cursoweb2py/default/index>
before, in 1.81.4 I did this:

return UL(*[LI(*[A(db(db.plugin_wiki_page.slug==row)\

.select(db.plugin_wiki_page.title)[0].title,\

_href=URL(r=request,f='page',args=[row,]))])\
for row in found])


and the result was:
Home

but trying localy with the new version 1.81.5 the result is:

Home

Notice, that I am doing it with ajax() to load the item list

$('#search').keyup(function(){
ajax("{{=URL(r=request,
c='plugin_wiki',f='page.load/searchpages')}}",['search'],'target');
return false;
});

Why .load is being appended to the url generated by URL() ?

Something that can be done to continue as before?

Tks

-- 

http://rochacbruno.com.br


[web2py] Re: Plugin_wiki - the URL() helper has changed in version 1.81.5?

2010-07-28 Thread Bruno Rocha
Nevermind,

I Solved using this way:

_href=URL(request.application,'plugin_wiki','page',args=[row,])

.load is not appended to the link.

Tks

2010/7/29 Bruno Rocha 

>
> ##plugin_wiki
> There was some change in the URL() helper, from 1.81.4 to 1.81.5?
>
> To the search widget in <
> http://web2pybrasil.appspot.com/cursoweb2py/default/index>
> before, in 1.81.4 I did this:
>
> return UL(*[LI(*[A(db(db.plugin_wiki_page.slug==row)\
> 
> .select(db.plugin_wiki_page.title)[0].title,\
>  
> _href=URL(r=request,f='page',args=[row,]))])\
> for row in found])
>
>
> and the result was:
> Home
>
> but trying localy with the new version 1.81.5 the result is:
>
>  href="/application/plugin_wiki/page.load/home">Home
>
> Notice, that I am doing it with ajax() to load the item list
>
> $('#search').keyup(function(){
> ajax("{{=URL(r=request,
> c='plugin_wiki',f='page.load/searchpages')}}",['search'],'target');
> return false;
> });
>
> Why .load is being appended to the url generated by URL() ?
>
> Something that can be done to continue as before?
>
> Tks
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Getting Eclipse / Pydev running

2010-07-29 Thread Bruno Rocha
did you provide password parameter to run web2py.py?


2010/7/29 pabloest 

> Hi,
>
> I'm having some trouble simply getting started with Eclipse and Pydev
> for web2py development.
> I can't get into a debugging mode with web2py.py and the web server
> will not even start. When I right-click and select Debug As > Python
> Run, I get error messages that say:
> -unexpected error setting up the debugger: socket closed
> -pydev debugger: starting
> Could not connect to localhost: 51530
> Traceback (most recent call last):
>  File "/Applications/eclipse/plugins/
> org.python.pydev.debug_1.6.0.2010071813/pysrc/pydevd_comm.py", line
> 341, in StartClient
>s.connect((host, port))
>  File "", line 1, in connect
> gaierror: (8, 'nodename nor servname provided, or not known')
>
> I haven't modified my db.py files from the default.
> It seems I am missing something quite basic as I haven't found
> anything on this message board or others to indicate this is a normal
> problem.
>
> I'm running Eclipse IDE for Javascript Developers (by the way, does it
> matter which Eclipse? I also tried with Eclipse Classic and got the
> same results).
> Eclipse v1.3.0.2
> Eclipse Platform SDK v3.0.6
> PyDev for Eclipse 1.6.0.2
> PyDev Mylyn Integration 0.3.0
>
> I'm on a Mac 10.5.8 and Python 2.6.5.
> Any hints?
> Thanks much.
>



-- 

http://rochacbruno.com.br


[web2py] plugin_wiki - Ajax to save pages?

2010-07-29 Thread Bruno Rocha
 to save a page in plugin_wiki page editor, we have to submit the page or
focus in page title then hit enter.

As I am writing large pages, I have 2 displays when editing a page, first to
edit the code, and the other to frequently refresh and view the result.

It is so annoying to submit the page every time I need to have a preview, is
there any way to save the page code via Ajax, just like appadmin edit_area ?

or may be, to have a preview panel, as you can see when editing a slice on <
web2pyslices.com> or the one used to edit markdown in 

Tks

-- 

http://rochacbruno.com.br


[web2py] plugin_wiki - how to define the target to an external link?

2010-07-29 Thread Bruno Rocha
Any way to define the target="_blank" for  [["a link" http://someurl.com]]

any way like this: [["a link" http://someurl.com "_blank"]] ???

-- 

http://rochacbruno.com.br


Re: [web2py] Re: plugin_wiki - how to define the target to an external link?

2010-07-30 Thread Bruno Rocha
As i really didn't figure out how to implement what you propose, I decided
to do it in the wrong way:

in meta-code I defined:

def elink(text,url,target='_blank'):
"""
>>>elink('Google','http://google.com')
'Google'
>>>elink('Google','http://google.com','_self')
'Google'
"""
return XML("%s" %
(url,text,target,text))

and in my wiki-page:

- ``{{=elink('Python para Desenvolvedores','http://migre.me/RdTv
','_blank')}}``:template

which returns:

http://migre.me/RdTv http://migre.me/RdTv>"
alt="Python para Desenvolvedores" target="_blank">Python para
Desenvolvedores


I Know it is bad and ugly, but I have to save time now, later I will try to
do what you said.


Tks


2010/7/30 mdipierro 

> You can use the extra parameters to define behaviour yourself
>
> ``link http://``:link_target_blank
>
> extra = {'link_target_blank':lambda x: '
> %s' % (x.rsplit(' ',1)[1],x.rsplit(' ',1)[0])
>
> On Jul 29, 8:46 pm, Bruno Rocha  wrote:
> > Any way to define the target="_blank" for  [["a link"http://someurl.com
> ]]
> >
> > any way like this: [["a link"http://someurl.com"_blank";]] ???
> >
> > --
> >
> > http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: fun with metaclasses

2010-07-30 Thread Bruno Rocha
I completelly agree with Jonathan, I also want to have a deeper explanation
on DAL backgrounds.

web2py is Agile enough for me and for my development team, but, sometimes we
spent more time trying to figure out "how to" to some things, and testing
alternatives than developing real solutions.

The book is very good when we need to solve common and trivial things,
otherwise when we need to go further. The only solution has been testing,
looking for examples, using this list, or in many cases reading the source
code and trying to understand what is happening behind the scenes. It costs
a great time.

As was mentioned in the "why I hate Django" video, using frameworks you gain
time in the early stages, but lost much more in that we need to refine and
tune up applications.

For this reason I support a forum , IMHO, until we have a
broader and deeper documentation, a forum would be much more usable than
this list, and the DRY concept could be applied more easily to posts in a
forum, rather than messages in this list.
Forum can do things like a good search engine, sintax highlighting,
screenshots embeded in to the context
and yet it is possible to create mechanisms for threads to be followed by
email, and people could start new threads by email as well.  Perhaps using
markmin syntax to include files, highlight the code, and things ... more

This type of platform could be better used to build further documentation.

why not support and start an official web2py forum?




2010/7/30 Jonathan Lundell 

> On Jul 30, 2010, at 7:22 PM, Iceberg wrote:
>
> > On Jul 31, 1:15 am, Jonathan Lundell  wrote:
> >> On Jul 30, 2010, at 9:19 AM, VP wrote:
> >>> On Jul 30, 9:35 am, mdipierro  wrote:
> 
> http://gluonframework.wordpress.com/2010/07/30/web2py-and-metaclasses/
> >>
> >>> This is really nice.  Please do more of this.
> >>
> >> My initial reaction is the opposite. The result might be more readable,
> but it doesn't strike me as more writable.
> >>
> >> What would be most helpful for me would be a deeper explanation (in the
> book) of what's going on behind the existing DAL "magic" syntax, rather than
> adding yet another layer of magic.
> >
> > You make a good point, Jonathan. And I think there is a underlying
> > question here. Which kind of audience is web2py targeting to?  If for
> > developers, the existing DAL syntax is already powerful and magical
> > enough (the document is also good, here it is.
> http://web2py.com/book/default/chapter/06
> > ). Developers don't need another layer which is more fancy but not
> > more powerful.
>
> I'm not satisfied with the treatment in the book. I'd like to see each of
> the DAL objects more completely described, especially as to the underlying
> Python types and the operations that they implicitly support. Several of
> them IIRC are polymorphic wrt their argument types, and you either have to
> divine this telepathically or read the source in detail. Likewise operator
> overloading.
>
> I'm sure it's second nature to Massimo, but for most of us, we have to hunt
> around for an example that matches our situation, and blindly copy & paste.
> Either that or experiment until it stops raising exceptions




-- 

http://rochacbruno.com.br


Re: [web2py] Re: fun with metaclasses

2010-07-31 Thread Bruno Rocha
It is impossible not to use the official book as a reference. since the book
is the only official documentation available.
I use it for  writing a series of tutorials and handouts, used for training
that I will give, and I'm also writing a documentation in Portuguese, for
beginners with web2py.

In all cases, the Official Book has been used as a reference, and often
translated and quoted.

I support the creation of a platform for documentation, but once the
incentive does not come through Massimo and development team.

I believe that nobody will feel motivated to get something in the dark.



2010/7/31 Thadeus Burgess 

> The book is not released as open source. Massimo can only post it
> online through a loophole with his publisher.
>
> any community based documentation will need to be started from the
> ground up, and not taking anything from the book.
>
> --
> Thadeus
>
>
>
>
>
> On Sat, Jul 31, 2010 at 12:56 PM, Scott  wrote:
> > I support community contributions but there still needs to be an
> > "editor" or someone ultimately responsible for the changes.
> >
> > On Jul 31, 11:27 am, VP  wrote:
> >> I completely support these ideas.  It seems the book is Massimo's
> >> effort, not a community's effort.  Documentation needs to be a
> >> community effort; look at Django, Drupal.
> >>
> >> On Jul 30, 11:03 pm, Bruno Rocha  wrote:
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> > I completelly agree with Jonathan, I also want to have a deeper
> explanation
> >> > on DAL backgrounds.
> >>
> >> > web2py is Agile enough for me and for my development team, but,
> sometimes we
> >> > spent more time trying to figure out "how to" to some things, and
> testing
> >> > alternatives than developing real solutions.
> >>
> >> > The book is very good when we need to solve common and trivial things,
> >> > otherwise when we need to go further. The only solution has been
> testing,
> >> > looking for examples, using this list, or in many cases reading the
> source
> >> > code and trying to understand what is happening behind the scenes. It
> costs
> >> > a great time.
> >>
> >> > As was mentioned in the "why I hate Django" video, using frameworks
> you gain
> >> > time in the early stages, but lost much more in that we need to refine
> and
> >> > tune up applications.
> >>
> >> > For this reason I support a forum , IMHO, until we have
> a
> >> > broader and deeper documentation, a forum would be much more usable
> than
> >> > this list, and the DRY concept could be applied more easily to posts
> in a
> >> > forum, rather than messages in this list.
> >> > Forum can do things like a good search engine, sintax highlighting,
> >> > screenshots embeded in to the context
> >> > and yet it is possible to create mechanisms for threads to be followed
> by
> >> > email, and people could start new threads by email as well.  Perhaps
> using
> >> > markmin syntax to include files, highlight the code, and things ...
> more
> >>
> >> > This type of platform could be better used to build further
> documentation.
> >>
> >> > why not support and start an official web2py forum?
> >>
> >> > 2010/7/30 Jonathan Lundell 
> >>
> >> > > On Jul 30, 2010, at 7:22 PM, Iceberg wrote:
> >>
> >> > > > On Jul 31, 1:15 am, Jonathan Lundell  wrote:
> >> > > >> On Jul 30, 2010, at 9:19 AM, VP wrote:
> >> > > >>> On Jul 30, 9:35 am, mdipierro  wrote:
> >>
> >> > >
> http://gluonframework.wordpress.com/2010/07/30/web2py-and-metaclasses/
> >>
> >> > > >>> This is really nice.  Please do more of this.
> >>
> >> > > >> My initial reaction is the opposite. The result might be more
> readable,
> >> > > but it doesn't strike me as more writable.
> >>
> >> > > >> What would be most helpful for me would be a deeper explanation
> (in the
> >> > > book) of what's going on behind the existing DAL "magic" syntax,
> rather than
> >> > > adding yet another layer of magic.
> >>
> >> > > > You make a good point, Jonathan. And I think there is a underlying
> >> > > > question here. Which kind of audience is web2py targeting t

[web2py] plugin_wiki suggestions

2010-07-31 Thread Bruno Rocha
Sorry again, I am creating a new thread about plugin_wiki.

I wonder if there is any public place where we can write suggestions,
criticisms, and send questions exclusively about plugin_wiki, markmin and
cube2py?

-- 

http://rochacbruno.com.br


Re: [web2py] Re: plugin_wiki suggestions

2010-07-31 Thread Bruno Rocha
I am developing and writing a lot with plugin_wiki (cube2py). I already have
some suggestions, observations and have also found some bugs.
As I'm finding more issues, I will posting here in this thread. If someone
else has something to add, enjoy the thread.

I am working now on this page : http://web2pybrasil.appspot.com/cursoweb2py/

*
*
*Bugs I Found:*

-* **Comments Widget*
I noticed that the comments widget is restricted to logged in users, the
code that generates the widget has requires_login (), this is great for
protecting users not logged in to write.
however, as the same widget generates the form for adding a comment, and
also generates a list of comments to display, it is not possible to display
existing comments to a user who is not logged.
I suggest dividing into two widgets, one to generate the form of insertion,
and this would be protected. And another to generate a list of existing
comments, and this would free reading. this last could be used in another
place eg:  to show recent comments for a page.

-* Searches with crud.search and jqgrid on GAE*
I got error using crud.search and jqgrid widgets, as GAE does not allow to
perform LIKE, StartsWIth, EndsWith, Contains, etc, while do not have any
workarround, I think that options should be disabled When it is detected
that is working in GAE


*Suggestions:*( Too many things. Sorry )

- *Widget_Builder:*
Binds the code generated by widget builder direct to the page content
editor, I think it is not hard to do with JavaScript, preventing the
copy-paste when using widget builder

- *Widget* *Messages customization*
Include the total capacity for customize the output messages  in the
standard widgets. "load_action" and "load_url" eg uses AJAX and display the
message "loading", it would be nice to have how to pass as a parameter, a
new message to be displayed, it is usefull for translating.

- *Blank lines, white space:*
Markdown for example set spaces by using two blank spaces at the end of each
line to make a break, I'm developing a lot with plugin_wiki and had to
create a function just to give me white space and blank lines.
``{{=br(2)}}``:template

- *Categories:*
wiki or any other type of page created with plugin_wiki, IMHO, will need
some kind of category management. it is not difficult to implement as
standard, without having to create custom widgets, as I had to do.

- *Search: *
I created a custom widget that performs searches in titles, slugs, and body
of the pages, and it is running on GAE,  I believe this should be used as a
widget placed on the meta-header, or meta-sidebar for example. but could be
part of the plugin itself, considering that this is a basic need of any wiki
page.

- *Link Targets:*
I do not think there is a specific reason not to open external links in a
wiki page, wikipedia does, it would be interesting to receive the parameter
"target" by default in the marking of a [[link]] as [[linktitle
http://linkurl  blank]]

- *Preview and Saving: *
It is very annoying having to submit  the page every time we need to save,
then to have a preview, the saving could happen with AJAX and have option to
view a Preview window.

- *Lists:*
 In ordered and unordered lists creates with - and +, Needs a way to create
sublevels with lists, maybe -- and ++
- A Topic
-- Subtopic of A Topic
--- Subtopic of a subtopic of A Topic
-- Another subtopic of A Topic

+ A Topic
++ Subtopic of A Topic
+++ Subtopic of a subtopic of A Topic
++ Another subtopic of A Topic

- *Page auto reference:*
It would be interesting to have a variable that works as ALIAS to reference
the page itself, when I need to reference the current page into a widget I
use {{= request.args(0)}} would be more interesting to use something like
"THISPAGE"

- *Wiki Pages management: *
Wiki Pages management "plugin_wiki / index" tends to get a little confusing
as the number of existing pages grows, it would be interesting to have
pagination, search, categorization.

- *Meta Pages: *
As a developer I use a lot the page meta-code, but as the code grows, things
start getting difficult to administer, would have the option to create more
pages like meta-code, for example meta-code- xxx, meta-code-something,
meta-code-anynameigive, and they have the same operation of the meta-code.

By Now , that's it. As Im using I will send more thoughts about it.
I am available for any help or tests you need.

{{=thanks}}

---
rochacbruno.com.br
@rochacbruno

2010/8/1 mdipierro 

> Fornow you can post here.Please send your comments asap because I am
> about to revise it and write a book chapter about it.
>
> On 1 Ago, 04:55, Bruno Rocha  wrote:
> > Sorry again, I am creating a new thread about plugin_wiki.
> >
> > I wonder if there is any public place where we can write suggestions,
> > criticisms, and send questions exclusively about plugin_wiki, markmin and
> > cube2py?
> >
> > --
> >
> > http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: plugin_wiki suggestions

2010-07-31 Thread Bruno Rocha
I Just found one more thing:

take this page by example:
http://web2pybrasil.appspot.com/cursoweb2py/plugin_wiki/page/curso-web2py-002

now add a ".code" to he action

http://web2pybrasil.appspot.com/cursoweb2py/plugin_wiki/page.code/curso-web2py-002

even logged out, you can see the code behind the page, as we pass parameters
to custom widgets, I think this could not happens.

but, it is usefull to still have page.load, page.xml, page.json, and
page.rss functions.


2010/8/1 Bruno Rocha 

> I am developing and writing a lot with plugin_wiki (cube2py). I already
> have some suggestions, observations and have also found some bugs.
> As I'm finding more issues, I will posting here in this thread. If someone
> else has something to add, enjoy the thread.
>
> I am working now on this page :
> http://web2pybrasil.appspot.com/cursoweb2py/
>
> *
> *
> *Bugs I Found:*
>
> -* **Comments Widget*
> I noticed that the comments widget is restricted to logged in users, the
> code that generates the widget has requires_login (), this is great for
> protecting users not logged in to write.
> however, as the same widget generates the form for adding a comment, and
> also generates a list of comments to display, it is not possible to display
> existing comments to a user who is not logged.
> I suggest dividing into two widgets, one to generate the form of insertion,
> and this would be protected. And another to generate a list of existing
> comments, and this would free reading. this last could be used in another
> place eg:  to show recent comments for a page.
>
> -* Searches with crud.search and jqgrid on GAE*
> I got error using crud.search and jqgrid widgets, as GAE does not allow to
> perform LIKE, StartsWIth, EndsWith, Contains, etc, while do not have any
> workarround, I think that options should be disabled When it is detected
> that is working in GAE
>
>
> *Suggestions:*( Too many things. Sorry )
>
> - *Widget_Builder:*
> Binds the code generated by widget builder direct to the page content
> editor, I think it is not hard to do with JavaScript, preventing the
> copy-paste when using widget builder
>
> - *Widget* *Messages customization*
> Include the total capacity for customize the output messages  in the
> standard widgets. "load_action" and "load_url" eg uses AJAX and display
> the message "loading", it would be nice to have how to pass as a parameter,
> a new message to be displayed, it is usefull for translating.
>
> - *Blank lines, white space:*
> Markdown for example set spaces by using two blank spaces at the end of
> each line to make a break, I'm developing a lot with plugin_wiki and had to
> create a function just to give me white space and blank lines.
> ``{{=br(2)}}``:template
>
> - *Categories:*
> wiki or any other type of page created with plugin_wiki, IMHO, will need
> some kind of category management. it is not difficult to implement as
> standard, without having to create custom widgets, as I had to do.
>
> - *Search: *
> I created a custom widget that performs searches in titles, slugs, and body
> of the pages, and it is running on GAE,  I believe this should be used as a
> widget placed on the meta-header, or meta-sidebar for example. but could
> be part of the plugin itself, considering that this is a basic need of any
> wiki page.
>
> - *Link Targets:*
> I do not think there is a specific reason not to open external links in a
> wiki page, wikipedia does, it would be interesting to receive the parameter
> "target" by default in the marking of a [[link]] as [[linktitle
> http://linkurl  blank]]
>
> - *Preview and Saving: *
> It is very annoying having to submit  the page every time we need to save,
> then to have a preview, the saving could happen with AJAX and have option to
> view a Preview window.
>
> - *Lists:*
>  In ordered and unordered lists creates with - and +, Needs a way to create
> sublevels with lists, maybe -- and ++
> - A Topic
> -- Subtopic of A Topic
> --- Subtopic of a subtopic of A Topic
> -- Another subtopic of A Topic
>
> + A Topic
> ++ Subtopic of A Topic
> +++ Subtopic of a subtopic of A Topic
> ++ Another subtopic of A Topic
>
> - *Page auto reference:*
> It would be interesting to have a variable that works as ALIAS to reference
> the page itself, when I need to reference the current page into a widget I
> use {{= request.args(0)}} would be more interesting to use something like
> "THISPAGE"
>
> - *Wiki Pages management: *
> Wiki Pages management "plugin_wiki / index" tends to get a little confusing
> as the number of existing pages grows, it would be interesting to have
> pagination, search, categorizatio

Re: [web2py] Re: plugin_wiki suggestions

2010-07-31 Thread Bruno Rocha
But the ".code" thing, is usefull for editors, so there is a way to ".code"
output be available only to logged in editor users?

its usefull to check the code as in
http://web2pybrasil.appspot.com/cursoweb2py/plugin_wiki/page.code/meta-code


2010/8/1 Bruno Rocha 

> I Just found one more thing:
>
> take this page by example:
>
> http://web2pybrasil.appspot.com/cursoweb2py/plugin_wiki/page/curso-web2py-002
>
> now add a ".code" to he action
>
>
> http://web2pybrasil.appspot.com/cursoweb2py/plugin_wiki/page.code/curso-web2py-002
>
> even logged out, you can see the code behind the page, as we pass
> parameters to custom widgets, I think this could not happens.
>
> but, it is usefull to still have page.load, page.xml, page.json, and
> page.rss functions.
>
>
> 2010/8/1 Bruno Rocha 
>
> I am developing and writing a lot with plugin_wiki (cube2py). I already
>> have some suggestions, observations and have also found some bugs.
>> As I'm finding more issues, I will posting here in this thread. If
>> someone else has something to add, enjoy the thread.
>>
>> I am working now on this page :
>> http://web2pybrasil.appspot.com/cursoweb2py/
>>
>> *
>> *
>> *Bugs I Found:*
>>
>> -* **Comments Widget*
>> I noticed that the comments widget is restricted to logged in users, the
>> code that generates the widget has requires_login (), this is great for
>> protecting users not logged in to write.
>> however, as the same widget generates the form for adding a comment, and
>> also generates a list of comments to display, it is not possible to display
>> existing comments to a user who is not logged.
>> I suggest dividing into two widgets, one to generate the form of
>> insertion, and this would be protected. And another to generate a list of
>> existing comments, and this would free reading. this last could be used in
>> another place eg:  to show recent comments for a page.
>>
>> -* Searches with crud.search and jqgrid on GAE*
>> I got error using crud.search and jqgrid widgets, as GAE does not allow to
>> perform LIKE, StartsWIth, EndsWith, Contains, etc, while do not have any
>> workarround, I think that options should be disabled When it is detected
>> that is working in GAE
>>
>>
>> *Suggestions:*( Too many things. Sorry )
>>
>> - *Widget_Builder:*
>> Binds the code generated by widget builder direct to the page content
>> editor, I think it is not hard to do with JavaScript, preventing the
>> copy-paste when using widget builder
>>
>> - *Widget* *Messages customization*
>> Include the total capacity for customize the output messages  in the
>> standard widgets. "load_action" and "load_url" eg uses AJAX and display
>> the message "loading", it would be nice to have how to pass as a parameter,
>> a new message to be displayed, it is usefull for translating.
>>
>> - *Blank lines, white space:*
>> Markdown for example set spaces by using two blank spaces at the end of
>> each line to make a break, I'm developing a lot with plugin_wiki and had to
>> create a function just to give me white space and blank lines.
>> ``{{=br(2)}}``:template
>>
>> - *Categories:*
>> wiki or any other type of page created with plugin_wiki, IMHO, will need
>> some kind of category management. it is not difficult to implement as
>> standard, without having to create custom widgets, as I had to do.
>>
>> - *Search: *
>> I created a custom widget that performs searches in titles, slugs, and
>> body of the pages, and it is running on GAE,  I believe this should be used
>> as a widget placed on the meta-header, or meta-sidebar for example. but
>> could be part of the plugin itself, considering that this is a basic need of
>> any wiki page.
>>
>> - *Link Targets:*
>> I do not think there is a specific reason not to open external links in a
>> wiki page, wikipedia does, it would be interesting to receive the parameter
>> "target" by default in the marking of a [[link]] as [[linktitle
>> http://linkurl  blank]]
>>
>> - *Preview and Saving: *
>> It is very annoying having to submit  the page every time we need to save,
>> then to have a preview, the saving could happen with AJAX and have option to
>> view a Preview window.
>>
>> - *Lists:*
>>  In ordered and unordered lists creates with - and +, Needs a way to
>> create sublevels with lists, maybe -- and ++
>> - A Topic
>> -- Subtopic of A Topic
>> --- Subtopic of a subtopic of A Topic
>>

Re: [web2py] Re: plugin_wiki suggestions

2010-08-01 Thread Bruno Rocha
One more suggestion for today.

It will be great to create new pages from "template", as creating a template
page with standard texts, widgets and other stuff, we have any way to
duplicate that page.

actually just creating a way to duplicate certain page will do that work.

{{=thanks}}

2010/8/1 Bruno Rocha 

> But the ".code" thing, is usefull for editors, so there is a way to ".code"
> output be available only to logged in editor users?
>
> its usefull to check the code as in
> http://web2pybrasil.appspot.com/cursoweb2py/plugin_wiki/page.code/meta-code
>
>
> 2010/8/1 Bruno Rocha 
>
>> I Just found one more thing:
>>
>> take this page by example:
>>
>> http://web2pybrasil.appspot.com/cursoweb2py/plugin_wiki/page/curso-web2py-002
>>
>> now add a ".code" to he action
>>
>>
>> http://web2pybrasil.appspot.com/cursoweb2py/plugin_wiki/page.code/curso-web2py-002
>>
>> even logged out, you can see the code behind the page, as we pass
>> parameters to custom widgets, I think this could not happens.
>>
>> but, it is usefull to still have page.load, page.xml, page.json, and
>> page.rss functions.
>>
>>
>> 2010/8/1 Bruno Rocha 
>>
>> I am developing and writing a lot with plugin_wiki (cube2py). I already
>>> have some suggestions, observations and have also found some bugs.
>>> As I'm finding more issues, I will posting here in this thread. If
>>> someone else has something to add, enjoy the thread.
>>>
>>> I am working now on this page :
>>> http://web2pybrasil.appspot.com/cursoweb2py/
>>>
>>> *
>>> *
>>> *Bugs I Found:*
>>>
>>> -* **Comments Widget*
>>> I noticed that the comments widget is restricted to logged in users, the
>>> code that generates the widget has requires_login (), this is great for
>>> protecting users not logged in to write.
>>> however, as the same widget generates the form for adding a comment, and
>>> also generates a list of comments to display, it is not possible to display
>>> existing comments to a user who is not logged.
>>> I suggest dividing into two widgets, one to generate the form of
>>> insertion, and this would be protected. And another to generate a list
>>> of existing comments, and this would free reading. this last could be used
>>> in another place eg:  to show recent comments for a page.
>>>
>>> -* Searches with crud.search and jqgrid on GAE*
>>> I got error using crud.search and jqgrid widgets, as GAE does not allow
>>> to perform LIKE, StartsWIth, EndsWith, Contains, etc, while do not have any
>>> workarround, I think that options should be disabled When it is detected
>>> that is working in GAE
>>>
>>>
>>> *Suggestions:*( Too many things. Sorry )
>>>
>>> - *Widget_Builder:*
>>> Binds the code generated by widget builder direct to the page content
>>> editor, I think it is not hard to do with JavaScript, preventing the
>>> copy-paste when using widget builder
>>>
>>> - *Widget* *Messages customization*
>>> Include the total capacity for customize the output messages  in the
>>> standard widgets. "load_action" and "load_url" eg uses AJAX and display
>>> the message "loading", it would be nice to have how to pass as a parameter,
>>> a new message to be displayed, it is usefull for translating.
>>>
>>> - *Blank lines, white space:*
>>> Markdown for example set spaces by using two blank spaces at the end of
>>> each line to make a break, I'm developing a lot with plugin_wiki and had to
>>> create a function just to give me white space and blank lines.
>>> ``{{=br(2)}}``:template
>>>
>>> - *Categories:*
>>> wiki or any other type of page created with plugin_wiki, IMHO, will need
>>> some kind of category management. it is not difficult to implement as
>>> standard, without having to create custom widgets, as I had to do.
>>>
>>> - *Search: *
>>> I created a custom widget that performs searches in titles, slugs, and
>>> body of the pages, and it is running on GAE,  I believe this should be used
>>> as a widget placed on the meta-header, or meta-sidebar for example. but
>>> could be part of the plugin itself, considering that this is a basic need of
>>> any wiki page.
>>>
>>> - *Link Targets:*
>>> I do not think there is a specific reason not to open external links in a
>>> wiki page

Re: [web2py] Re: rewrite url using routes.py

2010-08-01 Thread Bruno Rocha
Does not works here, may I doing something wrong.

$1 HelloWorld
$2 default
$3 index/args/

I do not want the url: http://127.0.0.1/HelloWorld/default/index
I need http://127.0.0.1/index

that points me to the place I need, but raises INVALID REQUEST

I tried to remane my app to 'init' but does not works too.

Where can I find more detailed explanation on routes.py ?



2010/8/1 Thadeus Burgess 

> Don't forget routes out
>
> routes_out = (
>  ('/(.*)/(.*)/(.*)', '/$3'),
> )
>
> --
> Thadeus
>
>
>
>
>
> On Sun, Aug 1, 2010 at 1:16 AM, Vasile Ermicioi  wrote:
> > oops, not like that but like this
> > routes_in = (
> > ('/(.*)/(.*)',   '/$1/yourcontroller/$2'),
> > )
> > everything is passed to a controller (e.g. 'default')
> >
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: plugin_wiki suggestions

2010-08-01 Thread Bruno Rocha
Page Attachments does not works on GAE

2010/8/1 Bruno Rocha 

> I am developing and writing a lot with plugin_wiki (cube2py). I already
> have some suggestions, observations and have also found some bugs.
> As I'm finding more issues, I will posting here in this thread. If someone
> else has something to add, enjoy the thread.
>
> I am working now on this page :
> http://web2pybrasil.appspot.com/cursoweb2py/
>
> *
> *
> *Bugs I Found:*
>
> -* **Comments Widget*
> I noticed that the comments widget is restricted to logged in users, the
> code that generates the widget has requires_login (), this is great for
> protecting users not logged in to write.
> however, as the same widget generates the form for adding a comment, and
> also generates a list of comments to display, it is not possible to display
> existing comments to a user who is not logged.
> I suggest dividing into two widgets, one to generate the form of insertion,
> and this would be protected. And another to generate a list of existing
> comments, and this would free reading. this last could be used in another
> place eg:  to show recent comments for a page.
>
> -* Searches with crud.search and jqgrid on GAE*
> I got error using crud.search and jqgrid widgets, as GAE does not allow to
> perform LIKE, StartsWIth, EndsWith, Contains, etc, while do not have any
> workarround, I think that options should be disabled When it is detected
> that is working in GAE
>
>
> *Suggestions:*( Too many things. Sorry )
>
> - *Widget_Builder:*
> Binds the code generated by widget builder direct to the page content
> editor, I think it is not hard to do with JavaScript, preventing the
> copy-paste when using widget builder
>
> - *Widget* *Messages customization*
> Include the total capacity for customize the output messages  in the
> standard widgets. "load_action" and "load_url" eg uses AJAX and display
> the message "loading", it would be nice to have how to pass as a parameter,
> a new message to be displayed, it is usefull for translating.
>
> - *Blank lines, white space:*
> Markdown for example set spaces by using two blank spaces at the end of
> each line to make a break, I'm developing a lot with plugin_wiki and had to
> create a function just to give me white space and blank lines.
> ``{{=br(2)}}``:template
>
> - *Categories:*
> wiki or any other type of page created with plugin_wiki, IMHO, will need
> some kind of category management. it is not difficult to implement as
> standard, without having to create custom widgets, as I had to do.
>
> - *Search: *
> I created a custom widget that performs searches in titles, slugs, and body
> of the pages, and it is running on GAE,  I believe this should be used as a
> widget placed on the meta-header, or meta-sidebar for example. but could
> be part of the plugin itself, considering that this is a basic need of any
> wiki page.
>
> - *Link Targets:*
> I do not think there is a specific reason not to open external links in a
> wiki page, wikipedia does, it would be interesting to receive the parameter
> "target" by default in the marking of a [[link]] as [[linktitle
> http://linkurl  blank]]
>
> - *Preview and Saving: *
> It is very annoying having to submit  the page every time we need to save,
> then to have a preview, the saving could happen with AJAX and have option to
> view a Preview window.
>
> - *Lists:*
>  In ordered and unordered lists creates with - and +, Needs a way to create
> sublevels with lists, maybe -- and ++
> - A Topic
> -- Subtopic of A Topic
> --- Subtopic of a subtopic of A Topic
> -- Another subtopic of A Topic
>
> + A Topic
> ++ Subtopic of A Topic
> +++ Subtopic of a subtopic of A Topic
> ++ Another subtopic of A Topic
>
> - *Page auto reference:*
> It would be interesting to have a variable that works as ALIAS to reference
> the page itself, when I need to reference the current page into a widget I
> use {{= request.args(0)}} would be more interesting to use something like
> "THISPAGE"
>
> - *Wiki Pages management: *
> Wiki Pages management "plugin_wiki / index" tends to get a little confusing
> as the number of existing pages grows, it would be interesting to have
> pagination, search, categorization.
>
> - *Meta Pages: *
> As a developer I use a lot the page meta-code, but as the code grows,
> things start getting difficult to administer, would have the option to
> create more pages like meta-code, for example meta-code- xxx,
> meta-code-something, meta-code-anynameigive, and they have the same
> operation of the meta-code.
>
> By Now , that's it. As Im using I will send more thoughts about it.
&

Re: [web2py] Re: plugin_wiki suggestions

2010-08-01 Thread Bruno Rocha
SlideShow widget also does not runs on GAE.

try it; http://web2pybrasil.appspot.com/init/plugin_wiki/page/images

the code: http://web2pybrasil.appspot.com/init/plugin_wiki/page.code/images

Given an image saved as BLOB in GAE, how to retrieve this image URL to put
it on Wiki Page body?

2010/8/1 Bruno Rocha 

> Page Attachments does not works on GAE
>
> 2010/8/1 Bruno Rocha 
>
> I am developing and writing a lot with plugin_wiki (cube2py). I already
>> have some suggestions, observations and have also found some bugs.
>> As I'm finding more issues, I will posting here in this thread. If
>> someone else has something to add, enjoy the thread.
>>
>> I am working now on this page :
>> http://web2pybrasil.appspot.com/cursoweb2py/
>>
>> *
>> *
>> *Bugs I Found:*
>>
>> -* **Comments Widget*
>> I noticed that the comments widget is restricted to logged in users, the
>> code that generates the widget has requires_login (), this is great for
>> protecting users not logged in to write.
>> however, as the same widget generates the form for adding a comment, and
>> also generates a list of comments to display, it is not possible to display
>> existing comments to a user who is not logged.
>> I suggest dividing into two widgets, one to generate the form of
>> insertion, and this would be protected. And another to generate a list of
>> existing comments, and this would free reading. this last could be used in
>> another place eg:  to show recent comments for a page.
>>
>> -* Searches with crud.search and jqgrid on GAE*
>> I got error using crud.search and jqgrid widgets, as GAE does not allow to
>> perform LIKE, StartsWIth, EndsWith, Contains, etc, while do not have any
>> workarround, I think that options should be disabled When it is detected
>> that is working in GAE
>>
>>
>> *Suggestions:*( Too many things. Sorry )
>>
>> - *Widget_Builder:*
>> Binds the code generated by widget builder direct to the page content
>> editor, I think it is not hard to do with JavaScript, preventing the
>> copy-paste when using widget builder
>>
>> - *Widget* *Messages customization*
>> Include the total capacity for customize the output messages  in the
>> standard widgets. "load_action" and "load_url" eg uses AJAX and display
>> the message "loading", it would be nice to have how to pass as a parameter,
>> a new message to be displayed, it is usefull for translating.
>>
>> - *Blank lines, white space:*
>> Markdown for example set spaces by using two blank spaces at the end of
>> each line to make a break, I'm developing a lot with plugin_wiki and had to
>> create a function just to give me white space and blank lines.
>> ``{{=br(2)}}``:template
>>
>> - *Categories:*
>> wiki or any other type of page created with plugin_wiki, IMHO, will need
>> some kind of category management. it is not difficult to implement as
>> standard, without having to create custom widgets, as I had to do.
>>
>> - *Search: *
>> I created a custom widget that performs searches in titles, slugs, and
>> body of the pages, and it is running on GAE,  I believe this should be used
>> as a widget placed on the meta-header, or meta-sidebar for example. but
>> could be part of the plugin itself, considering that this is a basic need of
>> any wiki page.
>>
>> - *Link Targets:*
>> I do not think there is a specific reason not to open external links in a
>> wiki page, wikipedia does, it would be interesting to receive the parameter
>> "target" by default in the marking of a [[link]] as [[linktitle
>> http://linkurl  blank]]
>>
>> - *Preview and Saving: *
>> It is very annoying having to submit  the page every time we need to save,
>> then to have a preview, the saving could happen with AJAX and have option to
>> view a Preview window.
>>
>> - *Lists:*
>>  In ordered and unordered lists creates with - and +, Needs a way to
>> create sublevels with lists, maybe -- and ++
>> - A Topic
>> -- Subtopic of A Topic
>> --- Subtopic of a subtopic of A Topic
>> -- Another subtopic of A Topic
>>
>> + A Topic
>> ++ Subtopic of A Topic
>> +++ Subtopic of a subtopic of A Topic
>> ++ Another subtopic of A Topic
>>
>> - *Page auto reference:*
>> It would be interesting to have a variable that works as ALIAS to
>> reference the page itself, when I need to reference the current page into a
>> widget I use {{= request.args(0)}} would be more interesting to use
>> something like "THISPAG

[web2py] Exporting data from GAE BigTable

2010-08-01 Thread Bruno Rocha
Hello, I'm writing a lot of text using cube2py running on GoogleAppEngine.
All content written in cube2py is stored in the database, and I need to do a
backup.

Is there a way to use DAL to export records in a given table?
I know it may be possible to do this by creating action.json or action.xml,
 table by table.
But is there any easier way, someone already did?

{{=thanks}}
-- 

http://rochacbruno.com.br


Re: [web2py] Re: plugin_wiki suggestions

2010-08-01 Thread Bruno Rocha
Error on "select" widget, trying to fetch non UTF-8 text records,
People wrote a message in portuguese, a lot of accents, [ á, é, ã, ê,
í] , to insert with "create"widget no problem, then I can view the
records on GAE admin.


But when I try to select the accentuated records with " select"widget
its raise an error:


the same occurs when I give accentuated totle for a page, inserts ok,
select fails.


Traceback (most recent call last):

  File 
"/base/data/home/apps/web2pybrasil/4.343788305571582046/applications/init/models/plugin_wiki.py",
line 555, in render_widget
html = getattr(PluginWikiWidgets,name)(**args)
  File 
"/base/data/home/apps/web2pybrasil/4.343788305571582046/applications/init/models/plugin_wiki.py",
line 252, in jqgrid
columns = [x.strip() for x in db[table].fields if
db[table][x.strip()].readable]
  File "/base/data/home/apps/web2pybrasil/4.343788305571582046/gluon/sql.py",
line 1323, in __getitem__
return dict.__getitem__(self, str(key))
KeyError: 'contato'



2010/8/1 Bruno Rocha 

> SlideShow widget also does not runs on GAE.
>
> try it; http://web2pybrasil.appspot.com/init/plugin_wiki/page/images
>
> the code:
> http://web2pybrasil.appspot.com/init/plugin_wiki/page.code/images
>
> Given an image saved as BLOB in GAE, how to retrieve this image URL to put
> it on Wiki Page body?
>
>
> 2010/8/1 Bruno Rocha 
>
>> Page Attachments does not works on GAE
>>
>> 2010/8/1 Bruno Rocha 
>>
>> I am developing and writing a lot with plugin_wiki (cube2py). I already
>>> have some suggestions, observations and have also found some bugs.
>>> As I'm finding more issues, I will posting here in this thread. If
>>> someone else has something to add, enjoy the thread.
>>>
>>> I am working now on this page :
>>> http://web2pybrasil.appspot.com/cursoweb2py/
>>>
>>> *
>>> *
>>> *Bugs I Found:*
>>>
>>> -* **Comments Widget*
>>> I noticed that the comments widget is restricted to logged in users, the
>>> code that generates the widget has requires_login (), this is great for
>>> protecting users not logged in to write.
>>> however, as the same widget generates the form for adding a comment, and
>>> also generates a list of comments to display, it is not possible to display
>>> existing comments to a user who is not logged.
>>> I suggest dividing into two widgets, one to generate the form of
>>> insertion, and this would be protected. And another to generate a list
>>> of existing comments, and this would free reading. this last could be used
>>> in another place eg:  to show recent comments for a page.
>>>
>>> -* Searches with crud.search and jqgrid on GAE*
>>> I got error using crud.search and jqgrid widgets, as GAE does not allow
>>> to perform LIKE, StartsWIth, EndsWith, Contains, etc, while do not have any
>>> workarround, I think that options should be disabled When it is detected
>>> that is working in GAE
>>>
>>>
>>> *Suggestions:*( Too many things. Sorry )
>>>
>>> - *Widget_Builder:*
>>> Binds the code generated by widget builder direct to the page content
>>> editor, I think it is not hard to do with JavaScript, preventing the
>>> copy-paste when using widget builder
>>>
>>> - *Widget* *Messages customization*
>>> Include the total capacity for customize the output messages  in the
>>> standard widgets. "load_action" and "load_url" eg uses AJAX and display
>>> the message "loading", it would be nice to have how to pass as a parameter,
>>> a new message to be displayed, it is usefull for translating.
>>>
>>> - *Blank lines, white space:*
>>> Markdown for example set spaces by using two blank spaces at the end of
>>> each line to make a break, I'm developing a lot with plugin_wiki and had to
>>> create a function just to give me white space and blank lines.
>>> ``{{=br(2)}}``:template
>>>
>>> - *Categories:*
>>> wiki or any other type of page created with plugin_wiki, IMHO, will need
>>> some kind of category management. it is not difficult to implement as
>>> standard, without having to create custom widgets, as I had to do.
>>>
>>> - *Search: *
>>> I created a custom widget that performs searches in titles, slugs, and
>>> body of the pages, and it is running on GAE,  I believe this should be used
>>> as a widget placed on the meta-header, or meta-sidebar for example. but
>>> could be 

Re: [web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-02 Thread Bruno Rocha
Martin, is it able to work on GAE ?

2010/8/2 Martin.Mulone 

> I am working in a cms *blog style* the idea is to be simple, ready to
> work, looking professional, and use ajax and effect in admin panel at
> least. You can see here: http://code.google.com/p/instant-press/ It is
> in developing state but many things are working. I am working on it in
> the last 2 or 3 weeks. All the ideas, bugs and others comments are
> welcome. Here where I work Iam prommoting web2py.
>
> Can admin users.
> Can admin articles.
> Can admin comments.
> Can admin categories.
> Can admin information of the site.
>
>
> On Aug 2, 7:16 am, Phyo Arkar  wrote:
> > Web2py is Great, Greatest framework that i had ever tried and stick onto
> it.
> >
> > But what it is lacking is publicity and lack of KILLER web-apps like
> those
> > Made PHP most popular web-development platform.
> > Here are some , what that had made PHP Popular and which will also make
> > Web2py + Python all together more popular and makes development
> enviorment
> > of Choice for web:
> >
> > Necessary APPS:
> >
> > *Database Administration:*
> >
> > phpMyAdmin - Is the Most used webbased Database Manager ever
> >
> > we have admin for web2py but that alone is not sufficient, we need a DB
> > Admin for every Databases on the current system .
> > Current commercial project i am doing have some features for it and when
> i
> > free i will start making dedicated one . I will need contributers later.
> >
> > Hows about PySQLAdmin sounds?
> >
> > *File Manager :*
> >
> > Those who work on LAMP , they usually use a file manager like net2ftp.
> > Current my  elFinder-web2py works well for this case, but i need
> > contributors .
> >
> > *CMS*
> >
> > KPAX exist but it is not dedicatedly maintained , we will need dedicated
> > maintainers for it , lets let Massimo dedicate his works on web2py.
> > KPAX should  not only be as Appliance , it should have its own Domain and
> > brand.And lets make it better than CMS.
> >
> > *Blog*
> >
> > There are many blog exist on the appliance , but we need a dedicate best
> one
> > that can go toes to toes against Wordpress.
> > + will need A Dedicated domain , and maintainer.
> > *
> > *
> > *
> > *
> > KILLER APP Ideas
> >
> > *Stack Overflow Clone:*
> >
> > For web2py community and as separate Open Source Project , lets make a SO
> > Clone?
> >
> > *Email Client:*
> > *
> > *
> > Python have a very rich Built-in mail handling libs , developing a
> > gmail-clone wont be hard at all.
> >
> > Ticketing Systems:
> >
> > Many enterprises needs a Help Desk/ Ticketing system . Best one i used is
> RT
> > (Perl based ticketing system). We can make a better one based on web2py.
> >
> > What i can contribute :
> >
> > I am planning to provide a site for hosting web2py app and demos for it.
> I
> > have server / space and good domain (www.web2pyhost.com, scaryhits.com)
>  or
> > should it be web2pyapps.com
> > for code hosting we can use google for that.
> >
> > *
> > *




-- 

http://rochacbruno.com.br


Re: [web2py] Re: plugin_wiki suggestions

2010-08-02 Thread Bruno Rocha
Another BUG in markmin render

paragraph with **bold**, ''italic'' and ``code``.but:


**text** renders as text

**text:** renders as **text:**

the same happens if we put any mark, point or accent as the last in Markup


**text()** renders as **text()**

where should render as text()





2010/8/2 Bruno Rocha 

> Error on "select" widget, trying to fetch non UTF-8 text records, People 
> wrote a message in portuguese, a lot of accents, [ á, é, ã, ê, í] , to 
> insert with "create"widget no problem, then I can view the records on GAE 
> admin.
>
>
> But when I try to select the accentuated records with " select"widget its 
> raise an error:
>
>
> the same occurs when I give accentuated totle for a page, inserts ok, select 
> fails.
>
>
> Traceback (most recent call last):
>
>   File 
> "/base/data/home/apps/web2pybrasil/4.343788305571582046/applications/init/models/plugin_wiki.py",
>  line 555, in render_widget
> html = getattr(PluginWikiWidgets,name)(**args)
>   File 
> "/base/data/home/apps/web2pybrasil/4.343788305571582046/applications/init/models/plugin_wiki.py",
>  line 252, in jqgrid
> columns = [x.strip() for x in db[table].fields if 
> db[table][x.strip()].readable]
>   File "/base/data/home/apps/web2pybrasil/4.343788305571582046/gluon/sql.py", 
> line 1323, in __getitem__
> return dict.__getitem__(self, str(key))
> KeyError: 'contato'
>
>
>
> 2010/8/1 Bruno Rocha 
>
>> SlideShow widget also does not runs on GAE.
>>
>> try it; http://web2pybrasil.appspot.com/init/plugin_wiki/page/images
>>
>> the code:
>> http://web2pybrasil.appspot.com/init/plugin_wiki/page.code/images
>>
>> Given an image saved as BLOB in GAE, how to retrieve this image URL to put
>> it on Wiki Page body?
>>
>>
>> 2010/8/1 Bruno Rocha 
>>
>>> Page Attachments does not works on GAE
>>>
>>> 2010/8/1 Bruno Rocha 
>>>
>>> I am developing and writing a lot with plugin_wiki (cube2py). I already
>>>> have some suggestions, observations and have also found some bugs.
>>>> As I'm finding more issues, I will posting here in this thread. If
>>>> someone else has something to add, enjoy the thread.
>>>>
>>>> I am working now on this page :
>>>> http://web2pybrasil.appspot.com/cursoweb2py/
>>>>
>>>> *
>>>> *
>>>> *Bugs I Found:*
>>>>
>>>> -* **Comments Widget*
>>>> I noticed that the comments widget is restricted to logged in users, the
>>>> code that generates the widget has requires_login (), this is great for
>>>> protecting users not logged in to write.
>>>> however, as the same widget generates the form for adding a comment, and
>>>> also generates a list of comments to display, it is not possible to display
>>>> existing comments to a user who is not logged.
>>>> I suggest dividing into two widgets, one to generate the form of
>>>> insertion, and this would be protected. And another to generate a list
>>>> of existing comments, and this would free reading. this last could be used
>>>> in another place eg:  to show recent comments for a page.
>>>>
>>>> -* Searches with crud.search and jqgrid on GAE*
>>>> I got error using crud.search and jqgrid widgets, as GAE does not allow
>>>> to perform LIKE, StartsWIth, EndsWith, Contains, etc, while do not have any
>>>> workarround, I think that options should be disabled When it is
>>>> detected that is working in GAE
>>>>
>>>>
>>>> *Suggestions:*( Too many things. Sorry )
>>>>
>>>> - *Widget_Builder:*
>>>> Binds the code generated by widget builder direct to the page content
>>>> editor, I think it is not hard to do with JavaScript, preventing the
>>>> copy-paste when using widget builder
>>>>
>>>> - *Widget* *Messages customization*
>>>> Include the total capacity for customize the output messages  in the
>>>> standard widgets. "load_action" and "load_url" eg uses AJAX and display
>>>> the message "loading", it would be nice to have how to pass as a parameter,
>>>> a new message to be displayed, it is usefull for translating.
>>>>
>>>> - *Blank lines, white space:*
>>>> Markdown for example set spaces by using two blank spaces at the end of
>>>> each line to make a break, I'm d

Re: [web2py] code organization

2010-08-02 Thread Bruno Rocha
Have you tried local_import()?
I really dont know if that will work in your case, Give it a try

http://web2py.com/book/default/chapter/04?search=local_import

2010/8/2 Miguel Lopes 

> I have several functions returning forms in a module file, and started
> experimenting with the LOAD function, but I can figure out how to use this
> functions without moving them to the controller. I would prefer to keep
> these functions in a module for code organization reasons. I wonder if it is
> possible, and if not what solution do you use for code organization?
>
> Miguel
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: Chapter 13: components and plugins

2010-08-02 Thread Bruno Rocha
I can do for plugin_wiki chapter, as I am working a lot with that.

let me know about standard format for the image and min-max size/scale, I
use default MacOs screenshot tool ( shift+command+4)

Do you want only selection of the funcionality?, zooming ?, just 
content or including browser window?

2010/8/2 mdipierro 

> Can somebody help me make the screenshots for chapter 3 and chapter 13
> within this week?
> You can a free copy of the final PDF book before everybody else ;-)
> Let me know if you can before you start doing it. No need to duplicate
> work.
>
> Massimo
>
> On Aug 2, 9:22 am, Massimo Di Pierro  wrote:
> > Here is an early draft of the book chapter 13 which discusses
> > Components, Plugins and plugin_wiki.
> >
> > It is incomplete. Screenshots are missing. It references the trunk code.
> >
> > Can you please read it and send me feedback?
> >
> > Massimo
> >
> >  chap13.pdf
> > 249KViewDownload




-- 

http://rochacbruno.com.br


Re: [web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-02 Thread Bruno Rocha
Running locally InstantPress looks awesome, quickly, beauty/clean layout and
I loved the way you treat Admin Buttons.

Congratulations!

But, this could not works on GAE, I saw a lot of code that is not allowed on
GAE, you are using .like() in get_lats_pots_with_search()

Today I will try to run it on GAE, testing  some workarround, then I report
you.


{{=thanks}}

2010/8/2 Martin.Mulone 

> I don know I think yes, but I dont test it.
>
> On Aug 2, 9:45 am, Bruno Rocha  wrote:
> > Martin, is it able to work on GAE ?
> >
> > 2010/8/2 Martin.Mulone 
> >
> >
> >
> >
> >
> > > I am working in a cms *blog style* the idea is to be simple, ready to
> > > work, looking professional, and use ajax and effect in admin panel at
> > > least. You can see here:http://code.google.com/p/instant-press/It is
> > > in developing state but many things are working. I am working on it in
> > > the last 2 or 3 weeks. All the ideas, bugs and others comments are
> > > welcome. Here where I work Iam prommoting web2py.
> >
> > > Can admin users.
> > > Can admin articles.
> > > Can admin comments.
> > > Can admin categories.
> > > Can admin information of the site.
> >
> > > On Aug 2, 7:16 am, Phyo Arkar  wrote:
> > > > Web2py is Great, Greatest framework that i had ever tried and stick
> onto
> > > it.
> >
> > > > But what it is lacking is publicity and lack of KILLER web-apps like
> > > those
> > > > Made PHP most popular web-development platform.
> > > > Here are some , what that had made PHP Popular and which will also
> make
> > > > Web2py + Python all together more popular and makes development
> > > enviorment
> > > > of Choice for web:
> >
> > > > Necessary APPS:
> >
> > > > *Database Administration:*
> >
> > > > phpMyAdmin - Is the Most used webbased Database Manager ever
> >
> > > > we have admin for web2py but that alone is not sufficient, we need a
> DB
> > > > Admin for every Databases on the current system .
> > > > Current commercial project i am doing have some features for it and
> when
> > > i
> > > > free i will start making dedicated one . I will need contributers
> later.
> >
> > > > Hows about PySQLAdmin sounds?
> >
> > > > *File Manager :*
> >
> > > > Those who work on LAMP , they usually use a file manager like
> net2ftp.
> > > > Current my  elFinder-web2py works well for this case, but i need
> > > > contributors .
> >
> > > > *CMS*
> >
> > > > KPAX exist but it is not dedicatedly maintained , we will need
> dedicated
> > > > maintainers for it , lets let Massimo dedicate his works on web2py.
> > > > KPAX should  not only be as Appliance , it should have its own Domain
> and
> > > > brand.And lets make it better than CMS.
> >
> > > > *Blog*
> >
> > > > There are many blog exist on the appliance , but we need a dedicate
> best
> > > one
> > > > that can go toes to toes against Wordpress.
> > > > + will need A Dedicated domain , and maintainer.
> > > > *
> > > > *
> > > > *
> > > > *
> > > > KILLER APP Ideas
> >
> > > > *Stack Overflow Clone:*
> >
> > > > For web2py community and as separate Open Source Project , lets make
> a SO
> > > > Clone?
> >
> > > > *Email Client:*
> > > > *
> > > > *
> > > > Python have a very rich Built-in mail handling libs , developing a
> > > > gmail-clone wont be hard at all.
> >
> > > > Ticketing Systems:
> >
> > > > Many enterprises needs a Help Desk/ Ticketing system . Best one i
> used is
> > > RT
> > > > (Perl based ticketing system). We can make a better one based on
> web2py.
> >
> > > > What i can contribute :
> >
> > > > I am planning to provide a site for hosting web2py app and demos for
> it.
> > > I
> > > > have server / space and good domain (www.web2pyhost.com,
> scaryhits.com)
> > >  or
> > > > should it be web2pyapps.com
> > > > for code hosting we can use google for that.
> >
> > > > *
> > > > *
> >
> > --
> >
> > http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: rewrite url using routes.py

2010-08-02 Thread Bruno Rocha
I really tried every example given,
but no one works on GAE

I cant figure out how to change this:

http://web2pybrasil.appspot.com/init/plugin_wiki/page/home

to this:

http://web2pybrasil.appspot.com/page/home



2010/8/1 mdipierro 

>  ('/(.*?)/(.*?)',   '/$1/yourcontroller/$2'),
>
> or use
>
>  ('/$a/$anything',   '/$a/yourcontroller/$anything'),
>
> On Aug 1, 1:16 am, Vasile Ermicioi  wrote:
> > oops, not like that but like this
> >
> > routes_in = (
> > ('/(.*)/(.*)',   '/$1/yourcontroller/$2'),
> > )
> >
> > everything is passed to a controller (e.g. 'default')
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: plugin_wiki suggestions

2010-08-02 Thread Bruno Rocha
Another suggestion:

 should be the page.title field of plugin_wiki_page just
including response.title = page.title to page controller

def page():
"""
shows a page
"""
slug = request.args(0) or 'index'
w = db.plugin_wiki_page
page = db(w.slug==slug).select().first()
response.title = page.title
if not auth.user and (not page or not page.public or not page.active):
redirect(URL(r=request,c='default',f='user',args='login'))
elif not plugin_wiki_editor and (not page or not page.public or not
page.active):
raise HTTP(404)
elif page and page.role and not auth.has_membership(page.role):
raise HTTP(404)
if request.extension=='load': return plugin_wiki.render(page.body)
if request.extension!='html': return page.body
return dict(page=page,slug=slug)


2010/8/1 Bruno Rocha 

> I am developing and writing a lot with plugin_wiki (cube2py). I already
> have some suggestions, observations and have also found some bugs.
> As I'm finding more issues, I will posting here in this thread. If someone
> else has something to add, enjoy the thread.
>
> I am working now on this page :
> http://web2pybrasil.appspot.com/cursoweb2py/
>
> *
> *
> *Bugs I Found:*
>
> -* **Comments Widget*
> I noticed that the comments widget is restricted to logged in users, the
> code that generates the widget has requires_login (), this is great for
> protecting users not logged in to write.
> however, as the same widget generates the form for adding a comment, and
> also generates a list of comments to display, it is not possible to display
> existing comments to a user who is not logged.
> I suggest dividing into two widgets, one to generate the form of insertion,
> and this would be protected. And another to generate a list of existing
> comments, and this would free reading. this last could be used in another
> place eg:  to show recent comments for a page.
>
> -* Searches with crud.search and jqgrid on GAE*
> I got error using crud.search and jqgrid widgets, as GAE does not allow to
> perform LIKE, StartsWIth, EndsWith, Contains, etc, while do not have any
> workarround, I think that options should be disabled When it is detected
> that is working in GAE
>
>
> *Suggestions:*( Too many things. Sorry )
>
> - *Widget_Builder:*
> Binds the code generated by widget builder direct to the page content
> editor, I think it is not hard to do with JavaScript, preventing the
> copy-paste when using widget builder
>
> - *Widget* *Messages customization*
> Include the total capacity for customize the output messages  in the
> standard widgets. "load_action" and "load_url" eg uses AJAX and display
> the message "loading", it would be nice to have how to pass as a parameter,
> a new message to be displayed, it is usefull for translating.
>
> - *Blank lines, white space:*
> Markdown for example set spaces by using two blank spaces at the end of
> each line to make a break, I'm developing a lot with plugin_wiki and had to
> create a function just to give me white space and blank lines.
> ``{{=br(2)}}``:template
>
> - *Categories:*
> wiki or any other type of page created with plugin_wiki, IMHO, will need
> some kind of category management. it is not difficult to implement as
> standard, without having to create custom widgets, as I had to do.
>
> - *Search: *
> I created a custom widget that performs searches in titles, slugs, and body
> of the pages, and it is running on GAE,  I believe this should be used as a
> widget placed on the meta-header, or meta-sidebar for example. but could
> be part of the plugin itself, considering that this is a basic need of any
> wiki page.
>
> - *Link Targets:*
> I do not think there is a specific reason not to open external links in a
> wiki page, wikipedia does, it would be interesting to receive the parameter
> "target" by default in the marking of a [[link]] as [[linktitle
> http://linkurl  blank]]
>
> - *Preview and Saving: *
> It is very annoying having to submit  the page every time we need to save,
> then to have a preview, the saving could happen with AJAX and have option to
> view a Preview window.
>
> - *Lists:*
>  In ordered and unordered lists creates with - and +, Needs a way to create
> sublevels with lists, maybe -- and ++
> - A Topic
> -- Subtopic of A Topic
> --- Subtopic of a subtopic of A Topic
> -- Another subtopic of A Topic
>
> + A Topic
> ++ Subtopic of A Topic
> +++ Subtopic of a subtopic of A Topic
> ++ Another subtopic of A Topic
>
> - *Page auto reference:*
> It would be interesting to have a variable that works as 

Re: [web2py] Re: plugin_wiki suggestions

2010-08-02 Thread Bruno Rocha
- Page History
page history does not works on GAE,
http://web2pybrasil.appspot.com/init/plugin_wiki/page_history/home  Fails
and raises a ticket


There is a limit to history entries per page?

I mean, if I edit a page too many times this will create too many entries in
plugin_wiki_page_history
I think it needs a limit, may be 20 entries per page like a FIFO


2010/8/1 Bruno Rocha 

> I am developing and writing a lot with plugin_wiki (cube2py). I already
> have some suggestions, observations and have also found some bugs.
> As I'm finding more issues, I will posting here in this thread. If someone
> else has something to add, enjoy the thread.
>
> I am working now on this page :
> http://web2pybrasil.appspot.com/cursoweb2py/
>
> *
> *
> *Bugs I Found:*
>
> -* **Comments Widget*
> I noticed that the comments widget is restricted to logged in users, the
> code that generates the widget has requires_login (), this is great for
> protecting users not logged in to write.
> however, as the same widget generates the form for adding a comment, and
> also generates a list of comments to display, it is not possible to display
> existing comments to a user who is not logged.
> I suggest dividing into two widgets, one to generate the form of insertion,
> and this would be protected. And another to generate a list of existing
> comments, and this would free reading. this last could be used in another
> place eg:  to show recent comments for a page.
>
> -* Searches with crud.search and jqgrid on GAE*
> I got error using crud.search and jqgrid widgets, as GAE does not allow to
> perform LIKE, StartsWIth, EndsWith, Contains, etc, while do not have any
> workarround, I think that options should be disabled When it is detected
> that is working in GAE
>
>
> *Suggestions:*( Too many things. Sorry )
>
> - *Widget_Builder:*
> Binds the code generated by widget builder direct to the page content
> editor, I think it is not hard to do with JavaScript, preventing the
> copy-paste when using widget builder
>
> - *Widget* *Messages customization*
> Include the total capacity for customize the output messages  in the
> standard widgets. "load_action" and "load_url" eg uses AJAX and display
> the message "loading", it would be nice to have how to pass as a parameter,
> a new message to be displayed, it is usefull for translating.
>
> - *Blank lines, white space:*
> Markdown for example set spaces by using two blank spaces at the end of
> each line to make a break, I'm developing a lot with plugin_wiki and had to
> create a function just to give me white space and blank lines.
> ``{{=br(2)}}``:template
>
> - *Categories:*
> wiki or any other type of page created with plugin_wiki, IMHO, will need
> some kind of category management. it is not difficult to implement as
> standard, without having to create custom widgets, as I had to do.
>
> - *Search: *
> I created a custom widget that performs searches in titles, slugs, and body
> of the pages, and it is running on GAE,  I believe this should be used as a
> widget placed on the meta-header, or meta-sidebar for example. but could
> be part of the plugin itself, considering that this is a basic need of any
> wiki page.
>
> - *Link Targets:*
> I do not think there is a specific reason not to open external links in a
> wiki page, wikipedia does, it would be interesting to receive the parameter
> "target" by default in the marking of a [[link]] as [[linktitle
> http://linkurl  blank]]
>
> - *Preview and Saving: *
> It is very annoying having to submit  the page every time we need to save,
> then to have a preview, the saving could happen with AJAX and have option to
> view a Preview window.
>
> - *Lists:*
>  In ordered and unordered lists creates with - and +, Needs a way to create
> sublevels with lists, maybe -- and ++
> - A Topic
> -- Subtopic of A Topic
> --- Subtopic of a subtopic of A Topic
> -- Another subtopic of A Topic
>
> + A Topic
> ++ Subtopic of A Topic
> +++ Subtopic of a subtopic of A Topic
> ++ Another subtopic of A Topic
>
> - *Page auto reference:*
> It would be interesting to have a variable that works as ALIAS to reference
> the page itself, when I need to reference the current page into a widget I
> use {{= request.args(0)}} would be more interesting to use something like
> "THISPAGE"
>
> - *Wiki Pages management: *
> Wiki Pages management "plugin_wiki / index" tends to get a little confusing
> as the number of existing pages grows, it would be interesting to have
> pagination, search, categorization.
>
> - *Meta Pages: *
> As a developer I use a lot the page meta-code, but as the code grows,
>

Re: [web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-02 Thread Bruno Rocha
I am using cube2py(plugin_wiki) as a CMS, for my site I am using markmin to
write in, it is a quite difficult and needs some improvement, I like markin
syntax and I will keep markmin to the site.

besides, is it easy to turn plugin_wiki in to a Simple CMS ( able to run on
GAE).

In Model:
change plugin_wiki_mode = 'markmin' to plugin_wiki_mode = 'html'

Editor:
Change the default WSIWYG to CKeditor

Include a category widget for each page:
http://web2pyslices.com/main/slices/take_slice/92 ( alpha )

I'm trying to build a CMS / blog, using plugin_wiki as a platform, I wish to
include some changes to the plugin_wiki core, and everything else can be
extended with widgets, components etc..

Take a look:
http://web2pybrasil.appspot.com
http://web2pybrasil.appspot.com/init/plugin_wiki/page/curso-web2py-002





2010/8/2 ma...@rockiger.com 

> +1 KPAX
>
> An CMS is essential for adoption of web2py. If you have a small
> project for a small customer. You simple can't write an app from
> scratch -
> even if you use web2py. This is where php really shines.
>
> I would really like to help with the information and interaction
> design of kpax.
>
> On Aug 2, 12:35 pm, mdipierro  wrote:
> > +1
> >
> > next on todo list new KPAX
> >
> > On Aug 2, 5:16 am, Phyo Arkar  wrote:
> >
> >
> >
> > > Web2py is Great, Greatest framework that i had ever tried and stick
> onto it.
> >
> > > But what it is lacking is publicity and lack of KILLER web-apps like
> those
> > > Made PHP most popular web-development platform.
> > > Here are some , what that had made PHP Popular and which will also make
> > > Web2py + Python all together more popular and makes development
> enviorment
> > > of Choice for web:
> >
> > > Necessary APPS:
> >
> > > *Database Administration:*
> >
> > > phpMyAdmin - Is the Most used webbased Database Manager ever
> >
> > > we have admin for web2py but that alone is not sufficient, we need a DB
> > > Admin for every Databases on the current system .
> > > Current commercial project i am doing have some features for it and
> when i
> > > free i will start making dedicated one . I will need contributers
> later.
> >
> > > Hows about PySQLAdmin sounds?
> >
> > > *File Manager :*
> >
> > > Those who work on LAMP , they usually use a file manager like net2ftp.
> > > Current my  elFinder-web2py works well for this case, but i need
> > > contributors .
> >
> > > *CMS*
> >
> > > KPAX exist but it is not dedicatedly maintained , we will need
> dedicated
> > > maintainers for it , lets let Massimo dedicate his works on web2py.
> > > KPAX should  not only be as Appliance , it should have its own Domain
> and
> > > brand.And lets make it better than CMS.
> >
> > > *Blog*
> >
> > > There are many blog exist on the appliance , but we need a dedicate
> best one
> > > that can go toes to toes against Wordpress.
> > > + will need A Dedicated domain , and maintainer.
> > > *
> > > *
> > > *
> > > *
> > > KILLER APP Ideas
> >
> > > *Stack Overflow Clone:*
> >
> > > For web2py community and as separate Open Source Project , lets make a
> SO
> > > Clone?
> >
> > > *Email Client:*
> > > *
> > > *
> > > Python have a very rich Built-in mail handling libs , developing a
> > > gmail-clone wont be hard at all.
> >
> > > Ticketing Systems:
> >
> > > Many enterprises needs a Help Desk/ Ticketing system . Best one i used
> is RT
> > > (Perl based ticketing system). We can make a better one based on
> web2py.
> >
> > > What i can contribute :
> >
> > > I am planning to provide a site for hosting web2py app and demos for
> it. I
> > > have server / space and good domain (www.web2pyhost.com, scaryhits.com)
>  or
> > > should it be web2pyapps.com
> > > for code hosting we can use google for that.
> >
> > > *
> > > *
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-02 Thread Bruno Rocha
Thats the way I found to perform LIKE() search in GAE, it is ugly (I know)
but works.. I am waiting for any feature to replace this.


@staticmethod
def searchPages(string=None,nfmessage='Nothing found with %s'):
"""
string: string to be found
"""
found = set()
string = request.vars.search
if string:
#search in slug
pages =
db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug)
for page in pages:
if page.slug.find(string) > -1:
found.add(page.slug)

#search in page body
pages =
db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug,db.plugin_wiki_page.body)
for page in pages:
if page.body.find(string) > -1:
found.add(page.slug)

#search in page title
pages =
db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug,db.plugin_wiki_page.title)
for page in pages:
if page.title.find(string) > -1:
found.add(page.slug)

if found:
cleanfound = set()
for row in found:
if row[:4]!='meta':
cleanfound.add(row)

return UL(*[LI(*[A(XML(db(db.plugin_wiki_page.slug==row)\

.select(db.plugin_wiki_page.title)[0].title),\

_href=URL(request.application,'plugin_wiki','page',args=[row,]))])\
for row in cleanfound])
#r=request,f='page'
else:
return nfmessage % string

else:
return ''


2010/8/2 Martin.Mulone 

> I use like() to search, but in a near future this could be disabled.
>
> On Aug 2, 1:23 pm, Bruno Rocha  wrote:
> > Running locally InstantPress looks awesome, quickly, beauty/clean layout
> and
> > I loved the way you treat Admin Buttons.
> >
> > Congratulations!
> >
> > But, this could not works on GAE, I saw a lot of code that is not allowed
> on
> > GAE, you are using .like() in get_lats_pots_with_search()
> >
> > Today I will try to run it on GAE, testing  some workarround, then I
> report
> > you.
> >
> > {{=thanks}}
> >
> > 2010/8/2 Martin.Mulone 
> >
> >
> >
> >
> >
> > > I don know I think yes, but I dont test it.
> >
> > > On Aug 2, 9:45 am, Bruno Rocha  wrote:
> > > > Martin, is it able to work on GAE ?
> >
> > > > 2010/8/2 Martin.Mulone 
> >
> > > > > I am working in a cms *blog style* the idea is to be simple, ready
> to
> > > > > work, looking professional, and use ajax and effect in admin panel
> at
> > > > > least. You can see here:
> http://code.google.com/p/instant-press/Itis
> > > > > in developing state but many things are working. I am working on it
> in
> > > > > the last 2 or 3 weeks. All the ideas, bugs and others comments are
> > > > > welcome. Here where I work Iam prommoting web2py.
> >
> > > > > Can admin users.
> > > > > Can admin articles.
> > > > > Can admin comments.
> > > > > Can admin categories.
> > > > > Can admin information of the site.
> >
> > > > > On Aug 2, 7:16 am, Phyo Arkar  wrote:
> > > > > > Web2py is Great, Greatest framework that i had ever tried and
> stick
> > > onto
> > > > > it.
> >
> > > > > > But what it is lacking is publicity and lack of KILLER web-apps
> like
> > > > > those
> > > > > > Made PHP most popular web-development platform.
> > > > > > Here are some , what that had made PHP Popular and which will
> also
> > > make
> > > > > > Web2py + Python all together more popular and makes development
> > > > > enviorment
> > > > > > of Choice for web:
> >
> > > > > > Necessary APPS:
> >
> > > > > > *Database Administration:*
> >
> > > > > > phpMyAdmin - Is the Most used webbased Database Manager ever
> >
> > > > > > we have admin for web2py but that alone is not sufficient, we
> need a
> > > DB
> > > > > > Admin for every Databases on the current system .
> > > > > > Current commercial project i am doing have some features for it
> and
> > > when
> > > > > i
> > > > > > free i will start making dedicated one . I will need contri

Re: [web2py] Re: markmin, t2, t3, cube9 etc. (important update)

2010-08-02 Thread Bruno Rocha
Texy features are very good http://texy.info/en/syntax
but the syntax is ugly...

I would like markmin to implement all that features in a beauty way.


2010/8/2 Tim Michelsen 

> > No that I can think of.
> Would be good if you could use one of the major markup languages as input:
> http://en.wikipedia.org/wiki/List_of_lightweight_markup_languages
>
> Currently, your markmin seems to be like Texy (http://texy.info/en/)
>
> A look at converters show how is the life could be:
> * http://txt2tags.sourceforge.net/
> * http://johnmacfarlane.net/pandoc/
>
> So I may suggest to adapt markmin to one of the major lanuages and then
> use a converter.
>
> Regards.
>
> >
> > On Aug 1, 1:40 pm, Timmie  wrote:
> >>> I foundrestructuredtext to be too complex to parse.
> >>
> >> What marup language do you use as template?
> >> Is there any markup format you use as design schedme for markmin?
> >
>
>
>


-- 

http://rochacbruno.com.br


Re: [web2py] Re: Chapter 13: components and plugins

2010-08-02 Thread Bruno Rocha
The book is based on a specific version? are you using 1.81.5 or trunk?



2010/8/2 mdipierro 

> Thank you Bruno,
>
> OK. I would like to have the images as tiff in actual size in pixels.
> Scale the window so that the default layout fits in the browser. I
> will cut it as needed.
>
> Massimo
>
> On Aug 2, 9:53 am, Bruno Rocha  wrote:
> > I can do for plugin_wiki chapter, as I am working a lot with that.
> >
> > let me know about standard format for the image and min-max size/scale, I
> > use default MacOs screenshot tool ( shift+command+4)
> >
> > Do you want only selection of the funcionality?, zooming ?, just 
> > content or including browser window?
> >
> > 2010/8/2 mdipierro 
> >
> >
> >
> > > Can somebody help me make the screenshots for chapter 3 and chapter 13
> > > within this week?
> > > You can a free copy of the final PDF book before everybody else ;-)
> > > Let me know if you can before you start doing it. No need to duplicate
> > > work.
> >
> > > Massimo
> >
> > > On Aug 2, 9:22 am, Massimo Di Pierro  wrote:
> > > > Here is an early draft of the book chapter 13 which discusses
> > > > Components, Plugins and plugin_wiki.
> >
> > > > It is incomplete. Screenshots are missing. It references the trunk
> code.
> >
> > > > Can you please read it and send me feedback?
> >
> > > > Massimo
> >
> > > >  chap13.pdf
> > > > 249KViewDownload
> >
> > --
> >
> > http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: plugin_wiki suggestions

2010-08-03 Thread Bruno Rocha
Thanks, Massimo

I have no doubt, I will keep the markmin as markup language for my site, I
did a comparison and I write much faster with markmin than with LaTeX,
markdown, html Or Another.

I'll do everything possible to contribute on issues that I have knowledge. if
I get some success will send a patch.

I suggested using the page title as  by questions of SEO,
concatenating site name + pageTitle:
 My Wiki Site | My Page Title   Considering that plugin_wiki
can be used as a CMS platform (as in my case).

{{=thanks*10}}

2010/8/3 mdipierro 

> I never though somebody sould have more than 1000 revisions. Let's
> think about a good solution. The one you propose may be ok.
>
> On Aug 2, 3:54 pm, Bruno Rocha  wrote:
> > - Page History
> > page history does not works on GAE,
> http://web2pybrasil.appspot.com/init/plugin_wiki/page_history/home Fails
> > and raises a ticket
> >
> > There is a limit to history entries per page?
> >
> > I mean, if I edit a page too many times this will create too many entries
> in
> > plugin_wiki_page_history
> > I think it needs a limit, may be 20 entries per page like a FIFO
> >
> > 2010/8/1 Bruno Rocha 
> >
> >
> >
> > > I am developing and writing a lot with plugin_wiki (cube2py). I already
> > > have some suggestions, observations and have also found some bugs.
> > > As I'm finding more issues, I will posting here in this thread. If
> someone
> > > else has something to add, enjoy the thread.
> >
> > > I am working now on this page :
> > >http://web2pybrasil.appspot.com/cursoweb2py/
> >
> > > *
> > > *
> > > *Bugs I Found:*
> >
> > > -* **Comments Widget*
> > > I noticed that the comments widget is restricted to logged in users,
> the
> > > code that generates the widget has requires_login (), this is great for
> > > protecting users not logged in to write.
> > > however, as the same widget generates the form for adding a comment,
> and
> > > also generates a list of comments to display, it is not possible to
> display
> > > existing comments to a user who is not logged.
> > > I suggest dividing into two widgets, one to generate the form of
> insertion,
> > > and this would be protected. And another to generate a list of existing
> > > comments, and this would free reading. this last could be used in
> another
> > > place eg:  to show recent comments for a page.
> >
> > > -* Searches with crud.search and jqgrid on GAE*
> > > I got error using crud.search and jqgrid widgets, as GAE does not allow
> to
> > > perform LIKE, StartsWIth, EndsWith, Contains, etc, while do not have
> any
> > > workarround, I think that options should be disabled When it is
> detected
> > > that is working in GAE
> >
> > > *Suggestions:*( Too many things. Sorry )
> >
> > > - *Widget_Builder:*
> > > Binds the code generated by widget builder direct to the page content
> > > editor, I think it is not hard to do with JavaScript, preventing the
> > > copy-paste when using widget builder
> >
> > > - *Widget* *Messages customization*
> > > Include the total capacity for customize the output messages  in the
> > > standard widgets. "load_action" and "load_url" eg uses AJAX and display
> > > the message "loading", it would be nice to have how to pass as a
> parameter,
> > > a new message to be displayed, it is usefull for translating.
> >
> > > - *Blank lines, white space:*
> > > Markdown for example set spaces by using two blank spaces at the end of
> > > each line to make a break, I'm developing a lot with plugin_wiki and
> had to
> > > create a function just to give me white space and blank lines.
> > > ``{{=br(2)}}``:template
> >
> > > - *Categories:*
> > > wiki or any other type of page created with plugin_wiki, IMHO, will
> need
> > > some kind of category management. it is not difficult to implement as
> > > standard, without having to create custom widgets, as I had to do.
> >
> > > - *Search: *
> > > I created a custom widget that performs searches in titles, slugs, and
> body
> > > of the pages, and it is running on GAE,  I believe this should be used
> as a
> > > widget placed on the meta-header, or meta-sidebar for example. but
> could
> > > be part of the plugin itself, considering that this is a basic need of
> any
> > > wiki page.
> >
> > > - *Link Targets:*
> >

Re: [web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-03 Thread Bruno Rocha
Thanks Massimo!

I am learning a lot about the way you use lambda: in web2py.

now my search is really faster.

is there any chance to do:

myrows = db(..).select().GAELIKE('string')   or
myrows = db(...).select().like(string)   or may be
myrows = GAELIKE(db.().select(),'string')

pointing to you solution? than this could solve the problem.



I am doing this:

*Search page (meta-sidebar):*


$('#search').keyup(function(){
ajax("{{=URL(r=request,
c='plugin_wiki',f='page.load/searchpages')}}",['search'],'target');
return false;
});

Search





*page/searchpages:*

``
name: searchPages
string: {{=request.args(1)}}
nfmessage: Nothing found with the word (%s)
``:widget

*the widget just as you said:*

@staticmethod
def searchPages(string=None,nfmessage='Nothing found with %s'):

string = request.vars.search
pages = db(db.plugin_wiki_page.id>0).select().find(lambda row:string
and (string in row.slug or string in row.body or string in row.title) and
not row.slug.startswith('meta'))
if string:
if pages:
return 'Results %s  ' %
UL(*[LI(A(XML(page.title),_href=URL(request.application,'plugin_wiki','page',args=page.slug)))
for page in pages])
else:
return nfmessage % string
else:
return ''


--


Sorry for going out off the post Topic Again...






2010/8/3 mdipierro 

> This code is equivalent to yours, also runs on GAE, and it is faster:
>
> @staticmethod
>def searchPages(string=None,nfmessage='Nothing found with %s'):
> pages = db(db.plugin_wiki_page.id>0).select().find(lambda row:
> \
>  string and (string in row.slug or string in
> row.body or string in row.title) and not row.slug.startswith('meta'))
>if pages:
>    return
>
> UL(*[LI(A(page.title,_href=URL(request.application,'plugin_wiki','page',args=page.slug)))
> for page in pages])
>else:
>return ''
>
>
> On Aug 2, 4:59 pm, Bruno Rocha  wrote:
> > Thats the way I found to perform LIKE() search in GAE, it is ugly (I
> know)
> > but works.. I am waiting for any feature to replace this.
> >
> > @staticmethod
> > def searchPages(string=None,nfmessage='Nothing found with %s'):
> > """
> > string: string to be found
> > """
> > found = set()
> > string = request.vars.search
> > if string:
> > #search in slug
> > pages =
> > db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug)
> > for page in pages:
> > if page.slug.find(string) > -1:
> > found.add(page.slug)
> >
> > #search in page body
> > pages =
> > db(db.plugin_wiki_page.id
> >0).select(db.plugin_wiki_page.slug,db.plugin_wiki_page.body)
> > for page in pages:
> > if page.body.find(string) > -1:
> > found.add(page.slug)
> >
> > #search in page title
> > pages =
> > db(db.plugin_wiki_page.id
> >0).select(db.plugin_wiki_page.slug,db.plugin_wiki_page.title)
> > for page in pages:
> > if page.title.find(string) > -1:
> > found.add(page.slug)
> >
> > if found:
> > cleanfound = set()
> > for row in found:
> > if row[:4]!='meta':
> > cleanfound.add(row)
> >
> >     return UL(*[LI(*[A(XML(db(db.plugin_wiki_page.slug==row)\
> >
> > .select(db.plugin_wiki_page.title)[0].title),\
> >
> > _href=URL(request.application,'plugin_wiki','page',args=[row,]))])\
> > for row in cleanfound])
> > #r=request,f='page'
> > else:
> > return nfmessage % string
> >
> > else:
> > return ''
> >
> > 2010/8/2 Martin.Mulone 
> >
> >
> >
> > > I use like() to search, but in a near future this could be disabled.
> >
> > > On Aug 2, 1:23 pm, Bruno Rocha  wrote:
> > > > Running locally InstantPress looks awesome, quickly, beauty/clean
> layout
> > > and
> > > > I loved the way you treat Admin Buttons.
> >
> > > &

Re: [web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-03 Thread Bruno Rocha
'Bad English '*2

2010/8/3 Martin.Mulone 

> First my appologies for my bad english, spanish is my primary
> language. I was reading about GAE
> http://web2py.com/AlterEgo/default/show/248
> . Yes i have to transform many queries :P. I have many ideas, many of
> them i dont know how to implement like layouts system, layouts over
> layouts, i dont think is possible, so we have a limit here, anyway i
> dont go to implement it, after to be totally sure. Another thing I
> dont want to create another auth users tables because exist and do the
> job very well, but need some field, for example let the users upload
> avatars, so i think i need to extend. Anyways i think next week i am
> going to realease alpha 3, but always can check progress in
> subversion.
>
> On Aug 3, 1:17 pm, Phyo Arkar  wrote:
> > Another necessary app:
> >
> > Currently , there are so few python hosting providers especially for
>  shared
> > hosting.
> > We need a Hosting Control panel for web2py.
> >
> > Even Web2py admin modifcation with different admins for each projects
> should
> > work. But there may be security concern as web2py allows full python
> access.
> > There is Python Virtual env for it right?
> >
> > Anyone wanna give it a shot?
> >
> > On Tue, Aug 3, 2010 at 10:41 PM, Phyo Arkar  >wrote:
> >
> >
> >
> > > Ok Back to Topic
> > > Instant Press , looks good
> >
> > > With some work , that one could become a standard Blog for Web2py .
> >
> > > mulone martin , you should be branding it .
> > > Get a domain for it as a dedicate site , and to some of us who want to
> > > contribute , assign task at google code.
> >
> > > Prof Massimo , your reddit clone can also become a killer APP ,
> shouln't
> > > you make a site dedicated for it and host it at googlecode + assign
> task to
> > > us , so we can contribute?
> >
> > > googlecode have huge SEO advantage for opensource projects.
> >
> > > On Tue, Aug 3, 2010 at 10:17 PM, mdipierro  >wrote:
> >
> > >> This code is equivalent to yours, also runs on GAE, and it is faster:
> >
> > >> @staticmethod
> > >>def searchPages(string=None,nfmessage='Nothing found with %s'):
> > >> pages = db(db.plugin_wiki_page.id>0).select().find(lambda
> row:
> > >> \
> > >>      string and (string in row.slug or string in
> > >> row.body or string in row.title) and not row.slug.startswith('meta'))
> > >>if pages:
> > >>return
> >
> > >>
> UL(*[LI(A(page.title,_href=URL(request.application,'plugin_wiki','page',arg
> s=page.slug)))
> > >> for page in pages])
> > >>else:
> > >>return ''
> >
> > >> On Aug 2, 4:59 pm, Bruno Rocha  wrote:
> > >> > Thats the way I found to perform LIKE() search in GAE, it is ugly (I
> > >> know)
> > >> > but works.. I am waiting for any feature to replace this.
> >
> > >> > @staticmethod
> > >> > def searchPages(string=None,nfmessage='Nothing found with %s'):
> > >> > """
> > >> > string: string to be found
> > >> > """
> > >> > found = set()
> > >> > string = request.vars.search
> > >> > if string:
> > >> > #search in slug
> > >> > pages =
> > >> > db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug)
> > >> > for page in pages:
> > >> > if page.slug.find(string) > -1:
> > >> > found.add(page.slug)
> >
> > >> > #search in page body
> > >> > pages =
> > >> > db(db.plugin_wiki_page.id
> > >> >0).select(db.plugin_wiki_page.slug,db.plugin_wiki_page.body)
> > >> > for page in pages:
> > >> > if page.body.find(string) > -1:
> > >> > found.add(page.slug)
> >
> > >> > #search in page title
> > >> > pages =
> > >> > db(db.plugin_wiki_page.id
> > >> >0).select(db.plugin_wiki_page.slug,db.plugin_wiki_page.title)
> > >> > for page in pages:
>

Re: [web2py] Re: A Call to Arms - Necessary and KILLER Apps for Web2py

2010-08-03 Thread Bruno Rocha
'Bad English'*2 ... I mean my english is worse than yours.

 your method get_last_post_with_search()  can be replaces with the solution
using .find() posted here,
now we have to find ways to port use the not operators ("!=" and "~")  and
mixed queries (db.image.id==id)&(db.image.title=='').

Image upload is also a problem, I have no sucess when trying to download an
image from GAE Blob.



2010/8/3 Martin.Mulone 

> First my appologies for my bad english, spanish is my primary
> language. I was reading about GAE
> http://web2py.com/AlterEgo/default/show/248
> . Yes i have to transform many queries :P. I have many ideas, many of
> them i dont know how to implement like layouts system, layouts over
> layouts, i dont think is possible, so we have a limit here, anyway i
> dont go to implement it, after to be totally sure. Another thing I
> dont want to create another auth users tables because exist and do the
> job very well, but need some field, for example let the users upload
> avatars, so i think i need to extend. Anyways i think next week i am
> going to realease alpha 3, but always can check progress in
> subversion.
>
> On Aug 3, 1:17 pm, Phyo Arkar  wrote:
> > Another necessary app:
> >
> > Currently , there are so few python hosting providers especially for
>  shared
> > hosting.
> > We need a Hosting Control panel for web2py.
> >
> > Even Web2py admin modifcation with different admins for each projects
> should
> > work. But there may be security concern as web2py allows full python
> access.
> > There is Python Virtual env for it right?
> >
> > Anyone wanna give it a shot?
> >
> > On Tue, Aug 3, 2010 at 10:41 PM, Phyo Arkar  >wrote:
> >
> >
> >
> > > Ok Back to Topic
> > > Instant Press , looks good
> >
> > > With some work , that one could become a standard Blog for Web2py .
> >
> > > mulone martin , you should be branding it .
> > > Get a domain for it as a dedicate site , and to some of us who want to
> > > contribute , assign task at google code.
> >
> > > Prof Massimo , your reddit clone can also become a killer APP ,
> shouln't
> > > you make a site dedicated for it and host it at googlecode + assign
> task to
> > > us , so we can contribute?
> >
> > > googlecode have huge SEO advantage for opensource projects.
> >
> > > On Tue, Aug 3, 2010 at 10:17 PM, mdipierro  >wrote:
> >
> > >> This code is equivalent to yours, also runs on GAE, and it is faster:
> >
> > >> @staticmethod
> > >>def searchPages(string=None,nfmessage='Nothing found with %s'):
> > >> pages = db(db.plugin_wiki_page.id>0).select().find(lambda
> row:
> > >> \
> > >>  string and (string in row.slug or string in
> > >> row.body or string in row.title) and not row.slug.startswith('meta'))
> > >>if pages:
> > >>return
> >
> > >>
> UL(*[LI(A(page.title,_href=URL(request.application,'plugin_wiki','page',arg
> s=page.slug)))
> > >> for page in pages])
> > >>else:
> > >>return ''
> >
> > >> On Aug 2, 4:59 pm, Bruno Rocha  wrote:
> > >> > Thats the way I found to perform LIKE() search in GAE, it is ugly (I
> > >> know)
> > >> > but works.. I am waiting for any feature to replace this.
> >
> > >> > @staticmethod
> > >> > def searchPages(string=None,nfmessage='Nothing found with %s'):
> > >> > """
> > >> > string: string to be found
> > >> > """
> > >> > found = set()
> > >> > string = request.vars.search
> > >> > if string:
> > >> > #search in slug
> > >> > pages =
> > >> > db(db.plugin_wiki_page.id>0).select(db.plugin_wiki_page.slug)
> > >> > for page in pages:
> > >> > if page.slug.find(string) > -1:
> > >> > found.add(page.slug)
> >
> > >> > #search in page body
> > >> > pages =
> > >> > db(db.plugin_wiki_page.id
> > >> >0).select(db.plugin_wiki_page.slug,db.plugin_wiki_page.body)
> > >> > for page in pages:
> > >> >

[web2py] Is it possible to close the source of an app made with plugin_wiki?

2010-08-03 Thread Bruno Rocha
I saw this post - > "So ... you want to make and sell a closed source
windows exe web2py app? Http://bit.ly/aNWRgi"

And I was thinking, if it is possible to package an application developed
with plugin_wiki and distribute closed source?

I am not sure how this works internally, but since the plugin_wiki executes
code that can be stored in database, within meta-pages, and template widget.

Is it possible to package parts of the application and still perform the
meta codes at run-time?

Just curious.


Re: [web2py] Re: plugin_wiki suggestions

2010-08-03 Thread Bruno Rocha
Useful suggestion:

markmin currently does not allow the creation of references to links, this
is very useful when the written material might be used for printing as
well. thus present a list of links referenced in the footnote.

with markdown, we can do:
This is [an example] [id] reference-style link.
Then, anywhere in the document, you define your link label like this, on a
line by Itself:
[Id]: http://example.com/ "Optional Title Here"



2010/8/1 mdipierro 

> Not yet. You can post here for now. Not sure it needs a new place.
>
> If you have comments please send them asap since I am about to make
> some changes and write a book chapter about it tomorrow.
>
> On 1 Ago, 04:55, Bruno Rocha  wrote:
> > Sorry again, I am creating a new thread about plugin_wiki.
> >
> > I wonder if there is any public place where we can write suggestions,
> > criticisms, and send questions exclusively about plugin_wiki, markmin and
> > cube2py?
> >
> > --
> >
> > http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: cube2py news

2010-08-03 Thread Bruno Rocha
I found a trick to do that

as #anchor marked with [[anything]] is rendered as  ( which I am not sure if it is a good html pratice
)

BTW, I solved my problem on white spaces with CSS

[[br]] =  I want 
[[brbr]] =  I want 

the CSS

#br{
height:15px;
line-height:15px;
display:block;
}
#brbr{
height:30px;
line-height:15px;
display:block;
}
#hr{
width:100%;
height:2px;
border-top: 1px solid black;
display:block;
}

I also modified markin.py to render  just for curiosity, but I decide to
stay with only CSS

regex_br = re.compile('\[\[\sbr\s\]\]')  and [[ br ]] is rendered as  by
defining text = regex_br.sub('')



2010/7/13 mdipierro 

> You can override the default behavior, just set in db.py
>
> plugin_wiki_editor = . your condition 
>
> You cannot insert white spaces in markmin unless you do
>
>  `` ``:template
>
> but it is horrible.
>
> On 13 Lug, 17:07, Chris S  wrote:
> > Ah great, you're correct GAE does not start at id==1 (or it doesn't
> > guarantee it).
> >
> > Any chance we could make the 'editor' group a variable so that when
> > importing it into existing applications we can set the name to be that
> > of an already created 'admin' group?
> > Another thing I've been doing recently is to make the {{extend
> > 'layout.html'}} in all of the views a varriable.  This lets me easily
> > swap to a different layout with out having to rename files, or even
> > swap on the fly.  I can manually do this but it might be something
> > worth putting into the files.  It could just be set with the other
> > 'required' globals to default to 'layout.html'.
> >
> > This looks really great I love the storing of pages in a DB and the
> > auto-history tracking.  How do I go about inserting page breaks 
> > or white space in markmin?  So far that's the only thing making me
> > want to stick to WYSIWYG editing in HTML, though I like the look of
> > markmin.
> >
> > On Jul 13, 4:06 pm, mdipierro  wrote:
> >
> > > The first user (id==1) is editor by default (but not on GAE). Create a
> > > group with role='editor' and make yourself member using appadmin.
> >
> > > On 13 Lug, 13:11, Chris S  wrote:
> >
> > > > Ah it's an authorization thing.
> >
> > > > I can get myself to the the index page now, but I'm still not sure
> how
> > > > I make myself a 'plugin_wiki_editor' I tried creating a group of that
> > > > name and using appadmin to add my login to that group but that didn't
> > > > work.  Maybe I'm missing something easy, or maybe the first
> registered
> > > > user needs to become an 'editor'?  I'm not sure how anyone gets to be
> > > > an editor if you have to first be one to assign the rights...
> >
> > > > On Jul 13, 12:42 pm, Chris S  wrote:
> >
> > > > > I also meant to ask, does plugin_wiki just come with cube2py?  Can
> it
> > > > > also be downloaded somewhere separately?
> > > > > I thought it could, but I can't find it anwywhere.  Can someone
> point
> > > > > me to where plugin_wiki is?
> >
> > > > > On Jul 13, 12:39 pm, Chris S  wrote:
> >
> > > > > > I just loaded the latest trunk, and the latest cube2py at:
> https://cube2py.googlecode.com/hg/cube2py
> >
> > > > > > I cleared the datastore and memcache then pointed my browser to
> > > > > > 127.0.0.1:8080/cube2py
> >
> > > > > > I get the login screen, but when I try to register I get a 404.
>  The
> > > > > > entire log from the initial page view to the redirect to home is
> shown
> > > > > > below.
> > > > > > Am I using the correct location for the cube2py repository?
> >
> > > > > > --Complete Log--
> > > > > > INFO 2010-07-13 17:35:46,755 gaehandler.py:57]  Request:
> > > > > > 25.00ms/25.65ms (real time/cpu time)
> > > > > > INFO 2010-07-13 17:35:46,780 dev_appserver.py:3268] "GET
> /cube2py
> > > > > > HTTP/1.1" 303 -
> > > > > > INFO 2010-07-13 17:35:46,835 gaehandler.py:57]  Request:
> > > > > > 23.00ms/23.60ms (real time/cpu time)
> > > > > > INFO 2010-07-13 17:35:46,862 dev_appserver.py:3268] "GET
> /cube2py/
> > > > > > plugin_wiki/page/home HTTP/1.1" 303 -
> > > > > > INFO 2010-07-13 17:35:46,921 gaehandler.py:57]  Request:
> > > > > > 27.00ms/26.93ms (real time/cpu time)
> > > > > > INFO 2010-07-13 17:35:46,947 dev_appserver.py:3268] "GET
> /cube2py/
> > > > > > default/user/login HTTP/1.1" 200 -
> > > > > > ERROR2010-07-13 17:35:47,092 dev_appserver.py:2633] Error
> > > > > > encountered reading file "C:\Users\chris.sanders\Documents\Misc
> > > > > > \workspace\WebDev\applications/cube2py/static/echo/images/ddd-
> > > > > > gradient.jpg":
> > > > > > [Errno 2] No such file or directory: 'C:\\Users\\chris.sanders\
> > > > > >
> \Documents\\Misc\\workspace\\WebDev\\applications/cube2py/static/echo/
> > > > > > images/ddd-gradient.jpg'
> > > > > > INFO 2010-07-13 17:35:47,118 dev_appserver.py:3268] "GET
> /cube2py/
> > > > > > static/echo/images/ddd-gradient.jpg HTTP/1.1" 404 -
> > > > > > INFO 2010-07-13 17:35:51,035 gaehandler.py:57]  Request:
> > > > > > 29.00ms/28.97m

Re: [web2py] Re: plugin_wiki suggestions

2010-08-04 Thread Bruno Rocha
Sorry, I am so stupid... I forgotten about anchors

Thanks again

2010/8/4 mdipierro 

> Yes you can:
>
> [[my reference #id1]]
>
> [[id1]] referenced material
>
> On Aug 3, 11:56 pm, Bruno Rocha  wrote:
> > Useful suggestion:
> >
> > markmin currently does not allow the creation of references to links,
> this
> > is very useful when the written material might be used for printing as
> > well. thus present a list of links referenced in the footnote.
> >
> > with markdown, we can do:
> > This is [an example] [id] reference-style link.
> > Then, anywhere in the document, you define your link label like this, on
> a
> > line by Itself:
> > [Id]:http://example.com/"Optional Title Here"
> >
> > 2010/8/1 mdipierro 
> >
> >
> >
> > > Not yet. You can post here for now. Not sure it needs a new place.
> >
> > > If you have comments please send them asap since I am about to make
> > > some changes and write a book chapter about it tomorrow.
> >
> > > On 1 Ago, 04:55, Bruno Rocha  wrote:
> > > > Sorry again, I am creating a new thread about plugin_wiki.
> >
> > > > I wonder if there is any public place where we can write suggestions,
> > > > criticisms, and send questions exclusively about plugin_wiki, markmin
> and
> > > > cube2py?
> >
> > > > --
> >
> > > >http://rochacbruno.com.br
> >
> > --
> >
> > http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] web2py 1.82.1 is OUT check it out

2010-08-04 Thread Bruno Rocha
It is going down to zero ??

was 1.84.1, than 1.85. and now it is 1.82???

2010/8/4 mdipierro 

> Changelog
>
> #1.82.1
> - new template system supports {{block}}, thanks Thadeus
> - new db.table(id,[field=value]) and db.table(query) syntax to get
> first matching record
> - URL('index') (no more r=request), thanks Thadeus
> - mail.send(message='...', )
> - DAL([uri1, uri2, uri3]) for load balancing
> - @service.soap(...) with mysimplesoap, thanks Mariano
> - request.ajax to detect if action is called via ajax, tahnks Jonathan
> and David Mako
> - more captcha options, thanks Vidul
> - openid and oauth2 thanks Michele and Keith
> - better PluginManager and load components
> - FORM(...,hideerror=True) for custom forms
>



-- 

http://rochacbruno.com.br


Re: [web2py] web2py 1.82.1 is OUT check it out

2010-08-04 Thread Bruno Rocha
I got confused because of this thread..
http://groups.google.com/group/web2py/browse_thread/thread/a1e2b8443ada7198/5e20279c2ba66d88?lnk=gst&q=
*1.84*#5e20279c2ba66d88

Sorry...


2010/8/4 Bruno Rocha 

> It is going down to zero ??
>
> was 1.84.1, than 1.85. and now it is 1.82???
>
> 2010/8/4 mdipierro 
>
> Changelog
>>
>> #1.82.1
>> - new template system supports {{block}}, thanks Thadeus
>> - new db.table(id,[field=value]) and db.table(query) syntax to get
>> first matching record
>> - URL('index') (no more r=request), thanks Thadeus
>> - mail.send(message='...', )
>> - DAL([uri1, uri2, uri3]) for load balancing
>> - @service.soap(...) with mysimplesoap, thanks Mariano
>> - request.ajax to detect if action is called via ajax, tahnks Jonathan
>> and David Mako
>> - more captcha options, thanks Vidul
>> - openid and oauth2 thanks Michele and Keith
>> - better PluginManager and load components
>> - FORM(...,hideerror=True) for custom forms
>>
>
>
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: web2py 1.82.1 is OUT check it out

2010-08-04 Thread Bruno Rocha
LOL

Really sorry when I read the thread mentioned above got the number on the
head, I even mentioned as being the current version on my site. (just
corrected)

web2py use a crawler to pull the version information directly to the
appadmin. it is possible to embed in any other place?

I i'll take a look into appadmin source now.

Sry...


2010/8/4 mdipierro 

> You had me panic for a second. LOL
>
> On Aug 4, 7:11 pm, Bruno Rocha  wrote:
> > I got confused because of this thread..
> http://groups.google.com/group/web2py/browse_thread/thread/a1e2b8443a...
> > *1.84*#5e20279c2ba66d88
> >
> > Sorry...
> >
> > 2010/8/4 Bruno Rocha 
> >
> >
> >
> > > It is going down to zero ??
> >
> > > was 1.84.1, than 1.85. and now it is 1.82???
> >
> > > 2010/8/4 mdipierro 
> >
> > > Changelog
> >
> > >> #1.82.1
> > >> - new template system supports {{block}}, thanks Thadeus
> > >> - new db.table(id,[field=value]) and db.table(query) syntax to get
> > >> first matching record
> > >> - URL('index') (no more r=request), thanks Thadeus
> > >> - mail.send(message='...', )
> > >> - DAL([uri1, uri2, uri3]) for load balancing
> > >> - @service.soap(...) with mysimplesoap, thanks Mariano
> > >> - request.ajax to detect if action is called via ajax, tahnks Jonathan
> > >> and David Mako
> > >> - more captcha options, thanks Vidul
> > >> - openid and oauth2 thanks Michele and Keith
> > >> - better PluginManager and load components
> > >> - FORM(...,hideerror=True) for custom forms
> >
> > > --
> >
> > >http://rochacbruno.com.br
> >
> > --
> >
> > http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: web2py 1.82.1 is OUT check it out

2010-08-04 Thread Bruno Rocha
Found it: http://web2py.com/examples/default/version

Tks

2010/8/4 Bruno Rocha 

> LOL
>
> Really sorry when I read the thread mentioned above got the number on the
> head, I even mentioned as being the current version on my site. (just
> corrected)
>
> web2py use a crawler to pull the version information directly to the
> appadmin. it is possible to embed in any other place?
>
> I i'll take a look into appadmin source now.
>
> Sry...
>
>
> 2010/8/4 mdipierro 
>
>> You had me panic for a second. LOL
>>
>>
>> On Aug 4, 7:11 pm, Bruno Rocha  wrote:
>> > I got confused because of this thread..
>> http://groups.google.com/group/web2py/browse_thread/thread/a1e2b8443a...
>> > *1.84*#5e20279c2ba66d88
>> >
>> > Sorry...
>> >
>> > 2010/8/4 Bruno Rocha 
>> >
>> >
>> >
>> > > It is going down to zero ??
>> >
>> > > was 1.84.1, than 1.85. and now it is 1.82???
>> >
>> > > 2010/8/4 mdipierro 
>> >
>> > > Changelog
>> >
>> > >> #1.82.1
>> > >> - new template system supports {{block}}, thanks Thadeus
>> > >> - new db.table(id,[field=value]) and db.table(query) syntax to get
>> > >> first matching record
>> > >> - URL('index') (no more r=request), thanks Thadeus
>> > >> - mail.send(message='...', )
>> > >> - DAL([uri1, uri2, uri3]) for load balancing
>> > >> - @service.soap(...) with mysimplesoap, thanks Mariano
>> > >> - request.ajax to detect if action is called via ajax, tahnks
>> Jonathan
>> > >> and David Mako
>> > >> - more captcha options, thanks Vidul
>> > >> - openid and oauth2 thanks Michele and Keith
>> > >> - better PluginManager and load components
>> > >> - FORM(...,hideerror=True) for custom forms
>> >
>> > > --
>> >
>> > >http://rochacbruno.com.br
>> >
>> > --
>> >
>> > http://rochacbruno.com.br
>>
>
>
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: plugin_wiki with 1.82.1 "meta" page error

2010-08-05 Thread Bruno Rocha
Take a look in your layout.html

when you create meta- pages, is expected to yout layout.html to render that
code..

HEADER


  
{{=auth.navbar('Welcome',URL(r=request,c='default',f='user'))}}

  {{=*plugin_wiki.embed_page('meta-header')* or XML('%s%s'
% (response.title, response.subtitle))}}


SIDEBAR


  {{=*plugin_wiki.embed_page('meta-sidebar') *or ''}}



FOOTER


  {{=*plugin_wiki.embed_page('meta-footer')* or XML('© 2010. Design
inspired by http://www.spyka.net";>spyka@http://www.justfreetemplates.com";>FreeWebTemplates - Powered by http://web2py.com";>web2py - documentation
(pdf)' % URL(r=request,c='static',f='cube2py.pdf'))}}


2010/8/6 cadrentes 

> Thanks!
> That took care of the error.
>
> I tested all but the meta-code.  The meta-menu works but the other
> "meta's" are being trumped...for example, the footer remains
> "Copyright © 2010 - Powered by web2py" instead of being replaced by
> "meta-footer" when I create the pages.
>
> On Aug 5, 4:40 pm, mdipierro  wrote:
> > I posted it now at
> >
> > http://web2py.com/examples/static/web2py.plugin.wiki.w2p
> >
> > please check it.
> >
> > On Aug 5, 5:33 pm, mdipierro  wrote:
> >
> > > This is fixed in this version of the plugins:
> >
> > >http://code.google.com/p/cube2py/
> >
> > > will repost it on web2py.com tomorrow.
> >
> > > On Aug 5, 3:46 pm, cadrentes  wrote:
> >
> > > > I'm running 1.82.1 and installed plugin_wiki.  When attempting to
> > > > create "meta" pages I get the following error:
> >
> > > >   File "/home/www-data/web2py/applications/welcome/controllers/
> > > > plugin_wiki.py", line 70, in page_editbody=request.vars.template
> > > > and w(slug=request.vars.template).body or '')AttributeError:
> > > > 'NoneType' object has no attribute 'body'
> >
> > > > Any suggestions?
> >
> >
>


Re: [web2py] Re: plugin_wiki with 1.82.1 "meta" page error

2010-08-05 Thread Bruno Rocha
Massimo, I posted a new issue:
http://code.google.com/p/cube2py/issues/detail?id=4

Do you prefer to keep the bug tracking in Google Code? or here in the list?

2010/8/5 mdipierro 

> I posted it now at
>
> http://web2py.com/examples/static/web2py.plugin.wiki.w2p
>
> please check it.
>
> On Aug 5, 5:33 pm, mdipierro  wrote:
> > This is fixed in this version of the plugins:
> >
> > http://code.google.com/p/cube2py/
> >
> > will repost it on web2py.com tomorrow.
> >
> > On Aug 5, 3:46 pm, cadrentes  wrote:
> >
> > > I'm running 1.82.1 and installed plugin_wiki.  When attempting to
> > > create "meta" pages I get the following error:
> >
> > >   File "/home/www-data/web2py/applications/welcome/controllers/
> > > plugin_wiki.py", line 70, in page_editbody=request.vars.template
> > > and w(slug=request.vars.template).body or '')AttributeError:
> > > 'NoneType' object has no attribute 'body'
> >
> > > Any suggestions?
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: web2py and SEO

2010-08-06 Thread Bruno Rocha
SEO is basically done through:

page title (response.meta.title)
page keywords ( response.meta.keywords)
page description ( response.meta.description)

plus:
the robots.txt file under website root directory,
good practices for creating links and inserting images,
Semantic html markup ( I mean always including "name" , "alt", "title" for
relevant tags),
and also using correctly the most relevant tags (h1,h2,h..., , 
etc )

And one of the most important thing: Build a sitemap [1]

web2py is ready to do all that, but we need to do it all from the scratch,
what we need now is a helper or a mechanism to make it more user friendly.As
is done by the plugin ALL-IN-ONE-PACK-SEO on wordpress for example.


[1] http://en.wikipedia.org/wiki/Site_map





2010/8/6 mdipierro 

> web2py does not care. I do not think there is any difference between
> frameworks about this. The issue how you use them.
>
> web2py provides response.meta that combined with the default layout
> allows you to set
>
> response.meta.keywords
> response.meta.description
> response.meta.author
>
> If you have recommendations about specific features that need to be
> implemented at the framework level, let us know.
>
>
>
>
>
>
> On Aug 6, 6:13 am, puercoespin 
> wrote:
> > Is web2py designed for a good practices about SEO? Are some frameworks
> > SEO-friends and others no SEO-friends and, if this is true, are web2py
> > SEO-friend?
> >
> > Thanks
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: web2py and SEO

2010-08-06 Thread Bruno Rocha
I believe that a simple helper, to be called in any view or controller is
enought, imagine:

view:

{{extend 'layout.html'}}

{{SEO(title='My Product view',

 keywords='phones,calls,smartphone',

 description='This is a phone seller site made with web2py',

 author='me',

 sitemap=['/products/categories/phones']

}}

Choose your phone
...

...

...


Another important thing is the page slug, even if the action is called
e.g: "showproduct" and that expect an product id for a product named
"XPTO smartphone", then
"/showprodict/id" needs to be accessible by "/showproduct/xpto-smartphone"
but it is a database design matter, I dont know how web2py could help with that.

video about SEO:
http://www.mahalo.com/how-to-seo-your-website


2010/8/6 Bruno Rocha 

> SEO is basically done through:
>
> page title (response.meta.title)
> page keywords ( response.meta.keywords)
> page description ( response.meta.description)
>
> plus:
> the robots.txt file under website root directory,
> good practices for creating links and inserting images,
> Semantic html markup ( I mean always including "name" , "alt", "title" for
> relevant tags),
> and also using correctly the most relevant tags (h1,h2,h..., , 
> etc )
>
> And one of the most important thing: Build a sitemap [1]
>
> web2py is ready to do all that, but we need to do it all from the scratch,
> what we need now is a helper or a mechanism to make it more user friendly.As
> is done by the plugin ALL-IN-ONE-PACK-SEO on wordpress for example.
>
>
> [1] http://en.wikipedia.org/wiki/Site_map
>
>
>
>
>
> 2010/8/6 mdipierro 
>
> web2py does not care. I do not think there is any difference between
>> frameworks about this. The issue how you use them.
>>
>> web2py provides response.meta that combined with the default layout
>> allows you to set
>>
>> response.meta.keywords
>> response.meta.description
>> response.meta.author
>>
>> If you have recommendations about specific features that need to be
>> implemented at the framework level, let us know.
>>
>>
>>
>>
>>
>>
>> On Aug 6, 6:13 am, puercoespin 
>> wrote:
>> > Is web2py designed for a good practices about SEO? Are some frameworks
>> > SEO-friends and others no SEO-friends and, if this is true, are web2py
>> > SEO-friend?
>> >
>> > Thanks
>>
>
>
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: web2py and SEO

2010-08-06 Thread Bruno Rocha
List of Best and Worst practices:
http://www.webconfs.com/15-minute-seo.php



2010/8/6 Bruno Rocha 

> I believe that a simple helper, to be called in any view or controller is
> enought, imagine:
>
> view:
>
> {{extend 'layout.html'}}
>
> {{SEO(title='My Product view',
>
>  keywords='phones,calls,smartphone',
>
>  description='This is a phone seller site made with web2py',
>
>  author='me',
>
>  sitemap=['/products/categories/phones']
>
> }}
>
> Choose your phone
> ...
>
> ...
>
> ...
>
>
> Another important thing is the page slug, even if the action is called e.g: 
> "showproduct" and that expect an product id for a product named "XPTO 
> smartphone", then
> "/showprodict/id" needs to be accessible by "/showproduct/xpto-smartphone"
> but it is a database design matter, I dont know how web2py could help with 
> that.
>
> video about SEO:
> http://www.mahalo.com/how-to-seo-your-website
>
>
> 2010/8/6 Bruno Rocha 
>
> SEO is basically done through:
>>
>> page title (response.meta.title)
>> page keywords ( response.meta.keywords)
>> page description ( response.meta.description)
>>
>> plus:
>> the robots.txt file under website root directory,
>> good practices for creating links and inserting images,
>> Semantic html markup ( I mean always including "name" , "alt", "title" for
>> relevant tags),
>> and also using correctly the most relevant tags (h1,h2,h..., ,
>>  etc )
>>
>> And one of the most important thing: Build a sitemap [1]
>>
>> web2py is ready to do all that, but we need to do it all from the scratch,
>> what we need now is a helper or a mechanism to make it more user friendly.As
>> is done by the plugin ALL-IN-ONE-PACK-SEO on wordpress for example.
>>
>>
>> [1] http://en.wikipedia.org/wiki/Site_map
>>
>>
>>
>>
>>
>> 2010/8/6 mdipierro 
>>
>> web2py does not care. I do not think there is any difference between
>>> frameworks about this. The issue how you use them.
>>>
>>> web2py provides response.meta that combined with the default layout
>>> allows you to set
>>>
>>> response.meta.keywords
>>> response.meta.description
>>> response.meta.author
>>>
>>> If you have recommendations about specific features that need to be
>>> implemented at the framework level, let us know.
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Aug 6, 6:13 am, puercoespin 
>>> wrote:
>>> > Is web2py designed for a good practices about SEO? Are some frameworks
>>> > SEO-friends and others no SEO-friends and, if this is true, are web2py
>>> > SEO-friend?
>>> >
>>> > Thanks
>>>
>>
>>
>>
>> --
>>
>> http://rochacbruno.com.br
>>
>
>
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: web2py and SEO

2010-08-06 Thread Bruno Rocha
2010/8/6 mdipierro 

> You should this in a model, before the view is executed:
>
> response.title='My Product view'
> response.meta.keywords='phones,calls,smartphone'
> response.meta.description='This is a phone seller site made with
> web2py'
> response.meta.author='me'
>
> The sitemap cannot be accomplished by a helper. It needs a helper and
> a storage.


In this example you are declaring globally.
The problem is that SEO variables. must be unique for each view, and
sometimes, must be built according to the parameters received, as in the
example of Canonical URLS.

take this example:
/ Showproduct/01 the url needs to be changed to /showproduct/foo-smartphone

and also title of the page needs to be amended in accordance with the
product,
response.title = "my phone shop | phones | Smartphone foo"
response.keywords = "foo, phone, brand, 3G, 5 mp cam"

Regarding the sitemap is a good point to look how this is being done out
there, to get an idea:
http://sitemaps.org/protocol.php
http://docs.djangoproject.com/en/dev/ref/contrib/sitemaps/?from=olddocs
COOL FEATURE
http://docs.djangoproject.com/en/dev/ref/contrib/sitemaps/?from=olddocs#pinging-google
http://code.google.com/p/django-seo-tools/

>


Re: [web2py] Re: Some MARKMIN questions

2010-08-06 Thread Bruno Rocha
In Markmin double spaces between lines or paragraphs breaks the line, but
only one break is allowed, sometimes we need more space.

I think it's extremely necessary to use  sometimes. Markdown and
wikimedia does.

I'm writing a lot and need to convert to PDF, the way I'm doing the css code
is not considered in the conversion.
So I'm using  :template   to solve the problem, it is very ugly..
but works..

I created a function to render that then I call as ``{{=br(4)}}``:template
which returns ''

2010/8/6 mr.freeze 

> In markdown, you make a new line by ending the current line with two
> or more spaces.
>
> On Aug 6, 9:17 am, mdipierro  wrote:
> > On Aug 6, 8:55 am, David Marko  wrote:
> >
> > > I have a few questions to MARKMIN.
> >
> > > 1. How to allow user to enter new line? Is there some way, using
> > > MARKMIN, how to specify new line ('cause common text area new lines
> > > are not translated to )
> >
> > You do not. Use CSS for that. That is the point of using a markup
> > language.
> >
> > > 2. When using the 'image' MARKMIN command, is there a way how to
> > > display the image 'inline', mean without align='left|center|right'
> > > params, which screw up page view?
> >
> > center should be the same as inline.
>



-- 

http://rochacbruno.com.br


Re: [web2py] Re: Some MARKMIN questions

2010-08-06 Thread Bruno Rocha
Cool! tks

replacing right now

2010/8/6 mdipierro 

> you can extend MARKMIN by passing extra
>
> MARMIN(text, extra={'space':lambda code: '' %
> code
>
> and in text
>
> ``50px``:space
>
>
>
> On Aug 6, 9:28 am, Bruno Rocha  wrote:
> > In Markmin double spaces between lines or paragraphs breaks the line, but
> > only one break is allowed, sometimes we need more space.
> >
> > I think it's extremely necessary to use  sometimes. Markdown and
> > wikimedia does.
> >
> > I'm writing a lot and need to convert to PDF, the way I'm doing the css
> code
> > is not considered in the conversion.
> > So I'm using  :template   to solve the problem, it is very ugly..
> > but works..
> >
> > I created a function to render that then I call as
> ``{{=br(4)}}``:template
> > which returns ''
> >
> > 2010/8/6 mr.freeze 
> >
> >
> >
> > > In markdown, you make a new line by ending the current line with two
> > > or more spaces.
> >
> > > On Aug 6, 9:17 am, mdipierro  wrote:
> > > > On Aug 6, 8:55 am, David Marko  wrote:
> >
> > > > > I have a few questions to MARKMIN.
> >
> > > > > 1. How to allow user to enter new line? Is there some way, using
> > > > > MARKMIN, how to specify new line ('cause common text area new lines
> > > > > are not translated to )
> >
> > > > You do not. Use CSS for that. That is the point of using a markup
> > > > language.
> >
> > > > > 2. When using the 'image' MARKMIN command, is there a way how to
> > > > > display the image 'inline', mean without align='left|center|right'
> > > > > params, which screw up page view?
> >
> > > > center should be the same as inline.
> >
> > --
> >
> > http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] Sessions

2010-08-06 Thread Bruno Rocha
The problem that Session variables have to overcome is that the HTTP
protocol that you use to browse the web is stateless. Each request for a
page is completely independant of earlier requests, so if you want  to
"remember" the variables you have to store that information somewhere. This
remembering of user-specific data is called "maintaining state".

Session lives until browser is openned to keep the session relation with the
cookie that stores the session ID,
if you want to mantain  session variables active for a long time, you have
to create a cookie, specify the cookie duration, insert your values to the
cookie and also check if the cookie exists on every page load.

You can save the information in a database as explained here:
http://web2py.com/book/default/chapter/04?search=session#session

also you have to save a cookie that refers to that register in database, or
if you want, you can save the whoke information in the cookie.

I dont know any other trick to maintain state with web2py, anybody?



2010/8/5 Cody 

> Hello,
>
> I just started using web2py this summer to create a website.
>
> Currently, I am having an issue with sessions. I am trying to store
> information in session variables without having the user login, but
> whenever the browser closes and reopens all the session variables are
> reset. I am only storing strings and integers, and the code works as
> long as the browser does not close.
>
> Is there anyway to prevent this? Also, how long do sessions last, and
> how can I change that?




-- 

http://rochacbruno.com.br


Re: [web2py] Sessions

2010-08-06 Thread Bruno Rocha
If I understand, he wants to save session values, even the user closes the
browser and returns after.

if you set e.g one week to the cookie time limit, this will keep the
reference to the session ID, but I dont think this will automaticaly keep
the session values. ( what if the server restarts?)

To maintain the state, I guess you have to store the values anywhere, even
inside the cookie. Then you have to check if the cookie exists Am I
wrong?



2010/8/6 Alexandre Andrade 

> You just have to set a time limit to your session/cookie, like a week,
> month or year.
>
> I'm sure massimo answer how to set a diferent time limit to a cookie
> before.
>
>
>
> 2010/8/5 Cody 
>
>> Hello,
>>
>>
>> I just started using web2py this summer to create a website.
>>
>> Currently, I am having an issue with sessions. I am trying to store
>> information in session variables without having the user login, but
>> whenever the browser closes and reopens all the session variables are
>> reset. I am only storing strings and integers, and the code works as
>> long as the browser does not close.
>>
>> Is there anyway to prevent this? Also, how long do sessions last, and
>> how can I change that?
>>
>
>
>
> --
> Atenciosamente
>
> --
> =
> Alexandre Andrade
> Hipercenter.com
>



-- 

http://rochacbruno.com.br


Re: [web2py] Book in Italian, Spanish, Portuguese, Chinese and Russian (sort of)

2010-08-08 Thread Bruno Rocha
Portuguese version is really funny :o| , absolutelly wrong, as portuguese is
a "strange", non semantic and complex language.

Look how the Python Chapter were translated back into english..

- Python is a general purpose,  and about programming of very high level
languages.

By the way, this is very useful to be used as a guide for a human
translator.

Tks



2010/8/8 mdipierro 

> I have been playing with google translate and I managed to get a
> complete translation of the book in Italian, Spanish, Portuguese,
> Chinese and Russian.
>
> DISCLAMER:
>
> - The translation is bad but for non-english speakers, it is still
> better than the english version.
> - The translation was completely automated with NO MANUAL
> intervention.
> - I only read (partially) the italian translation. It is quite funny
> and often wrong.
> - The translation only includes the alpha version of the book.
> - This is a proof of concept. The idea is to use this as a blueprint
> so that translators can fix it online before we make proper corrected
> production version.
> - The license is Artistic License and YOU CAN redistribute the files.
> - You are not allowed to use this admittedly bad translations to
> complain about the quality of web2py. ;-)
>
> Here  are the PDF:
>
> http://web2py.com/book/static/web2py_manual_it.pdf
> http://web2py.com/book/static/web2py_manual_es.pdf
> http://web2py.com/book/static/web2py_manual_pt.pdf
>
> And here are Russian and Chinese in Latex zipped:
>
> http://web2py.com/book/static/web2py_manual_zh.zip
> http://web2py.com/book/static/web2py_manual_ru.zip
> (I have been unable to process these perhaps you can help me)
>
> You can laugh (LOL) but please DO NOT jam my web server. The PDF files
> are huge ~6MB and ~530 pages.
>



-- 

http://rochacbruno.com.br


[web2py] lightning speech - Web2py - A framework for human beings

2010-08-09 Thread Bruno Rocha
On August 22 will present the lightning speech (only 5 minutes) at TDC2010 (
The Developers Conference ) in São Paulo - Brazil

TDC is a big event in São Paulo, with trails of speeches on various subjects
related to software development.

on sunday, Python will be the subject of a full day of speeches, I will try
in just five minutes to show an overview of web2py and provide a focus on
the DAL.

any idea or advice?


Google Translated TDC page
http://translate.google.com.br/translate?js=y&prev=_t&hl=pt-BR&ie=UTF-8&layout=1&eotf=1&u=http://www.thedevelopersconference.com.br/tdc/2010/sp/trilha-python&sl=pt&tl=en


Re: [web2py] Re: lightning speech - Web2py - A framework for human beings

2010-08-10 Thread Bruno Rocha
The PDF you provided will be very very useful.

Thank you!


2010/8/10 Anand Vaidya 

> Hi Bruno,
>
> I did  a 5-min lightning talk on web2py at the PyCon APAC event. The
> slides are at:
>
>
> https://docs.google.com/a/vsa-services.com/leaf?id=0BzXgm0Aj6rayM2JlMTA4ODYtNWZkZC00OWRmLTg0MTAtY2U0MjQxMmIwYmQz&hl=en
>
> From my talk as well as talks by some others, I realize that:
>
> - Rehearse the timing before you go onstage, 5-minutes is incredibly
> short
> - Stay on the topic, no more than 5-6 slides, don't read out any of
> your slides
> - Prepare & rehearse a quick demo of installation, DB admin interface,
> a quick app - I demo'd wrapping some system commands in a web
> interface using web2py
> - Don't knock other frameworks
>
> Best of luck
>
> Regards
> Anand
>
> On Aug 10, 8:46 am, Bruno Rocha  wrote:
> > On August 22 will present the lightning speech (only 5 minutes) at
> TDC2010 (
> > The Developers Conference ) in São Paulo - Brazil
> >
> > TDC is a big event in São Paulo, with trails of speeches on various
> subjects
> > related to software development.
> >
> > on sunday, Python will be the subject of a full day of speeches, I will
> try
> > in just five minutes to show an overview of web2py and provide a focus on
> > the DAL.
> >
> > any idea or advice?
> >
> > Google Translated TDC pagehttp://
> translate.google.com.br/translate?js=y&prev=_t&hl=pt-BR&ie=UTF...




-- 

http://rochacbruno.com.br


Re: [web2py] Problems with GAE auth :(

2010-08-10 Thread Bruno Rocha
You cannot import "appengine.api" if you're out of GAE environment..



2010/8/10 Fale 

> Hi,
> I'm a new web2py user :)
> I'm trying to use google's auth for my app, but it does not work on
> web2py, while it works perfectly on appspot.com and on the offline gae
> engine :|
>
> My code:
> from gluon.tools import Mail, Auth, Recaptcha
> auth = Auth(globals(), db)
> from gluon.contrib.login_methods.gae_google_account import
> GaeGoogleAccount
> auth.settings.login_form = GaeGoogleAccount()
> auth.define_tables()
> auth.settings.create_user_groups = False
> auth.settings.mailer = mail
>
> On Web2py:
> Traceback (most recent call last):
>  File "/home/web2py/grimpuis/gluon/restricted.py", line 178, in
> restricted
>exec ccode in environment
>  File "/home/web2py/grimpuis/applications/init/models/dbs.py", line
> 100, in 
>from gluon.contrib.login_methods.gae_google_account import
> GaeGoogleAccount
>  File "/home/web2py/grimpuis/gluon/contrib/login_methods/
> gae_google_account.py", line 12, in 
>from google.appengine.api import users
> ImportError: No module named appengine.api
>
> Someone has some ideas to fix it?
>
> Thankyou in advance to anyone =)
>
> PS: As far as I seen there isn't a unique place where is stored all
> the web2py-gae knowledge. Am I blind or we really lack something like
> it?




-- 

http://rochacbruno.com.br


Re: [web2py] Problems with GAE auth :(

2010-08-10 Thread Bruno Rocha
The first place where I always search for help is *THE ORACLE* :

http://www.google.com/codesearch/p?hl=en#uyCl3L51_dI/gluon/contrib/login_methods/gae_google_account.py&q=GaeGoogleAccount%20package:http://web2py%5C.googlecode%5C.com

class GaeGoogleAccount(CasAuth):"""Login will be done via
Google's Appengine login object, instead of web2py'slogin form.
Include in your model (eg db.py)::from
gluon.contrib.login_methods.gae_google_account
<#uyCl3L51_dI&q=file:(/%7C%5E)gluon/contrib/login_methods/gae_google_account(/__init__)%3F%5C.py$&exact_package=http://web2py.googlecode.com/hg/&is_navigation=1>
import \GaeGoogleAccount
auth.settings.login_form=GaeGoogleAccount()"""


So if you are out of GAE and need to Auth using GMAIL you have to use
*email_auth
or RPX ( rpx can auth with a wide range of accounts, facbeook, twitter,
gmail...)*

http://www.google.com/codesearch?q=email_auth+package:http://web2py\.googlecode\.com&origq=email_auth&btnG=Search+Trunk



def email_auth(server="smtp.gmail.com:587",
domain="@gmail.com"):"""to use email_login:from
gluon.contrib.login_methods.email_auth
<#uyCl3L51_dI&q=file:(/%7C%5E)gluon/contrib/login_methods/email_auth(/__init__)%3F%5C.py$&exact_package=http://web2py.googlecode.com/hg/&is_navigation=1>
import email_auth
<#uyCl3L51_dI&q=file:(/%7C%5E)gluon/contrib/login_methods/email_auth/email_auth(/__init__)%3F%5C.py$&exact_package=http://web2py.googlecode.com/hg/&is_navigation=1>
   auth.settings.login_methods.append(email_auth("smtp.gmail.com:587",
 "@gmail.com"))"""




2010/8/10 Bruno Rocha 

> You cannot import "appengine.api" if you're out of GAE environment..
>
>
>
> 2010/8/10 Fale 
>
> Hi,
>> I'm a new web2py user :)
>> I'm trying to use google's auth for my app, but it does not work on
>> web2py, while it works perfectly on appspot.com and on the offline gae
>> engine :|
>>
>> My code:
>> from gluon.tools import Mail, Auth, Recaptcha
>> auth = Auth(globals(), db)
>> from gluon.contrib.login_methods.gae_google_account import
>> GaeGoogleAccount
>> auth.settings.login_form = GaeGoogleAccount()
>> auth.define_tables()
>> auth.settings.create_user_groups = False
>> auth.settings.mailer = mail
>>
>> On Web2py:
>> Traceback (most recent call last):
>>  File "/home/web2py/grimpuis/gluon/restricted.py", line 178, in
>> restricted
>>exec ccode in environment
>>  File "/home/web2py/grimpuis/applications/init/models/dbs.py", line
>> 100, in 
>>from gluon.contrib.login_methods.gae_google_account import
>> GaeGoogleAccount
>>  File "/home/web2py/grimpuis/gluon/contrib/login_methods/
>> gae_google_account.py", line 12, in 
>>from google.appengine.api import users
>> ImportError: No module named appengine.api
>>
>> Someone has some ideas to fix it?
>>
>> Thankyou in advance to anyone =)
>>
>> PS: As far as I seen there isn't a unique place where is stored all
>> the web2py-gae knowledge. Am I blind or we really lack something like
>> it?
>
>
>
>
> --
>
> http://rochacbruno.com.br
>



-- 

http://rochacbruno.com.br


Re: [web2py] using URL() inside a component view

2010-08-10 Thread Bruno Rocha
I Solved using this way:

URL(request.application,'default','view_detail',args=[rec.contact.id])

.load is not appended to the link.

2010/8/10 Miguel Lopes 

> I'm pretty sure this as been asked, but I can't find it anywhere.
>
> I would like to use the URL function to construct a link inside
> a component view (i.e. views/components/view_x.load). This would be a link
> to a completely new page, to be loaded in the browser and not in the
> component div. However, the default behavior is that all links inside a
> component are trapped and loaded into the same component, thus if I have in
> the component view:
>
> {{
> rec.contact.name}}
>
> This gets translated into:
> Clockwork Orange
>
> And I would like to get:
> Clockwork Orange
>
> How can I achieve this?
> Txs,
> Miguel
>



-- 

http://rochacbruno.com.br


Re: [web2py] Problems with GAE auth :(

2010-08-10 Thread Bruno Rocha
PLUS: If you need an example on how to auth with gmail account,
look at pyforum source code:  http://pyforum.org/



2010/8/10 Fale 

> Hi,
> I'm a new web2py user :)
> I'm trying to use google's auth for my app, but it does not work on
> web2py, while it works perfectly on appspot.com and on the offline gae
> engine :|
>
> My code:
> from gluon.tools import Mail, Auth, Recaptcha
> auth = Auth(globals(), db)
> from gluon.contrib.login_methods.gae_google_account import
> GaeGoogleAccount
> auth.settings.login_form = GaeGoogleAccount()
> auth.define_tables()
> auth.settings.create_user_groups = False
> auth.settings.mailer = mail
>
> On Web2py:
> Traceback (most recent call last):
>  File "/home/web2py/grimpuis/gluon/restricted.py", line 178, in
> restricted
>exec ccode in environment
>  File "/home/web2py/grimpuis/applications/init/models/dbs.py", line
> 100, in 
>from gluon.contrib.login_methods.gae_google_account import
> GaeGoogleAccount
>  File "/home/web2py/grimpuis/gluon/contrib/login_methods/
> gae_google_account.py", line 12, in 
>from google.appengine.api import users
> ImportError: No module named appengine.api
>
> Someone has some ideas to fix it?
>
> Thankyou in advance to anyone =)
>
> PS: As far as I seen there isn't a unique place where is stored all
> the web2py-gae knowledge. Am I blind or we really lack something like
> it?




-- 

http://rochacbruno.com.br


Re: [web2py] using URL() inside a component view

2010-08-10 Thread Bruno Rocha
"extension=False" is new to me, Thats not covered by the Book

I found and reported that before :
http://groups.google.com/group/web2py/browse_thread/thread/99c2f5b8db562fba/8b82a682dff3fc58?lnk=gst&q=URL+changed#8b82a682dff3fc58

Tks Jonathan

2010/8/10 Jonathan Lundell 

> On Aug 10, 2010, at 5:48 PM, Miguel Lopes wrote:
>
> I'm pretty sure this as been asked, but I can't find it anywhere.
>
> I would like to use the URL function to construct a link inside
> a component view (i.e. views/components/view_x.load). This would be a link
> to a completely new page, to be loaded in the browser and not in the
> component div. However, the default behavior is that all links inside a
> component are trapped and loaded into the same component, thus if I have in
> the component view:
>
> {{
> rec.contact.name}}
>
>
> Are you sure this is the code? It doesn't seem right; I'd expect a syntax
> error with no application or request specified.
>
> At any rate, you can suppress the extension with extension="" or
> extension=False.
>
>
>
> This gets translated into:
> Clockwork Orange
>
> And I would like to get:
> Clockwork Orange
>
> How can I achieve this?
>
>
>
>


-- 

http://rochacbruno.com.br


Re: [web2py] using URL() inside a component view

2010-08-10 Thread Bruno Rocha
Thank you agains 4 the explanation,

now, this should be documented anywhere, as this is not on the book (
http://web2py.com/book/default/search?search=extension ) also not in
AlterEgo ( http://www.web2py.com/AlterEgo/default/search?search=extension )



2010/8/10 Jonathan Lundell 

> On Aug 10, 2010, at 7:11 PM, Bruno Rocha wrote:
>
> "extension=False" is new to me, Thats not covered by the Book
>
> I found and reported that before :
> http://groups.google.com/group/web2py/browse_thread/thread/99c2f5b8db562fba/8b82a682dff3fc58?lnk=gst&q=URL+changed#8b82a682dff3fc58
>
>
> It's a side effect of the way URL fills in its values. A slight
> oversimplification: if you don't specify an extension, you'll get the
> current extension (.load in your case, more often .html). Specifying a value
> other than None (which leads to the default behavior) that evaluates to
> False causes the extension to be omitted.
>



-- 

http://rochacbruno.com.br


Re: [web2py] reminder about last book edit

2010-08-10 Thread Bruno Rocha
I dont know if timeline has ended but...

URL helper has an "extension" parameter, as we can see here:

http://www.google.com/codesearch/p?hl=en#uyCl3L51_dI/gluon/html.py&q=URL
package:http://web2py\.googlecode\.com&sa=N&cd=1&ct=rc&l=119

But not here: http://web2py.com/book/default/chapter/04?search=URL(#URL



2010/8/9 Massimo Di Pierro 

> Tomorrow is likely the last day to submit comments and corrections about
> the online book. Then it will be frozen to go to print.
>
> Massimo
>



-- 

http://rochacbruno.com.br


Re: [web2py] using URL() inside a component view

2010-08-10 Thread Bruno Rocha
I thought your explanation is very well written,
we need always maintain the practice of looking for something relevant to be
documented when a new thread emerges, and document as quickly as possible,
so soon web2py will be the framework with the best online documentation (if
not already)

Massimo, please ignore my last reply about that.

2010/8/10 Jonathan Lundell 

> On Aug 10, 2010, at 7:37 PM, Bruno Rocha wrote:
>
> Thank you agains 4 the explanation,
>
> now, this should be documented anywhere, as this is not on the book (
> http://web2py.com/book/default/search?search=extension ) also not in
> AlterEgo ( http://www.web2py.com/AlterEgo/default/search?search=extension)
>
>
> I've just added it to the end of the URL section of Chapter 4.
>
> Massimo, would you please check that I've got it right?
>
>
>
>
> 2010/8/10 Jonathan Lundell 
>
>> On Aug 10, 2010, at 7:11 PM, Bruno Rocha wrote:
>>
>> "extension=False" is new to me, Thats not covered by the Book
>>
>> I found and reported that before :
>> http://groups.google.com/group/web2py/browse_thread/thread/99c2f5b8db562fba/8b82a682dff3fc58?lnk=gst&q=URL+changed#8b82a682dff3fc58
>>
>>
>> It's a side effect of the way URL fills in its values. A slight
>> oversimplification: if you don't specify an extension, you'll get the
>> current extension (.load in your case, more often .html). Specifying a value
>> other than None (which leads to the default behavior) that evaluates to
>> False causes the extension to be omitted.
>>
>
>
>
> --
>
> http://rochacbruno.com.br
>
>
>
>


-- 

http://rochacbruno.com.br


Re: [web2py] Re: doc2py - php.net like python module documentation

2010-08-11 Thread Bruno Rocha
Is there any way to copy a *permalink* to a function?
e.g :
http://semanticsbml.org/doc2py/default/index/gluon/contrib/login_methods/email_auth




2010/8/11 selecta 

> new feature:
> parsing of docstrings strings as examples (searches for any occurrence
> of >>>)
>
> > Yes, make more darker and lighter the other.
> made the headers a bit darker




-- 

http://rochacbruno.com.br


  1   2   3   4   5   6   7   8   9   10   >