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

2009-06-14 Thread Hans Donner
I think there is, but currently I've came up with: def year(): # too many - fail if len(request.args) > 1: redirect(URL(r=request,args=[])) # init table = db.year_year app_settings = AppSettings() arg0 = None if len(request.args) == 1: arg0 = request.a

[web2py:24116] I want to send an email...

2009-06-14 Thread Jason Brower
I found this... http://groups.google.com/group/web2py/browse_thread/thread/3250ef91619c7c19 but the link seems dead. Any new information I should know about? Just want to know how to send an email. Regards, Jason Brower --~--~-~--~~~---~--~~ You received this mes

[web2py:24117] models\menu.py

2009-06-14 Thread Hans Donner
models\menu.py now has hard-encoded urls to login/logout etc. These could be replaced by their auth.setting counterparts. Problably need some more settings to cover all options. This way it will continue to work out of the box when you change some auth settings... === modified file 'web2py/applic

[web2py:24118] Re: authentication - login error

2009-06-14 Thread Fran
On Jun 14, 3:51 am, Gary wrote: > 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. I d

[web2py:24119] Re: flatpage application

2009-06-14 Thread desfrenes
Just an attempt to revive this question ;-) Here is a link to a patch: http://pastebin.com/m417aa1f5 Any chance to see this merged in trunk ? Bye. On 26 mai, 23:54, desfrenes wrote: > cool :-) > > On 26 mai, 23:47, mdipierro wrote: > > > interesting. Let me give this some thought. somethi

[web2py:24120] Re: I want to send an email...

2009-06-14 Thread Fran
On Jun 14, 8:34 am, Jason Brower wrote: > I found > this...http://groups.google.com/group/web2py/browse_thread/thread/3250ef9161... > but the link seems dead. These links both work for me: http://mdp.cti.depaul.edu/appliances/default/show/10 http://mdp.cti.depaul.edu/appliances/default/download

[web2py:24121] Re: upgrading app

2009-06-14 Thread mdipierro
You must add the views/generic.* files to each one of your apps to add this functionality On Jun 13, 10:18 pm, DenesL wrote: > 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

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

2009-06-14 Thread mdipierro
I am pretty sure that if you omit this line: form.append(INPUT(_type='hidden', _value=newyear, _name ='newyear')) the field still goes in db because of "default" thus no need for validation. Massimo On Jun 14, 2:26 am, Hans Donner wrote: > I think there is, but currently I've came up

[web2py:24123] Re: models\menu.py

2009-06-14 Thread mdipierro
agree. thanks. On Jun 14, 2:53 am, Hans Donner wrote: > models\menu.py now has hard-encoded urls to login/logout etc. > These could be replaced by their auth.setting counterparts. > > Problably need some more settings to cover all options. This way it will continue to work out of the box when yo

[web2py:24124] Re: authentication - login error

2009-06-14 Thread mdipierro
this have been fixed "involuntarily" in the latest trunk. On Jun 14, 3:34 am, Fran wrote: > On Jun 14, 3:51 am, Gary wrote: > > > 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()"

[web2py:24125] Re: I want to send an email...

2009-06-14 Thread Jason Brower
Those two links in the mdp.cti.depaul.edu are not working for me. Weird. not even http://mdp.cti.depaul.edu/ loads. Regards, Jason Brower On Sun, 2009-06-14 at 01:48 -0700, Fran wrote: > On Jun 14, 8:34 am, Jason Brower wrote: > > I found > > this...http://groups.google.com/group/web2py/browse

[web2py:24126] Re: flatpage application

2009-06-14 Thread mdipierro
thank you! On Jun 14, 3:34 am, desfrenes wrote: > Just an attempt to revive this question ;-) > > Here is a link to a patch:http://pastebin.com/m417aa1f5 > > Any chance to see this merged in trunk ? > > Bye. > > On 26 mai, 23:54, desfrenes wrote: > > > cool :-) > > > On 26 mai, 23:47, mdipierro

