Re: [web2py] Re: import_from_csv_file broken

2012-02-16 Thread Ron McOuat
Looked in the DAL section of the manual, looks like you need to open the file and supply the File object as the parameter to db.table.import_from_csv(...) You can serialize a single table in CSV and store it in a file test.csv: 1. open('test.csv', 'w').write(str(db(db.person.id).select()))

[web2py] Re: Current status of adapting OrientDB for web2py

2012-02-16 Thread David Marko
I would also appreciate some hints on what libraries do you use to communicate with orientDB, or can you create some simple appliance as demo? Thanks! David

[web2py] Re: import_from_csv_file broken

2012-02-16 Thread Simon Lukell
not sure if there is a difference in the resulting file, but I usually use db.category.export_to_csv_file(open(...)) On Feb 16, 3:24 pm, Richard Penman richar...@gmail.com wrote: I exported a table from sqlite with: open(filename, 'w').write(str(db(db.category.id).select())) Output file looks

[web2py] Re: sqlhtml.py - breadcrumbs exception when using smartgrid format + lambda

2012-02-16 Thread Roderick
Hi Massimo and Anthony Created the following issue: http://code.google.com/p/web2py/issues/detail?id=663 Unfortunately the fix doesn't work on the breadcrumbs - still getting the index - although it does work on row data... Thanks regards, Roderick On Feb 14, 4:44 pm, Massimo Di Pierro

[web2py] Re: Implementing task queue using web2py

2012-02-16 Thread Saurabh S
Now the task queue is working fine. I have another problem. I am generating a csv file.. Now since its running at background there will not be any popup so I want to attach the file as an attachment in mail and send or store the file in blobstore and send the link to user. This is my code: def

[web2py] mongrel2 + uwsgi + web2py

2012-02-16 Thread Anthon
I had some difficulty getting the mongrel2 + uwsgi + web2py to work because uwsgi was not setting all of the environment variables that web2py was expecting. With uWSGI 1.1 some improvements will be made, but e.g. web2py logging is depending on REMOTE_ADDRESS and this is not set by uWSGI and

[web2py] Video site : Should i use AWS cloudfront just web2py?

2012-02-16 Thread Anaconda
I need some advice, i notice that web2py has streaming by default, therefore should i just use web2py to stream the video files or use CloudFront? Which option would allow better scalability and pricing? Thanks in advance as it is my first video site!

Re: [web2py] Re: OFF Topic - Business inteligence in Python, web2py?

2012-02-16 Thread Michele Comitini
This article even if old can be useful: http://www.information-management.com/issues/20060601/1088417-1.html?zkPrintable=1nopagination=1 The python+R+postgesql combination is very powerful, but you are expected to know very well the math+statistics behind your needs. mic 2012/2/16 Adi

[web2py] ReportLab with StringIO

2012-02-16 Thread Martin Weissenboeck
This is the whole example for ReportLab using StringIO, chapter 10.3.3 in the book: # delete lines starting with # from reportlab.platypus import * from reportlab.lib.styles import getSampleStyleSheet from reportlab.rl_config import defaultPageSize from reportlab.lib.units import inch, mm from

[web2py] Re: jQuery UI multiselect

2012-02-16 Thread Alan Etkin
So it seems that you need to retrieve a select element with options via ajax somewhere in the page's javascript, instead of a json data payload, and place it in the document dinamically. I think that you could modify the controller to return a select object with a .load view and then append it to

[web2py] Re: My new site powered by Web2Py

2012-02-16 Thread Matt Doiron
Thanks all! Seems you found the site, even though I forgot to post an actual link! Here is a link just in case: http://queuebot.com

[web2py] Re: Instalação do badmin

2012-02-16 Thread CalBR
Mas foi exatamente isso que eu tinha feito e não funcionou: - coloquei o controller badmin.py como plugin_badmin.py no diretório \controllers - coloquei as views no sub-diretório plugin_bandmin dentro de \views - coloquei o subdiretório plugin_badmin em \static Abs Ciro On 15 fev, 20:25, Bruno

Re: [web2py] Re: How to Generate the effective report by using web2py

2012-02-16 Thread Ross Peoples
I had to write a lot of code to get FPDF to do proper headers, footers, and page numbers. Then about another 100 lines of code to get it to wrap long lines of text inside of a table. I'm also not using HTML to PDF conversion. I am using FPDF's methods to create PDFs. If I recall correctly, I

[web2py] Re: Associative Table

2012-02-16 Thread Ross Peoples
Good practice says you should ALWAYS have an identity (ID) field, even if you don't use it.

Re: [web2py] Re: Instalação do badmin

