[web2py] Re: Latest revision[s] breaking DAL

2010-12-05 Thread Ishbir
Okay, just checked; things are fine till revision e0944eaf3f. Haven't tried updating further than that and checking if it works. The host of dal changes that have been introduced have probably got something to do with it. On Dec 5, 7:06 pm, Ishbir wrote: > The revision from 25 Novemb

[web2py] Latest revision[s] breaking DAL

2010-12-05 Thread Ishbir
The revision from 25 November works perfectly fine; however, I updated my source today and I get this error- Traceback (most recent call last): File "/Users/ishbir/web2py/gluon/main.py", line 446, in wsgibase BaseAdapter.close_all_instances(BaseAdapter.commit) File "/User

[web2py] Re: Exposing auth as a controller

2010-12-05 Thread Ishbir
Hey there, Ah leave that; I've sub-classed auth. Thanks for your help anyway. :) On Dec 5, 6:42 pm, mdipierro wrote: > yes with > > def login(): >      return dict(form=auth.login()) > > def profile(): >      return dict(form=auth.profile()) > >

[web2py] Exposing auth as a controller

2010-12-05 Thread Ishbir
Hey there, I have a little question. Is it possible to expose the auth() methods to the user as a controller adding our own custom methods as well? Like, in default.py, we expose it like- def user(): return dict(form=auth()) Is it possible to expose it like a controller and add custom metho

[web2py] Re: Inserting custom field types broken

2010-11-25 Thread Ishbir
Did you check out the bug Massimo?

[web2py] Re: Inserting custom field types broken

2010-11-24 Thread Ishbir
an > fix it sooner. > > On Nov 23, 7:53 am, Ishbir wrote: > > > Hey there, > > > There seems to be a bug in web2py which pops up while inserting a > > record to a table with a custom field type. > > > How to reproduce: > > - Make a table with a custom f

[web2py] [BUG] Inserting custom field types broken

2010-11-23 Thread Ishbir
Hey there, There seems to be a bug in web2py which pops up while inserting a record to a table with a custom field type. How to reproduce: - Make a table with a custom field - Try inserting a record - The record would come out as None - Try updating the record with the custom value. It shows this

[web2py] [BUG] Inserting custom field types broken

2010-11-23 Thread Ishbir
Hey there, There seems to be a bug in the latest version of web2py. Steps: 1. Create a table with a custom field 2. Try inserting the record 3. You'll notice that the custom field evaluates to None 4. Try updating the record, the custom field will show this time. Workaround: 1. Insert the record

[web2py] Re: After-method Execution

2010-11-22 Thread Ishbir
Okay, thank you; it worked. :) But, I couldn't yield from the controller function, I had to return a generator. Why is that so? On Nov 22, 5:47 pm, Ishbir wrote: > On Nov 21, 4:05 pm, Branko Vukelic wrote: > > > Is it a pr0n site? :) > > lol No it ain't. > >

[web2py] Re: After-method Execution

2010-11-22 Thread Ishbir
On Nov 21, 4:05 pm, Branko Vukelic wrote: > Is it a pr0n site? :) lol No it ain't. Massimo: Thank you, I'll try your approach and get back if it worked or not.

[web2py] Re: set session variable by javascript?

2010-11-21 Thread Ishbir
Web2py uses server side sessions; so it is not possible to do this. What you can do, however, is call a controller function which sets the session variable. On Nov 21, 1:54 pm, beroz wrote: > Hello, > > How could I set value for a variable in session in javascript > function? > Example: > >     i

[web2py] Re: Calling controller function

2010-11-21 Thread Ishbir
I am not very sure about the first approach; but with the second approach, you are not passing the variable and regardless of that, you don't have any argument for a controller function. It should be something like- image1 = FORM (TABLE (TR(TD(INPUT(_type = "submit", _value = "delete",_id="delete_

[web2py] After-method Execution

2010-11-21 Thread Ishbir
Hey there, So what I want is that a function/line of code should execute AFTER a controller function has thrown out all the output. What I have is a download function; I'm trying to keep track of open/ closed connections. Users would be downloading big files; like 200-400MB. So, I want to know ho

[web2py] Re: Custom Auth Methods

2010-04-15 Thread Ishbir
kit and they very little magic. On Apr 14, 8:38 pm, mdipierro wrote: > auth.define_tables() is missing > > On Apr 14, 1:24 am, Ishbir wrote: > > > Okay, so far I've managed to solve all the other problems but there is > > one that I am stuck on. This is the code- >

[web2py] Re: Custom Auth Methods

