[web2py] Image searching - Redirecting Ajax Results to pass to template ??

2011-11-02 Thread BrendanC
OK - hope I can make this clear - it's more of a 'how to' design question and not really web2py specific. Imagine a view/template with a container/div that displays a (multipage) image gallery - this is the landing page (prepopulated with random images. The page has a Search sidebar to allow

[web2py] A SQLFORM.grid question

2011-11-02 Thread Mike Veltman
I have grid = SQLFORM.grid(query=db.lvstorage.setup_id==usedsetupid,csv=False,details=True,searchable=True) That creates a form with the records with a add button. But when I use add I get the next screen but the record is not added. What do I miss ? Btw is the same setup with a query

Re: [web2py] A SQLFORM.grid question

2011-11-02 Thread Bruno Rocha
are you able to see the form? or are you getting the not authorized message? you can set user_signature=False or ensure that user is logged in. On Wed, Nov 2, 2011 at 6:50 AM, Mike Veltman mike.velt...@gmail.com wrote: I have grid =

Re: [web2py] A SQLFORM.grid question

2011-11-02 Thread Mike Veltman
are you able to see the form? or are you getting the not authorized message? you can set user_signature=False or ensure that user is logged in. Thanks for the reaction. But no the form is generated perfectly. And the user is logged in. On Wed, Nov 2, 2011 at 6:50 AM, Mike Veltman

[web2py] Re: BlockUI with web2py

2011-11-02 Thread brushek
here is controller (sleep is for emulating long lasting action): def akcje(): [...] if request.vars.a == 'restart': form=FORM(TR('Wybierz VPS',SELECT(ipvps,_name='ip', requires=IS_IN_SET(ipvps))), TR('',INPUT(_type='submit'), formstyle='ul'),_id='staty')

[web2py] Re: Confused about hidden fields

2011-11-02 Thread apple
Instead of form.accepts() you can use form.validate() and then do your own update. Then you do not need to pass unnecessary variables to the view and back again. form = SQLFORM(table, id) if form.validate(): form.vars.mysecretvariable=whatever I want if not form.errors:

[web2py] Re: A SQLFORM.grid question

2011-11-02 Thread apple
SQLFORM.grid does not actually add the records automatically. It just calls the grid controller with args action/table. You have to do something like: if request.args(0) in (edit, new): redirect(URL(edit.html, args=[request.args(1), request.args(2)]) On Nov 2, 9:15 am, Mike Veltman

[web2py] Re: How about auth.define_tables(..., format='...')? [SOLVED]

2011-11-02 Thread Ray (a.k.a. Iceberg)
On Nov 1, 7:54 pm, Anthony abasta...@gmail.com wrote: On Tuesday, November 1, 2011 6:20:57 AM UTC-4, Massimo Di Pierro wrote: I am not sure I understand the proposal. You can override the format: db.mytable._format = '%(name)s' db.mytable._format = lambda record: SPAN(record.first_name)

[web2py] Re: lexical scanner

2011-11-02 Thread lucas
oh yeah, that is working awesome. sometimes coding is better then eating. thanx so much limedrop. have a great day. lucas

[web2py] Controller result: assign to Javascript variable

2011-11-02 Thread Vineet
I am trying a custom AJAX like functionality. I know, AJAX function in web2py is there. But i need to populate values of html elements by their IDs. Not just show the result in a 'target' DIV. simplified code follows [Controller] def lod(): do some processing on request.vars.i1

[web2py] AJAX custom code

2011-11-02 Thread Vineet
I am trying a custom AJAX like functionality. I know, AJAX function in web2py is there. But i need to populate the values of html elements by their IDs. Not just show the result in a 'target' DIV. 1) Upon clicking the link, controller action is performed (via a 'onclick' js handler) using value

[web2py] Re: upload

2011-11-02 Thread lucas
ok, thank you for completely clarifying for me. it makes sense and it is a matter or relative perspective. now i am straight. one additional question, the response.download function confuses me still. i get it that it is download to the client computer. what i don't get is its parameters.

[web2py] Re: Passing values to CRUD create from controller

2011-11-02 Thread Philip Kilner
Hi, I've a seemingly workable solution for this, but it's hardly elegant. In my model, for the property_id field I have: - ,default=session.last_parent_id ,writable=False ,readable=True ...and in my controller: - @auth.requires_login() def property_detail_insert():