2012-02-16 Thread Vinicius Assef
Ciro, eu instalei o plugin pela interface administrativa do admin do web2py. Comigo funcionou. Tente acessar como http://localhost:8000/sua_aplicacao/plugin_badmin/index 2012/2/15 Ciro cal...@gmail.com: Vinicius, Segui as instruções do manual: - Transferi os arquivos e diretórios,

[web2py] Web2py upload behind apache mod proxy

2012-02-16 Thread Álvaro J . Iradier
Hi, I have a testing web2py environment running on a system on port 8000, and then apache2 using mod_proxy to redirect requests to a virtual host on port 80 to the web2py rocket server. This is the apache config for the vhost: --- VirtualHost *:80 ... Proxy * Order

[web2py] web2pyfied jQuery interfface

2012-02-16 Thread Alan Etkin
What if web2py provided an in-the-middle interface to web2pyify jQuery features and, where possible, unify the usual server-side command syntax of the web2py apps? I am aware that web2py currently supports a set of javascript functions that handle jQuery and other javascript-related stuff, but I

Re: [web2py] Re: How to Generate the effective report by using web2py

2012-02-16 Thread Sanjeet Kumar
Ross Can you send me the CODE for that thanks in advance because i want to generate the report properly through FPDF. On Thu, Feb 16, 2012 at 6:31 PM, Ross Peoples ross.peop...@gmail.comwrote: I had to write a lot of code to get FPDF to do proper headers, footers, and page numbers. Then about

[web2py] Re: jQuery UI multiselect

2012-02-16 Thread Alan Etkin
Wait, you mean you must return a field name option list? Then you can query the DAL table to return the list of field names: field_names = db.mytable.fields On 15 feb, 13:37, Annet anneve...@googlemail.com wrote: Hi Alan, Thanks for your reply. .multiselect() and .autocomplete() are jQuery

[web2py] Re: Video site : Should i use AWS cloudfront just web2py?

2012-02-16 Thread Anthony
On Thursday, February 16, 2012 4:47:52 AM UTC-5, Anaconda wrote: I need some advice, i notice that web2py has streaming by default, therefore should i just use web2py to stream the video files or use CloudFront? Which option would allow better scalability and pricing? If you're already

[web2py] Re: web2pyfied jQuery interfface

2012-02-16 Thread simon
I think it would be helpful too. I try to minimise the amount of clientside script. There are some tools I found here: http://www.web2pyslices.com/slices/take_slice/8 On Feb 16, 1:22 pm, Alan Etkin spame...@gmail.com wrote: What if web2py provided an in-the-middle interface to web2pyify jQuery

[web2py] Re: OFF Topic - Business inteligence in Python, web2py?

2012-02-16 Thread simon
http://orange.biolab.si/ On Feb 16, 10:26 am, Michele Comitini michele.comit...@gmail.com wrote: This article even if old can be useful:http://www.information-management.com/issues/20060601/1088417-1.html?... The python+R+postgesql combination is very powerful, but you are expected to know

[web2py] Getting controller/function name in view

2012-02-16 Thread Yarin
Is there a way to get the controller and function name within a view- i.e. the 'c' and 'f' parts of the current url?

[web2py] TR() unwanted extra cell - don't know what's happening

2012-02-16 Thread Cliff
Can somebody give me a clue? This code produces an extra table cell in each row. I have a screen shot showing the extra columns, but I don't know how to post it. *** Controller row_count = 0 product_total_quantity =

[web2py] Re: Getting controller/function name in view

2012-02-16 Thread Cliff
request.controller request.function For more information: http://web2py.com/books/default/chapter/29/4#request On Feb 16, 9:41 am, Yarin ykess...@gmail.com wrote: Is there a way to get the controller and function name within a view- i.e. the 'c' and 'f' parts of the current url?

[web2py] Re: UnicodeEncodeError on GAE

2012-02-16 Thread sherdim
I Think it is a bug as for 1.99.4 When a form tries to keep values w/ non ascii characters if form.accepts(request.vars,session, formname=sP, keepvalues=True): File C:\a\w2p\gluon\html.py, line 1801, in accepts status = self._traverse(status,hideerror) File C:\a\w2p\gluon\html.py,

[web2py] Re: TR() unwanted extra cell - don't know what's happening

