[web2py:24061] Re: XML (a proposal and solution)

2009-06-13 Thread DenesL
On Jun 12, 10:46 pm, mdipierro wrote: > Still no comments about the issue below? I consider it an important > issues and am not sure this is best ways (although it is in trunk > now): > > I have been working on this this morning and YES, there is a bug. But > there is more than that. The syntax I

[web2py:24062] Re: How to modify SQLRows

2009-06-13 Thread DenesL
Oops... sorry about that. Note to self: do not post when in a hurry to leave the office (and did not test thoroughly). :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to thi

[web2py:24063] Proposal for auth

2009-06-13 Thread Alexey Nezhdanov
I'm writing unit tests for my app and come across this problem: if I try to access the page which has @auth.requires_login() I get error 303 - i.e. redirect to the page with login/password form. While this works visually for browsers, it is actually wrong for testing AND for search engines. Statu

[web2py:24066] Re: session.flash not working on auth password recovery

2009-06-13 Thread mdipierro
It may be a double redirection causing the problem but the line you refer to it is not wrong, that just make sure you redirect somewhere. On Jun 13, 12:44 am, "mr.freeze" wrote: > From what I can tell, the issue is that a double redirect happens when > request.vars._next or auth.settings.retrie

[web2py:24064] Re: web2py and Debian

2009-06-13 Thread mdipierro
Sorry I did not express myself properly. I mean there should not applicaitons other than welcome, exmaple, admin. On Jun 12, 11:59 pm, Alexey Nezhdanov wrote: > On Friday 12 June 2009 20:49:28 mdipierro wrote:> I would go with bare web2py > unless somebody wants to work on improving > > and cle

[web2py:24065] Re: Little recipe for ad hoc queries and ref cursors

2009-06-13 Thread mdipierro
the you email it to me as an attachament . the indentation is messed up and hard to read. Massimo On Jun 13, 12:21 am, Mariano Mara wrote: > Hi everyone. > >  I'm currently trying to migrate a legacy oracle database to web2py and > on the past weeks I stumbled upon several issues related to how

[web2py:24067] Re: XML (a proposal and solution)

2009-06-13 Thread mdipierro
> > Comments? Pros? Cons? > > Nice. Some comments though: > > 1) /app/default/data defaults to /app/default/data/tables > with select type links for each table. > It is easy to do the same for create for example, where each link > would be a create type link for the respective table, but is it a

[web2py:24068] Re: Proposal for auth

2009-06-13 Thread mdipierro
I will take this patch! On Jun 13, 6:19 am, Alexey Nezhdanov wrote: > I'm writing unit tests for my app and come across this problem: > if I try to access the page which has @auth.requires_login() > I get error 303 - i.e. redirect to the page with login/password form. > While this works visually

[web2py:24070] Re: Little recipe for ad hoc queries and ref cursors

2009-06-13 Thread Mariano Mara
really? mutt + imap + gmail: a recipe for desaster!! :) 2009/6/13 mdipierro > > the you email it to me as an attachament . the indentation is messed > up and hard to read. > > Massimo > > On Jun 13, 12:21 am, Mariano Mara wrote: > > Hi everyone. > > > > I'm currently trying to migrate a legac

[web2py:24069] Re: IDE with debugging support for web2py

2009-06-13 Thread Randell
Hi, I was googling for the comparison between PyDev and Wing IDE and one of the results led me in this thread. I was wondering whether you were able to compare PyDev and Wing IDE deeply and what the results are. You response will be greatly appreciated. Thank you! On May 1, 4:26 am, David Zejd

[web2py:24071] readonly fields dont validate on form level

2009-06-13 Thread Hans Donner
db.define_table( 'test', SQLField('unique', 'string', unique = True, requires = IS_NOT_IN_DB(db, 'test.unique')), ) def pseudo(): db.table.field.writable = False db.table.field = 'some invalid value for the requires[]' form = crud.create(db.table) the form doesn't r

[web2py:24072] can't create app with trunk 1035

2009-06-13 Thread DenesL
"unable to create application" from appadmin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group,

[web2py:24073] Re: readonly fields dont validate on form level

