[web2py] Re: cpdb errors

2013-01-06 Thread Simon Ashley
Interesting but encountering similar problems to *backseat *on windows 7 using the following command from a prompt in web2py root folder: i.e. c:\web2py> set path=%path%;c:\web2py\gluon c:\web2py> c:\python27\python scripts\cpdb.py -d gluon -f application\app\databases -y 'sqlite://storage.sqli

[web2py] just upgraded to 2.3.2 stable and getting ticket ...

2013-01-06 Thread weheh
Traceback (most recent call last): File "C:\web2py\gluon\restricted.py", line 212, in restricted exec ccode in environment File "C:\web2py\applications\myapp\views\foo/xyzzy.html", line 516, in File "C:\web2py\gluon\compileapp.py", line 140, in LOAD from html import TAG, DIV, URL,

[web2py] How to parse quoted '%20' RESTfully to web2py?

2013-01-06 Thread Alec Taylor
I can't figure out how to parse url quoted inputs to web2py. Here is my attempt: from HTMLParser import HTMLParserfrom urllib2 import quote, unquote @service.jsondef get_group(): search_for = unquote(HTMLParser.unescape.__func__(HTMLParser, args[0]).encode('ascii', 'ignore')) our_groups_f

Re: [web2py] Changed date to datetime. Now I get: invalid literal for int() with base 10:

2013-01-06 Thread HittingSmoke
Yep, SQLITE. But I completely wiped the database from the disk in web2py/applications/application/databases and let web2py write a completely new one. Wouldn't I not need to alter anything if web2py has created a fresh database with the proper field types? On Sunday, January 6, 2013 6:37:48 PM

Re: [web2py] Changed date to datetime. Now I get: invalid literal for int() with base 10:

2013-01-06 Thread Bruno Rocha
Are you using SQLITE? SQLITE does not support "alter table" for changing column types. SO you have to use "sqliteman" program to alter directly on sqlite. --

[web2py] Changed date to datetime. Now I get: invalid literal for int() with base 10:

2013-01-06 Thread HittingSmoke
I changed date to datetime in my comments database model and now after submitting a comment I can't load the comment function. I figured I just broke the database with the switch and tried to wipe it to start over. That didn't work though. In appadmin if I go to the comments table I get the sam

Re: [web2py] WWW SQL Designer to DAL converter

2013-01-06 Thread Boris Manojlovic
change to xslt file --- output.xsl-orig 2013-01-07 01:58:23.0 + +++ output.xsl 2013-01-07 01:50:44.0 + @@ -85,10 +85,11 @@

Re: [web2py] WWW SQL Designer to DAL converter

2013-01-06 Thread Bruno Rocha
This syntax is deprecated, still worls, but it is now deprecated. Should be: """ database class object creation (initialization) """ if request.env.web2py_runtime_ gae: # if running on Google App Engine db = *DAL*('gae') # connect to Google BigTable

[web2py] Re: plugin to drag and drop upload of a file

2013-01-06 Thread Alan Etkin
> > How can I address this issue ? > > -- > Vincenzo Ampolo > > Are the .css files added to the ajax response? In that case, I doubt they will affect the document. I'd add the css files to response.files in the plugin model instead, so they are appended to the app layout. # models/plugin_fil

[web2py] Re: Uploading images

2013-01-06 Thread Alan Etkin
> > This makes me think, is there any way so the stored file is accessed > directly via URL, something like > http://mysite.com/myapp/uploads/myfilename.jpg? This should customize the uploaded files. - Retrieve the file db record - Change the upload field to whatever name you need - Rename th

Re: [web2py] WWW SQL Designer to DAL converter

2013-01-06 Thread Boris Manojlovic
i really do not understand why people simply do not extend work i already done with wwwsqldesigner, who ever owns gaesql should update xslt to working one... not to mention it already worked at hxxp:// designer. bojanka. net I give up about this story :) On Fri, Dec 28, 2012 at 7:35 PM, Derek w

[web2py] plugin to drag and drop upload of a file

2013-01-06 Thread Vincenzo Ampolo
Hi I'm writing a plugin to do a drag and drop upload of a series of files. It's a plugin because I'll think it can be reused in many other context than the one i'm developing now. I'm following http://web2py.com/books/default/chapter/29/12 and I need to load some css and javascript for my pl

[web2py] Re: Uploading images

2013-01-06 Thread Wonton
Well, once again sorry for answering myself, but, as I'm trying to understand this and read posts in Internet I find out more things, for example, that in the official book this is said: "It uses the filename to determine the extension (type) of the file, creates a new temp name for the file (ac

Re: [web2py] Re: Can't get auth_user.first_name from referenced comment author field.

2013-01-06 Thread Chris Johnson
That explains it then. I put in a test comment before creating the first user account. I'll just purge that account. Thanks! On Jan 6, 2013 3:28 PM, "Massimo Di Pierro" wrote: > {{=comment.author.first_name}} > > is correct but: > 1) fails if some records have comment.author == None > 2) makes a

[web2py] Re: Uploading images

