[web2py] Re: PYFPDF and printing labels

2013-01-12 Thread Paul Rykiel
Thank You Massimo ... hope all is well! On Saturday, January 12, 2013 9:08:42 PM UTC-6, Massimo Di Pierro wrote: > > Here are some examples of speaker badges created with fpdf ( > https://github.com/mdipierro/web2py-recipes-source/tree/master/samples/10_Reporting_recipes) > > from the Pckt recipe

[web2py] Re: PYFPDF and printing labels

2013-01-12 Thread Massimo Di Pierro
Here are some examples of speaker badges created with fpdf (https://github.com/mdipierro/web2py-recipes-source/tree/master/samples/10_Reporting_recipes) from the Pckt recipes book. In the same place you can also find the code. On Saturday, 12 January 2013 19:15:11 UTC-6, Paul Rykiel wrote: > >

[web2py] PYFPDF and printing labels

2013-01-12 Thread Paul Rykiel
Greetings, Has anyone used the PYFPDF library to build and print labels Are there setting to control the label sizes and to skip to print the next label. Please advise --

Re: [web2py] Re: how to embed a d3.js script in a view correctly?

2013-01-12 Thread Alan Etkin
> > {{response.files.append(URL(r=request,c='static',f='/js/d3.js'))}} > {{extend 'layout.html'}} > That way, the script is only added for the current action (the function requested by the client), saving client resources Another way would be adding them conditionally per-controller/function (

[web2py] Re: Web2Py function to query the database...

2013-01-12 Thread Anthony
Can you provide more details regarding what you have tried? How are you creating the form and posting to web2py? Are you querying local databases that you are modeling with the DAL, or are you querying some external API's? When you submit a form to web2py (via GET or POST), the variables will be

[web2py] Re: Web2Py function to query the database...

2013-01-12 Thread Mihir Lade
Hi Alan, I've read the chapters a few times however having difficulty understanding a HTML search page would pass the information to a function where it queries multiple databases to return the data? On Sunday, January 13, 2013 8:14:07 AM UTC+10:30, Alan Etkin wrote: > > The book has anything y

Re: [web2py] Re: how to embed a d3.js script in a view correctly?

2013-01-12 Thread António Ramos
Try this, {{response.files.append(URL(r=request,c='static',f='/js/d3.js'))}} {{extend 'layout.html'}} The in the web console try d3.select('body').append('svg').append('circle').style("stroke", "gray").style("fill", "red").attr("r", 40).attr("cx", 50).attr("cy", 50); I´m into D3.js too! 201

[web2py] Re: embedding simple d3.js script in view correctly

2013-01-12 Thread Alan Etkin
> > I am new to web2py and I want to include a d3.js script in a simple view. > I did the following: > This thread is duplicated. I made a reply at https://groups.google.com/d/topic/web2py/lngBXrQIh1g/discussion --

[web2py] Re: how to embed a d3.js script in a view correctly?

2013-01-12 Thread Alan Etkin
> > Hi, I am new to web2py and I would like to embed a running (tested with > flask) > javascript based on d3.js in a web2py view. > If the script can go in the body of the document, you can do this in a view: {{=SCRIPT(_type="text/javascript", _src=URL(c="static", f="js/"))}} Where is store

[web2py] Re: auth.wiki deployment issue

2013-01-12 Thread Massimo Di Pierro
I do not understand. The source says wiki_editor and wiki_author everywhere. On Saturday, 12 January 2013 13:28:14 UTC-6, wwwgong wrote: > > the group name shipped with 2.3.2 is 'wiki_editor', I changed it to > 'wiki-editor' > I also add 'wiki-author' and assign both to myself. Now I can add pag

[web2py] embedding simple d3.js script in view correctly

2013-01-12 Thread Martina Gruber
Hi all, I am new to web2py and I want to include a d3.js script in a simple view. I did the following: In myapp/views/default/visualizations.html {{extend 'layout.html'}} script text ... but when I try the view no d3.js plot appears. I would really appreciate any help on this. O

[web2py] how to embed a d3.js script in a view correctly?

2013-01-12 Thread Martina Gruber
Hi, I am new to web2py and I would like to embed a running (tested with flask) javascript based on d3.js in a web2py view. How should I do this correctly? Thanks. --

[web2py] Re: Web2Py function to query the database...

2013-01-12 Thread Alan Etkin
The book has anything you are asking for and much more. For an introduction to forms and controllers I think you could check the examples at Overview: http://www.web2py.com/books/default/chapter/29/03#Overview Also, there are appliances available you can use as example: http://www.web2py.com/ap

[web2py] gluon.contenttype.contenttype

2013-01-12 Thread Bob St John
def contenttype(filename, default='text/plain'): """ Returns the Content-Type string matching extension of the given filename. """ i = filename.rfind('.') if i>=0: default = CONTENT_TYPE.get(filename[i:].lower(),default) j = filename.rfind('.', 0, i) if

Re: [web2py] Re: (Class) references issue

2013-01-12 Thread molhokwai
Indeed. Knew about the & and should have remembered/thought about it... Apologies for the incongruous assumptions... On 1/12/13, Anthony wrote: > This is the wrong syntax for a query: > > db(db.user_atom.user == self._user.id and db.user_atom.top_atom == self. > _top_atom.id) > > Instead of usin

[web2py] Re: wiki now partially documented

2013-01-12 Thread Andrew W
Great work. And if you want to see a deployed auth.wiki, go to: performancecomposites.co.nz There are still some routes.py and IE things to sort out, but it's working. Any one in need of a wheel for their racing yacht ? On Sunday, January 13, 2013 4:45:11 AM UTC+13, wwwgong wrote: > > Th

[web2py] Re: auth.wiki deployment issue

2013-01-12 Thread wwwgong
the group name shipped with 2.3.2 is 'wiki_editor', I changed it to 'wiki-editor' I also add 'wiki-author' and assign both to myself. Now I can add page and media --

[web2py] Re: auth.wiki deployment issue

2013-01-12 Thread wwwgong
Hi, Alan, following your recipe: http://www.web2pyslices.com/slice/show/1565/wikifying-web2py-apps I got '401 UNAUTHORIZED' when accessing /mywiki/default/wiki/_editmedia/index I am using 2.3.2 stable on localhost, tried the same at pythonanywhere.com same error --

Re: [web2py] Thank you Aaron Swartz

2013-01-12 Thread Arvind Gupta
It's very Sad. RIP Aaron Swatz. On Sat, Jan 12, 2013 at 10:00 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > I woke up this morning and read some bad news: > > > http://news.cnet.com/8301-1023_3-57563642-93/internet-activist-aaron-swartz-commits-suicide/ > > Aaron was the founder o

[web2py] Thank you Aaron Swartz

2013-01-12 Thread Massimo Di Pierro
I woke up this morning and read some bad news: http://news.cnet.com/8301-1023_3-57563642-93/internet-activist-aaron-swartz-commits-suicide/ Aaron was the founder of reddit.com, creator of web.py, and inventor of markdown. I did not know Aaron personally and I have never met him but I took

[web2py] Re: (Class) references issue

2013-01-12 Thread Anthony
This is the wrong syntax for a query: db(db.user_atom.user == self._user.id and db.user_atom.top_atom == self. _top_atom.id) Instead of using "and", you must use "&" (see this sectionin the book): db((db.user_atom.user == self._u

[web2py] Re: wiki now partially documented

2013-01-12 Thread wwwgong
Thanks for auth.wiki doc --

[web2py] (Class) references issue

2013-01-12 Thread molhokwai
Hi, The title is my best guess for what the issue is most likely linked to... although in this case, it's... *weirder*... The code: logging.info('---| %i ' % self._user.id) logging.info('---| %s ' %

Re: [web2py] cool new wysiwyg editor

2013-01-12 Thread Tito Garrido
Anybody made a slice of how to implement it with the upload feature? Seems pretty cool On Fri, Jun 1, 2012 at 8:54 AM, villas wrote: > Then it must be compatible with this guy!! > > The Refridgerator > > Remember him - he was a sensation at the time? > > > > On Thurs

[web2py] Web2Py function to query the database...

2013-01-12 Thread Mihir Lade
Hi Guys, I am currently working on an assignment where I need to create a function which would query the database to search flights available according to the users input through the HTML form. I have attached a picture of the HTML form. Basically the user, selects the origin, the destination,

[web2py] Re: objet from view to controller using json

2013-01-12 Thread Alan Etkin
> > I trying to send un object from a view to controller (Web2py) in the same > way that: > If you go to the ticket system in /appadmin, you'll probably see a ticket with this error: TypeError: expected a character buffer object That's because the file object cannot write Python objects dire

[web2py] Re: existing tables in plugin_wiki

2013-01-12 Thread Tim Mead
Thanks Massimo! Just doing some experimentation and it looks like I've been caught out watching old tutorial videos and not keeping up with the latest documentation. Cheers, Tim On Saturday, January 12, 2013 1:11:19 AM UTC+11, Massimo Di Pierro wrote: > > Mind that plugins wiki is being replace