[web2py] [Web2py] Stop the processing of the models midway

2011-11-02 Thread anubhav aggarwal
Hi, I am a developer for Sahana Eden . I am facing the following problem :- A variable is defined in the second file of the models of the web2py-application ( there are more than 40 files in the models folder). Depending on the value of that variable I wanted to stop the further execution of

Re: [web2py] Re: SSL Error

2011-11-02 Thread António Ramos
Context: Windows Did not tried yet using the source code but using 1.98 i get the same errors but the server never crashes... 2011/10/27 Ross Peoples ross.peop...@gmail.com I don't think so. I access my dev machine using the IP all the time. Can you try using the source code version instead of

[web2py] Problem while Importing a csv file into the database

2011-11-02 Thread Saurabh S
Hi , Step1: Created table headers(cloumns) in the excel file EXACTLY SIMILAR TO THOSE which are present in the database

[web2py] web2py.com down?

2011-11-02 Thread Michal Jursa
Hi, is there some problem with web2py site? I just started new project, returned to web2py and need a book for a while in the re-beginning..:D Michal

[web2py] Problem while Importing a csv file into the database

2011-11-02 Thread Saurabh S
Hi, I am facing the problem while importing csv file. Please find the steps below that i am following. Step1: Created table headers(cloumns) in the excel file EXACTLY SIMILAR to those which are present in the database table Step2: Inserted some dummy data as rows in the columns. All the

[web2py] Windows7 python2.7 SQLite web2py

2011-11-02 Thread JmiXIII
Hello, I'm facing a pb with windows 7/SQLite (current)/python2.7 I'm working on local and just lunch web2py.py with python2.7 nearly 50% of my request have the folloowing issue : Traceback (most recent call last): File C:\Users\user11\Desktop\web2py\gluon\restricted.py, line 194, in

[web2py] Re: Windows7 python2.7 SQLite web2py

2011-11-02 Thread Anthony
Looks like you've got your own Python installation and are running from source. In that case, do you have http://sourceforge.net/projects/pywin32/ installed? Anthony On Wednesday, November 2, 2011 7:38:11 AM UTC-4, JmiXIII wrote: Hello, I'm facing a pb with windows 7/SQLite

[web2py] Re: web2py.com down?

2011-11-02 Thread Anthony
Yes, looks like it's down: http://www.downforeveryoneorjustme.com/web2py.com

[web2py] Re: Passing values to CRUD create from controller

2011-11-02 Thread Anthony
On Wednesday, November 2, 2011 6:55:41 AM UTC-4, glimmung wrote: Hi, I've a seemingly workable solution for this, but it's hardly elegant. In my model, for the property_id field I have: - ,default=session.last_parent_id ,writable=False ,readable=True ...and in my

Re: [web2py] Re: web2py.com down?

2011-11-02 Thread Michal Jursa
Website is back and running... YIPIIIEE Michal On 11/02/2011 01:01 PM, Anthony wrote: Yes, looks like it's down: http://www.downforeveryoneorjustme.com/web2py.com

[web2py] Re: list of usernames

2011-11-02 Thread Archibald Linx
Dear Anthony, I know, you explained me they were supposed to be identical. In both cases, I can fill in the form the same way, but when you submit the form and that a row in the database is added, the title column is filled in, but not the tosomeone column. Archibald On 2 nov, 03:39, Anthony

Re: [web2py] Re: Passing values to CRUD create from controller

2011-11-02 Thread Philip Kilner
Hi Anthony, On 02/11/2011 12:06, Anthony wrote: Does the parent_id have to persist across multiple requests? If so, then storing in session is probably the way to go. If you don't want to have the value appear in the form, you could either use an onvalidation function to populate the value

[web2py] Re: upload

2011-11-02 Thread Anthony
On Wednesday, November 2, 2011 6:20:55 AM UTC-4, lucas wrote: one additional question, the response.download function confuses me still. i get it that it is download to the client computer. what i don't get is its parameters. response.download(request, db) i get that it pulls the

[web2py] Re: Windows7 python2.7 SQLite web2py