2012-02-16 Thread Anthony
tbody.append(TR( TD(row.products.name), TD(row.products.internal_item_number), TD(product_total_quantity), # EXTRA CELL comes up here!! TD(indexer.mk_links('Inventory', 'products', arg,

[web2py] Re: Getting controller/function name in view

2012-02-16 Thread Yarin
awesome- (could've probably looked at the docs..) Thanks On Feb 16, 9:47 am, Cliff cjk...@gmail.com wrote: request.controller request.function For more information:http://web2py.com/books/default/chapter/29/4#request On Feb 16, 9:41 am, Yarin ykess...@gmail.com wrote: Is there a

Re: [web2py] Re: Anyone using Backbone.js?

2012-02-16 Thread Christian Foster Howes
i did this to use static files to contain my handlebars code: $.get({{=URL(r=request, c='static', f='js/handlebars/views/popup.html')}}, function(data) { popup_template = Handlebars.compile(data); }); On 2/15/12 23:33 , David Marko wrote: I'm also making decision right now and evaluating

[web2py] Re: menu problem when importing layout

2012-02-16 Thread Edward Shave
Has anyone an answer for this yet?

[web2py] Re: menu problem when importing layout

2012-02-16 Thread Anthony
Is the problem in all browsers, or just older versions of IE? On Tuesday, November 15, 2011 4:24:23 AM UTC-5, thodoris wrote: Hello, When i install any layout in my app, i always have the following problem with the menu. Instead of the menu just expanding and covering the text bellow, it

[web2py] FORM.accepts fails on dev_appserver

2012-02-16 Thread Carl
I have the following code which runs fine on web2py but dev_appserver.py the call to greetform returns False not True greetform = FORM( INPUT(_name='email', requires=IS_EMAIL()), LABEL(''),INPUT(_type='submit', _value=T('send')), _name='greetings') if

[web2py] Re: FORM.accepts fails on dev_appserver

2012-02-16 Thread Carl
in gluon/html.py in accepts() formkey = self.session.get('_formkey[%s]' % self.formname, None) # check if user tampering with form and void CSRF if formkey != self.request_vars._formkey: status = False Under dev_appserver.py then status is set to False.

[web2py] pyfpdf rendering bug

2012-02-16 Thread Bruce Wade
When using the examples provided for creating pdf's all whitespace between words is removed. IE: Testing Change is rendered as TestingChange Some Address - somewhere - is rendered as SomeAddress-somewhere- Is there a solution to this that someone else has found? -- -- Regards, Bruce Wade

[web2py] Re: Current status of adapting OrientDB for web2py

2012-02-16 Thread TheSweetlink
Hello all, I do not have a patch as it is not for the DAL however I can show you this handy module I hacked up. It will add/remove edges to an OrientDB document-graph DB as well as return the RID of a newly inserted record. CRUD for now is project dependant on what if any schema you have

[web2py] Re: web2pyfied jQuery interfface

2012-02-16 Thread Alan Etkin
Well, the client-side web2py-like code is not as new as i thought. I'll check the slice, it looks good. However, instead of a web2py- slice, wouldn't be a good feature for web2py to expose script tools like those by default? On 16 feb, 11:21, simon simo...@gmail.com wrote: I think it would be

[web2py] Forms not working with web2py in Chrome

2012-02-16 Thread Sameh Khalil
I'm new to web2py and following the book, I'm trying to follow along with the 3rd Chapter building the images application http://web2py.com/books/default/chapter/29/3#An-image-blog, I'm faced with a problem after building the model and trying to add uploads using the database administration,

Re: [web2py] Forms not working with web2py in Chrome

2012-02-16 Thread Bruno Rocha
check if you have any link with an empty href or any image with an empty src a href='' and img src='' cause problems with form submission. On Thu, Feb 16, 2012 at 3:52 PM, Sameh Khalil thebook...@gmail.com wrote: I'm new to web2py and following the book, I'm trying to follow along with the

Re: [web2py] Re: How to Generate the effective report by using web2py

2012-02-16 Thread Mariano Reingart
Ross: I'm planning a unicode patch and a better support to html rendering using web2py helpers They will not break compatibility. If you want, you can sent me your changes, I could add it somewhere or using as a base of a new reporting functions. It would be great if you can fill an issue:

Re: [web2py] pyfpdf rendering bug

2012-02-16 Thread Mariano Reingart
What examples? Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On Thu, Feb 16, 2012 at 2:42 PM, Bruce Wade bruce.w...@gmail.com wrote: When using the examples provided for creating pdf's all whitespace between words is removed. IE: Testing Change is rendered

Re: [web2py] pyfpdf rendering bug

2012-02-16 Thread Bruce Wade
web2py.app.fpdf.w2p fpdfex application, controller default, action invoice. When running python template.py directly the invoice is created as expected. However when using the invoice action it is incorrect. I think it is a problem when pulling from the database. I am replacing the database call

Re: [web2py] pyfpdf rendering bug

2012-02-16 Thread Bruce Wade
Nope using the CSV like if __name__ == __main__: in the gluon/contrib/pyfpdf/template.py did not fix it. For some reason the rendering through web2py is breaking the display somewhere. On Thu, Feb 16, 2012 at 10:41 AM, Bruce Wade bruce.w...@gmail.com wrote: web2py.app.fpdf.w2p fpdfex

Re: [web2py] pyfpdf rendering bug

2012-02-16 Thread Mariano Reingart
Strange, are you using unicode? Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On Thu, Feb 16, 2012 at 3:45 PM, Bruce Wade bruce.w...@gmail.com wrote: Nope using the CSV like if __name__ == __main__: in the gluon/contrib/pyfpdf/template.py  did not fix it.

Re: [web2py] pyfpdf rendering bug

2012-02-16 Thread Bruce Wade
I am using the sample text that came with the example. For some reason it just removes the spaces between words looks like there may be a issue when rendering dest='S' On Thu, Feb 16, 2012 at 11:03 AM, Mariano Reingart reing...@gmail.comwrote: Strange, are you using unicode? Mariano Reingart

[web2py] Re: Close...but still not deployed

2012-02-16 Thread Bill Thayer
Thanks to Omi Chiba for pointing out the missing e in welcome. Now the welcome app is deployed!

[web2py] Re: loop inside helper

2012-02-16 Thread web-dev-m
You got it! Thanks!!! On Feb 16, 1:10 am, Anthony abasta...@gmail.com wrote: I am trying to add a jquery effect, to each row based on its id, but i am having trouble formatting the _onclick=jQuery('id').toggle() _onclick=jQuery('%s').toggle() % row.id Anthony

[web2py] Re: menu problem when importing layout

2012-02-16 Thread Edward Shave
Hi Anthony, In case thodoris isn't around I'm assuming this problem is the same as I ran into when using the layout plugins... Just seems like drop down (sub) menus aren't supported? To see this just upload one into the welcome app. Regards, Ed

[web2py] new mysql claimed 70x faster

2012-02-16 Thread Massimo Di Pierro
http://www.mysql.com/why-mysql/white-papers/mysql-cluster-7.2-ga.html

[web2py] Re: Video site : Should i use AWS cloudfront just web2py?

2012-02-16 Thread Anaconda
Thank you for taking the time out to reply Anthony, i am not running an EC2 instance but will give it a try now with CloudFront. On Feb 16, 6:06 am, Anthony abasta...@gmail.com wrote: On Thursday, February 16, 2012 4:47:52 AM UTC-5, Anaconda wrote: I need some advice, i notice that web2py has

[web2py] Re: pyfpdf rendering bug

2012-02-16 Thread Alan Etkin
Perhaps there is some old system filename conversion feature causing the mess with the strings. I think I was manually testing an app with a function that returns a pdf file without problems. On Feb 16, 2:42 pm, Bruce Wade bruce.w...@gmail.com wrote: When using the examples provided for creating

Re: [web2py] Re: pyfpdf rendering bug

2012-02-16 Thread Bruce Wade
Yeah not sure, I am trying to get it working correct. I know running the python template.py directly works. On Thu, Feb 16, 2012 at 2:13 PM, Alan Etkin spame...@gmail.com wrote: Perhaps there is some old system filename conversion feature causing the mess with the strings. I think I was

[web2py] Re: new mysql claimed 70x faster

2012-02-16 Thread Cliff
And recommended by 9 out of 10 dentists :) Sorry, couldn't help myself. On Feb 16, 3:33 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: http://www.mysql.com/why-mysql/white-papers/mysql-cluster-7.2-ga.html

[web2py] Re: TR() unwanted extra cell - don't know what's happening

2012-02-16 Thread Cliff
thanks, Anthony. I stared at that thing for at least 30 minutes this morning and didn't see the nesting. Another palm-to-forehead moment. On Feb 16, 10:24 am, Anthony abasta...@gmail.com wrote:                 tbody.append(TR(                     TD(row.products.name),                    

Re: [web2py] Re: Implementing task queue using web2py

2012-02-16 Thread howesc
for writing files to the blobstore see the GAE docs: http://code.google.com/appengine/docs/python/blobstore/overview.html#Writing_Files_to_the_Blobstore

[web2py] Re: Forms not working with web2py in Chrome

2012-02-16 Thread Cliff
Do you have the little Web2py icon in the destination field? (Or whatever Chrome calls it - the place where you type the URL.) That would be your favicon.ico. In the past, Chrome did really odd things if favicon is missing and maybe it still does. On Feb 16, 12:52 pm, Sameh Khalil

[web2py] Re: html5 suport for forms

2012-02-16 Thread howesc
nothing generic, but i have been known to do things like: #Set HTML 5 input properties if not auth.is_logged_in(): form.custom.widget.first_name['_required'] = True form.custom.widget.first_name['_autofocus'] = True form.custom.widget.last_name['_required'] = True

[web2py] Re: Wizard comments/suggestions

2012-02-16 Thread Bill Thayer
https://lh6.googleusercontent.com/-5Lz1SVK5Swk/Tz2Jxso6ugI/ACA/JUxWbEK-Qa8/s1600/illegible_plugin_selector.JPG This might be a decent thread to add this discovery. The wizard's plugin selector is illegible in Firefox. See screenshot. Regards, Bill

Re: [web2py] Forms not working with web2py in Chrome

2012-02-16 Thread Sameh Khalil
The forms page is created by web2py in the database administration page, and I checked the source and it contains no empty hrefs or src

[web2py] Re: Forms not working with web2py in Chrome

2012-02-16 Thread Sameh Khalil
the favicon exists and shows just fine

[web2py] Re: Forms not working with web2py in Chrome

2012-02-16 Thread Anthony
Can you show your exact model file code? What version of web2py? Are you running from source (with your own Python installation), or using the Windows binary? Anthony On Thursday, February 16, 2012 12:52:03 PM UTC-5, Sameh Khalil wrote: I'm new to web2py and following the book, I'm trying to

Re: [web2py] Re: html5 suport for forms

2012-02-16 Thread Bruno Rocha
I want to create a form parser, to not break the compatibility with FORM something like this: raw_form = SQLFORM(db.table) from plugin_html5form import HTML5FORM html5_form = HTML5FORM(form) So HTML5FORM receives a FORM object and loops inside its components changing everything to html5

[web2py] Re: Associative Table

2012-02-16 Thread Cliff
If you want to avoid duplicate associations, check out update_or_insert. http://web2py.com/books/default/chapter/29/6#update_or_insert In raw SQL you would use the two associated IDs as the primary key, then use ON DUPLICATE KEY to trap the error. On Feb 16, 8:09 am, Ross Peoples

[web2py] Re: sqlhtml.py - breadcrumbs exception when using smartgrid format + lambda

2012-02-16 Thread Cliff
Here's an alternative breadcrumb generator that handles object names like this... if len(request.args) 0: # tune this value. grid smartgrid use longer arg lists if 'name' in db[request.controller].fields: item_name = 'editing ' + db[request.controller][args[-1]]].name else:

Re: [web2py] Re: How to Generate the effective report by using web2py

2012-02-16 Thread Sanjeet Kumar
Ross i am new in web2py and python so please what are you planning put in the repository because i want to generate the report by using FPDF and i also generated the report but now in the rows i have the large text so Problems are arising on the view On Fri, Feb 17, 2012 at 12:02 AM, Mariano

Re: [web2py] Re: How to Generate the effective report by using web2py

2012-02-16 Thread Ramkrishan Bhatt
Hello Sanjeet, In your code the header and footer column is unmatched . Just care full about the Grid Structure as per Column name and data value. A part from that in refer http://www.web2py.com/book/default/chapter/10#Low-level-API-and-other-recipes

[web2py] turnoff the default datepicker

2012-02-16 Thread Martin Weissenboeck
Hi, I want (1) to deactive the automatic call of the AnyTime picker depending on the class 'date' and (2) substitue it with something like $('myid').click(...) (2) works fine, I have translated the names of month and days to German, changed the first day of the week and so on. (1) is the

[web2py] rendering a view

2012-02-16 Thread Praveen Bhat
Hello, I have 2 tables : business and article. And I have 3 controllers : Home, Articles, Businesses. In Home page the following code renders a list of Businesses and Articles: def index(): lists= db().select(db.article.ALL,limitby=(0, 5),orderby=~db.article.id)

[web2py] adding extra form elements in a

2012-02-16 Thread Martin Weissenboeck
Hi, chapter 7.2.8 of the books tells how to add extra form elements to SQLFORM. My question: I want to use a SQLFORM.smartgrid. On adding a new record a SQLFORM appears. It is possible to add an extra form element to this form? Concrete: I want to add a button to activate a datepicker in the

[web2py] Why admin|examples|welcome in hgignore?

2012-02-16 Thread pbreit
I see this line in .hgignore: ^applications/(?!(admin|examples|welcome|__init__)).*$ So I'm wondering how I get updates to those applications? Is it safe to change that to this? ^applications/(?!(__init__)).*$