Re: [web2py] Re: The web2py version

2012-02-12 Thread Bruce Wade
Hi Massimo, The problem is fixed in the nightly build. The problem was caused from using: if not translate(self.error_messages): instead of: if not self.error_messages: Changing to this in the stable branch also fixes the issue. On Sat, Feb 11, 2012 at 10:37 PM, Massimo Di Pierro < massimo.dipi

Re: [web2py] Dedicated IDE

2012-02-12 Thread Bruce Wade
Thank's for the link Massimo. Bruno, I guess every developer is different. I would like to see tools that make it easier to generate interfaces/views, a more visual way of creating database design that maps to DAL etc On Sat, Feb 11, 2012 at 10:42 PM, Bruno Rocha wrote: > I am working exclu

Re: [web2py] Dedicated IDE

2012-02-12 Thread Mariano Reingart
Bruce: As you could have seen from the link that sent Massimo (rad2py, ide2py, psp2py, etc.), I'm finishing a fully-featured IDE, including coding completion, local and remote debugger, integrated shell, etc. The web2py dedication is complete, currently the tool can be attached to a web2py server

Re: [web2py] Dedicated IDE

2012-02-12 Thread Marin Pranjić
+1 for Wing, it is great On Sun, Feb 12, 2012 at 7:42 AM, Bruno Rocha wrote: > I am working exclusively with web2py, over 2 years (8-24 hours a day *7) > plus holydays. And I never used an IDE. I use Sublime-text-2 and VIM, I > have Python code completion and I have set some web2py completions f

[web2py] Re: How to change menu colors?

2012-02-12 Thread Edward Shave
Thanks for that... Also had to make changes to topbar in order to get color across the whole screen.

[web2py] accessing admin via ssh fails with:- "admin disabled because unable to access password file"

2012-02-12 Thread Edward Shave
Hi, despite being a total novice with little or no experience beyond windows I have managed to install web2py on a webfaction shared server. By substituting my webfaction application listening port into the instructions I found here... http://docs.webfaction.com/user-guide/databases.html#start

[web2py] invalid literal for int() with base 10: '%s%id'

