[web2py] digital data store

2012-07-26 Thread Richard Penman
Hello, I made this web2py app for selling digital data via PayPal: http://sitescraper.net/data Would appreciate feedback. If you are interested it is hosted on webfaction with nginx for the static content and uwsgi for web2py. Blog was generated with jekyll. If there is enough interest I can

[web2py] Re: field of type upload exceptions.UnboundLocalError

2012-07-26 Thread Annet
Massimo, It would help if you could help debug as suggested below. As mentioned in issue 906, I did add a print statement at line 1206: elif field.type == 'upload': f = self.vars[fieldname] fd = '%s__delete' % fieldname ... print f

[web2py] Puzzle: reference table not working?

2012-07-26 Thread lyn2py
I created a brand new app for this. Code: db.define_table('location', Field('city', 'string',length=255,requires=IS_NOT_EMPTY()), Field('state', 'string',length=255,requires=IS_NOT_EMPTY()), Field('country', 'string',length=255,requires=IS_NOT_EMPTY()), ) db.define_table('person',

Re: [web2py] Re: Suggestion - a pickled DAL field

2012-07-26 Thread Omri
So I tried it out, and it works great, except for one thing - when I try to use record.as_dict() to get the structure which I can return to a JSON-RPC call which I normally use to communicate with my client, it simply does not return the field. I tried to print it out and I see very clearly that

[web2py] Re: Puzzle: reference table not working?

2012-07-26 Thread David Marko
Th e problem is in line default=location.id . You should set default value in some controller as I expect the location id is going to be taken from some request vars ... --

[web2py] Re: Error using Scheduler with CouchDB

2012-07-26 Thread Niphlod
Couchdb support is still experimental in web2py. If auth is not working you'd likely to wait (or help Massimo with) a better implementation of the DAL. If you need ultra-fast tasks you'd want to use celery (or pyres, or rq). The current scheduler with SQLite can process ~5 tasks per second per

Re: [web2py] Re: Suggestion - a pickled DAL field

2012-07-26 Thread Omri
I use the pickled field to store a dictionary. Since dictionary is not defined as a serializable type for the as_dict function, it is not returned when calling to as_dict. Adding it (dal.py line 6183) solved my problem, but I would like to keep this change when I update my web2py next. Is there a

[web2py] Re: trying to use movu

2012-07-26 Thread Daniel Gonzalez
Take a look at the controllers. They are somehow disabled (they have an spurious x as argument, which causes them to fail). I do not know why is that. On Wednesday, July 25, 2012 10:38:17 AM UTC+2, Hassan Alnatour wrote: Dear ALL , I am Trying TO use movu from http://movu.ca and i

[web2py] is there any trick in this PaaS hosting?

2012-07-26 Thread José Luis Redrejo Rodríguez
https://console.appfog.com/pricing Free up to 2 Gb RAM , it costs more than 50$ per month in most providers ... I'm still looking for the trick, without success ;) Regards José L. --

[web2py] Re: Question on using legacy tables

2012-07-26 Thread Massimo Di Pierro
I do not know how well that works. Please let us know if there is any problem. On Wednesday, 25 July 2012 22:42:39 UTC-5, tomt wrote: More good news. I discovered that this fix now allows me to use SQLFORM.grid on legacy tables that don't have an 'id' field! On Wednesday, July 25, 2012

Re: [web2py] BR()

2012-07-26 Thread Massimo Di Pierro
{{=BR()**how_many_times}}* On Wednesday, 25 July 2012 22:51:03 UTC-5, rochacbruno wrote: On Thu, Jul 26, 2012 at 12:39 AM, pbreit pbreitenb...@gmail.com wrote: Wow, you would write that instead of brbrbrbrbr?? Sometimes the repetition is a variable {{=CAT(*[BR() for i in

[web2py] Re: JSON output with referencing data

2012-07-26 Thread Massimo Di Pierro
before you serialize rows in json, you can do: for row in rows: row.tag_names = [db.tag[id].name for is in row.tags] This will be not efficient. depends on how many rows. Perhaps you can find a faster way to do the conversion. On Wednesday, 25 July 2012 23:32:58 UTC-5, Jaymin Oh wrote: Hi,

[web2py] Re: field of type upload exceptions.UnboundLocalError

2012-07-26 Thread Massimo Di Pierro
yes but elif field.type == 'upload': f = self.vars[fieldname] fd = '%s__delete' % fieldname if f == '' or f is None: ... continue so if the user does not upload a file, the continue statement should prevent

Re: [web2py] markmin embed:http://... not work trunk version

2012-07-26 Thread Massimo Di Pierro
This may be considered a breaking of backward compatibility and we need to think about it. Originally the emebed:... attribute was supposed to check if the link supports the oembed protocol and determine what to do (iframe or not) automatically. There is actually code in web2py

[web2py] running scheduler as a windows service or background process

2012-07-26 Thread Tim Richardson
I'm confused about this topic. I want to run the scheduler in the background, as a windows service. web2py is running as a windows service. From reading this group, it seems that web2py's built in cron is not a reliable way to start the scheduler if web2py is a service. I know little about

Re: [web2py] Re: how to achieve public/private key authentication for web service in web2py?

2012-07-26 Thread Amit
Michele, I tried to use simpatica, but getting error : type 'exceptions.ImportError' DLL load failed: The operating system cannot run %1.what i observed is this error coming wherever M2Crypto import statement is there: File

Re: [web2py] Re: Error using Scheduler with CouchDB

2012-07-26 Thread Ted Dunstone
Thanks. I'll try using SQLite and WAL - that having been said I'd still be vote for getting the scheduler working with NoSQL (couchDB) at some stage. Ted On Thursday, 26 July 2012, Niphlod wrote: Couchdb support is still experimental in web2py. If auth is not working you'd likely to wait (or

Re: [web2py] Re: Visit Plugow on FISL13

2012-07-26 Thread vinicius...@gmail.com
We generate them using a Google API and read them using ZBar. There are different modules in this totem. One of them is the Web2py part. Another is the ZBar thing. They can be all in one machine or distributed among several ones. But I'm not authorized to detail this implementation right now.

Re: [web2py] digital data store

2012-07-26 Thread José Ricardo Borba
Hi, Richard, Is an interesting work, congratulations. I will be glad if you open source-it. Best regards, José Ricardo Borba Porto Alegre - RS - Brasil 2012/7/26 Richard Penman richar...@gmail.com Hello, I made this web2py app for selling digital data via PayPal:

[web2py] Re: Error using Scheduler with CouchDB

2012-07-26 Thread David Marko
Hot to activate SQLite WAL when using DAL? Dne čtvrtek, 26. července 2012 10:04:23 UTC+2 Niphlod napsal(a): Couchdb support is still experimental in web2py. If auth is not working you'd likely to wait (or help Massimo with) a better implementation of the DAL. If you need ultra-fast tasks

[web2py] Replacing session.var with another value

2012-07-26 Thread adohertyd
Hope you guys can give me a hand here. I have two central functions in my controller: index() and resultsDisplay() In index() the user enters a string into a form and it is assigned to session.var.a session.var.a is passed to resultsDisplay() and it is processed. In the resultsDisplay() view,

[web2py] Re: Error using Scheduler with CouchDB

2012-07-26 Thread Niphlod
Hot to activate SQLite WAL when using DAL? you need to have a sqlite3 (or pysqlite2) linked to a sqlite version = 3.7.0. There are two version number: the module itself and the linked static library (.so on unix and .dll on Windows) import sqlite3 #or from pysqlite2 import dbapi2 as

Re: [web2py] User accessed site without logging in

2012-07-26 Thread Massimo Di Pierro
Added validation for request.client in trunk On Wednesday, 25 July 2012 16:29:45 UTC-5, Massimo Di Pierro wrote: Hello Neil, thank you for this thread and for how you handled the issue. This was a tricky one to debug and a very important issue for the community. We can all rejoice this is

[web2py] Re: Replacing session.var with another value

2012-07-26 Thread Anthony
It will probably be easier if you do it all in one function, and in the view, conditionally show results if there are any. Anthony On Thursday, July 26, 2012 8:43:33 AM UTC-4, adohertyd wrote: Hope you guys can give me a hand here. I have two central functions in my controller: index() and

Re: [web2py] is there any trick in this PaaS hosting?

2012-07-26 Thread Tito Garrido
Seems good... Did you manage to install web2py there? On Thu, Jul 26, 2012 at 5:52 AM, José Luis Redrejo Rodríguez jredr...@debian.org wrote: https://console.appfog.com/pricing Free up to 2 Gb RAM , it costs more than 50$ per month in most providers ... I'm still looking for the trick,

Re: [web2py] Replacing session.var with another value

2012-07-26 Thread Johann Spies
On 26 July 2012 14:43, adohertyd adoher...@hotmail.com wrote: . A great example of this is Google. If you type a query in the main bar it gives you results. You notice that you've spelt the query incorrectly. Google offers a suggestion, or the user has the option of re-typing the query in the

[web2py] Re: Replacing session.var with another value

2012-07-26 Thread adohertyd
My problem is I don't know how to put it all in one function. Would be be able to give me some pointers please? Would really appreciate it. On Thursday, 26 July 2012 14:29:00 UTC+1, Anthony wrote: It will probably be easier if you do it all in one function, and in the view, conditionally

Re: [web2py] Replacing session.var with another value

2012-07-26 Thread adohertyd
It's not the auto complete function that I'm looking for. I just want the form to be populated with the original search term, and to be able to submit a new search term from the results page On Thursday, 26 July 2012 14:34:05 UTC+1, Johann Spies wrote: On 26 July 2012 14:43, adohertyd wrote:

Re: [web2py] markmin embed:http://... not work trunk version

2012-07-26 Thread Jose
El jueves, 26 de julio de 2012 02:04:21 UTC-3, dbdeveloper escribió: Hi, Jose! try 'iframe' instead of 'embed': iframe:http://www.youtube.com/embed/x1w8hKTJ2Co Ok Vladyslav, but I think the same as Massimo, this breaks backwards compatibility. Jose --

[web2py] Re: Puzzle: reference table not working?

2012-07-26 Thread Anthony
db.define_table('person', Field('name','string',length=255,requires=IS_NOT_EMPTY()), Field('location_id','reference location',default=location.id), ) There is no location object defined anywhere, so location.id raises an exception. Perhaps you meant db.location.id, but that

[web2py] Re: Replacing session.var with another value

2012-07-26 Thread Cliff Kachinske
The dot notation for session.vars.a is not going to work. It's true that session is a Python object and you can assign attributes to it, but vars is not a Python object. Thus you cannot assign attributes to it. For this case, it would be simpler to just use something like

[web2py] Re: Complex query with left outer join

2012-07-26 Thread jw
Ok guys... I did step for step and now the query works for the stage (progress). The second thing (stage is multiplicator for time) I have no glue how to move on. cards2learn = db((db.groupCards.card_id == db.card.id) \ (db.groupCards.studyGroup_id == auth.user.studyGroup_id) \

[web2py] Re: table auth_user already exists

2012-07-26 Thread Chris
I've found what seems a simple way to let multiple apps share a DB and create the same table definitions without conflict. Chris, you may find this useful and also I'd love to hear from the true experts if there are problems with this approach. (It works for me but maybe there are other

[web2py] Re: Replacing session.var with another value

2012-07-26 Thread adohertyd
Cliff you are correct that was a typo in my original question. If you look at my code you can see that I am using session.variable_name in all other cases. This is how I want to do it. But my original question still remains. On Thursday, 26 July 2012 16:15:56 UTC+1, Cliff Kachinske wrote: The

Re: [web2py] Re: Complex query with left outer join

2012-07-26 Thread vinicius...@gmail.com
Some suggestions, but I've not tested any of them: 1) Use timedelta(days=int(db.userCard.stage)) to convert your Field to int. 2) Split your query in 2 parts. The 2nd should use find() or exclude(). 3) Use db.executesql() to insert your SQL statement. -- Vinicius Assef On 07/26/2012 12:23

[web2py] mysql migration 5.0 to 5.5 - migrate=False, getting auth_users already exists

2012-07-26 Thread wdtatenh
I had to migrate to mysql 5.5. for another application I have. I did not attempt to migrate things through that administrative interface. Just did a RESTORE from a mysql dump to file. I have migrate=False in the DAL() statement. Am I missing something here? Appreciate any input on

[web2py] Re: Complex query with left outer join

2012-07-26 Thread Niphlod
Currently you'd have to code a view in the database (or simply a string condition to pass on) to achieve that. date.today() - timedelta(something) is a python fixed value that doesn't get re-evaluated at runtime by the database substituting the something for each value of every row. If you

Re: [web2py] Re: Complex query with left outer join

2012-07-26 Thread jw
On Thursday, July 26, 2012 5:41:40 PM UTC+2, viniciusban wrote: Some suggestions, but I've not tested any of them: 1) Use timedelta(days=int(db.userCard.stage)) to convert your Field to int. The typecast brings the following exception: type 'exceptions.TypeError' int() argument must be

[web2py] Re: table auth_user already exists

2012-07-26 Thread Niphlod
all of this instead of migrate=False where you know a table already exist ? On Thursday, July 26, 2012 5:23:50 PM UTC+2, Chris wrote: I've found what seems a simple way to let multiple apps share a DB and create the same table definitions without conflict. Chris, you may find this

Re: [web2py] Re: Complex query with left outer join

2012-07-26 Thread vinicius...@gmail.com
I think you're right, @Niphlod. I didn't note this. @jw, tell us how you solved it, ok? -- Vinicius Assef On 07/26/2012 12:52 PM, Niphlod wrote: Currently you'd have to code a view in the database (or simply a string condition to pass on) to achieve that. date.today() -

[web2py] Re: mysql migration 5.0 to 5.5 - migrate=False, getting auth_users already exists

2012-07-26 Thread Niphlod
yep. migrate=False in DAL set migrate=False for table definitions. the auth.define_table() needs to be set to migrate=False explicitely. On Thursday, July 26, 2012 5:48:23 PM UTC+2, wdtatenh wrote: I had to migrate to mysql 5.5. for another application I have. I did not attempt to migrate

[web2py] unordered list in markmin and no bullets

2012-07-26 Thread Martin Weissenboeck
I have tried the buletted list (unorder list) of markmin: - one - two - three These lines look like one two three without any bullets. The reason seems to be the line ul { list-style-type: none; margin: 0px; padding: 0px; } in the file web2py.css. I have deleted this line and now the

[web2py] Re: Complex query with left outer join

2012-07-26 Thread jw
cards2learn.exclude(lambda row: row.userCard.lastTimeLearned date.today() - timedelta(days=row.userCard.stage)) Niphlod, you made my day!! Thank you so much! And thank you all for the advices! On Thursday, July 26, 2012 5:52:29 PM UTC+2, Niphlod wrote: Currently you'd have to code a

[web2py] Re: Left outer join in a compex select

2012-07-26 Thread jw
Thank you Massimo. The second problem is solved by Niphlod: https://groups.google.com/d/msg/web2py/zryvpiFwWgI/RvmphEN7VzAJ On Wednesday, July 25, 2012 3:43:01 PM UTC+2, jw wrote: Hi! I'm trying to develop a E-Learning-System. The idea is to give the student a bunch of cards to learn every

[web2py] Re: mysql migration 5.0 to 5.5 - migrate=False, getting auth_users already exists

2012-07-26 Thread wdtatenh
Thanks so much. On Thursday, July 26, 2012 11:59:24 AM UTC-4, Niphlod wrote: yep. migrate=False in DAL set migrate=False for table definitions. the auth.define_table() needs to be set to migrate=False explicitely. On Thursday, July 26, 2012 5:48:23 PM UTC+2, wdtatenh wrote: I had to

[web2py] web2py windows build broken in nightly

2012-07-26 Thread Nomad
error on start up C:\web2py\web2pyweb2py.exe Traceback (most recent call last): File web2py.py, line 16, in module zipimport.ZipImportError: can't find module 'gluon' the source check out seems to be ok (?) --

Re: [web2py] web2py windows build broken in nightly

2012-07-26 Thread Marin Pranjić
When did you download nightly build? Can you please try again, it was fixed 6 hours ago. Marin On Jul 26, 2012 7:14 PM, Nomad hilleratw...@gmail.com wrote: error on start up C:\web2py\web2pyweb2py.exe Traceback (most recent call last): File web2py.py, line 16, in module

[web2py] Re: digital data store

2012-07-26 Thread Derek
I like the work these guys do. http://www.scorpiondesign.com/ On Wednesday, July 25, 2012 11:05:49 PM UTC-7, Richard Penman wrote: Hello, I made this web2py app for selling digital data via PayPal: http://sitescraper.net/data Would appreciate feedback. If you are interested it is

Re: [web2py] BR()

2012-07-26 Thread Derek
Massimo, that doesn't work, as we already explained. Traceback (most recent call last): File C:\Temp\web2py\gluon\restricted.py, line 205, in restricted exec ccode in environment File C:\Temp\web2py\applications\customers2\views\default/index.html, line 88, in module TypeError:

Re: [web2py] BR()

2012-07-26 Thread Jonathan Lundell
On 26 Jul 2012, at 11:22 AM, Derek wrote: Massimo, that doesn't work, as we already explained. It's new in the trunk. Traceback (most recent call last): File C:\Temp\web2py\gluon\restricted.py, line 205, in restricted exec ccode in environment File

Re: [web2py] BR()

2012-07-26 Thread Derek
Ah, cool. I was going to modify the div class to support that, but it looks like now that would be a waste of time. On Thursday, July 26, 2012 11:24:24 AM UTC-7, Jonathan Lundell wrote: On 26 Jul 2012, at 11:22 AM, Derek wrote: Massimo, that doesn't work, as we already explained. It's

Re: [web2py] web2py windows build broken in nightly

2012-07-26 Thread Nomad
I downloaded it about 4 hours ago.. 11:00am CST. ill try it again shortly. On Thursday, July 26, 2012 12:23:43 PM UTC-5, Marin Pranjić wrote: When did you download nightly build? Can you please try again, it was fixed 6 hours ago. Marin On Jul 26, 2012 7:14 PM, Nomad wrote: error on

[web2py] Re: Complex query with left outer join

2012-07-26 Thread Niphlod
no probl. To elaborate this further for others having the same issue People (programmers, often) tend to forget that db engines are programs. They have their own algorithms too (and they take time). It's true that they have pretty rock-solid algos and do their work very fast, but having

Re: [web2py] web2py windows build broken in nightly

2012-07-26 Thread Nomad
working now. thanks again On Thursday, July 26, 2012 1:53:30 PM UTC-5, Nomad wrote: I downloaded it about 4 hours ago.. 11:00am CST. ill try it again shortly. On Thursday, July 26, 2012 12:23:43 PM UTC-5, Marin Pranjić wrote: When did you download nightly build? Can you please try again, it

[web2py] installing mssql drivers

2012-07-26 Thread jcrowe
Are there any docs on how to install pyodbc to work with web2py. I have it installed in my windows python installation, but that doesn't seem to work with web2py. Any pointers would be greatly appreciated. :) --

Re: [web2py] BR()

2012-07-26 Thread Massimo Di Pierro
We can also implement BR()+BR(). how about DIV(...)-BR()? What do you think it should do? --

Re: [web2py] BR()

2012-07-26 Thread Anthony
I'd really like to see DIV() % BR(). ;-) On Thursday, July 26, 2012 3:43:35 PM UTC-4, Massimo Di Pierro wrote: We can also implement BR()+BR(). how about DIV(...)-BR()? What do you think it should do? --

[web2py] Re: bootstrap and user panel

2012-07-26 Thread Nomad
On Monday, July 23, 2012 7:02:47 PM UTC-5, Martin.Mulone wrote: I want to share this two applications* Bootstrap welcome application* I made my own welcome scatfold app, using twitter bootstrap template. My version is more like from the example template. Download:

Re: [web2py] web2py windows build broken in nightly

2012-07-26 Thread Massimo Di Pierro
Many thanks to niphlod and marin for their help with windows. Anyway please test it since we switched from 2.5 to 2.7 --

[web2py] Re: bootstrap and user panel

2012-07-26 Thread Nomad
I am trying this with the nightly build (since it didnt work in stable) and get the following exception Is this just related to the windows build ? please advise. web2py™(2, 0, 0, datetime.datetime(2012, 7, 26, 13, 52, 14), 'dev')PythonPython 2.7: C:\web2py\web2pynew\web2py\web2py.exeTRACEBACK

[web2py] Re: bootstrap and user panel

2012-07-26 Thread Nomad
On Monday, July 23, 2012 7:02:47 PM UTC-5, Martin.Mulone wrote: I want to share this two applications* Bootstrap welcome application* I made my own welcome scatfold app, using twitter bootstrap template. My version is more like from the example template. Download:

Re: [web2py] Re: bootstrap and user panel

2012-07-26 Thread Martín Mulone
It's a bug I think, but it's related to windows perhaps. have to be: from gluon.sqlhtml import SQLFORM the strange that this is working in linux: from sqlhtml import SQLFORM fixed in trunk. 2012/7/26 Nomad hilleratw...@gmail.com On Monday, July 23, 2012 7:02:47 PM UTC-5, Martin.Mulone

[web2py] Changing a function variable from a view

2012-07-26 Thread adohertyd
I posted a related question earlier but given the response I don't think my question was clear. My index page contains a form and the index() function assigns the user input in this form to a variable: session.userQuery session.userquery is then processed in resultsDisplay() and sent to a

Re: [web2py] BR()

2012-07-26 Thread Derek
Well, since BR is a subclass of DIV, and DIV overrides the __add__ as %s%s self, other - it should work without modification, no? On Thursday, July 26, 2012 12:43:35 PM UTC-7, Massimo Di Pierro wrote: We can also implement BR()+BR(). how about DIV(...)-BR()? What do you think it should do?

Re: [web2py] BR()

2012-07-26 Thread Derek
ah, nevermind. yes, please implement it. On Thursday, July 26, 2012 1:22:46 PM UTC-7, Derek wrote: Well, since BR is a subclass of DIV, and DIV overrides the __add__ as %s%s self, other - it should work without modification, no? On Thursday, July 26, 2012 12:43:35 PM UTC-7, Massimo Di

[web2py] Re: installing mssql drivers

2012-07-26 Thread Derek
It should work just fine if you are using the source build. Don't use the win32 version of web2py. On Thursday, July 26, 2012 12:32:37 PM UTC-7, jcrowe wrote: Are there any docs on how to install pyodbc to work with web2py. I have it installed in my windows python installation, but that

[web2py] Referencing user results in syntax-error?

2012-07-26 Thread Alec Taylor
I checked the documentation to make sure, and either one of the commented out lines works, but I keep getting this: class 'sqlite3.OperationalError' near .: syntax errorIt one (well both) of the commented out lines that give this error, because commenting them out makes the error go away.

[web2py] Referencing user results in syntax-error?

2012-07-26 Thread Massimo Di Pierro
Person cannot be not null and default to auth.user_id which likely is null. It also cannot defaul to auth.user. Use the second line and remove notnull --

[web2py] Re: bootstrap and user panel

2012-07-26 Thread Omi Chiba
+1 On Monday, July 23, 2012 7:02:47 PM UTC-5, Martin.Mulone wrote: I want to share this two applications* Bootstrap welcome application* I made my own welcome scatfold app, using twitter bootstrap template. My version is more like from the example template. Download:

[web2py] Re: Changing a function variable from a view

2012-07-26 Thread Anthony
Construct the links so they contain a query string with the new userQuery. In the resultsDisplay function, check for a userQuery in request.vars, and if present, process that value instead of processing session.userQuery. Anthony On Thursday, July 26, 2012 4:21:22 PM UTC-4, adohertyd wrote:

Re: [web2py] prettydate question

2012-07-26 Thread Vladyslav Kozlovskyy
25.07.12 16:52, ctrlSoft написав(ла): browser is set up to english, but in model i do T.force('ro'). without forced translation result is the same -- please do these steps and post the result here: 1. add test() function into applicatons/welcome/controllers/default.py: def test(): import

[web2py] Re: Changing a function variable from a view

2012-07-26 Thread adohertyd
How do I assign the query value to the request.vars? I'm ok with checking for it in the function, but how do I pass the request.vars to the function first?? On Thursday, 26 July 2012 22:31:54 UTC+1, Anthony wrote: Construct the links so they contain a query string with the new userQuery. In

Re: [web2py] markmin embed:http://... not work trunk version

2012-07-26 Thread Vladyslav Kozlovskyy
well, give me an example of correct iframe and embed output and I'll change markmin. ok? Vladyslav Kozlovskyy (Ukraine) 26.07.12 16:40, Jose ???(??): El jueves, 26 de julio de 2012 02:04:21 UTC-3, dbdeveloper escribió: Hi, Jose! try 'iframe' instead of 'embed':

[web2py] Re: Changing a function variable from a view

2012-07-26 Thread Anthony
When you build the links, do something like: {{for suggestion in suggestions:}} {{=LI(A(suggestion, _href=URL('default', 'resultsDisplay', vars=dict(userQuery=suggestion}} {{pass}} That will give you URLs like /yourapp/default/resultsDisplay?userQuery=suggestion. The suggestion will then

[web2py] Re: Changing a function variable from a view

2012-07-26 Thread adohertyd
Thank you very much Anthony that's a great help. Do you know where in the manual/other documentation this kind of thing is? I couldn't find it anywhere. All I could find on the net was jQuery and ajax stuff On Thursday, 26 July 2012 23:11:16 UTC+1, Anthony wrote: When you build the links, do

[web2py] import_from_csv_file with validation

2012-07-26 Thread Mark Li
Is there something like validate_and_insert() for import_from_csv_file()? I would like to update my database with csv files, but have the form validators fired to ensure that the data inserted is of the correct type. --

Re: [web2py] markmin embed:http://... not work trunk version

2012-07-26 Thread Massimo Di Pierro
Before you change it, let me think about this some more... On Thursday, 26 July 2012 17:03:35 UTC-5, dbdeveloper wrote: well, give me an example of correct iframe and embed output and I'll change markmin. ok? Vladyslav Kozlovskyy (Ukraine) 26.07.12 16:40, Jose написав(ла): El

[web2py] Re: Select Distinct for more than 1 distinct value

2012-07-26 Thread Derek
Usually, when you are asking these kind of questions, you come to realize you are asking the wrong question. On Monday, July 23, 2012 3:15:14 PM UTC-7, Mark Li wrote: I have a database setup with id and 'dogname.' I would like to retrieve distinct values of dogname, but allow for 2 of each

Re: [web2py] Re: JSON output with referencing data

2012-07-26 Thread Jaymin Oh
Thanks, Massimo! On Thu, Jul 26, 2012 at 6:34 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: before you serialize rows in json, you can do: for row in rows: row.tag_names = [db.tag[id].name for is in row.tags] This will be not efficient. depends on how many rows. Perhaps you can

Re: [web2py] Re: JSON output with referencing data

2012-07-26 Thread Michele Comitini
Why not doing a join on team, auth_user and tags with DAL and then put the needed field as arg of the .select() method? The overhead would be minimal. mic 2012/7/27 Jaymin Oh tan...@gmail.com: Thanks, Massimo! On Thu, Jul 26, 2012 at 6:34 PM, Massimo Di Pierro massimo.dipie...@gmail.com

Re: [web2py] Re: JSON output with referencing data

2012-07-26 Thread Jaymin Oh
Oh my... u r right. I just forgot about JOIN. Or... only to retrive tag name when request, is it good idea to store tag.name with tag.id to reduce JOIN overhead? (I ONLY need tag name) On Jul 27, 2012 7:59 AM, Michele Comitini michele.comit...@gmail.com wrote: Why not doing a join on team,

[web2py] web2py on appfog

2012-07-26 Thread Joel Carrier
Has anyone tried running web2py on appfog ( www.appfog.com ) and cares to comment on their experience? --

[web2py] Accessing static file with consecutive hypens in filename.

2012-07-26 Thread Mark Li
I have a static file named person---dog-3.jpg When I try to access the file through http://127.0.0.1:8000/myapp/static/pets/person---dog-3.jpg I get an invalid request error. However, if I rename the file to person-dog-3.jpg, it works fine. I have a very large number of files named this way

Re: [web2py] Accessing static file with consecutive hypens in filename.

2012-07-26 Thread Jonathan Lundell
On 26 Jul 2012, at 8:50 PM, Mark Li markruole...@gmail.com wrote: I have a static file named person---dog-3.jpg When I try to access the file through http://127.0.0.1:8000/myapp/static/pets/person---dog-3.jpg I get an invalid request error. However, if I rename the file to

[web2py] Re: field of type upload exceptions.UnboundLocalError

2012-07-26 Thread Annet
Massimo, elif field.type == 'upload': f = self.vars[fieldname] print f fd = '%s__delete' % fieldname ... newfilename = field.store(source_file, original_filename, field.uploadfolder) When I submit the form with the upload field left empty, nothing is being written to the

Re: [web2py] Re: Visit Plugow on FISL13

2012-07-26 Thread Annet
Hi Vinicius, Thanks for your reply. I hope your presentation went well. Keep in touch. I will, thanks. Annet --