2013-01-06 Thread Wonton
Regarding to my second question, I've found the image file stored in my server under applications/myapp/uploads, but its name is not myuser.jpg but auth_user.avatar.8d275a959267dd9b.612e6a7067.jpg. El lunes, 7 de enero de 2013 00:26:03 UTC+1, Wonton escribió: > > Hello Massimo, > > First of all

[web2py] Re: Can't get auth_user.first_name from referenced comment author field.

2013-01-06 Thread Massimo Di Pierro
{{=comment.author.first_name}} is correct but: 1) fails if some records have comment.author == None 2) makes a nested recursive select You can address 1 with: {{=comment.author.first_name if comment.author else 'Unknown'}} You can address both with a join: comments = db(db.comment.author==db.a

[web2py] Re: Uploading images

2013-01-06 Thread Wonton
Hello Massimo, First of all thank you very much for your help. I've done what you told me, to be exact: file_name = auth.user.username+'.jpg' print file_name row.update(avatar=db.auth_user.avatar.store(request.post_vars['upload_field' ],filename=file_name)) Running this, it seems that

[web2py] Re: Bar encoded text fields

2013-01-06 Thread Massimo Di Pierro
This is correct in the sense that since you try to store a list, web2py thinks it is a 'list:string' type of object and escapes the list accordingly accordingly. At the same time, the behavior in this case is not really specified and could be changed. On Sunday, 6 January 2013 14:52:51 UTC-6,

[web2py] Web2Py on AWS Elastic Beanstalk

2013-01-06 Thread Isaac Dorgbefu
Hi, Can anyone help with setting up web2py app on AWS Elastic Beanstalk? There's a django tutorial here. Thanks Isaac --

[web2py] Re: Maintain Attendance details of students

2013-01-06 Thread Alan Etkin
El domingo, 6 de enero de 2013 13:32:49 UTC-3, Cler escribió: > > Hello, > Is there any way to maintain attendance records of students using > web2py? > Let me know if this helped: http://www.web2pyslices.com/slice/show/1582/a-chart-with-db-io-for-class-attendance-check --

[web2py] Can't get auth_user.first_name from referenced comment author field.

2013-01-06 Thread HittingSmoke
I'm trying to get my comment page to show the comment author by first and last name. Unfortunately I can't get it to display anything but user ID. My db model: db.define_table('comments', Field('author', db.auth_user, default=auth.user_id, writeable=False), Field('postedon', 'date',

[web2py] Bar encoded text fields

2013-01-06 Thread Alan Etkin
>>> db.define_table("mytable", Field("mytext", "text")) >>> db.mytable.insert(mytext=(1,2,3,4)) 1L >>> db.mytable[1].mytext '|1|2|3|4|' >>> print db.mytable[1].mytext |1|2|3|4| I am trying to implement native support for json data type in dal (for databases like mongodb) and found this behavior

[web2py] Re: Postgres : created new database, but tables not being create when I access the app

2013-01-06 Thread Anthony
See http://web2py.com/books/default/chapter/29/06#Migrations: The value of migrate is the filename (in the "databases" folder for the application) where web2py stores internal migration information for this table. These files are very important and should never be removed except when the entire

[web2py] Re: IS_EMPTY_OR for spam bot filtering?

2013-01-06 Thread Anthony
> On a related note, is it possible to make the form silently fail if this > one field does not pass validation but other fields will still properly > produce error message if they fail validation? > Something like: if form.process().accepted: [success action] elif form.errors.secret_fiel

[web2py] Re: IS_EMPTY_OR for spam bot filtering?

2013-01-06 Thread HittingSmoke
Thanks, that should work. The idea is to have a field hidden with CSS named something common. The HTML can still be seen by bots and they will automatically fill it in with junk. People won't see the field so they will leave it empty. Bots will fill it in and the form will be rejected. On a re

[web2py] Re: How to import file within another directory of modules

2013-01-06 Thread Niphlod
yep, but only if in the folder there is an __init__.py file. http://docs.python.org/2/tutorial/modules.html#packages On Sunday, January 6, 2013 5:57:51 PM UTC+1, howesc wrote: > > i use sub folders all the time - python does the import with dot notation: > > import users.test_users > > cfh > > On

[web2py] Re: IS_EMPTY_OR for spam bot filtering?

2013-01-06 Thread Niphlod
didn't really grasp the requirements, but a few examples that may turn useful... >>> IS_LENGTH(maxsize=0)(' ') (' ', 'enter from 0 to 0 characters') >>> IS_LENGTH(maxsize=0)('') ('', None) >>> IS_EQUAL_TO('')(None) (None, 'no match') >>> IS_EQUAL_TO(None)(None) (None, None) >>> IS_EQUAL_TO('')(''

[web2py] IS_EMPTY_OR for spam bot filtering?

2013-01-06 Thread HittingSmoke
Can I use IS_EMPTY_OR to require a field is completely empty, basically leaving out the OR part? I'd like to make a hidden field in a form that is required to be empty to help filter out spam bots on a form. --

[web2py] Re: anyone tried jQuery svg?

2013-01-06 Thread villas
Look at what he does here: http://keith-wood.name/svgBasics.html See the drawInitial function. You need to load it, put it into a document.ready function or something. On Sunday, January 6, 2013 2:14:13 PM UTC, jonas wrote: > > Hi. > > Has anyone here tried the jQuery svg lib http://keith-wood

[web2py] Re: Returning a token for Android app authentication

2013-01-06 Thread dlypka
If you mimic the same http traffic that a browser would generate, then of course you will get all the normal web2py functionality such as the session. The web2py session is usually stored in the database which means it can store a large amount of data without the size limits of cookie storage. A

[web2py] Re: Postgres : created new database, but tables not being create when I access the app

2013-01-06 Thread GeeksRule
Resolved this by removing *.table files under the *application/database/* Restarted postgres Restart apache Is this a bug ? On Sunday, 6 January 2013 11:43:53 UTC-5, GeeksRule wrote: > > > I switched to Postgres recently and things were working fine. > I had to make some major changes, hence dele

[web2py] Maintain Attendance details of students

2013-01-06 Thread Cler
Hello, Is there any way to maintain attendance records of students using web2py? --

[web2py] Re: preferred solution for parsing {xht,ht,x}ml

2013-01-06 Thread webpypy
Here is a scrapy tutorial . On Sunday, January 6, 2013 4:24:54 PM UTC+3, webpypy wrote: > > > > What about scrapy ? > > --

[web2py] Re: How to import file within another directory of modules

2013-01-06 Thread howesc
i use sub folders all the time - python does the import with dot notation: import users.test_users cfh On Sunday, January 6, 2013 8:15:29 AM UTC-8, villas wrote: > > Never had to do this but I wonder... > Do you really have so many module files for one app that you need to > organize them using

[web2py] Postgres : created new database, but tables not being create when I access the app

2013-01-06 Thread GeeksRule
I switched to Postgres recently and things were working fine. I had to make some major changes, hence deleted the old database & created a brand new one. I accessed a function that inserts new records in a table -> "newsMaster" But in the logs I see this : [error] Trying to insert title : x

[web2py] Re: How to import file within another directory of modules

2013-01-06 Thread villas
Never had to do this but I wonder... Do you really have so many module files for one app that you need to organize them using sub-directories? On Friday, January 4, 2013 12:19:52 PM UTC, Yasir Saleem wrote: > > Hi all, > > In my modules directory, I created a new directory named "users" and >

Re: [web2py] geodal

2013-01-06 Thread Paolo valleri
well done! All the former tests worked. I will investigate more the others functions as soon as possible. Paolo On Sunday, January 6, 2013 4:28:13 PM UTC+1, Massimo Di Pierro wrote: > > One more try please. > > On Sunday, 6 January 2013 02:11:09 UTC-6, Paolo valleri wrote: >> >> Hi Massimo, I'

[web2py] Re: anyone tried jQuery svg?

2013-01-06 Thread Massimo Di Pierro
No but I have used processing.js (from the same author as jQuery) and I am very happy with it. On Sunday, 6 January 2013 08:14:13 UTC-6, jonas wrote: > > Hi. > > Has anyone here tried the jQuery svg lib http://keith-wood.name/svg.html? > > I tried to use it in web2py but with no success. > > t

Re: [web2py] geodal

2013-01-06 Thread Massimo Di Pierro
One more try please. On Sunday, 6 January 2013 02:11:09 UTC-6, Paolo valleri wrote: > > Hi Massimo, I've tried the same 3 tests. > The first one failed, it was working before though, the ticket: > > Traceback (most recent call last): > File "/home/paolo/Dropbox/git/web2py/gluon/restricted.py",

[web2py] anyone tried jQuery svg?

2013-01-06 Thread jonas
Hi. Has anyone here tried the jQuery svg lib http://keith-wood.name/svg.html? I tried to use it in web2py but with no success. the necessary lib was imported: but is seems that the svg function is not present : svg should be here $('.test').svg(); var svg=$('.test').svg('get'); svg.cir

[web2py] Re: preferred solution for parsing {xht,ht,x}ml

2013-01-06 Thread webpypy
What about scrapy ? --

[web2py] Re: Putting apps together

2013-01-06 Thread Sverre
Thank you very much --

[web2py] Re: SQLFORM.grid not showing correctly

2013-01-06 Thread Niphlod
seems that you have not a view extending the default layout do you have a views/lineas/lineas.html with {{extend 'layout.html'}} in it ? On Sunday, January 6, 2013 3:52:15 AM UTC+1, visuallinux wrote: > > Dear i am trying to use SQLFORM.grig > > >form = SQLFORM.grid(query=query, left=le

Re: [web2py] geodal

2013-01-06 Thread Paolo valleri
Hi Massimo, I've tried the same 3 tests. The first one failed, it was working before though, the ticket: Traceback (most recent call last): File "/home/paolo/Dropbox/git/web2py/gluon/restricted.py", line 212, in restricted exec ccode in environment File "/home/paolo/Dropbox/git/web2py/app