2011-11-02 Thread JmiXIII
Yep I have my own python installation and are running from source Not I do not have pywin32 installed But I do not remember to have it installed on my previous computer. Anyway I'll try it thanks

[web2py] Re: AJAX custom code

2011-11-02 Thread Anthony
On Wednesday, November 2, 2011 6:14:04 AM UTC-4, Vineet wrote: script function populate(){ var empid = {{URL(('lod'))}}; That's not how Ajax works -- you don't just assign a URL to a variable. Instead, you have to explicitly make an Ajax call. If the web2py ajax() function isn't

[web2py] Re: Windows7 python2.7 SQLite web2py

2011-11-02 Thread JmiXIII
Hello, I have installed pywin32 ofr python27 Seems to work a little better but if I stress my computer on a web page (form for example), I still have the pb. JmiXIII

[web2py] Re: [Web2py] Stop the processing of the models midway

2011-11-02 Thread villas
You may also wish to consider using sub-folders for models. all files in models/a/ are executed only for actions in controllers/a.py all files in models/a/b/ are executed only for actions b() in controllers/a.py this is for every a and b.

[web2py] Re: Confused about hidden fields

2011-11-02 Thread DenesL
On Nov 1, 11:11 pm, Omi Chiba ochib...@gmail.com wrote: Thank you for understanding me :) I tried but this code will set the default value if the field exist on the view. I made a simple example. I don't want to show field2 so it's excluded in view using custom form but want to store the

[web2py] SQLFORM.grid columnas a mostrar

2011-11-02 Thread mmartinez
Hello list. My question is this, I have a join in my query to the database, you need to show the columns belonging to tables and routes accountcode, here is my code: left =

[web2py] Suggested improvements to populate()

2011-11-02 Thread ~redShadow~
I needed to customize the behavior of gluon.contrib.populate.populate(), so I created by version by adding ``values=None`` argument, and this code after the ``elif field.type == 'id': continue``: elif values is not None and values.has_key(fieldname): if callable(values[fieldname]):

[web2py] Choose nothing in a drop-down menu

2011-11-02 Thread Bianca Cadaveri
Hello, I would like my users to be able to choose nothing, if they want to, in a drop-down menu. The drop-down menu is generated using SQLFORM. By default the validator does not accept that my users choose nothing. How to change that ? Thank you very much, Bianca

Re: [web2py] Re: Confused about hidden fields

2011-11-02 Thread Philip Kilner
Hi, On 02/11/2011 13:59, DenesL wrote: form.vars.field2 = 'BBB' This should work to pre-populate the value of field2 with 'BBB' but it seems to be broken in 1.99.2 I'm so glad you said that - this was one of the things I tried in troubleshooting my Passing values to CRUD create from

[web2py] Re: Choose nothing in a drop-down menu

2011-11-02 Thread Anthony
You can try IS_EMPTY_OR(IS_IN_DB(...)) (also works with IS_IN_SET). You might also want to specify a 'zero' option. See http://web2py.com/book/default/chapter/07#Validators. On Wednesday, November 2, 2011 10:35:26 AM UTC-4, Bianca Cadaveri wrote: Hello, I would like my users to be able to

[web2py] Re: AJAX custom code

2011-11-02 Thread Vineet
thanks for replying. I tried this-- [Controller] def lod(): x = 'This is a val' return $('#i2').val(x); [/Controller] [View] {{extend 'layout.html'}} input type='text' value='type a value' id='i1' name='i1' / a href='#' onclick=ajax({{=URL('lod')}}, ['i1'], ':eval'); Load result via AJAX

[web2py] problems after changeset # ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch

2011-11-02 Thread Carlos
Hi, I'm using web2py latest trunk on win7. As soon as I applied the following changeset: ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch I got errors both in shell and web requests ... auth.settings.hmac_key = 'sha512:5fd2a4d2-d703-476c-8184-800b84e453b8'

[web2py] Re: AJAX custom code

2011-11-02 Thread Anthony
On Wednesday, November 2, 2011 10:49:04 AM UTC-4, Vineet wrote: thanks for replying. I tried this-- [Controller] def lod(): x = 'This is a val' return $('#i2').val(x); Note, the returned value is simply a string from the perspective of the lod() function, so 'x' in that

