[web2py] Re: plugin_wiki - Ajax to save pages?

2010-07-29 Thread mdipierro
Good idea. I'll take the patch. On Jul 29, 7:44 pm, Bruno Rocha wrote: >  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

Re: [web2py] What's the best way to get code completion / tooltip information ?

2010-07-29 Thread Thadeus Burgess
gluon. Look in gluon/compileapp.py in build_environment. You could use that as a template for the autocomplete. -- Thadeus On Thu, Jul 29, 2010 at 3:22 PM, Stef Mientki wrote: >  hello, > > my viewer has changed into an quit handy editor, > and now I want more: autocompletion and tooltip in

[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: question/suggestion about URL, controller

2010-07-29 Thread Thadeus Burgess
Massimo, you cannot I am sorry but that would break backwards compatibility. Say if in certain apps you have this (in alot of the earlier apps on web2py.com do this too) URL(request.application, 'static', 'logo.png') Or URL(request.application, 'default', 'index') Unfortunately, we cannot re-

Re: [web2py] Re: question/suggestion about URL, controller

2010-07-29 Thread Michele Comitini
thumbs up! 2010/7/30 mdipierro > I took it one step further... > > >>> URL() > /app/default/index > >>> URL('test') > /app/default/test > >>> def test(): return 'test' > >>> URL(test) > /app/default/test > >>> URL('static','filename') > /app/static/filename > >>> URL('other','static','filename')

[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 e

[web2py] Re: question/suggestion about URL, controller

2010-07-29 Thread mdipierro
I took it one step further... >>> URL() /app/default/index >>> URL('test') /app/default/test >>> def test(): return 'test' >>> URL(test) /app/default/test >>> URL('static','filename') /app/static/filename >>> URL('other','static','filename') /other/static/filename No more r=, c=, f= needed but al

Re: [web2py] Re: id field representation (.represent) pb on unnormalized table crud.read

2010-07-29 Thread Jean-Guy
Thanks! I got it like this : db.atable.othertablefield_id.represent=\ lambda value: "%(num)s" % (db.v_othertable_num[value] or {'num':'unkown'}) ;-) Jonhy On 2010-07-29 18:18, mdipierro wrote: please try: db.atable.othertablefield_id.represent=\ lambda value: "%(num)s" % (db.v_

[web2py] Re: Rocket is a good built-in server

2010-07-29 Thread mdipierro
40k/s on a local network on upload is slow. I am not sure if this a rocket issue. Perhaps other uesrs have other feedback on this topic. If you make any more tests please let us know. Massimo On Jul 29, 8:16 am, BearXu wrote: > We build a small file sharing webapp in our intranet. Sometimes we >

[web2py] Re: id field representation (.represent) pb on unnormalized table crud.read

2010-07-29 Thread mdipierro
please try: db.atable.othertablefield_id.represent=\ lambda value: "%(num)s" % (db.v_othertable_num[value] or {'num','unkown'} (this will fix if the problem is that record is None) and/or db.atable.othertablefield_id.represent=\ lambda value: str(db.v_othertable_num[value].num) (this

[web2py] Re: reset password mail as html mail

2010-07-29 Thread mdipierro
Please try the code in trunk. If the message is '' it should be sent automatically in html. On Jul 29, 3:00 am, Rohan wrote: > I need to send reset password mail as html, so i created > > in db.py > > auth.messages.reset_password = [None, "Some html + Click on > below link to reset your passw

[web2py] Re: Redirect status of redirects via routes.py

2010-07-29 Thread mdipierro
None of them. routes_in does not generates a response. The map is done internally before dispatching. web2py only sees the new url, not the old one. On Jul 29, 3:58 am, "ma...@rockiger.com" wrote: > If I rewrite an old url to a new one in routes.py: > What is the response? A 301(permanent) or a

[web2py] id field representation (.represent) pb on unnormalized table crud.read

2010-07-29 Thread Jean-Guy
Hello, I define the way to show the id field in crud.read like this : db.atable.othertablefield_id.represent=\ lambda value: "%(num)s" %db.v_othertable_num[value] Placed in model. v_othertable_num is a database view of the related table because the number are formed of many fields so I c

[web2py] Re: how to validate duplicity in a many to many table relationship?

2010-07-29 Thread mdipierro
You are dernormalizing in a link table. Not a good idea. Let's go it b the book: with crud.create(db.familia_riesgo) The models are like: db.define_table('familia',Field('ficha','string'),format='%(ficha)s') db.define_table('riesgo',Field('nombre','string'),format='%(nombre)s') db.define_table

[web2py] Re: How to map multiple 'tags' to a 'blog'

2010-07-29 Thread mdipierro
if you use db.blog.tags.requires = IS_IN_DB(db, 'tags.id', 'tags.name',multiple=True) than you are not using many2many but you are denormalizing. that means db.blogs.tags has to be a string field and tags will be stored as '|3| 6|18|43|'. So: db.define_table ('blog', Field('heading'), F

[web2py] Re: Configure Apache to forward http://1.2.3.4/admin/ to https://1.2.3.4/admin/

2010-07-29 Thread mdipierro
If you find out how to force the redirection let me know and I will update web2py-setup-ubuntu.sh On Jul 29, 4:20 pm, mwolfe02 wrote: > When I follow a ticket link it goes to http: instead of https:.  Can I > configure Apache to recognizehttp://1.2.3.4/admin/and automatically > redirect tohttps:/

[web2py] Re: rocket performance issues

2010-07-29 Thread mdipierro
It is easy to fix things when problems are clearly reported. ;-) On Jul 29, 4:38 pm, Michael Ellis wrote: > Seems to be.  I updated, restarted, and restored the colon after the > comment.  No errors when I load the page.  Thanks for fixing it so quickly! > > On Thu, Jul 29, 2010 at 5:21 PM, mdipi

Re: [web2py] Re: rocket performance issues

2010-07-29 Thread Michael Ellis
Seems to be. I updated, restarted, and restored the colon after the comment. No errors when I load the page. Thanks for fixing it so quickly! On Thu, Jul 29, 2010 at 5:21 PM, mdipierro wrote: > Can you check if this issue is solved in trunk? > > Massimo > > On Jul 29, 7:55 am, Michael Ellis

[web2py] Re: Configure Apache to forward http://1.2.3.4/admin/ to https://1.2.3.4/admin/

2010-07-29 Thread mwolfe02
I just realized I can visit all of my web pages over https. So the simple solution for me is to test on the production server by visiting https://1.2.3.4/ instead of http://1.2.3.4/. Then when I click on the relative ticket link it takes me to https://1.2.3.4/admin/. All is good. Seems glaringl

[web2py] Re: rocket performance issues

2010-07-29 Thread mdipierro
Can you check if this issue is solved in trunk? Massimo On Jul 29, 7:55 am, Michael Ellis wrote: > Has anything changed at tip in the view parser? Looks like there may > be a problem now with colons at the end of comment lines. I have a > view with the following that was working fine before I up

[web2py] Configure Apache to forward http://1.2.3.4/admin/ to https://1.2.3.4/admin/

2010-07-29 Thread mwolfe02
When I follow a ticket link it goes to http: instead of https:. Can I configure Apache to recognize http://1.2.3.4/admin/ and automatically redirect to https://1.2.3.4? This is more an annoyance than anything, but it has gotten really annoying. I'm testing my new app in its future production env

[web2py] Re: Getting Eclipse / Pydev running

2010-07-29 Thread pabloest
Thanks, Christopher. At some point it may make sense for me to contribute my learnings to the wiki. However, for now I'm just trying to get off the ground so I can't provide much value. On Jul 29, 1:58 pm, Christopher Steel wrote: > Hi Pabloest, > > We have started a Wiki with Web2py Eclipse a

[web2py] Re: What's the best way to get code completion / tooltip information ?

2010-07-29 Thread mdipierro
Edit this file: applications/admin/models/0.py and change TEXT_EDITOR = 'edit_area' or 'amy' into TEXT_EDITOR = 'amy' amy editor provide web2py autocompletion. It is not the default because does not work with every browser. On Jul 29, 3:22 pm, Stef Mientki wrote: >  hello, > > my viewer has

[web2py] Re: "Why I hate Django" by Cal Henderson

2010-07-29 Thread mdipierro
The speaker raises some good issue with Django and some do apply to web2py Aside for the many jokes which are indeed funny he complains about scalability and make these valid points: 1) session should be stored client side for scalability (web2py and Django both store them server side, although i

[web2py] Re: Getting Eclipse / Pydev running

2010-07-29 Thread Christopher Steel
Hi Pabloest, We have started a Wiki with Web2py Eclipse and Maven Stuff where we publish working configurations. It may be helpful. If you want to contribute any additional info let me know. http://code.google.com/p/voa-web2py2eclipse/ Cheer, Christopher Steel Voice of Access http://code.goog

[web2py] How to map multiple 'tags' to a 'blog'

2010-07-29 Thread Abhiteja
Hi Gurus, I want to map multiple tags to a blog and allow users to select predefined tags to a blog header. I am able to see form for blogs and no errors shown after submit , but nothing is entered to DB. Am I missing something, please help me out. Thanks & regards Abhiteja PS: My setup info -

[web2py] What's the best way to get code completion / tooltip information ?

2010-07-29 Thread Stef Mientki
hello, my viewer has changed into an quit handy editor, and now I want more: autocompletion and tooltip information. The autocompletion and tooltip generator, searches for classes and methods, looks up the documentation and analyses the method arguments. Now as web2py is (at least I think) a st

[web2py] Re: "Why I hate Django" by Cal Henderson

2010-07-29 Thread Vidul Petrov
Django (the opposite of RoR) sucks likes RoR (the Denmark salesman vs the desparate Kanzas Python programmers ambitions to create everything out of nothing). Probably you know what's the definition of the Nobel winners for intellect - adequacy. And in order to achieve adequacy we need compromises

[web2py] Re: Webfaction deployment

2010-07-29 Thread Iceberg
On Jul 30, 12:29 am, iceb...@21cn.com wrote: > Hi pals, > > Today I start my day 1 with webfaction. Here come some experience and > thoughts to share. > > a. web2py installation will be smooth if you use these install script [1] & > [2], and follow its docstring instructions. (One bug in [2] is f

[web2py] Re: Webfaction deployment

2010-07-29 Thread Iceberg
On Jul 30, 1:40 am, Vasile Ermicioi wrote: > I think you don't need that a install script for web2py > > I would recommend > > 1. Create from your panel an application: >           - category:  mod_wsgi >           - type:  mod_wsgi 3.2 / python2.6 > 2. Use mod_wsgi deployment > recipeshttp://web

[web2py] Re: Filling a form with AJAX / contextual JQuery dialog?

2010-07-29 Thread pabloest
Hi, I believe it should be ok to leave the and jQuery in the header. This will be cached by the browser and you may well find yourself using it elsewhere too as it is quite useful. Then for view-specific functions, there's no reason you can't place