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

2014-04-01 Thread Sihui Huang
Hi Martina, Thanks for posting this! It's very helpful! I'm also trying to use d3 in web2py. I follow your example, it works! But I don't know how to make to circle appear above the copyright 2013 -- powered by web2py line. Here's the html file: {{response.files.append(URL(r=request,c='static

[web2py] SQLFORM URL duplicate validation

2014-05-11 Thread Sihui Huang
I want to forbid users being able to submit duplicate urls into the database. Right now my approach is: db.url.URL.requires=[IS_URL(error_message='URL Error'), IS_NOT_IN_DB(db, 'url.URL',error_message='Dupilcated URL')] It covers the case for with "http" and without "http".

[web2py] Re: SQLFORM URL duplicate validation

2014-05-13 Thread Sihui Huang
Here's the solution<http://stackoverflow.com/questions/23601275/web2py-sqlform-url-duplicate-validation/23610186#23610186>! Thanks! On Sunday, May 11, 2014 11:53:55 PM UTC-5, Sihui Huang wrote: > > I want to forbid users being able to submit duplicate urls into the > dat

[web2py] Many-to-Many relationship and multi SQLFORMs submission automatically

2014-05-14 Thread Sihui Huang
In my application, one has urls and tags. What I'm doing is when the user entering data for an url, he/she will also select relative tags. I store urls and tags into two different tables and I plan to use a reference table which describe the many-to-many relationship between tags and urls. I