2009-06-13 Thread mdipierro
I am not what you mean by: db.table.field = 'some invalid value for the requires[]' It seems to be redefining the field. It should give an error. On Jun 13, 8:28 am, Hans Donner wrote: > db.define_table( >     'test', >     SQLField('unique', 'string', unique = True, >         requires = IS_NO

[web2py:24074] Re: can't create app with trunk 1035

2009-06-13 Thread mdipierro
I cannot reproduce this. On Jun 13, 8:48 am, DenesL wrote: > "unable to create application" from appadmin. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send em

[web2py:24075] Re: XML (a proposal and solution)

2009-06-13 Thread DenesL
On Jun 13, 7:57 am, mdipierro wrote: > > > 1) /app/default/data defaults to /app/default/data/tables > > with select type links for each table. > > It is easy to do the same for create for example, where each link > > would be a create type link for the respective table, but is it a good > > ide

[web2py:24076] Re: readonly fields dont validate on form level

2009-06-13 Thread Hans Donner
sorry, should be db.table.field.default = '' On Sat, Jun 13, 2009 at 3:54 PM, mdipierro wrote: > > I am not what you mean by: > > db.table.field = 'some invalid value for the requires[]' > > It seems to be redefining the field. It should give an error. > > On Jun 13, 8:28 am, Hans Donner wrote:

[web2py:24077] Re: can't create app with trunk 1035

2009-06-13 Thread DenesL
I created a separate repository on my PC and used svn checkout to download everything anew. Still get the same error running from there. In 1035 /trunk/admin.w2p /trunk/examples.w2p /trunk/welcome.w2p were deleted. Any problem with that?. --~--~-~--~~~---~--~~ You

[web2py:24078] authentication - login error

2009-06-13 Thread mika
I'm trying to make an authentication: i've just made new application, the auth settings in db model are default (I'm using web2py 1.64.1), and I defined in my default controller two functions: @auth.requires_login() def secret(): return 'secret one..' def nosecret(): return 'not secret'

[web2py:24079] Re: XML (a proposal and solution)

2009-06-13 Thread mdipierro
On Jun 13, 9:01 am, DenesL wrote: > On Jun 13, 7:57 am, mdipierro wrote: > > > > > > 1) /app/default/data defaults to /app/default/data/tables > > > with select type links for each table. > > > It is easy to do the same for create for example, where each link > > > would be a create type link fo

[web2py:24080] Re: readonly fields dont validate on form level

2009-06-13 Thread mdipierro
back to the original question. Should they validate? If they are readonly it means they are not inserted by the visitor. We only validate visitor provided input. Massimo On Jun 13, 9:02 am, Hans Donner wrote: > sorry, should be db.table.field.default = '' > > On Sat, Jun 13, 2009 at 3:54 PM, md

[web2py:24081] Re: session.flash not working on auth password recovery

2009-06-13 Thread mr.freeze
Yes, but the result of that line is /authtest/default/user which will always redirect again to /authtest/default/user/login. If you changed it to: if not next: next = self.url() + "/login" ...it will work. On Jun 13, 7:50 am, mdipierro wrote: > It may be a double redirection

[web2py:24082] Re: can't create app with trunk 1035

2009-06-13 Thread mdipierro
People complained they were taking too much space. Run make src and will be rebuilt. Perhaps whit was a mistake... Massimo On Jun 13, 9:07 am, DenesL wrote: > I created a separate repository on my PC and used svn checkout to > download everything anew. > Still get the same error running f

[web2py:24083] rss

2009-06-13 Thread pk
hi together, i can`t create a rss. i tried it with my table news. news has the rows user, timestamp, header and text and is a function calls: def news: in my controller menu. how can i solve my problem for an easy way? thanks for your help. peter --~--~-~--~~~---~--~-

[web2py:24084] Re: session.flash not working on auth password recovery

2009-06-13 Thread mdipierro
You are right. This is a more systematic issue. I fixed it in many places and uploading in trunk. Could you please check it? Massimo On Jun 13, 9:39 am, "mr.freeze" wrote: > Yes, but the result of that line is  /authtest/default/user  which > will always redirect again to  /authtest/default/use

[web2py:24085] Re: rss

2009-06-13 Thread mdipierro
please post your model and I will send an example. Massimo On Jun 13, 9:52 am, pk wrote: > hi together, > > i can`t create a rss. i tried it with my table news. news has the rows > user, timestamp, header and text > and is a function calls: def news: in my controller menu. > how can i solve my

[web2py:24086] Re: rss

2009-06-13 Thread pk
# ## Tabelle News # db.define_table('news', SQLField('userid', default=auth.user.id if auth.user else 0, writable=False, readable=False),

[web2py:24087] Re: session.flash not working on auth password recovery

2009-06-13 Thread mr.freeze
The session.flash is working now. Did you intend for it to redirect to itself (/authtest/default/user/retrieve_password) after success? It seems like it should redirect to the login page by default after resetting the password. On Jun 13, 9:52 am, mdipierro wrote: > You are right. This is a mor

[web2py:24088] Re: readonly fields dont validate on form level

2009-06-13 Thread Hans Donner
Well, depends what you call 'inserted by the visitor'. In this case I'm prepopulating the form, some fields are not editable, but the user should submit these values as well. Guess I have to use onvalidate then to make sure all is ok. The second remark in my original posting: the 'unique' should

[web2py:24089] Re: rss

2009-06-13 Thread mdipierro
def make_rss(): news = db(db.news.id>0).select() d=dict(title='title',link=URL (r=request),description='description', entries = [dict(title=r.betreff, description=r.text, link='no link') for r in news]) from gluon.serializers import rss return rss(d) Mind that I am

[web2py:24090] Re: rss

2009-06-13 Thread pk
thanks massimo, i will change the fieldname of text. how can i test now this? On 13 Jun., 17:39, mdipierro wrote: > def make_rss(): >     news = db(db.news.id>0).select() >     d=dict(title='title',link=URL > (r=request),description='description', >                entries = [dict(title=r.betre

[web2py:24091] Re: authentication - login error

2009-06-13 Thread Gary
I'm having the same problem. On Jun 13, 10:34 am, mika wrote: > I'm trying to make an authentication: i've just made new application, > the auth settings in db model are default (I'm using web2py 1.64.1), > and I defined in my default controller two functions: > > @auth.requires_login() > def s

[web2py:24092] Re: session.flash not working on auth password recovery

2009-06-13 Thread mdipierro
Yes it should. Some defaults were missing and I am now uploading the fix to trunk. That line was there as a last resort. Massimo On Jun 13, 10:10 am, "mr.freeze" wrote: > The session.flash is working now.  Did you intend for it to redirect > to itself (/authtest/default/user/retrieve_password)

[web2py:24093] Re: rss

2009-06-13 Thread pk
when i now go to the link i got /2busy/rss/make_rssdescriptionSat, 13 Jun 2009 17:50:25 GMTPyRSS2Gen-1.0.0http://blogs.law.harvard.edu/tech/rssno linkSat, 13 Jun 2009 17:50:25 GMTno linkSat, 13 Jun 2009 17:50:25 GMTno linkSat, 13 Jun 2009 17:50:25 GMTno linkROCKS !!! AWESOMESat, 13 Jun 2009 17:50

[web2py:24095] Re: How to modify SQLRows

2009-06-13 Thread weheh
Massimo, this is great and it works. Thank you. However, caveat emptor to others who follow this thread. The as_list() function turns datetime fields into strings, so you may have to convert them back to datetimes. It feels a little kludgey, but it does work. On Jun 12, 11:42 pm, mdipierro wrote

[web2py:24094] Re: session.flash not working on auth password recovery

2009-06-13 Thread mr.freeze
Perfect, works like a champ now. Thanks. On Jun 13, 10:45 am, mdipierro wrote: > Yes it should. Some defaults were missing and I am now uploading the > fix to trunk. That line was there as  a last resort. > > Massimo > > On Jun 13, 10:10 am, "mr.freeze" wrote: > > > > > The session.flash is wor

[web2py:24096] Re: How to modify SQLRows

2009-06-13 Thread Hans Donner
def as_list(self, compact=True, storage_to_dict=True, datetime_to_str=True): so you can prevent the conversion by providing the datetime_to_str = False On Sat, Jun 13, 2009 at 5:57 PM, weheh wrote: > > Massimo, this is great and it works. Thank

[web2py:24097] Re: Proposal for auth

2009-06-13 Thread Alexey Nezhdanov
On Saturday 13 June 2009 16:58:33 mdipierro wrote: > I will take this patch! Here it is, attached. Tested with latest stable, then ported to trunk version and tested again. However there is one problem with it. On error code 401 browser actually _renders_ the page causing it to be blanked and red

[web2py:24098] Re: readonly fields dont validate on form level

2009-06-13 Thread mdipierro
I do not understand. If the fields are marked readonly (as in db.table.field.readonly=True) the field is not submitted from the client to the server with the form. The form is populated serverside. Massimo On Jun 13, 10:38 am, Hans Donner wrote: > Well, depends what you call 'inserted by the vi

[web2py:24099] Re: authentication - login error

2009-06-13 Thread mdipierro
I do not undnerstand how there can be a list into next. Cna you help debug this? On Jun 13, 10:45 am, Gary wrote: > I'm having the same problem. > > On Jun 13, 10:34 am, mika wrote: > > > I'm trying to make an authentication: i've just made new application, > > the auth settings in db model are

[web2py:24100] Re: rss

2009-06-13 Thread mdipierro
My bad def make_rss(): news = db(db.news.id>0).select() d=dict(title='title',link=URL (r=request),description='description', entries = [dict(title=r.betreff, description=r.text,link='no link') for r in news]) response.headers['Content-Type']='application/rss+xml' ### MI

[web2py:24101] Re: rss

2009-06-13 Thread pk
thanks massimo. On 13 Jun., 18:39, mdipierro wrote: > My bad > > def make_rss(): >     news = db(db.news.id>0).select() >     d=dict(title='title',link=URL > (r=request),description='description', >                entries = [dict(title=r.betreff, > description=r.text,link='no link') for r in ne

[web2py:24102] Re: can't create app with trunk 1035

2009-06-13 Thread DenesL
make src? The only make (/doc/make.bat) does not have that option. Could you expand on that? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@g

[web2py:24103] Re: can't create app with trunk 1035

2009-06-13 Thread DenesL
trunk 1040 can create apps again. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email

[web2py:24104] Re: XML (a proposal and solution)

2009-06-13 Thread DenesL
On Jun 13, 9:38 am, mdipierro wrote: > On Jun 13, 9:01 am, DenesL wrote: > > > On Jun 13, 7:57 am, mdipierro wrote: > > > > > 2) /app/default/select creates a ticket while > > > > /app/default/data/select returns "404 not found" > > > > more consistent results would be better. > > > > I can fix

[web2py:24105] Re: XML (a proposal and solution)

2009-06-13 Thread mdipierro
I also just added http:///app/default/data.json/create/tablename?json=... where ... is a json encoded dictionary of field values. Still not completely convinced this is the best way to go... Massimo On Jun 13, 12:58 pm, DenesL wrote: > On Jun 13, 9:38 am, mdipierro wrote: > > > On Jun

[web2py:24106] Re: readonly fields dont validate on form level

2009-06-13 Thread Hans Donner
the model has some more fields, entered by the user. This filed is prepopulated by the server. On submitting the prepopluated value may be not valid any more, but may not be updated by the server (is considered part of the user submitted fileds). Currently worked around it by adding a hidden fiel

[web2py:24107] Re: IDE with debugging support for web2py

2009-06-13 Thread David Zejda
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, I did not perform a deep comparison. I only installed the tools and checked the basic functionality with emphasize on debugging of web2py, which effectively disqualified half of them. Maybe, if Wing IDE is opensoureced and free, I would examin

[web2py:24108] Nice plugin idea..

2009-06-13 Thread Oleg
Just take a look to http://rails-engines.org/ May be something like that will be useful to have in Web2py... :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send

[web2py:24109] Re: readonly fields dont validate on form level

2009-06-13 Thread mdipierro
can you post an example? I am sure there is a better way. Massimo On Jun 13, 3:28 pm, Hans Donner wrote: > the model has some more fields, entered by the user. This filed is > prepopulated by the server. > On submitting the prepopluated value may be not valid any more, but > may not be updated

[web2py:24110] Re: Nice plugin idea..

2009-06-13 Thread mdipierro
Funny... they use PHP for their web page and does not work: http://api.rails-engines.org/ Because of this I cannot get to the actual documentation. Perhaps it will work later or tomorrow. Massimo On Jun 13, 6:24 pm, Oleg wrote: > Just take a look tohttp://rails-engines.org/ > May be something

[web2py:24111] Re: authentication - login error

2009-06-13 Thread Gary
Massimo, Don't k On Jun 13, 12:32 pm, mdipierro wrote: > I do not undnerstand how there can be a list into next. Cna you help > debug this? > > On Jun 13, 10:45 am, Gary wrote: > > > I'm having the same problem. > > > On Jun 13, 10:34 am, mika wrote: > > > > I'm trying to make an authenticati

[web2py:24112] Re: authentication - login error

2009-06-13 Thread Gary
Massimo, I'm not sure that I have the skill to dig into the code to debug this yet, but if you create a default application, register, add a "@auth.requires_login()" directly above "def index()", save the controllers, run index and login, the error will appear. Hope that helps some. Regards, Ga

[web2py:24113] upgrading app

2009-06-13 Thread DenesL
I have an app that I created with trunk a few revisions back. Now, even after doing: web2py.py -S app -u UPGRADE the app does not behave the same as one created from scratch from appadmin with the same settings. For example, /appold/default/data.xml/read/dog/1 gives "invalid view" while /appn

[web2py:24114] Trying to make a tag cloud...

2009-06-13 Thread Jason Brower
So we have gotten close with this: def status(): current_user_id=auth.user.id tags = db((db.users.id==db.user_tags.user_id) &(db.user_tags.tag_id==db.tag.id) &(db.user_tags.tag_id.belongs( db(db.user_tags.user_id==current_user_id)._select( db.user_tags.tag_i