[web2py] Re: web2py dashboard external data

2014-04-07 Thread Dave S
On Monday, April 7, 2014 3:57:12 PM UTC-7, Trent Telfer wrote: > > Just in case someone might find this useful I was download Bank of Canada > FX information and scrubbing the information for injection into a database > with DAL. See code below: > > Cool! Thanks for sharing! /dps > import c

[web2py] Re: web2py dashboard external data

2014-04-07 Thread Trent Telfer
Just in case someone might find this useful I was download Bank of Canada FX information and scrubbing the information for injection into a database with DAL. See code below: import csv import requests import datetime as dt from datetime import timedelta from datetime import datetime import os i

[web2py] Best approach to using the DAL with external data sources that will go into multiple tables?

2014-04-07 Thread Trent Telfer
I am attempting to build a small webpage that takes some pricing data from a few external sources and displays it on one concise page (a dashboard of sorts). My problem is I have 38 timeseries to input in the database and I am hoping someone here can suggest a way around writing multiple define

Re: [web2py] How to change the message 'value already in database or empty' in Register?

2014-04-07 Thread 黄祥
i think you can achieve it using form validation on your controller e.g. if form.errors.name: response.flash = "Sorry chap, that doesn't exist" best regards, stifan > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] Smartgrid and archive buttons

2014-04-07 Thread 黄祥
had you already try to define the linked_table explicit in your smartgrid? e.g. linked_tables = ['detail'] best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

[web2py] Re: Form data hint

2014-04-07 Thread 黄祥
> > 1) when the form is accessed some of the fields should already contain a > hint which is not necessarily the default value of the field > i think you can achieve it using default e.g. table.registration_date.default = request.now > 2) the user should select a value from a drop-down list

[web2py] Re: Why does LINK work and STYLE doesn't?

2014-04-07 Thread Paolo Caruccio
Well, I think that style element with the src attribute in order to link an external stylesheet works only in XHTML2. Definitely it does not work when html5 doctype is applied and the current welcome app layout is in html5. I will open an issue, asking to correct the example in the book. Il gio

[web2py] Re: load file from folder

2014-04-07 Thread Anthony
Something like: import os import pandas as pd data = pd.read_csv(open(os.path.join(request.folder, 'static', 'path/to/data.csv'), 'r')) Anthony On Monday, April 7, 2014 4:49:19 PM UTC-4, ArtDijk wrote: > I want to do some pandas analysis on a csv. I've manually put the file in > the '/static'

[web2py] load file from folder

2014-04-07 Thread ArtDijk
I want to do some pandas analysis on a csv. I've manually put the file in the '/static' folder. Later I want to show a plot based on the analysis. What should be the correct syntax to load the csv file in the default.py ? Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documen

[web2py] Re: How do I post an image to web2py from HTML5 Canvas

2014-04-07 Thread pubu
hi, i would do the follow: 1) in model use compute to create image form base64 string: db.define_table('user_images', Field('my_image', 'upload', label=T('My Image'), compute=lambda r: create_image_from_base64_str(r.my_image_b64)), Field('my_image_b64', 'text') ) def create_image_from_b

[web2py] Re: web2py-mini-conference, May 4, 2014

2014-04-07 Thread Francisco Betancourt
Please make more conferences in more locations, maybe next year, I would have liked to attend, but it's to far, plus there's no more room. I look forward to the videos. El lunes, 3 de marzo de 2014 09:36:29 UTC-6, Massimo Di Pierro escribió: > > We have a date, a location, and a web site: > >

[web2py] Re: feedback da default.py a web2py

2014-04-07 Thread Massimo Di Pierro
Si! Invece di: ajax('{{=URL('AllegaNuovoFile')}}',['txtIdCarico','pathCompleto'],'target') usa: ajax_page('POST', '{{=URL('AllegaNuovoFile')}}',['txtIdCarico',' pathCompleto'],'target') and from: def AllegaNuovoFile(): ... response.flash = "Word done!" # or response.js = "..

Re: [web2py] How to change the message 'value already in database or empty' in Register?

2014-04-07 Thread deep jain
hey, is there any way in which i can flash this message (like response.flash)? On Monday, 19 December 2011 06:10:09 UTC+5:30, ニコノコ wrote: > > IS_IN_DB(db(db.mytable.id>0), 'mytable.id', db.mytable._format > > ,error_message=T("Sorry chap, that doesn't exist")) > > > You may specify your own error

Re: [web2py] Re: web2py-mini-conference, May 4, 2014

2014-04-07 Thread Frank
On 3 Apr 2014 at 20:58:41, Massimo Di Pierro (massimo.dipie...@gmail.com) wrote: Registration is closed. We exceeded room capacity. We have sponsors, volunteers, talks proposals, and a lot of work ahead of us. It is going to be great. We will do our best to record everything. ‘… record everythi

[web2py] Form data hint

2014-04-07 Thread csavorgn
Hi, I'm a web2py newbie and I'm developing my first app. In my app I have a database containing a table with many fields. I would like to create three different forms to add rows to the table. Each one of these forms should help the user to fill the data corresponding to a special situation. This