2010-04-13 Thread Ishbir
page, it throws this exception- Traceback (most recent call last): File "/home/ishbir/web2py/gluon/restricted.py", line 173, in restricted exec ccode in environment File "/home/ishbir/web2py/applications/linkupdater/controllers/ default.py", line 57, in File &

[web2py] Re: Custom Auth Methods

2010-04-13 Thread Ishbir
ew.  I would rather have a > bunch of new features that increase my capabilities, rather than 1 well > documented feature.  There are other ways to see the documentation too. > Even from the source code.  Like the help(). Method. > Just my 2 cents... > Jason > > On Tue, 2010-04

[web2py] Re: Custom Auth Methods

2010-04-13 Thread Ishbir
I found all about what I needed... however, I have found that web2py is not very well documented. We often have to open up the source files. I hope this problem can be resolved in the future. On Apr 13, 2:15 pm, Ishbir wrote: > Hmm.. yeah, that was kind of what I wanted; but isn't t

[web2py] Re: Custom Auth Methods

2010-04-13 Thread Ishbir
alternate authentication methods. > Look into the examples in gluon/contrib/login_methods > > perhaps you want one of these? > > On Apr 12, 9:52 am, Ishbir wrote: > > > What are the return values and stuff? Which is the method used for > > logging the user in and out; also th

[web2py] Re: Custom Auth Methods

2010-04-12 Thread Ishbir
MyAuth(Auth): >      def requires_login(self): . > > auth=MyAuth(globals(),db) > > On Apr 12, 6:21 am, Ishbir wrote: > > > Hey everyone, > > > Is it possible to define custom auth methods and override the existing > > methods with our own? For e.g. I am mak

[web2py] Re: Display Image from FieldStorage

2010-04-12 Thread Ishbir
There is an entry regarding this in the book- http://web2py.com/book/default/section/3/6 It's almost the same stuff.. On Apr 12, 3:54 pm, Francisco Costa wrote: > Model > > db.define_table('space', >     Field('name'), >     Field('slug', 'string'), >     Field('description','text'), >     Fiel

[web2py] Custom Auth Methods

2010-04-12 Thread Ishbir
Hey everyone, Is it possible to define custom auth methods and override the existing methods with our own? For e.g. I am making an application that authenticates against a remote website not the existing application. So, I just want to authenticate remotely and if it is successful, just get the us

[web2py] Re: Problem with MANY-MANY relationship

2010-04-09 Thread Ishbir
That seems to be a good idea... I would love to see this in the next release. On Apr 8, 9:41 pm, Thadeus Burgess wrote: > Ive sent emails on the list twice, and one email to you personally > about this. I have not implemented it since it never received any > feedback. > > There will be a 'pre' an

[web2py] Re: Problem with MANY-MANY relationship

2010-04-08 Thread Ishbir
gt; as close as possible to SQL layer. Nevertheless you have a good point > and I would like to see a few proposals for possible API extension. > > On Apr 7, 5:33 am, Ishbir wrote: > > > What you mentioned is only for crud forms. Isn't there anything like a > > database

[web2py] Re: Problem with MANY-MANY relationship

2010-04-07 Thread Ishbir
nction that takes the submitted form. > > On Apr 6, 5:34 am, Ishbir wrote: > > > Thanks for your help, although I had to tweak the code to get it > > working. It finally works! Thank you. > > > And by the way, do you know any way by which behaviours can be > > d

[web2py] Re: Problem with MANY-MANY relationship

2010-04-06 Thread Ishbir
21:20,2,1,1 > 2,woot,erifica,2010-04-05 09:21:20,,, > > Or you can do a secondary query to get the tags. > > snippets = db().select() > for snip in snippets: >    print snippet.title >    for tag in snip.snippet_tags_link.select(): >       print tag.snippet_tags.name > >

[web2py] Re: Problem with MANY-MANY relationship

2010-04-05 Thread Ishbir
tags associated with the record so that I can access the name field with something like- for tag in snippet.tags: print tag.name ?? On Apr 5, 6:46 pm, Ishbir wrote: > I've got some problem with the MANY-MANY relation in Web2Py. This is > my code- > > http://pastie.textmate.o

[web2py] Problem with MANY-MANY relationship

2010-04-05 Thread Ishbir
I've got some problem with the MANY-MANY relation in Web2Py. This is my code- http://pastie.textmate.org/903738 Now, the problem is that the query returns only those records which have tags, not the ones without them. However, if I specify query| db.snippets.id>0 or anything, it gives me garbled