[web2py] Re: AJAX custom code

2011-11-02 Thread Vineet
You are right. To clear any ambiguity, I did this -- return $('#i2').val('Vineet'); But still, no success. Any other hint? ---Vineet On Nov 2, 8:15 pm, Anthony abasta...@gmail.com wrote: On Wednesday, November 2, 2011 10:49:04 AM UTC-4, Vineet wrote: thanks for replying. I tried this--

[web2py] interget or string to date

2011-11-02 Thread Omi Chiba
This is more like python question but jj.J2NSD is integer and has value = 2030 (MMDD) I want to set the value as default value of FFNSD which is 'date' type. Field('FFNSD', 'date'), I think I need to import datetime and convert from integer or stiring. Is anyone know easy way to do it

[web2py] Re: problems after changeset # ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch

2011-11-02 Thread Anthony
How are you making use of None values in Storage keys? On Wednesday, November 2, 2011 10:59:01 AM UTC-4, Carlos wrote: Hi, I'm using web2py latest trunk on win7. As soon as I applied the following changeset: ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch I

[web2py] Re: interget or string to date

2011-11-02 Thread Vineet
Recently, I wrote this function for my purpose. See if this helps you. Assuming that argument 'dte' input format is -- 03-11-2011 [CODE] import datetime, string def str_to_dt(dte): dte = str(dte) dte = string.strip(dte) if len(dte) == 10: y = int(dte[6:]) m =

Re: [web2py] problems after changeset # ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch

2011-11-02 Thread Jonathan Lundell
On Nov 2, 2011, at 7:59 AM, Carlos wrote: I'm using web2py latest trunk on win7. As soon as I applied the following changeset: ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch I got errors both in shell and web requests ... auth.settings.hmac_key =

Re: [web2py] Re: [Web2py] Stop the processing of the models midway

2011-11-02 Thread anubhav aggarwal
Thanks for the reply You may also wish to consider using sub-folders for models. all files in models/a/ are executed only for actions in controllers/a.py Actually we wanted to execute most of the models for all the controllers except this particular controller which needs only 2 files of

[web2py] Hardware Requirements for Deployment

2011-11-02 Thread Harshad
I've been asked by my colleagues to enumerate all hardware requirements for deploying a server running web2py. My question is, how do I even begin to calculate the requirements for the architecture, storage space, memory, etc.? For architecture, am I basically stuck with x86? For storage, is

Re: [web2py] Re: problems after changeset # ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch

2011-11-02 Thread Jonathan Lundell
On Nov 2, 2011, at 8:20 AM, Anthony wrote: How are you making use of None values in Storage keys? I meant to ask the same thing, actually. I *do* think it's a useful behavior of Python dicts that one can store None as a dictionary value. I struggle sometimes with Objective-C, in which you

[web2py] Re: Windows7 python2.7 SQLite web2py

2011-11-02 Thread JmiXIII
Hello, I confirm that pywin32 doesn't help in this issue. I've searched on the web but did not find any peaple facing this pb with sqlite and windows7. Yet I nearly bet that if i use win xp evferything is all right and i cannot figure nobody has already faced this pb ... sic JmiXIII

Re: [web2py] Re: problems after changeset # ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch

2011-11-02 Thread Jonathan Lundell
On Nov 2, 2011, at 8:20 AM, Anthony wrote: How are you making use of None values in Storage keys? It turns out that Settings depends on that behavior (note its last line). Auth.__init__ sets auth.settings.hmac_key to None by default, and then sets lock_keys. The presence of the None value (or

Re: [web2py] problems after changeset # ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch

2011-11-02 Thread Carlos
Hi, I'm using Storage objects throughout my code, and compare vs None values to perform certain specific actions. Thanks!, Carlos

[web2py] Re: Windows7 python2.7 SQLite web2py

2011-11-02 Thread Anthony
I'm on Windows 7 with Python 2.7 32-bit and have never had this problem. On Wednesday, November 2, 2011 11:35:43 AM UTC-4, JmiXIII wrote: Hello, I confirm that pywin32 doesn't help in this issue. I've searched on the web but did not find any peaple facing this pb with sqlite and windows7.

[web2py] Re: Serving dynamic HTML files

2011-11-02 Thread John Duddy
These files can appear ANYWHERE on the file system. I do not know in advance, as the user can add directories for the input (and output) data at runtime via configuration. So, I need a fully dynamic solution that I can tweak programmatically at runtime. Your solution (creating links under a path

Re: [web2py] problems after changeset # ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch

2011-11-02 Thread Anthony
On Wednesday, November 2, 2011 11:46:49 AM UTC-4, Carlos wrote: Hi, I'm using Storage objects throughout my code, and compare vs None values to perform certain specific actions. In your code, can you use the attribute access method, which will return None when the attribute doesn't exist:

[web2py] Re: Choose nothing in a drop-down menu

2011-11-02 Thread Bianca Cadaveri
Thank you very much ! Could I also ask if it is possible to forbid one specific value for a field ? BC On 2 nov, 15:45, Anthony abasta...@gmail.com wrote: You can try IS_EMPTY_OR(IS_IN_DB(...)) (also works with IS_IN_SET). You might also want to specify a 'zero' option.

[web2py] Re: Windows7 python2.7 SQLite web2py

2011-11-02 Thread Paolo Caruccio
I also have no problem. Windows 7 64bit Python 2.7 32 bit (64-bit version gave me problems) Pywin 32-bit Paolo

[web2py] ID Encoding oddity

2011-11-02 Thread Philip Kilner
Hi, Where I have a next in CRUD create/update, rather than the [id] substring being replaced by the ID of the created/updated record, I'm seeing %5Bid%5D. My first question is why?, and that leads me to ask how I can refer to the ID if I use the URL helper here rather than a simple string?

Re: [web2py] problems after changeset # ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch

2011-11-02 Thread Carlos
Hi Anthony, One example is to pass an Storage object to form.accepts, containing None values. Carlos

Re: [web2py] problems after changeset # ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch

2011-11-02 Thread Jonathan Lundell
On Nov 2, 2011, at 9:09 AM, Carlos wrote: One example is to pass an Storage object to form.accepts, containing None values. It's a closed issue anyway, since Settings (and who knows what else) depends on it. I'm sure it's too late now, for compatibility reasons, but I think that deletes

Re: [web2py] Re: Choose nothing in a drop-down menu

2011-11-02 Thread Richard Vézina
In that case you have to pass a set instead of db to IS_IN_DB look in the book it clear... Richard On Wed, Nov 2, 2011 at 11:55 AM, Bianca Cadaveri biancacadav...@gmail.comwrote: Thank you very much ! Could I also ask if it is possible to forbid one specific value for a field ? BC On

[web2py] Re: Windows7 python2.7 SQLite web2py

2011-11-02 Thread JmiXIII
May I send someone my app to check on a windows7 + python2.7 + sqlite to check if this is an os/computer pb or linked to my app/database ? What i cannot understand is why after 2 or more attemps it suddenly works it really seems a randomly pb

Re: [web2py] Hardware Requirements for Deployment

2011-11-02 Thread Richard Vézina
I think it all depend of your needs (number of user, $$)... A single virtual machine under ubuntu can easily run postgres or mysql, apache and web2py with reasonable performance from 1 up to 50 users that need to acces your app once in a wild... If your audience is bigger then that you will maybe

[web2py] Re: Serving dynamic HTML files

2011-11-02 Thread John Duddy
Certainly there is s simpler way to talk to an already running instance of rocket (mine) and tell it to serve more static files? I could also do it via apache, if I could talk to apache and tell it to serve from locations not listed in its config. I need to do this at runtime, though. On Nov 1,

[web2py] Re: Windows7 python2.7 SQLite web2py

2011-11-02 Thread Paolo Caruccio
Can you provide a packed .w2p web2py application? Paolo

[web2py] Re: Windows7 python2.7 SQLite web2py

2011-11-02 Thread Anthony
I'll give it a try. On Wednesday, November 2, 2011 12:18:54 PM UTC-4, JmiXIII wrote: May I send someone my app to check on a windows7 + python2.7 + sqlite to check if this is an os/computer pb or linked to my app/database ? What i cannot understand is why after 2 or more attemps it suddenly

[web2py] Re: Serving dynamic HTML files

2011-11-02 Thread Anthony
Well, there's always this option: https://groups.google.com/d/msg/web2py/_GohKTJhn5c/KkeQzH1xRf0J On Wednesday, November 2, 2011 11:53:05 AM UTC-4, John Duddy wrote: These files can appear ANYWHERE on the file system. I do not know in advance, as the user can add directories for the input

Re: [web2py] problems after changeset # ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch

2011-11-02 Thread Anthony
On Wednesday, November 2, 2011 12:09:12 PM UTC-4, Carlos wrote: Hi Anthony, One example is to pass an Storage object to form.accepts, containing None values. I see -- so the keys have to actually exist.

[web2py] Re: AJAX custom code

2011-11-02 Thread Anthony
Can you use the browser developer tools to confirm that the ajax request is going out properly, and that the proper value is returned? On Wednesday, November 2, 2011 11:19:09 AM UTC-4, Vineet wrote: You are right. To clear any ambiguity, I did this -- return $('#i2').val('Vineet'); But

Re: [web2py] Re: Serving dynamic HTML files

2011-11-02 Thread ~redShadow~
On Wed, 2011-11-02 at 09:25 -0700, John Duddy wrote: Certainly there is s simpler way to talk to an already running instance of rocket (mine) and tell it to serve more static files? I could also do it via apache, if I could talk to apache and tell it to serve from locations not listed in its

Re: [web2py] problems after changeset # ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch

2011-11-02 Thread Carlos
Hi Jonathan, I completely agree about deletes to be explicit in all cases. In fact, Storage.__setattr__ should be changed to not auto-delete on None value, but I guess it's not possible for compatibility reasons?. Thanks again, Carlos

Re: [web2py] problems after changeset # ce20196cd7b895029ed667ecff505987ee83d727 - (ce20196cd7b8) storage patch

2011-11-02 Thread Jonathan Lundell
On Nov 2, 2011, at 10:06 AM, Carlos wrote: I completely agree about deletes to be explicit in all cases. In fact, Storage.__setattr__ should be changed to not auto-delete on None value, but I guess it's not possible for compatibility reasons?. That's my assumption, yes.

[web2py] Re: AJAX custom code

2011-11-02 Thread Vineet
Yes. I used Opera Dragonfly IE Developer Tools. It doesn't show any js error. After clicking the link also, no error. How Where do I check the sent returned values? (in the developer tools or in Dragonfly) Thanks, Vineet On Nov 2, 9:45 pm, Anthony abasta...@gmail.com wrote: Can you use the

Re: [web2py] Re: [Web2py] Stop the processing of the models midway

2011-11-02 Thread pbreit
The only other thing I can think of is putting that code in a module. http://web2py.com/book/default/chapter/04?search=module#Accessing-the-API-from-Python-modules But is there a specific reason you want to suppress model execution? Are you running into any sort of problem?

[web2py] Re: AJAX custom code

2011-11-02 Thread Anthony
On Wednesday, November 2, 2011 1:13:46 PM UTC-4, Vineet wrote: Yes. I used Opera Dragonfly IE Developer Tools. It doesn't show any js error. After clicking the link also, no error. How Where do I check the sent returned values? (in the developer tools or in Dragonfly) In IE,

[web2py] Fixing request.cid goes AWOL in LOAD with file upload fix from Slice # 113

2011-11-02 Thread Philip Kilner
Hi, Just fixed an irksome problem and wanted to share! I have a component, called with load. In the component is a view of a record with an edit button, linkified using web2py's Ajax trap: - {{=A(XML('button type=buttonEdit Landlord Registration/button'), _href=URL(r=request,

Re: [web2py] Re: Confused about hidden fields

2011-11-02 Thread JmiXIII
Hello, For hidden field I usually used p style=display : None{{=form.custom.widget}}/p But you can still access the value from code so it depends your needs. JmiXIII

[web2py] Re: AJAX custom code

2011-11-02 Thread Vineet
I did check the network tab in Opera Dragonfly. Upon clicking the ajax link, there is no network activity. Nothing is sent or fetched. In Network tab = url, if I put manually '/appname/ controllername/' and click on Send Request, In response, 'Failed to load URL'. The URL helper, ajax function

[web2py] Re: Serving dynamic HTML files

2011-11-02 Thread John Duddy
That's cool - I'll definitely consider it. Thanks! On Nov 2, 10:03 am, ~redShadow~ redsha...@hackzine.org wrote: On Wed, 2011-11-02 at 09:25 -0700, John Duddy wrote: Certainly there is s simpler way to talk to an already running instance of rocket (mine) and tell it to serve more static

[web2py] How to use this specific widget with a simple FORM ?

2011-11-02 Thread Dominique
Hello, I 'd like to use this great widget (slice 85 http://www.web2pyslices.com/slices/take_slice/85) with a simple form FORM helper. It works great with a SQLFORM but I need to use it (slightly modified) in a FORM. I saw that for this slice (http://www.web2pyslices.com/main/slices/

[web2py] ajax redirect after @auth.requires_login() failed

2011-11-02 Thread haggis
Hello, is it possible to return json to the calling jQuery.ajax() function after access was denied by decorator @auth.requires_login()? I know there is a possibility to specify a function when authorization/ authentication failed with auth.settings.on_failed_authentication = myFunc and

[web2py] Create different edit link for grid

2011-11-02 Thread Omi Chiba
I was reading the previous post https://groups.google.com/group/web2py/browse_thread/thread/51eed6556ba1b61f/a1f4395b7530192a?lnk=gstq=grid+edit#a1f4395b7530192a but I cannot figure out how to do it with my grid. In args, I want to pass the value of the field called db.PDTFF.FFDNO. How can I do

[web2py] Re: Confused about hidden fields

2011-11-02 Thread Omi Chiba
Thanks everyone. I'm easy person so I use the CSS to hide it just like JmixIII mentioned. something like this. View script jQuery(function(){ jQuery('.hidden').hide(); }; /script {{extend 'layout.html'}} table {{=form.custom.begin}}

[web2py] Autocomplete in GAE

2011-11-02 Thread José L .
Has anybody a solution for this? Autocomplete web2py widget doesn't work in gae. I've been searching in this group archive and I haven't found any solution. Googling gives me some possible solutions, but they are really complex unless you'd be a GAE expert. One of the most attractive things of

[web2py] Re: interget or string to date

2011-11-02 Thread Omi Chiba
Vineet, Thanks for sharing. It works like a charm ! On Nov 2, 10:27 am, Vineet vineet.deod...@gmail.com wrote: Recently, I wrote this function for my purpose. See if this helps you. Assuming that argument 'dte' input format is --  03-11-2011 [CODE] import datetime, string def

[web2py] GAE Python 2.7

2011-11-02 Thread Jonathan Lundell
1. Does anyone have a Python 2.7 web2py app running on GAE? 2. Ditto, with WSGI rather than CGI? I'm thinking that we need a new handler that's a blend of gaehandler.py and wsgihandler.py.

Re: [web2py] GAE Python 2.7

2011-11-02 Thread Jonathan Lundell
On Nov 2, 2011, at 12:11 PM, Jonathan Lundell wrote: 1. Does anyone have a Python 2.7 web2py app running on GAE? 2. Ditto, with WSGI rather than CGI? I'm thinking that we need a new handler that's a blend of gaehandler.py and wsgihandler.py. On second thought, would it work to app.yaml

[web2py] Re: Choose nothing in a drop-down menu

2011-11-02 Thread Bianca Cadaveri
Thank you very much ! BC On 2 nov, 17:30, Anthony abasta...@gmail.com wrote: Try IS_MATCH and specify a regex pattern that will exclude the item you want to forbid. Anthony On Wednesday, November 2, 2011 11:55:28 AM UTC-4, Bianca Cadaveri wrote: Thank you very much ! Could I

Re: [web2py] Re: [Web2py] Stop the processing of the models midway

2011-11-02 Thread Bruno Rocha
Not really a good solution, but you can do in the beggining of every model file. if request.function in ['index', 'another', 'other']: #model code goes here this way you can set which function will execute that model file. On Wed, Nov 2, 2011 at 1:27 PM, anubhav aggarwal

[web2py] POST in services jsonrpc

2011-11-02 Thread Raymond Elward
It's not clear from the book. but will a piece of code like : from gluon.tools import Service service = Service() def call(): session.forget() return service() @service.json def submit(body, age, gender): unique_id = insert_into_my_db(body, age, gender) return

Re: [web2py] POST in services jsonrpc

2011-11-02 Thread Jonathan Lundell
On Nov 2, 2011, at 12:35 PM, Raymond Elward wrote: It's not clear from the book. but will a piece of code like : from gluon.tools import Service service = Service() def call(): session.forget() return service() @service.json def submit(body, age, gender): unique_id =

[web2py] Re: ajax redirect after @auth.requires_login() failed

2011-11-02 Thread Anthony
On Wednesday, November 2, 2011 2:36:53 PM UTC-4, haggis wrote: Hello, is it possible to return json to the calling jQuery.ajax() function after access was denied by decorator @auth.requires_login()? I know there is a possibility to specify a function when authorization/ authentication

Re: [web2py] Re: [Web2py] Stop the processing of the models midway

2011-11-02 Thread villas
How about something like wrapping all your normal models inside a condition block... if not request.controller in []:

[web2py] Re: Windows7 python2.7 SQLite web2py

2011-11-02 Thread Willoughby
Another Thought: Based on the path listed in your Traceback, it looks like you're running it from the desktop. Trying instead installing and running from a root folder. Windows7 may restrict what will execute from the Desktop folder.

[web2py] Re: Image searching - Redirecting Ajax Results to pass to template ??

2011-11-02 Thread Massimo Di Pierro
I think you would pass the list of links to the images and then build the tabletrtdimg src=%s/ On Nov 2, 3:29 am, BrendanC bren...@gmail.com wrote: OK - hope I can make this clear - it's more of a 'how to' design question and not really web2py specific. Imagine a view/template with a

[web2py] Re: AJAX custom code

2011-11-02 Thread Anthony
The URL has to be in quotes. Also, looks like the second arg to ajax() should be the 'name' attribute of the input field, not the id (though, in this case they are the same). Anthony On Wednesday, November 2, 2011 1:59:48 PM UTC-4, Vineet wrote: I did check the network tab in Opera

[web2py] Re: [Web2py] Stop the processing of the models midway

2011-11-02 Thread Fran
You may also wish to consider using sub-folders for models We have our own Conditional Model Loading system to handle not having to load all models all the time. We can't simply use the Web2Py system as we have too many inter-linkages across models/controllers. is there a specific reason you

[web2py] Re: web2py.com down?

2011-11-02 Thread Massimo Di Pierro
VPS.net has been doing some maintenance On Nov 2, 7:21 am, Michal Jursa mic...@jursa.cz wrote: Website is back and running... YIPIIIEE Michal On 11/02/2011 01:01 PM, Anthony wrote: Yes, looks like it's down:http://www.downforeveryoneorjustme.com/web2py.com

[web2py] Re: SQLFORM.grid columnas a mostrar

2011-11-02 Thread Massimo Di Pierro
what is the question? On Nov 2, 9:09 am, mmartinez alexra...@gmail.com wrote: Hello list. My question is this, I have a join in my query to the database, you need to show the columns belonging to tables and routes accountcode, here is my code: left =

[web2py] Re: Image searching - Redirecting Ajax Results to pass to template ??

2011-11-02 Thread Anthony
Why not have the Ajax request retrieve new HTML to replace the HTML displaying the images? Your Ajax shouldn't be retrieving actually images, it should just be retrieving HTML img tags with the appropriate references to the image URLs. On Wednesday, November 2, 2011 4:29:55 AM UTC-4, BrendanC

[web2py] Re: ID Encoding oddity

2011-11-02 Thread Massimo Di Pierro
Can you show us your code? which web2py version? On Nov 2, 11:07 am, Philip Kilner phil.kil...@gmail.com wrote: Hi, Where I have a next in CRUD create/update, rather than the [id] substring being replaced by the ID of the created/updated record, I'm seeing %5Bid%5D. My first question is

[web2py] Re: ajax redirect after @auth.requires_login() failed

2011-11-02 Thread haggis
As I wrote Massimo directly by accident, he answered me via mail: it's not possible. That's a pity. May this be possible in a future release? Otherwise it's difficult to develope an application that works with ajax only. In this case the only way I see to redirect a user after his session timed

  1   2   >