[web2py] web2py in dropbox folder

2011-06-24 Thread andrej burja
hi on win7 i have web2py in dropbox folder, so i can work on applications from two computers (and to have a backup) but now i'm getting this error quite often: IOError: [Errno 22] invalid mode ('w') or filename: 'C:..\\Dropbox\\...\\databases\\c8b669d15150d7109e5f7_izobrazevanje.table' Could

[web2py] import reportlab

2011-06-24 Thread andrej burja
hi i installed web2py with a script setup-web2py-ubuntu.sh on ubuntu (vps) in the script, there is installation of reportlab on windows machine i have put the reportlab in site-packages folder and i have added some fonts when i move my application to vps ubuntu server and doing from

[web2py] pound sign display

2011-06-24 Thread apple
If I edit my template in a text editor then the £ sign shows up normally. If I edit my template in microsoft word and save as filtered html (which gets rid of MS Office formatting) then it also shows the £ normally if I open it directly in a browser. However when it is returned from the web2py

Re: [web2py] Re: For Massimo: which version of book to buy?

2011-06-24 Thread Sebastian E. Ovide
I like both paper to read while enjoying my sofa/bed. and online to find quickly the information when I need it ;) On Wed, Jun 22, 2011 at 12:45 PM, Paul Gerrard p...@gerrardconsulting.comwrote: Call me old-fashioned, but I for one *prefer* the paper book to online 8O) Online is

[web2py] Re: pound sign display

2011-06-24 Thread apple
One solution is to have a variable called pound and put {{=pound}} in the template. However there has to be a better way! On Jun 24, 9:31 am, apple simo...@gmail.com wrote: If I edit my template in a text editor then the £ sign shows up normally. If I edit my template in microsoft word and

[web2py] Re: Running web2py on Jython