[web2py] Re: Paypal Recurring Payments? Any experience? Any alternatives?

2014-04-07 Thread Clément Boulais - MangoPay
Hello Everyone, Here at Mangopay we serve and assist all european based company to process there payments through a simple API. Please check our transparent pricing and dedicated website: http://www.mangopay.com/ Also, feel free to contact me for any enquiry: sa...@mangopay.com All best wishes

[web2py] Why does LINK work and STYLE doesn't?

2014-04-07 Thread scruffyexaminer
Hi, I'm learning web2py and just messing around... I have a static file: css/style.css It contains: h1 {color: red;} When I make a simple view with an h1 block, my stylesheet gets applied if I put: {{=LINK(_rel="stylesheet", _type="text/css", _href=URL('static', 'css/style.css'))}} in

[web2py] feedback da default.py a web2py

2014-04-07 Thread Carlo DOnofrio
Salve a tutti, vorrei sapere se è possibile avere un feedback di fine esecuzione istruzioni della funzione richiamata in default.py. Mi spiego meglio. Ho creato tutta una serie di pagine html in cui, per esempio, ho necessità di salvare degli allegati in un database creato in mysql. All'in

Re: [web2py] Smartgrid and archive buttons

2014-04-07 Thread Seth J
The problem is that there are no field explicitly defined for that link. It appears automatically when I enable record_versioning. On Monday, April 7, 2014 2:49:00 AM UTC-4, Johann Spies wrote: > > > > > On 4 April 2014 00:01, Seth J > wrote: > > Hi guys, >> >> >> As you can see there's "Work l

Re: [web2py] Re: Ckeditor plugin - Update ckeditor

2014-04-07 Thread Marco Mansilla
El Mon, 7 Apr 2014 05:17:31 -0300 Marco Mansilla escribió: > El Tue, 25 Mar 2014 16:37:46 -0700 (PDT) > Tim Richardson escribió: > > > try this > > https://github.com/timrichardson/web2py_ckeditor4/releases/download/R-0.3/web2py.plugin.ckeditor.w2p > > > > Hi, I'm having a really hard struggl

Re: [web2py] Month picker

2014-04-07 Thread Richard Vézina
I would have the something similar for birth date with no year for user privacy on their age... Richard On Sun, Apr 6, 2014 at 6:24 AM, Pearu Peterson wrote: > Hi, > > In a form I'd like to have a field that contains month and year > information, only. The current date picker (via using IS_DATE

Re: [web2py] Mozilla Persona (Simple, privacy-sensitive single sign-in) and Web2py

2014-04-07 Thread Michele Comitini
+1 definitely 2014-04-07 13:53 GMT+02:00 puercoespin : > I think Mozilla Persona (http://www.mozilla.org/en-US/persona/) may be an > interesting sign in technology in web2py. > > There are lot of plugins for python frameworks, in > https://developer.mozilla.org/en-US/Persona/Libraries_and_plugins

[web2py] Mozilla Persona (Simple, privacy-sensitive single sign-in) and Web2py

2014-04-07 Thread puercoespin
I think Mozilla Persona (http://www.mozilla.org/en-US/persona/) may be an interesting sign in technology in web2py. There are lot of plugins for python frameworks, in https://developer.mozilla.org/en-US/Persona/Libraries_and_plugins, may be an web2py plugin would be interesting. What do you th

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

2014-04-07 Thread António Ramos
After all the pain learning d3 and angular i discovered d3js directives for angular. using them inside web2py is easy check one of them here about the line chart http://cmaurer.github.io/angularjs-nvd3-directives/line.chart.html 2014-04-05 20:11 GMT+01:00 Martina Gruber : > Hi Sihui, > > Just

Re: [web2py] Re: How do I "SELECT * FROM table WHERE field IN (1,2,3,4,7)

2014-04-07 Thread Michele Comitini
In PHP you post SQL queries as strings to the DB backend. If you want you can do that like: db.executesql("SELECT * FROM table WHERE field IN (1,2,3,4,7) AND field2='3'") but you loose much of the benefits of using DAL, for instance query portability. mic 2014-04-07 4:20 GMT+02:00 Cliff Kachinsk

Re: [web2py] Re: Ckeditor plugin - Update ckeditor

2014-04-07 Thread Marco Mansilla
El Tue, 25 Mar 2014 16:37:46 -0700 (PDT) Tim Richardson escribió: > try this > https://github.com/timrichardson/web2py_ckeditor4/releases/download/R-0.3/web2py.plugin.ckeditor.w2p > Hi, I'm having a really hard struggle with this, and so far I am really sure that is not a ckeditor plugin error,

Re: [web2py] Use IS_MATCH for optional form entry

2014-04-07 Thread chris_g
Thank you Johann, that worked for me. On Monday, April 7, 2014 4:52:34 PM UTC+10, Johann Spies wrote: > > On 7 April 2014 08:21, chris_g > wrote: > > >> How do I use IS_MATCH for field validation if the field only contains >> data? >> >> This works for me: >> IS_MATCH('^\d{10}', extract=True, err