[web2py:24127] Re: I want to send an email...

2009-06-14 Thread mdipierro
works for me. can you try again please? Can you send me a traceback? mind that accessing any page like http://www.web2py.com.//.php http://www.web2py.com.//.asp http://www.web2py.com.//.jsp will add you to the firewall and reject your IP forever. Massimo On Jun 14, 5:44 am, Jason B

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

2009-06-14 Thread Hans Donner
If I have multiple users running the same function, one of the users should get an error that the year he has been submitting is already existing and I do not want that what he inserts is the year following the one he has been submitting. (and I'm on GAE, so no uniquess checking there on db level)

[web2py:24129] referenced id representations

2009-06-14 Thread Hans Donner
def test(): table_membership = auth.settings.table_membership rows_membership = db().select(table_membership.ALL) return dict( rows = rows_membership, row0 = rows_membership[0], aslist = rows_membership.as_list(), ascsv = str(rows_member

[web2py:24130] Re: upgrading app

2009-06-14 Thread DenesL
I see. But is this so because I am on the bleeding edge? I mean, I hope this will not be the standard operating procedure for the stable release. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework"

[web2py:24131] Re: I want to send an email...

2009-06-14 Thread Jason Brower
It just times out. No trace back that I can see. :/ interesting. Nope, web2py.com doesn't work either. --- Jason On Sun, 2009-06-14 at 03:50 -0700, mdipierro wrote: > works for me. can you try again please? Can you send me a traceback? > mind that accessing any page like > > http://www.web2py.

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

2009-06-14 Thread DenesL
On Jun 13, 1:34 pm, mdipierro wrote: > 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... Why? can you share your thoughts?. --~--~

[web2py:24133] Re: upgrading app

2009-06-14 Thread Iceberg
On Jun14, 7:28pm, DenesL wrote: > I see. > But is this so because I am on the bleeding edge? > I mean, I hope this will not be the standard operating procedure for > the stable release. Not exactly. Those views/generic.* should be available by default if you create your app inside a recent web2p

[web2py:24134] Re: simplejson and date/datetime help

2009-06-14 Thread weheh
Sorry for the dumb question, but what's the path to qluon? I can't find it. I just downloaded the latest version of web2py and json still chokes on datetime. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web

[web2py:24135] Re: I want to send an email...

2009-06-14 Thread Fran
On Jun 14, 12:34 pm, Jason Brower wrote: > It just times out.  No trace back that I can see. > :/ interesting. > Nope, web2py.com doesn't work either. ok, so until your Firewall issues get resolved, here is the relevant section from the appliance: def email_user(sender,message,subject="group no

[web2py:24136] Built-in helper A.

2009-06-14 Thread annet
In one of my views I have: {{=A('Gymnasium',_href=URL(r=request,f='index'))}} When I replace the 'Gymnasium' string with {{=response.companyname}}: {{=A('{{=response.companyname}}',_href=URL(r=request,f='index'))}} an error ticket is issued: Traceback (most recent call last): File "/Libra

[web2py:24137] Using appliance "Ajax Shell" behind routes.py

2009-06-14 Thread Bernd das Brot
Hi, this is Bernd, the guy with "routes.py" like routes_in = (('/prefix/(?P.*)','/\g'),) routes_out = (('/(?P.*)','/prefix/\g'),) to have web2py alongside other web applications - and therefore finding "dirty" URLs ;-) The very cool "Ajax Shell" from http://mdp.cti.depaul.edu/appliances works f

[web2py:24138] Re: Built-in helper A.

2009-06-14 Thread Hans Donner
you are already running a python command, so nested {{ }} are not needed: {{=A(response.companyname,_href=URL(r=request,f='index'))}} On Sun, Jun 14, 2009 at 4:13 PM, annet wrote: > > In one of my views I have: > > {{=A('Gymnasium',_href=URL(r=request,f='index'))}} > > > When I replace the 'Gymn

[web2py:24139] Re: authentication - login error

2009-06-14 Thread mika
I still have that problem - I'm using web2py from trunk - Version 1.64.1 (2009-06-13 13:29:19). Could you give me example how to get it working? I'm doing like Gary said, and I get error while logging in... --~--~-~--~~~---~--~~ You received this message because you

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

2009-06-14 Thread Jesse Bever
I still can't access web2py.com :(. The trace still dies at mfc-cst-bs-v841.netequip.depaul.edu. Is there some firewall that is filtering out certain ip ranges? I can access it from work but not from home. On Mon, Jun 8, 2009 at 8:14 AM, mdipierro wrote: > > I was having problems from home. At

[web2py:24141] Delete

2009-06-14 Thread pk
Hi together, i have a question. i have a talbe project and there i can delete without any problems. i have another table calls projectfile. here is my model: # ## Tabelle File

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

2009-06-14 Thread mr.freeze
Same here. Thought it was just me. On Jun 14, 11:46 am, Jesse Bever wrote: > I still can't access web2py.com :(. The trace still dies at > mfc-cst-bs-v841.netequip.depaul.edu. Is there some firewall that is > filtering out certain ip ranges? I can access it from work but not from > home. > > >

[web2py:24143] Re: Proposal for auth

2009-06-14 Thread Alexey Nezhdanov
Ok, Massimo, do you still think this is a good idea? Should I make this optional for auth module with default set to [SE-friendly] 401? On Saturday 13 June 2009 20:08:36 Alexey Nezhdanov wrote: > On Saturday 13 June 2009 16:58:33 mdipierro wrote: > > I will take this patch! > > Here it is, attac

[web2py:24144] Re: authentication - login error

2009-06-14 Thread mr.freeze
Your code worked for me with the latest trunk. On Jun 14, 11:15 am, mika wrote: > I still have that problem - I'm using web2py from trunk - Version > 1.64.1 (2009-06-13 13:29:19). > Could you give me example how to get it working? > I'm doing like Gary said, and I get error while logging in... -

[web2py:24145] Re: authentication - login error

2009-06-14 Thread Fran
On Jun 14, 5:15 pm, mika wrote: > I still have that problem - I'm using web2py from trunk - Version > 1.64.1 (2009-06-13 13:29:19). > Could you give me example how to get it working? > I'm doing like Gary said, and I get error while logging in... Did you restart Web2Py after upgrade? I'm runnin

[web2py:24146] Nested list : good example for the documentation

2009-06-14 Thread Francois (Jersey)
Hello I am trying to make a page showing a nested list: period 1 subperiod 1 subperiod 2 subperiod 3 period 2 subperiod 1 subperiod 2 period 3 subperiod 1 period 4 subperiod 1 subperiod 2 subperiod 3 My model is: db.define_table('period', SQLField('descrip

[web2py:24147] Re: Nested list : good example for the documentation

2009-06-14 Thread Fran
On Jun 14, 9:03 pm, "Francois (Jersey)" wrote: > Hello I am trying to make a page showing a nested list: > period 1 >   subperiod 1 >   subperiod 2 >   subperiod 3 > period 2 >   subperiod 1 >   subperiod 2 -CUT- > def show_periods(): >     periods=SQLTABLE(db().select(db.period.ALL)) >     retur

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

2009-06-14 Thread mdipierro
I would then just handle this manual in onvalidate, no need for the hidden file. On Jun 14, 5:51 am, Hans Donner wrote: > If I have multiple users running the same function, one of the users > should get an error that the year he has been submitting is already > existing and I do not want that w

[web2py:24149] Re: referenced id representations

2009-06-14 Thread mdipierro
75L stands for 75 Long. This should not affect comparisons. Massimo On Jun 14, 6:25 am, Hans Donner wrote: > def test(): >     table_membership = auth.settings.table_membership >     rows_membership = db().select(table_membership.ALL) > >     return dict( >             rows = rows_membership, >

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

2009-06-14 Thread Hans Donner
then how to recognise what value was submitted? On 14 jun, 22:53, mdipierro wrote: > I would then just handle this manual in onvalidate, no need for the > hidden file. > > On Jun 14, 5:51 am, Hans Donner wrote: > > > If I have multiple users running the same function, one of the users > > shoul

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

2009-06-14 Thread mdipierro
I am thinking (experimenting) that as we can do read.json and select.json perhaps one should be able to do create.json and send the data using json format. On Jun 14, 7:04 am, DenesL wrote: > On Jun 13, 1:34 pm, mdipierro wrote: > > > I also just added > > >http:///app/default/data.json/cr

[web2py:24152] Re: simplejson and date/datetime help

2009-06-14 Thread mdipierro
do import gluon.contrib.simplejson as simplejson not import simplejson On Jun 14, 8:19 am, weheh wrote: > Sorry for the dumb question, but what's the path to qluon? I can't > find it. I just downloaded the latest version of web2py and json still > chokes on datetime. --~--~-~--~~-

[web2py:24153] Re: Using appliance "Ajax Shell" behind routes.py

2009-06-14 Thread mdipierro
The fact is... a better shell is now in web2py admin (controllers/ shell.py) so this app will be deprecated. Massimo On Jun 14, 9:55 am, Bernd das Brot wrote: > Hi, > this is Bernd, the guy with "routes.py" like > > routes_in = (('/prefix/(?P.*)','/\g'),) > routes_out = (('/(?P.*)','/prefix/\g'

[web2py:24154] Re: Delete

2009-06-14 Thread mdipierro
this has been default behavior for some time. Have you checked it? Does it not work? Massimo On Jun 14, 11:50 am, pk wrote: > Hi together, > > i have a question. i have a talbe project and there i can delete > without any problems. > i have another table calls projectfile. here is my model: > >

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

2009-06-14 Thread mdipierro
I do not know. It works now. On Jun 14, 11:46 am, Jesse Bever wrote: > I still can't access web2py.com :(. The trace still dies at > mfc-cst-bs-v841.netequip.depaul.edu. Is there some firewall that is > filtering out certain ip ranges? I can access it from work but not from > home. > > On Mon, J

[web2py:24156] Re: Proposal for auth

2009-06-14 Thread mdipierro
You can replace the page blanking by adding some content longer than 512 chars On Jun 13, 11:08 am, Alexey Nezhdanov wrote: > 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

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

2009-06-14 Thread Fran
On Jun 14, 9:56 pm, mdipierro wrote: > I am thinking (experimenting) that as we can do read.json and > select.json perhaps one should be able to do create.json and send the > data using json format. This is definitely required. Currently I'm using ?format=json for my CRUD functions, but having

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

2009-06-14 Thread mdipierro
My only problem is when we require somthing.json or something.xml we can customize how the output gets filtered (generic.json, generic.xml, etc.) but not the input. hence the input format must be taken care at the action level or at the crud function level. If we do the latter, the behavior cannot

[web2py:24159] Pagination of Search results

2009-06-14 Thread Salerno il Calabrese
Hello, I am new to web2py and this group. Would be thankful if someone could help me to paginate the results/hits of search. Suppose the following case: ---in models--- db.define_table('table_name', SQLField('Title','text',), SQLField('Artist','string',length=256)) -- in Controllers

[web2py:24160] Postgresql-confusion

2009-06-14 Thread Johann Spies
I am new to web2py and want to use postgresql. The example from the examples resulted in the following ticket: Ticket 192.168.0.253.2009-06-14.15-49-37.29bfdc0b-80d5-4e45-abf1-fa13eec8fa36 Error traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Traceback (most recent call last):

[web2py:24161] Re: Delete

2009-06-14 Thread pk
yeah, sorry i think i pressed my self not good enough, when youser delete a project from the table project then i need a command to delete the accordant file record from the table file thanks On 14 Jun., 23:02, mdipierro wrote: > this has been default behavior for some time. Have you checked i

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

2009-06-14 Thread mdipierro
OK. you win. On Jun 14, 3:54 pm, Hans Donner wrote: > then how to recognise what value was submitted? > > On 14 jun, 22:53, mdipierro wrote: > > > I would then just handle this manual in onvalidate, no need for the > > hidden file. > > > On Jun 14, 5:51 am, Hans Donner wrote: > > > > If I have

[web2py:24163] Re: Pagination of Search results

2009-06-14 Thread mdipierro
http://www.web2py.com/AlterEgo/default/show/95 On Jun 14, 12:32 pm, Salerno il Calabrese wrote: > Hello, > > I am new to web2py and this group. Would be thankful if someone could > help me to paginate the results/hits of search. > > Suppose the following case: > > ---in models--- > > db.define_t

[web2py:24164] Re: Postgresql-confusion

2009-06-14 Thread mdipierro
There are two options here: - installation was not successful - you have two python versions (one has psycopg2 and you are using the other to start web2py). Ignore web2py and see if you can do python >>> import psycopg2 Which directory you use to install psycopg2 should not make any difference.

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

2009-06-14 Thread Hans Donner
Hi Massimo, it's not about winning - I prefer learning... On Sun, Jun 14, 2009 at 11:14 PM, mdipierro wrote: > > OK. you win. > > On Jun 14, 3:54 pm, Hans Donner wrote: >> then how to recognise what value was submitted? >> >> On 14 jun, 22:53, mdipierro wrote: >> >> > I would then just handle

[web2py:24166] this made me laugh

2009-06-14 Thread mdipierro
... but I am not sure I understand whether it is a positive or a negative comment. http://twitter.com/dreid/status/2109869826 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to t

[web2py:24167] this made me laugh

2009-06-14 Thread mdipierro
... but I am not sure I understand whether it is a positive or a negative comment. http://twitter.com/dreid/status/2109869826 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to t

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

2009-06-14 Thread mdipierro
I did learn in this case, that's all I meant. ;-) What is your suggestion? Massimo On Jun 14, 4:19 pm, Hans Donner wrote: > Hi Massimo, > > it's not about winning - I prefer learning... > > On Sun, Jun 14, 2009 at 11:14 PM, mdipierro wrote: > > > OK. you win. > > > On Jun 14, 3:54 pm, Hans Donn

[web2py:24169] Re: Delete

2009-06-14 Thread mdipierro
shouldn't there be a file in projectfile that references a project? Or can a projectfile belong to multiple projects? On Jun 14, 4:13 pm, pk wrote: > yeah, > sorry i think i pressed my self not good enough, when youser delete a > project from the table project > then i need a command to delete t

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

2009-06-14 Thread Hans Donner
have an extra state besides readable/writable: submittable (in case of readable - true) -> field will be processed as hidden (and I assume validators are run on hidden as well?) On Sun, Jun 14, 2009 at 11:35 PM, mdipierro wrote: > > I did learn in this case, that's all I meant. ;-) > What is your

[web2py:/] Re: Delete

2009-06-14 Thread pk
a projectfile should reference a project, but a project can have many projectfiles On 14 Jun., 23:37, mdipierro wrote: > shouldn't there be a file in projectfile that references a project? Or > can a projectfile belong to multiple projects? > > On Jun 14, 4:13 pm, pk wrote: > > > yeah, > > sor

[web2py:24172] Re: this made me laugh

2009-06-14 Thread DJ
He's probably referring to high-speed jet engines ;-) I would take it as a compliment! Web2Py rocks and it's a matter of time before more people realize this. On this note Massimo, have you considered writing an article introducing Web2py on Linux Journal? I am sure a lot of readers would be exc

[web2py:24173] Re: I want to send an email...

2009-06-14 Thread Eddie Eyles
I'm also intermittently getting 'Gateway timeout' when I try to access web2py.com. I've not looked for information about which node was at fault, but will do next time! I can access it at the moment, and my full traceroute (from the UK) is: Tracing route to web2py.com [140.192.37.194] over a max

[web2py:24174] Re: I want to send an email...

2009-06-14 Thread Eddie Eyles
I'm also intermittently getting 'Gateway timeout' when I try to access web2py.com. I've not looked for information about which node was at fault, but will do next time! I can access it at the moment, and my full traceroute (from the UK) is: Tracing route to web2py.com [140.192.37.194] over a max

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

2009-06-14 Thread mdipierro
The problem is if the field is submitted by the user (even if hidden) it must be validated. If validation fails there must be a way to report the error but there is no visible input field in the form to attach the message to. I think what you have is special enough that should be treated as it is

[web2py:24176] Re: Delete

2009-06-14 Thread mdipierro
That is what I thought but I do not see in "projectfile" any reference field to "project". On Jun 14, 4:47 pm, pk wrote: > a projectfile should reference a project, but a project can have many > projectfiles > > On 14 Jun., 23:37, mdipierro wrote: > > > shouldn't there be a file in projectfile

[web2py:24177] Re: this made me laugh

2009-06-14 Thread mdipierro
I have emailed him complimenting him for the previous article. I have given my availability to answer question about web2py if he is interested. I have not explicitly suggested writing an article and it would be better if somebody else does it. I am willing to help any way I can of course. Massim

[web2py:24179] Re: this made me laugh

2009-06-14 Thread JD Erickson
It's negative. Ive seen lots of comments like that, even from friends of mine who write web apps. They tend to be the same kind of ignorant people who made fun of Rails before finally being converted to the idea of MVC for the web, and then made fun of other frameworks that tried to emulate Ra

[web2py:24178] Args and Ajax call

2009-06-14 Thread Fauché JM
Hello , Here is a copy from a message I send to Massimo but without response (maybe I send it to a wrong place..),I spend a long time to anderstand maybe my code is wrong or the solution stupid but I don't find the solution .If you can help me ... I have a problem: 1- in controlers I write this

[web2py:24180] Re: Args and Ajax call

2009-06-14 Thread mdipierro
Sorry Fauché, I did got get your previous email. here are two issues: 1) SELECT(liste,_id="choix",_name="choix") should be SELECT(*liste,_id="choix",_name="choix") This does not appear to be causing the second problem but it is the proper syntax. 2) You problem is caused by the fact tha

[web2py:24181] what could we use this for?

2009-06-14 Thread mdipierro
http://plash.beasts.org/wiki/NativeClient --~--~-~--~~~---~--~~ 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, se

[web2py:24182] Re: simplejson and date/datetime help

2009-06-14 Thread weheh
I'm already doing import gluon.contrib.simplejson as sj and then return sj.dump(x) --~--~-~--~~~---~--~~ 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@goog

[web2py:24183] How to output a ''?

2009-06-14 Thread Eddie Eyles
I'm retrieving data that may contain carriage returns, and I want to display this with these line breaks intact, i.e. I need to put either a '' or an HTML block element closure/opening in place of each carriage return. I have tried the following in the view: {{=row.basic.comments.replace('\n',''

[web2py:24184] Re: How to output a ''?

2009-06-14 Thread Álvaro Justen [Turicas]
On Sun, Jun 14, 2009 at 10:56 PM, Eddie Eyles wrote: > > I'm retrieving data that may contain carriage returns, and I want to > display this with these line breaks intact, i.e. I need to put either > a '' or an HTML block element closure/opening in place of each > carriage return.  I have tried th

[web2py:24186] Getting a uploaded file as image?

2009-06-14 Thread Michael
I have a model that has: db.Field('screenshot', 'upload')) In my controller i have: def add(): form = SQLFORM(db.apps) if form.accepts(request.vars, session): redirect(URL(r=request, c='default', f='index')) return dict(form = form) an

[web2py:24185] Re: Proposal for auth

2009-06-14 Thread Alexey Nezhdanov
No, I didn't meant IE. I meant that since redirect page doesn't have anybody for a user AND it is not a 301/303 page - it actually rendered. That is visible at least in Firefox. Also if I just add some random content (like 'you are being redirected') it will be visible too (site -> 'you are bein

[web2py:24187] Re: How to output a ''?

2009-06-14 Thread Hans Donner
you can use: {{=P(row.basic.comments, cr2br=true)}} On Mon, Jun 15, 2009 at 4:04 AM, Álvaro Justen [Turicas] wrote: > > On Sun, Jun 14, 2009 at 10:56 PM, Eddie Eyles wrote: >> >> I'm retrieving data that may contain carriage returns, and I want to >> display this with these line breaks intact, i

[web2py:24188] Javascript quickie for SQLTABLE

2009-06-14 Thread JohnMc
Does SQLTABLE produce the output you need, except you want different column headers and maybe slightly different coloration of the THEAD row? The Javascript below does exactly that. The combination of SQLTABLE and the code below has sped up my table builds so I thought I would share. Usage: Add

[web2py:24189] Re: simplejson and date/datetime help

2009-06-14 Thread mdipierro
Then your problem is that somehow you did not upgrade the code in the contrib folder. Other people have reported problems in upgrading from svn. Massimo On Jun 14, 8:32 pm, weheh wrote: > I'm already doing >     import gluon.contrib.simplejson as sj > and then >     return sj.dump(x) --~--~

[web2py:24190] Re: Proposal for auth

2009-06-14 Thread mdipierro
I would like to hear more opinions about this before changing it. Pros? Cons? Massimo On Jun 14, 10:28 pm, Alexey Nezhdanov wrote: > No, I didn't meant IE. I meant that since redirect page doesn't have anybody > for a user AND it is not a 301/303 page - it actually rendered. > That is visible a

[web2py:24191] Re: Getting a uploaded file as image?

2009-06-14 Thread mdipierro
I marked with ## the lines that I added, changed. Hope it is self- explanatory. Let me know if this fixes it. def add(): form = SQLFORM(db.apps) if form.accepts(request.vars, session): redirect(URL(r=request, c='default', f='index')) records=db(db.apps.

[web2py:24192] Re: How to output a ''?

2009-06-14 Thread mdipierro
Yes, this is what you want: {{=XML(row.basic.comments.replace('\n',''),sanitize=True)}} is deprecated and it should be , sanitize fixes it for you. You can also be more explicit {{=XML(row.basic.comments.replace('\n',''),permitted_tags= ['br/'],sanitize=True)}} so that only is un-escaped.

[web2py:24193] Re: Proposal for auth

2009-06-14 Thread Alexey Nezhdanov
Sure. For a start I'll provide the list that I have. Pros: 1) Search-engine friendly. SEs see proper '401 Not authorised' response instead of '303 Found' when trying to access login-only pages 2) Unit tests - binding to 401/403 codes is more explicit. Receiving them gives better understanding on w

[web2py:24194] Re: Proposal for auth

2009-06-14 Thread Hans Donner
can't the login page be included in the error page? This way you have both the error and no need for redirect as a user can directly login. On Mon, Jun 15, 2009 at 8:08 AM, Alexey Nezhdanov wrote: > Sure. For a start I'll provide the list that I have. > > Pros: > 1) Search-engine friendly. SEs se

[web2py:24195] Re: Built-in helper A.

2009-06-14 Thread annet
Hans, Thanks. Problem solved. Annet. --~--~-~--~~~---~--~~ 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 e

[web2py:24196] Re: Proposal for auth

2009-06-14 Thread Alexey Nezhdanov
That's a question to Massimo. Currently auth code just provides an URL that should be displayed instead. Such change requires rendering new URL w/o actually re-requesting needed page from the browser. On Mon, Jun 15, 2009 at 10:16 AM, Hans Donner wrote: > > can't the login page be included in th