2012-02-12 Thread Praveen Bhat
Hello, I am getting the following error: invalid literal for int() with base 10: '%s%id' and the code in my controller is: def show(): redirect(URL(c='articles',f='show?id=%s%id')) which redirects to the following function in articles controller: def show(): id=request.vars.id articles=db(d

Re: [web2py] accessing admin via ssh fails with:- "admin disabled because unable to access password file"

2012-02-12 Thread Mariano Reingart
The admin is not mandatory, you can upload your chages via FTP. Also, you can create a password file (parameters_.py, replace xxx with the port number) just running web2py in your local machine, and then upload it too your server (copy it to the folder where web2py.py resides). Best regards,

[web2py] How to success myapp example from web2py official book

2012-02-12 Thread codingstar
Dear web2py users! I am study on web2py. I have a problem. I try to apply web2py example on official book ( http://web2py.com/books/default/chapter/29/3 ) # example ## Write the corresponding actions in the default controlle

[web2py] common row for multiple fildes names

2012-02-12 Thread Td CtrlSoft
in model: db.define_table("news", Field("title_en",requires=IS_NOT_EMPTY()), Field("conten_en" ,type='text'), Field("title_fr",requires=IS_NOT_EMPTY()), Field("conten_fr" ,type='text'), Field("title_de",requires=IS_NOT_EMPTY()), Field("conten_de" ,type='text'),

[web2py] Re: invalid literal for int() with base 10: '%s%id'

2012-02-12 Thread Alan Etkin
The string interpolation here: redirect(URL(c='articles',f='show?id=%s%id')) is not being performed, so the controller gets ...%s%id as raw string, and the id argument should evaluate to an integer to return a db record. So i think that the part of the code that has to replace the string in the f

[web2py] Re: Dedicated IDE

2012-02-12 Thread Alan Etkin
I don't use IDEs for web2py, as I am very comfortable with the built- in web2py interface. I'd prefer to use an open source web2py oriented development environment rather than wingide for this two reasons.: -I cannot afford it ($245 per license) -I think it is not (completely) open source as far a

Re: [web2py] accessing admin via ssh fails with:- "admin disabled because unable to access password file"

2012-02-12 Thread Edward Shave
What you say is very interesting as it caused me to go back to the installation script which contains the following line... python -c "from gluon.main import save_password; save_password('${web2py_password}',443)" I have no idea where the 443 comes from, but when I renamed the file using my po

[web2py] Re: How to success myapp example from web2py official book

2012-02-12 Thread Alan Etkin
I have tried the example with the last mercurial version and it works well. By seeing the output screenshot it seems like (maybe) you have not created the corresponding view in the correct path: For web2py to use the view, it should be placed here: [application path]/views/default/first.html Als

Re: [web2py] Dedicated IDE

2012-02-12 Thread Ross Peoples
I have been following ide/rad2py for a little while now. I am really looking forward to trying this out and I appreciate all the work you have put into it Mariano! Depending on the type of project, I will use either TextMate or Komodo Edit. For larger projects, I use Komodo for the code complet

[web2py] Re: common row for multiple fildes names

2012-02-12 Thread Alan Etkin
I would use virtual fields to create the required fields based on the client language. I you have not yet, you could check the info in the web2py book: from section 6.20.1 On the other hand I'd consider using the web2py internationalization features to translate every input from english. On 12 fe

[web2py] Re: invalid literal for int() with base 10: '%s%id'

2012-02-12 Thread Praveen Bhat
Hello, Thank you as it worked for me. I did this: def show(): myid =request.vars.id redirect(URL(c='articles',f='show?id=%s' % myid)) Regards Praveen

[web2py] Re: Markmin Output Questions

2012-02-12 Thread Alan Etkin
-I'd prefer separated files for large documents (but does MARKMIN support it?) -I don't see page break options in the docs. CSS seems to support page breaks, but I don't think that MARKMIN accepts style sheets so far. I'm affraid you will have to explore this: http://web2py.googlecode.com/hg/g

[web2py] validators.py error in

2012-02-12 Thread Alan Etkin
I have pulled the last mercurial version and get this new exception in a query. This behavior is new, older versions of web2py don't return this error: Note: the app is a wxPython application that queries a PostgreSQL database with web2py and gui2py: http://code.google.com/p/gestionlibre.gui

[web2py] Re: cPickle instead of return dict(D=D) in serverside ajax function: accessing it in View

2012-02-12 Thread Vineet
I see. That means neither cPickle nor session can be used. A workaround can be like this-- Keep the dataset stored in session. On client-side, after hitting the save button, collect the values of elements in JSON array format. I can't use request.vars.elmt, because I require to pass the class valu

Re: [web2py] Dedicated IDE

2012-02-12 Thread Bruce Wade
Hi Mariano, That is a great start, I'm glad someone else has also started on this. I am going to start reading through the code you have done and when I am up to speed I would like to help you build the tool. I am also comfortable with the web based IDE. However even with youadworld there was ov

[web2py] Re: cPickle instead of return dict(D=D) in serverside ajax function: accessing it in View

2012-02-12 Thread Anthony
Google is your friend: http://stackoverflow.com/questions/7594740/convert-objects-to-json-and-send-via-jquery-ajax http://stackoverflow.com/questions/3168401/json-formatting-sending-json-via-jquery-ajax-post-to-java-wicket-server http://www.intelligrape.com/blog/2010/06/11/jquery-send-json-object-w

Re: [web2py] Dedicated IDE

2012-02-12 Thread Anthony
> > I am also comfortable with the web based IDE. However even with youadworld > there was over 5000 files to port over. (Most didn't have to be ported > because web2py added the same features required). It is very hard to work > with a large amount of files with the built in web based IDE. Now

Re: [web2py] Re: The web2py version

2012-02-12 Thread Anthony
Sorry, I was using trunk, so wasn't seeing the problem. Anthony On Sunday, February 12, 2012 3:38:59 AM UTC-5, Detectedstealth wrote: > > Hi Massimo, > > The problem is fixed in the nightly build. The problem was caused from > using: > if not translate(self.error_messages): > > instead of: > > i

[web2py] Re: cPickle instead of return dict(D=D) in serverside ajax function: accessing it in View

2012-02-12 Thread Vineet
Yeah. Let me dive into these links. Thanks, Vineet On Feb 12, 9:09 pm, Anthony wrote: > Google is your > friend:http://stackoverflow.com/questions/7594740/convert-objects-to-json-an...http://stackoverflow.com/questions/3168401/json-formatting-sending-js...http://www.intelligrape.com/blog/2010/

[web2py] Re: How to success myapp example from web2py official book

2012-02-12 Thread Anthony
And the reason you're still seeing a page even though your "first.html" is likely in the wrong place is that when web2py can't find the expected view, it defaults to "generic.html", which appears to be what is showing in your screenshot. Anthony On Sunday, February 12, 2012 8:30:02 AM UTC-5, A

[web2py] Representing foreign field with image (format/represent)

2012-02-12 Thread Keith Edmunds
I have a form based on a table which includes foreign fields. By default, the foreign fields are displayed as the name from the foreign table as expected. I want to have an image displayed rather than the name from the foreign table. Not having used 'format' before, I changed the format of the fo

[web2py] Re: Representing foreign field with image (format/represent)

2012-02-12 Thread Alan Etkin
I belive that format is intended for string output: "... defines a format string for the table. It determines how a record should be represented as a string. ..." For presenting other objects you could use the Field attribute represent "... table.id.represent = lambda id, row: \ A('edit:',id,_hre

Re: [web2py] Re: Representing foreign field with image (format/represent)

2012-02-12 Thread Keith Edmunds
Thanks Alan, that has enabled me to do what I want. -- "You can have everything in life you want if you help enough other people get what they want" - Zig Ziglar. Who did you help today?

[web2py] Re: Representing foreign field with image (format/represent)

2012-02-12 Thread Anthony
Like "represent", "format" should be either a string or a callable, so you should also be able to do: format=lambda row: IMG(_src=URL('static', 'images/red.jpg')) Anthony On Sunday, February 12, 2012 1:02:55 PM UTC-5, Alan Etkin wrote: > > I belive that format is intended for string output: >

Re: [web2py] uwsgi configuration: why many lines in /root/var/log/uwsgi-python/web2py log : routing 0 routes 0 ?

2012-02-12 Thread Carlos
Hi, Can you please provide the details on how to upgrade uwsgi-python on my ubuntu linux 10.04 LTS OS?. I am no expert in linux, and all I did to install uwsgi was: add-apt-repository ppa:uwsgi/release How can I (re-)install / upgrade uwsgi-python in my environment?. Thanks a lot!, Car

[web2py] Re: Markmin Output Questions

2012-02-12 Thread Massimo Di Pierro
No but we can think about extending it On Feb 12, 7:59 am, Alan Etkin wrote: > -I'd prefer separated files for large documents (but does MARKMIN > support it?) > -I don't see page break options in the docs. CSS seems to support page > breaks, but I don't think that MARKMIN accepts style sheets so

[web2py] Re: validators.py error in

2012-02-12 Thread Massimo Di Pierro
Any chance you can tell us which versions broke it? On Feb 12, 8:30 am, Alan Etkin wrote: > I have pulled the last mercurial version and get this new exception in > a query. This behavior is new, older versions of web2py don't return > this error: > > Note: the app is a wxPython application that

[web2py] Re: validators.py error in

2012-02-12 Thread Carlos
Hi Massimo, self.options() is being called (recursively) inside options function in IS_IN_DB class. changeset # c3ed339c547b (fixed issue 647, problem with is_in_db and multiple). Carlos

[web2py] Re: Markmin Output Questions

2012-02-12 Thread Ross Peoples
Massimo, How do you generate the PDF book now?

[web2py] New Plugin: plugin_markitup

2012-02-12 Thread Ross Peoples
I have created another plugin for the MarkItUp widget. I know that plugin_wiki has this currently, but I wanted a dedicated plugin for this for an upcoming project I'm working on. You can get the plugin from Bitbucket: https://bitbucket.org/PhreeStyle/web2py_markitup There is no documentation

Re: [web2py] Re: keep shared objects permanently in RAM: Is it possible ?

2012-02-12 Thread Sebastian E. Ovide
thanks Michele On Fri, Feb 10, 2012 at 10:57 PM, Michele Comitini < michele.comit...@gmail.com> wrote: > I wrote: > > The problem with MAP_ANONYMOUS is that you cannot share after fork. > > I should have written: you cannot share *a mmap created* after fork. > > > > > http://www.kernel.org/doc/ma

[web2py] Virtual Field Issue - Possible Bug with old style/class definitions?

2012-02-12 Thread BrendanC
I've been experimenting with creating virtual fields and have come across what may be a possible bug when they are created via old style (class definitions). I created a small table with 3 fields (ID, Name and dob). I've added some virtual fields to compute the age in days using all the options

[web2py] Re: validators.py error in

2012-02-12 Thread Alan Etkin
I don't keep a list of version updates for my local repository (and I see that it is a good idea for cases like this), but I pull the repository frequently, about once a week. Is there any way in mercurial to retrieve something like a command log? On 12 feb, 17:16, Massimo Di Pierro wrote: > Any

[web2py] Re: Dedicated IDE

2012-02-12 Thread Francisco Costa
at tymr we use gEdit + plugins On Feb 12, 4:17 pm, Anthony wrote: > > I am also comfortable with the web based IDE. However even with youadworld > > there was over 5000 files to port over. (Most didn't have to be ported > > because web2py added the same features required). It is very hard to work

[web2py] Re: Virtual Field Issue - Possible Bug with old style/class definitions?

2012-02-12 Thread pbreit
I wonder if there is a problem with when "now" is being calculated. Maybe put now = in the function or class?

[web2py] Re: Dedicated IDE

2012-02-12 Thread pbreit
You should not be using the web-based editor for anything beyond quick edits or testing, I always steer people away from IDEs and to just use a good text editor (for Mac, TextMate) and version control (I like MacHG better than SourceTree).

[web2py] Re: Web2py session has me really confused now

2012-02-12 Thread pbreit
Since session is already a Storage object, can't you skip this: session[request.controller] = Storage()?

[web2py] Re: Multiple different problems - Dealing with "Integrity Error" for nutnull=True and unique=True database fields

2012-02-12 Thread pbreit
I suggest, if possible, using auth_user as the user table. You can easily add fields: http://web2py.com/books/default/chapter/29/9#Customizing-Auth

[web2py] PURE, a JS templating engine

2012-02-12 Thread Francisco Costa
http://beebole.com/pure/ has anyone give it a try? Get started: http://beebole.com/pure/documentation/get-started/

Re: [web2py] Re: Dedicated IDE

2012-02-12 Thread Bruce Wade
IDE's are good when you are working on large projects, and or on medium to large teams. Also by dedicated IDE I mean more then just typing text. Think more like an environment that can handle all your planing tasks, profiling, design layouts etc but in more of a visual way. I am all for vim wh

Re: [web2py] Re: validators.py error in

2012-02-12 Thread Bruce Wade
I know git has "git log" I am sure mercurial has something similar. On Sun, Feb 12, 2012 at 2:07 PM, Alan Etkin wrote: > I don't keep a list of version updates for my local repository (and I > see that it is a good idea for cases like this), but I pull the > repository frequently, about once a w

[web2py] Re: validators.py error in

2012-02-12 Thread Alan Etkin
Thank you Bruce. It is possible to do hg log, it shows the complete commit list until the last pulled code (I think), and it supposedly includes instances not updated locally, so that method doesn't allow me to see what versions I really downloaded. However, the update seems to have been found by C

Re: [web2py] Re: Dedicated IDE

2012-02-12 Thread Jim Steil
I'm an Aptana user. Works great for me. -Jim On 2/12/2012 6:08 PM, Bruce Wade wrote: IDE's are good when you are working on large projects, and or on medium to large teams. Also by dedicated IDE I mean more then just typing text. Think more like an environment that can handle all your pl

[web2py] Re: Single error message for radio group

2012-02-12 Thread Massimo Di Pierro
INPUT(,hideerror=True) On Feb 12, 6:33 pm, Bruce Wade wrote: > Hi, > > Is it possible to show a single error message for a group of radio buttons. > See screen shot > > FORM( >             FIELDSET( >                 H4(self.T('Personal Questions')), >                 UL( >                  

Re: [web2py] Re: Single error message for radio group

2012-02-12 Thread Bruce Wade
Thanks. On Sun, Feb 12, 2012 at 5:57 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > INPUT(,hideerror=True) > > On Feb 12, 6:33 pm, Bruce Wade wrote: > > Hi, > > > > Is it possible to show a single error message for a group of radio > buttons. > > See screen shot > > > > FORM( >

[web2py] Can this be improved?

2012-02-12 Thread Lewis
In the controller below, I display a list of jokes for visitors to the site. They can choose to sort by author or category. They can also filter the list to a single category and/or a single author. The view includes a form with select/option drop downs for each choice. Then, I'll change the qu

[web2py] Re: Multiple different problems - Dealing with "Integrity Error" for nutnull=True and unique=True database fields

2012-02-12 Thread Rahul
All, I am sorry for my late reply. @Anthony, you are a genius - Problem 1 in this thread got resolved with - db.reguser.email.requires= [IS_NOT_EMPTY(), IS_EMAIL() , IS_NOT_IN_DB(db, 'reguser.email')] db.reguser.unique_code.requires = IS_NOT_IN_DB(db, 'reguser.email') Problem 3 got resol

[web2py] Re: Multiple different problems - Dealing with "Integrity Error" for nutnull=True and unique=True database fields

2012-02-12 Thread Rahul
Sorry ... I accidently clicked on Report Span link.. How do I revert this? On Feb 13, 4:35 am, pbreit wrote: > I suggest, if possible, using auth_user as the user table. You can easily > add fields:http://web2py.com/books/default/chapter/29/9#Customizing-Auth

[web2py] Create indices from DAL

2012-02-12 Thread Michael Toomim
Here's an improved way to create indices in the DAL. Works only with postgresql and sqlite. def create_indices(*fields): ''' Creates a set of indices if they do not exist Use like: create_indices(db.posts.created_at, db.users.first_name,

[web2py] Re: Dedicated IDE

2012-02-12 Thread Rahul
+1 for Aptana, Eclipse (my personal favorite for all languages) and ide2py/read2py - looks promising too. Rahul D On Feb 13, 6:00 am, Jim Steil wrote: > I'm an Aptana user.  Works great for me. > >      -Jim > > On 2/12/2012 6:08 PM, Bruce Wade wrote: > > > > > > > > > > > IDE's are good when yo

[web2py] Mixing Internationalisation and Business Idiom

2012-02-12 Thread chris_g
I have a conceptual issue about how I design some aspects of an application. I need to make my app customisable with respect to business idiom and in the longer term, I would like my app to embrace internationalisation. I'm curious to know if anyone has ever tackled the issue of business idiom in

[web2py] How to Change the date format

2012-02-12 Thread Sanjeet Kumar
Hi to all, I want to change the date format during the insertion in database default is YYY-MM-DD but i want to insert in database by using the DD- MM- and Month should be in the 'jan' format . Please help me

[web2py] Problem with update

2012-02-12 Thread weheh
I'm running Version 1.99.2. # model db.define_table('test', Field('user_id',db.auth_user,requires=IS_NULL_OR(IS_IN_DB(db,'auth_user.id'))), Field('session_id',default=resposne.session_id), ... ) # at some point, the following would be executed: test_id=db.test.insert( user_id=auth.user.id

Re: [web2py] How to Change the date format

2012-02-12 Thread Manuele Pesenti
Il 13/02/2012 08:40, Sanjeet Kumar ha scritto: Hi to all, I want to change the date format during the insertion in database default is YYY-MM-DD but i want to insert in database by using the DD- MM- and Month should be in the 'jan' format . Please help me have a look here http://web2py.co