2011-06-24 Thread Richard
Hi Massimo, this is my *full*, unaltered startup log (web2py 1.96.4 running under Jython 2.5.2): No handlers could be found for logger web2py.dal New installation: unable to create welcome.w2p fileweb2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2011 Version 1.96.4 (2011-06-07

[web2py] 'crud.search'-- How to render 'reference' fields?

2011-06-24 Thread GoldenTiger
We have two tables: db.define_table('t_company', Field('f_name')) db.define_table('t_person', Field('f_company_id', db.t_company), Field('f_name')) crud.create(db.person) -- 'f_company_id' is

[web2py] Bounties

2011-06-24 Thread villas
I notice that group member Dwayne was offering a 'bounty' to the project for information etc. I really like this idea and I wonder what others thought. It provides an incentive to provide more functionality and gives people an excuse to donate towards this wonderful framework and encourage

[web2py] Re: generating PDF invoices

2011-06-24 Thread apple
Thanks. I am having a problem with response.render. Followed example in the book but the controller below shows test.html but response.render returns the generic view. Am I missing something? def test(): customer = db.customer[1] html = response.render('test.html',

[web2py] Grouping Fields in Form. - Dict Ordering

2011-06-24 Thread David J.
I tried making a dict user_info = {'username':'Username','password':'Password'} billing_info = {'field_name':'Label','street':'Street','city':'City','state':'State',etc..} when I display it seems the dict does not keep the order? So when I display billing it shows some random order like

[web2py] Re: pound sign display

2011-06-24 Thread villas
I think the problem is with your choice of editor. All of these entities appear to work for me: #xa3; #163; #xa3; pound;

[web2py] Re: I created a little app to be able to share some files over the net without authentication

2011-06-24 Thread szimszon
Codes are in github: https://github.com/szimszon/Temporary-storage

[web2py] Re: Speed of rendering html data (10,000+ rows)

2011-06-24 Thread Vineet
As suggested by the community, I am trying to export json data to dataTable. But only blank dataTable is rendered (with desired formatting, search box, etc.) Pl. introspect into my code as to where I have a mistake. Data is not displayed (as returned by get_data method). I have made sure that the

[web2py] Re: pound sign display

2011-06-24 Thread apple
Hurrah! I have the answer. In Microsoft Word 2010 go to File/Options/Advancedscroll to bottom and choose web options/encoding. Then select to save document in unicode (UTF8) format; and tick the box saying always save in the default encoding. On Jun 24, 12:41 pm, villas villa...@gmail.com

[web2py] web2py and postgresql schema

2011-06-24 Thread Camil Ghircoias
Hi, I am now reading some documnentation about web2py. Does web2py support postgresql schemas ? I have my tables grouped in postgresql into scheme inside same database. So I can have same tables into the same databases but in different schemas. Like schema1.mytable schema2.mytable How can I

Re: [web2py] web2py and postgresql schema

2011-06-24 Thread Ovidio Marinho
what you really need to do?, create an app Web2py from your tables? Ovidio Marinho Falcao Neto ovidio...@gmail.com 88269088 Paraiba-Brasil 2011/6/24 Camil Ghircoias ghircoiasca...@yahoo.com Hi, I am now reading some

[web2py] Re: Grouping Fields in Form. - Dict Ordering

2011-06-24 Thread Anthony
Python dictionaries do not preserve order. In Python 2.7, you can use an ordered dictionary: http://docs.python.org/dev/library/collections.html#collections.OrderedDict. Anyway, if you're using SQLFORM, you can use the 'fields' argument to provide a list of fields to be included in the form

Re: [web2py] Re: Suggested functionality extention for SQLTABLE

2011-06-24 Thread Andrew Buchan
It's in version 1.93.2 as far as I can tell... You can simply check in your version by passing a named parameter (linkColumns = xyz..) to SQLTABLE and seeing if it works, like so: def ManageUserProfiles(): response.view = 'shared/allpurpose.html' response.title = 'Timesheets - manage

[web2py] Re: web2py and postgresql schema

2011-06-24 Thread Camil Ghircoias
I have a large erp application on windows forms that access postgresql tables. I am searching for tools to migrate the app from deskop to web app. Didn't find something that satisfied me. I like python as it is dynamic and clear syntax (comming from visual foxpro environment I am know to

[web2py] Re: generating PDF invoices

2011-06-24 Thread Anthony
Is test.html inside /views/default/? In that case, you need to do response.render('default/test.html',...) -- otherwise, if response.render can't find the view, I think it will just revert to the generic view. Anthony On Friday, June 24, 2011 7:35:25 AM UTC-4, apple wrote: Thanks. I am

[web2py] Re: generating PDF invoices

2011-06-24 Thread apple
Thanks. I had incorrectly assumed it treated the views/controller directory as the current one. On Jun 24, 3:50 pm, Anthony abasta...@gmail.com wrote: Is test.html inside /views/default/? In that case, you need to do response.render('default/test.html',...) -- otherwise, if response.render

[web2py] Cannot operate on a closed database

2011-06-24 Thread Manuele Pesenti
dear all, I've added a unique field to some existing tables and w2p gave me an error saing that he cannot add unique fields to a table so I deleted my db and restarted as a new application but I obtained this: ProgrammingError: Cannot operate on a closed database. it's sufficient to comment

[web2py] Re: generating PDF invoices

2011-06-24 Thread Anthony
On Friday, June 24, 2011 11:29:20 AM UTC-4, apple wrote: Thanks. I had incorrectly assumed it treated the views/controller directory as the current one. By default, if no view is specified, it will look for /views/current_controller/current_function.html and use generic.html if it can't

[web2py] dict.__getitem__(self, key) KeyError: 'nombre'

2011-06-24 Thread Juan Antonio
Hello, Together with others tables I have this in my db.py file: ... db.define_table('fab_lote', Field('fabricacion', db.fabricacion), Field('lote', db.lote), Field('cantidad_orden', 'double'), Field('cantidad_gastado', 'double'), Field('coste_unitario', 'double'))

Re: [web2py] web2py in dropbox folder

2011-06-24 Thread Manuele Pesenti
On 24/06/2011 09:22, andrej burja wrote: hi on win7 i have web2py in dropbox folder, so i can work on applications from two computers (and to have a backup) I'm doing the same with no trouble... but I never started at the same time from two computers my web2py Manuele but now i'm

[web2py] Re: generating PDF invoices

2011-06-24 Thread apple
That is not the case with response.render. By default if you just specify the filename then it looks first in views not in views/ controller. On Jun 24, 4:33 pm, Anthony abasta...@gmail.com wrote: On Friday, June 24, 2011 11:29:20 AM UTC-4, apple wrote: Thanks. I had incorrectly assumed it

[web2py] Re: pound sign display

2011-06-24 Thread ron_m
I would have great difficulty recommending Word as an editor for working with HTML because of all the things it does under the covers. Not trying to stir up flames, just trying to make your life easier. As a word processor Word is okay.

[web2py] Re: pound sign display

2011-06-24 Thread pbreit
Well put, ron_m. I would have no difficulty recommending against using Word to edit HTML. It's just not the right tool...at all. There are so many good free/low-cost options on all platforms that using Word makes little sense.

[web2py] Re: Grouping Fields in Form. - Dict Ordering

2011-06-24 Thread pbreit
I customize all my forms (http://pricetack.com) so I can do exactly what I want and it's pretty easy to manage: http://web2py.com/book/default/chapter/07#Custom-forms

[web2py] Re: pound sign display

2011-06-24 Thread apple
I would not use it for working with HTML normally. However if you have something like a mailing letter or an invoice then you might want someone to edit that who has no knowledge of HTML. They can use tables, outlining and other formatting features of MS Office which they know; and then load it up

Re: [web2py] Re: Grouping Fields in Form. - Dict Ordering

2011-06-24 Thread David J.
pbreit; Thanks, I tried customizing the forms; I got confused about; can you show me an example view? On 6/24/11 12:41 PM, pbreit wrote: I customize all my forms ( http://pricetack.com) so I can do exactly what I want and it's pretty easy to manage:

[web2py] Re: Bounties

2011-06-24 Thread pbreit
For a financial bounty, I think the projects needs to be relatively more substantial and Odesk works fine for that. For smaller needs, a karma bounty might be sufficient in which case Stack Exchange works OK. But I'm not sure compensation is the best approach in the forums.

[web2py] FYI: DataTree: Elementtree replacement

2011-06-24 Thread mikech
Emphasizing brevity and aesthetics. http://www.bigjason.com/blog/announcing-datatree/

[web2py] Janrain login_next

2011-06-24 Thread Chris Baron
Hi web2py users, I'm using Janrain for login. What's the best way to have a proper redirect after login? I would like to redirect to be the location visited before the login page. When a non logged in user attempts to access a page that requires login, they are redirected to the login page,

[web2py] Re: generating PDF invoices

2011-06-24 Thread Anthony
On Friday, June 24, 2011 12:13:25 PM UTC-4, apple wrote: That is not the case with response.render. By default if you just specify the filename then it looks first in views not in views/ controller. Right, I think you misunderstood what I wrote -- by default *if you don't specify any

[web2py] Re: FYI: DataTree: Elementtree replacement

2011-06-24 Thread pbreit
I've been happy with lxml.builder which would look something like this: from lxml.builder import E doc = ( E.author( E.name('Terry Pratchett'), E.genre('Fantasy/Comedy'), E.novels( E.novel('Small Gods', year=1992), E.novel('The Fifth Elephant',

[web2py] Re: Cannot operate on a closed database

2011-06-24 Thread Massimo Di Pierro
Is this is a sqlite or other? On Jun 24, 10:31 am, Manuele Pesenti manuele.pese...@gmail.com wrote: dear all, I've added a unique field to some existing tables and w2p gave me an error saing that he cannot add unique fields to a table so I deleted my db and restarted as a new application but

[web2py] Re: Janrain login_next

2011-06-24 Thread Massimo Di Pierro
auth.settings.login_next=URL(...) should work On Jun 24, 12:06 pm, Chris Baron topher.ba...@gmail.com wrote: Hi web2py users, I'm using Janrain for login.  What's the best way to have a proper redirect after login?  I would like to redirect to be the location visited before the login page.

Re: [web2py] Re: Cannot operate on a closed database

2011-06-24 Thread Manuele Pesenti
On 24/06/2011 20:13, Massimo Di Pierro wrote: Is this is a sqlite or other? yes, it was sqlite. At the moment I solved using postgres witrh pool_size=100 but I didn't try if this parameter is really necessary. what's the difference between the two db in this case?? Manuele

Re: [web2py] Re: Running web2py on Jython

2011-06-24 Thread Pierre Thibault
2011/6/23 Richard richb...@gmail.com Hi Pierre, Hi Richard, thanks for replying. I remember that I already stumbled upon the blog page you mention before I posted my question on this list. I admit that I didn't read it in depth back then. But I took as a good sign that you wrote in your

Re: [web2py] Re: Cannot operate on a closed database

2011-06-24 Thread pbreit
I don't think SQLite does pools. SQLite DBs are easy to deal with...just delete everything in the databases directory and start over. Might want to double-check that your connection string is pointing to the right place.

[web2py] Re: Cannot operate on a closed database

2011-06-24 Thread Massimo Di Pierro
When you deleted the db, did you also delete the associated .table files? You should have On Jun 24, 10:31 am, Manuele Pesenti manuele.pese...@gmail.com wrote: dear all, I've added a unique field to some existing tables and w2p gave me an error saing that he cannot add unique fields to a table

Re: [web2py] Re: Cannot operate on a closed database

2011-06-24 Thread Manuele Pesenti
On 24/06/2011 20:40, Massimo Di Pierro wrote: When you deleted the db, did you also delete the associated .table files? You should have everything in the databases directory... Manuele

[web2py] Re: Cannot operate on a closed database

2011-06-24 Thread Massimo Di Pierro
I do not know. This is odd. Can you send me your app (confidentally)? On Jun 24, 1:50 pm, Manuele Pesenti manuele.pese...@gmail.com wrote: On 24/06/2011 20:40, Massimo Di Pierro wrote: When you deleted the db, did you also delete the associated .table files? You should have everything in

Re: [web2py] Re: get attr value from TAG.element

2011-06-24 Thread danto
2011/6/23 Anthony abasta...@gmail.com Actually, even easier, you can just do mytag['_attr'] and mytag[0]. On Thursday, June 23, 2011 6:21:37 PM UTC-4, Anthony wrote: mytag=TAG.element('xyz', _attr='value') print mytag.attributes['_attr'] value print mytag.components[0] xyz Anthony

[web2py] SQL Query Help Using DAL

2011-06-24 Thread David J.
I am trying to display chat message information; I have 2 tables The first table is the auth table define in web2py The second is this db.define_table('messages', Field('from',db.auth_user), Field('to',db.auth_user), Field('msg','string'),

[web2py] Re: SQL Query Help Using DAL

2011-06-24 Thread Massimo Di Pierro
I am guessing, I have not tried it mfrom = db.messages.with_alias('mfrom') mto = db.messages.with_alias('mfrom') db(db.auth_user).select(db.auth.user.first_name, db.auth_user.last_name, mfrom.id.count(), mto.id.count(),

Re: [web2py] Re: SQL Query Help Using DAL

2011-06-24 Thread David J.
Thanks I will try now. On 6/24/11 3:27 PM, Massimo Di Pierro wrote: I am guessing, I have not tried it mfrom = db.messages.with_alias('mfrom') mto = db.messages.with_alias('mfrom') db(db.auth_user).select(db.auth.user.first_name, db.auth_user.last_name, mfrom.id.count(),

Re: [web2py] Re: I created a little app to be able to share some files over the net without authentication

2011-06-24 Thread danto
2011/6/24 szimszon szims...@gmail.com Codes are in github: https://github.com/szimszon/Temporary-storage great work, you really should put a license statement. check [this] for some info about free software licenses _that worry about 'copyleft'_: [ http://www.gnu.org/licenses/]. regards

Re: [web2py] Re: SQL Query Help Using DAL

2011-06-24 Thread David J.
Massimo; Thanks, this sort of works; The numbers seem off but this gives a good starting point; One other thing I would like to extend the table to include on other field 'mtype' which would be a value of 'text' or 'media', If I wanted to extend the query to use the previous query and

[web2py] update a field from a record from a table given all as parameters

2011-06-24 Thread Sebastian E. Ovide
Hi All, how can I do something like this: def update_my_field(tablename, columnname, id,value): db.tablename(id).update_record(columnname=value) update_my_field(my_table,my_column,123,hello world) thanks -- Sebastian E. Ovide

[web2py] Re: update a field from a record from a table given all as parameters

2011-06-24 Thread Massimo Di Pierro
def update_my_field(tablename, columnname, id,value): db(db[tablename].id==id).update(**{columnname:value}) update_my_field(my_table,my_column,123,hello world) On Jun 24, 3:08 pm, Sebastian E. Ovide sebastian.ov...@gmail.com wrote: Hi All, how can I do something like this: def

[web2py] Re: SQL Query Help Using DAL

2011-06-24 Thread Massimo Di Pierro
You can replace mfrom.on(mfrom.from==db.auth_user.id) with mfrom.on((mfrom.from==db.auth_user.id)(mfrom.type=='text')) and the same with the mto. On Jun 24, 3:06 pm, David J. da...@styleflare.com wrote: Massimo; Thanks, this sort of works; The numbers seem off but this gives a good

Re: [web2py] Re: SQL Query Help Using DAL

2011-06-24 Thread David J.
Got it thanks I think I tried but perhaps I did not use the right syntax I think I tried (mfrom.from==db.auth_user.id mfrom.type=='text') But I think it has to be logically separate (mfrom.from==db.auth_user.id)(mfrom.type=='text') On 6/24/11 4:28 PM, Massimo Di Pierro wrote: You can

Re: [web2py] Re: web2py and postgresql schema

2011-06-24 Thread Ovidio Marinho
Today I had a similar problem and Carlos Costa sent me a script for it and it worked well here http://groups.google.com/group/web2py/browse_thread/thread/eef02b6d3ca0741b?pli=1 here worked well, so you need to put the output to egex.: python extract_pgsql_models.py mydb localhost 5432 reingart

[web2py] [CDATA] breaks TAG parsing?

2011-06-24 Thread danto
Hi, I'm parsing an XML with TAG helper, but web2py breaks when an [CDATA] appears. Can the TAG helper bypass this? kind regards

Re: [web2py] Re: update a field from a record from a table given all as parameters

2011-06-24 Thread Sebastian E. Ovide
I do not understand it, but it works ! (in the book says to do not confuse update with update_record because for a single row, the method update updates the row object but not the database record, as in the case of update_record) Thanks ! On Fri, Jun 24, 2011 at 9:24 PM, Massimo Di Pierro

[web2py] Re: [CDATA] breaks TAG parsing?

2011-06-24 Thread danto
2011/6/24 danto web2py.n...@gmail.com Hi, I'm parsing an XML with TAG helper, but web2py breaks when an [CDATA] appears. Can the TAG helper bypass this? kind regards ahem... well, Iol, a string.replace('![CDATA[','') before using the helper fix the problem, but is there a way to do it

[web2py] Re: breaks TAG parsing?

2011-06-24 Thread Massimo Di Pierro
UNfortunately lots of things break TAG parning because it is based on python HTMLparser On Jun 24, 4:40 pm, danto web2py.n...@gmail.com wrote: 2011/6/24 danto web2py.n...@gmail.com Hi, I'm parsing an XML with TAG helper, but web2py breaks when an [CDATA] appears. Can the TAG helper bypass

[web2py] Re: update a field from a record from a table given all as parameters

2011-06-24 Thread Massimo Di Pierro
I should have added a return def update_my_field(tablename, columnname, id,value): return db(db[tablename].id==id).update(**{columnname:value}) and I did it because this fails more gracefully if the id is not found (returns 0). On Jun 24, 4:35 pm, Anthony abasta...@gmail.com wrote: Note,

Re: [web2py] Re: mongoDBAdapter test ......

2011-06-24 Thread joseph simpson
Thanks for the information. I will look at this again when I get a chance... Joe On Tue, Jun 21, 2011 at 5:25 AM, David Watson davidthewat...@gmail.comwrote: Hi Joe, That report is generated because the types dictionary for that key doesn't have a value that encodes a template for the