Re: [web2py] How to list:reference users ?

2012-03-11 Thread Bruno Rocha
Field('user_id', "list:reference auth_user") On Sun, Mar 11, 2012 at 12:36 AM, bussiere adrien wrote: > maybe Field('Auth','list:reference Auth'), > or ('Auth','list:reference User'), > > Regards > Bussiere > -- Bruno Rocha [http://rochacbruno.com.br]

[web2py] represent

2012-03-11 Thread Annet
In db.py I have: db.define_table('Node', Field('createdOn',type='datetime',writable=False,readable=False), Field('modifiedOn',type='datetime',writable= False,readable=False), migrate=False) db.define_table('Organization', Field('nodeID',db.Node,default='',notnull=True,ondelete='REST

[web2py] Re: How to list:reference users ?

2012-03-11 Thread bussiere adrien
thanks Le dimanche 11 mars 2012 04:36:37 UTC+1, bussiere adrien a écrit : > > maybe Field('Auth','list:reference Auth'), > or ('Auth','list:reference User'), > > Regards > Bussiere >

[web2py] (Field: unknown field type: float for Price)

2012-03-11 Thread bussiere adrien
here is my error : Traceback (most recent call last): File "gluon/restricted.py", line 205, in restricted File "C:/Users/Bussiere/Dropbox/Projets/Yuki/web2py/applications/init/models/db.py" , line 327, in File "gluon/dal.py", li

Re: [web2py] (Field: unknown field type: float for Price)

2012-03-11 Thread Bruno Rocha
There is no float, it is double in web2py Field ('Price', 'double'), -- Bruno Rocha [http://rochacbruno.com.br]

Re: [web2py] (Field: unknown field type: float for Price)

2012-03-11 Thread bussiere adrien
i owe you one. But on the web i see float ? http://web2py.wordpress.com/ Le dimanche 11 mars 2012 10:26:29 UTC+1, rochacbruno a écrit : > > There is no float, it is double in web2py > > > > Field ('Price', 'double'), > > > > -- > > Bruno Rocha

[web2py] using form in same page?

2012-03-11 Thread juvi1
Hello sorry my bad english and i hope that you understand my problem. I want show in one page all pictures which are saved in database. In page i want that i can upload new picture and update it whit forms (override old one) My code are in controller: def jobs(): images=db().select(db.ref.i

Re: [web2py] using form in same page?

2012-03-11 Thread Martín Mulone
I don't know why you have two {{pass}} in your view. I think you can do: def jobs(): images=db().select(db.ref.id,db.ref.file) form = SQLFORM(db.ref) if form.process().accepted: response.flash = "Image uploaded" return dict(form=form, images=images) in views: {{for img in

[web2py] custom css

2012-03-11 Thread frasse
Hi I like to use my custom css and add it to my application base.css mess my application. I have remove base.css and move classes .flash and .error to my custom css file. when I do that it is not working in FireFox 10 in windows but it works in all other browser and OS (mac Ubuntu , win). Can yo

[web2py] Re: Website doesn't show up.

2012-03-11 Thread Alan Etkin
> What exactly does that do? Where does it get sent to? It is explained in the book (available online): 1.3 "Model-View- Controller" "... The data in the dictionary is rendered by a view. If the visitor requests an HTML page (the default), the dictionary is rendered into an HTML page ..." For mo

Re: [web2py] custom css

2012-03-11 Thread Martín Mulone
What is not working?, you change views/layout.html? 2012/3/11 frasse > Hi > > I like to use my custom css and add it to my application base.css mess > my application. I have remove base.css and move classes .flash > and .error to my custom css file. when I do that it is not working in > FireFox

[web2py] Re: represent

2012-03-11 Thread Alan Etkin
> db.Organization(targetID).name I'd use db.Organization[targetID].name Not sure the first syntax is supported, (tables should have a __call__ attribute for that purpose)

[web2py] Re: Translations in custom classes

2012-03-11 Thread Alan Etkin
When messages object is instantiated, T is passed as argument probabbly to process default auth values for translation. Then .password_reset_button is set without T(...), so for automatic translation, there should be some operator overloading for the Message instance to translate the text without e

[web2py] Re: represent

2012-03-11 Thread Anthony
On Sunday, March 11, 2012 4:07:46 AM UTC-4, Annet wrote: > > In db.py I have: > > db.define_table('Node', > Field('createdOn',type='datetime',writable=False,readable=False), > Field('modifiedOn',type='datetime',writable= > False,readable=False), > migrate=False) > > db.define_ta

[web2py] Re: represent

2012-03-11 Thread Anthony
> > > db.Organization(targetID).name > > I'd use db.Organization[targetID].name > > Not sure the first syntax is supported, (tables should have a __call__ > attribute for that purpose) Yes, the first syntax is supported -- it's just not the right query in this case. Anthony

[web2py] Re: represent

2012-03-11 Thread Anthony
> > > db.Organization(targetID).name >> >> I'd use db.Organization[targetID].name >> >> Not sure the first syntax is supported, (tables should have a __call__ >> attribute for that purpose) > > > Yes, the first syntax is supported -- it's just not the right query in > this case. > Note, the d

Re: [web2py] Re: Website doesn't show up.

2012-03-11 Thread Anthony
> > Putting in return dict() made it work. Thanks. > > What exactly does that do? Where does it get sent to? > When myfunc() in mycontroller.py returns a dict (even an empty one), that tells web2py to render the view associated with myfunc, which by default will be /views/mycontroller/myfunc.ht

Re: [web2py] (Field: unknown field type: float for Price)

2012-03-11 Thread Anthony
> > i owe you one. > > But on the web i see float ? > > http://web2py.wordpress.com/ > That blog entry appears to be incorrect.

[web2py] Re: custom css

2012-03-11 Thread frasse
color for .error is not change and .flash move to left with no border. /F On 11 mar, 12:53, Martín Mulone wrote: > What is not working?, you change views/layout.html? > > 2012/3/11 frasse > > > Hi > > > I like to use my custom css and add it to my application base.css mess > > my application. I

[web2py] Re: custom css

2012-03-11 Thread frasse
One more think. yes I change the layout.html On 11 mar, 15:38, frasse wrote: > color for .error is not change and .flash move to left with no border. > /F > > On 11 mar, 12:53, Martín Mulone wrote: > > > > > > > > > What is not working?, you change views/layout.html? > > > 2012/3/11 frasse > >

Re: [web2py] (Field: unknown field type: float for Price)

2012-03-11 Thread pbreit
Also decimal is good for prices.

Re: [web2py] Re: Translations in custom classes

2012-03-11 Thread Bruce Wade
Okay, Well maybe it is just me but I think when you click the update translations button in admin, it should automatically grab ALL strings especially default strings in admin so we can translate them. For example with pyramid you use python setup.py extract_messages this will go through every sin

Re: [web2py] Re: Translations in custom classes

2012-03-11 Thread Bruce Wade
How would we update this method so it also gets all the strings from the gluon package? When you click update all languages it only looks in the specific language folders. This should also look in the gluon package and ideally there should be away to add locations for it to look. def findT(path, l

Re: [web2py] Re: Translations in custom classes

2012-03-11 Thread Bruce Wade
""Looks in specific folders in the current application"" On Sun, Mar 11, 2012 at 8:49 AM, Bruce Wade wrote: > How would we update this method so it also gets all the strings from the > gluon package? When you click update all languages it only looks in the > specific language folders. This shoul

[web2py] web2py and LGPLv3 License

2012-03-11 Thread Bruce Wade
Hi, Looking through the code base, there is a file in pyfpdf/designer.py licensed under: GNU General Public License. Wont this force web2py to be GPL consider it contains code under that license? -- -- Regards, Bruce Wade http://ca.linkedin.com/in/brucelwade http://www.wadecybertech.com http://

[web2py] Custom register form with personnalised Auth

2012-03-11 Thread bussiere adrien
here is my auth table : (the beginning my table is correct) db.define_table( auth.settings.table_user_name, Field('Nom'), Field('Prenom'), Field('Telephone'), # NOte on user is intern and the user don't hve to see it. Field('Note on user'), How to make a custom sqlform from it

[web2py] Re: web2py and LGPLv3 License

2012-03-11 Thread Anthony
Good catch. I assume that is an error, as the project as a whole says it's licensed under LGPL: http://code.google.com/p/pyfpdf/. Perhaps the license was changed at some point but the change wasn't made to this file. Anthony On Sunday, March 11, 2012 12:07:47 PM UTC-4, Detectedstealth wrote: >

[web2py] PDF rendering without spaces

2012-03-11 Thread Bruce Wade
Hi, A while back I reported a problem with PDF's being generated without spaces. IE: 'This would render' as 'Thiswouldrender' This is actually a bug with chrome not with the PDF library: http://code.google.com/p/chromium/issues/detail?id=86306 Just wanted to point that out if anyone else was con

[web2py] Re: Translations in custom classes

2012-03-11 Thread Alan Etkin
> it should automatically grab ALL > strings especially default strings in admin so we can translate them I don't understand completely how does the web2py translator works internally, but, why to translate every string in a module? Sometimes there are strings that the core developer is not intere

[web2py] Re: Pycon Streaming

2012-03-11 Thread Alan Etkin
Lost the first part. I hope it will be posted somewhere later. On 11 mar, 16:33, Bruno Rocha wrote: > in one hour at:http://streamti.me/track-5 > > -- > > Bruno Rocha > [http://rochacbruno.com.br]

[web2py] Re: Translations file

2012-03-11 Thread Alan Etkin
With a first look at the code, I don't realize how to use it in the new admin. I am thinking of a multi-translators plugin to store and manage per- user translations without patching the admin app. Does web2py for GAE support translations? (I belive GAE python runtime doesn't allow file IO) On 6 m

Re: [web2py] using form in same page?

2012-03-11 Thread juvi1
thanks, but now form create always new image in database, and i want update image. how it can be done?? sunnuntaina 11. maaliskuuta 2012 13.37.36 UTC+2 Martin.Mulone kirjoitti: > > I don't know why you have two {{pass}} in your view. I think you can do: > > def jobs(): > images=db().select(db

Re: [web2py] Re: how to set a default user group

2012-03-11 Thread Vasile Ermicioi
auth.settings.register_onaccept = post_register it works, thank you :) On Sat, Mar 10, 2012 at 2:44 PM, Alan Etkin wrote: > This is one way of solving it (by binding a function to an > auth.settings attribute): > > # model code > > def post_register(form): ># the new user id is stored in a

Re: [web2py] Re: Translations in custom classes

2012-03-11 Thread Bruce Wade
I was referring to all strings visible to the end user. Primarily the customizable setting stringsstrings On Mar 11, 2012 2:22 PM, "Alan Etkin" wrote: > > it should automatically grab ALL > > strings especially default strings in admin so we can translate them > > I don't understand completely ho

[web2py] Re: how to set a default user group

2012-03-11 Thread Alan Etkin
Yes, my bad. I copy-pasted the example from the book and modified it partially. On 11 mar, 19:43, Vasile Ermicioi wrote: > auth.settings.register_onaccept =  post_register > > it works, thank you :) > > > > > > > > On Sat, Mar 10, 2012 at 2:44 PM, Alan Etkin wrote: > > This is one way of solving

[web2py] Re: Support for PyPy

2012-03-11 Thread Francisco Costa
They say its incompatible https://bitbucket.org/pypy/compatibility/wiki/web2py Could someone run some tests? On Tuesday, February 28, 2012 5:41:41 PM UTC, Massimo Di Pierro wrote: > > I have fixed all pypy bugs that have been reported but I did not run > it myself. Please report any problems i

[web2py] Re: Latest version unable to connect to DB

2012-03-11 Thread Massimo Di Pierro
fixing in trunk (while at PyCon print) On Saturday, 10 March 2012 17:16:57 UTC-6, Alan Etkin wrote: > > Line 1999 in trunk: > self.driver = drivers.get('pg8000') > Should be: > self.driver = self.drivers.get('pg8000') > > On Mar 10, 8:07 pm, Alan Etkin wrote:

[web2py] Re: Errors creating/reading tickets

2012-03-11 Thread Massimo Di Pierro
Please email me one of the tickets that causes the problem and one of the tickets generated by admin as consequence. On Saturday, 10 March 2012 20:48:04 UTC-6, Brian M wrote: > > This has actually been plaguing me for a while but finally annoyed me > enough to ask. I have several web2py (1.99.4

[web2py] Re: Custom register form with personnalised Auth

2012-03-11 Thread Massimo Di Pierro
you the fields you do not want to db.table.field.writeable=False and the use the regular SQLFORM(db.table) On Sunday, 11 March 2012 11:15:41 UTC-5, bussiere adrien wrote: > > here is my auth table : > (the beginning my table is correct) > db.define_table( > auth.settings.table_user_name, >

[web2py] Re: web2py and LGPLv3 License

2012-03-11 Thread Massimo Di Pierro
On Sunday, 11 March 2012 11:07:47 UTC-5, Detectedstealth wrote: > > Hi, > > Looking through the code base, there is a file in > pyfpdf/designer.py licensed under: GNU General Public License. Wont this > force web2py to be GPL consider it contains code under that license? > > -- > -- > Regards

[web2py] Re: web2py and LGPLv3 License

2012-03-11 Thread Massimo Di Pierro
I am sitting in front of Mariano at PyCon. He is the authors. He said he will change it to LGPL. Anyway, having a GPL file into contrib does not change web2py to be GPL because the file is not linked and not required by web2py to run. This is a debatable issue. Since I like to avoid ambiguities

[web2py] Re: Translations file

2012-03-11 Thread Massimo Di Pierro
You have to translate locally and then push. On Sunday, 11 March 2012 16:33:01 UTC-5, Alan Etkin wrote: > > With a first look at the code, I don't realize how to use it in the > new admin. > I am thinking of a multi-translators plugin to store and manage per- > user translations without patchin

Re: [web2py] Re: Support for PyPy

2012-03-11 Thread Bruno Rocha
And I have to say! it is very very fast! and you can see the different even running welcome app. I am planning to put a web2py app to run in production for some time to test it. -- Bruno Rocha [http://rochacbruno.com.br]

[web2py] Web2Py Version 1.99.7 giving the trace back during run the Cron

2012-03-11 Thread Sanjeet Kumar
I am using the following model for test the cron : db.define_table(('emp'), Field('name')) and in crontab file inside the welcome app i am using the : */1 * * * * root *applications/welcome/modules/background_updater.py and makes the file inside the modules folder background_u

[web2py] need help with unicode decoding/encoding upload file

2012-03-11 Thread weheh
I'm embarrassed to say that I'm *still* having trouble getting unicode working on uploaded files. I'm sure this is an incredibly stupid easy thing to do, but unicode has never come easy for me. # model db.define_table('infile', Field('name', 'upload',uploadseparate=True)) # controller for upl

[web2py] Re: represent

2012-03-11 Thread Annet
Hi Alan and Anthony, Thanks for your replies. This solution partially solved the problem: db.NodeRelatedCard.targetID.represent = lambda targetID, row: db(db.Organization.nodeID == targetID).select().first().name In appadmin the targetID is now represented by the name of the organization, howeve