[web2py] Re: a few comments on session handling

2011-04-05 Thread Anthony
On Sunday, April 3, 2011 10:42:17 PM UTC-4, VP wrote: i'm making a few observations as i'm debugging my app. They might reflect my lack of understanding of how web2py works. Anyway, a few thoughts + It appears session.forget() (as mentioned numerous times in the book) should be

[web2py] Re: GAE internal error unknown

2011-04-05 Thread kawate
Hi Arble Samong Thank you very much. Actually the application does not run even on web2py server. The appengine log prove how stupid i am. It is a simple progam miss 'undefined name' Thank you, again. On 4月5日, 午後1:49, Arbie Samong phek...@gmail.com wrote: In appengine.google.com you have your

[web2py] Re: {{=plugin_wiki.embed()}} ?

2011-04-05 Thread mart
LOL :) , alright that works... thanks :) On Apr 2, 9:48 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: It is not {{=plugin_wiki.embed('widget_name',)}} it is {{=plugin_wiki.widget('widget_name',)}}  # to embed a widget or {{=plugin_wiki.render()}} # to embed a

Re: [web2py] .represent = ... in left join

2011-04-05 Thread Johann Spies
On 4 April 2011 16:11, Richard Vézina ml.richard.vez...@gmail.com wrote: Are course_week1 and course_week2 not null?? No. If not you need ...requires=IS_NULL_OR(IS_IN_DB(your requires) and in ...represent= you should use zero option (see book about that) or something like that :

Re: [web2py] .represent = ... in left join

2011-04-05 Thread Johann Spies
On 5 April 2011 09:16, Johann Spies johann.sp...@gmail.com wrote: Thanks! That solved the problem. I could not find something in the book about a 'zero option' though. Now .represent works on the screen but not in the CSV-output. I have used: {{ import cStringIO

[web2py] passing data as post params rather than URL vars/args

2011-04-05 Thread Brian Will
I assumed there would simply be a Storage in the response object I could just stuff things into, but it seems not. So my question is what's the easiest way to append POST data to a response (for both cases: a redirect and a non-redirect)? Maybe I'm going about this the wrong way. I have a simple

[web2py] Re: passing data as post params rather than URL vars/args

2011-04-05 Thread Arbie Samong
From what I can understand you want your data available even after a redirect. POST won't have that, so you should either store it on the session, with cookies or with the database. If it's just temporary I would suggest using session variables. Regards, Arbie On Apr 5, 3:38 pm, Brian Will

[web2py] Re: passing data as post params rather than URL vars/args

2011-04-05 Thread Brian Will
Come to think of it, not sure why I'm thinking it has to get passed as POST data: the redirect isn't triggering a second request, right? I just want to pass data from the action to the view. (Though I'm still curious how to POST data in the response.) I also realized I can manually set

[web2py] auto-update/refresh content

2011-04-05 Thread mart
Hi, I'm trying to do these 2 things: 1) I have a directory structure which stores sioftware builds (many builds daily), all versioned and sortable, many products, branches, blablabla..., alright. i would like new arrivals to magically announce their arrival in some section of a web page (but

[web2py] Re: passing data as post params rather than URL vars/args

2011-04-05 Thread Brian Will
Using session occurred to me, but I was put off by the idea of cluttering session with one-time use data. Is it good practice to then remove the data from session after use? Probably doesn't matter, I guess. On Apr 5, 12:47 am, Arbie Samong phek...@gmail.com wrote: From what I can understand you

[web2py] web2py/poweredby problem

2011-04-05 Thread guruyaya
I've been looking around http://www.web2py.com/poweredby section, and decided to go into one of the websites. I don't get why it asked me to log in, but I can understand this is website policy. The problem I had was this. Examine this url:

Re: [web2py] web2py/poweredby problem

2011-04-05 Thread Kenneth Lundström
Why is there no link to poweredby page on the frontpage or did I miss it? That sounds strange that you have to login, I don´t know why. But if you click on the name below the screencapture of the site you don´t have to login. Kenneth I've been looking around

Re: [web2py] Re: PDF writing under GAE

2011-04-05 Thread Martín Mulone
Well I browse the code of fpdf.py and pil is only using to check is the file is and image format, I think is easy to do to support gae, changing in gae to api or make the check like IS_IMAGE from web2py. Anyways there are other tools you can use to write pdf reports like PISA, Reportlab.

[web2py] ajax function

2011-04-05 Thread leone
Hi, sometimes I need to use ajax function passing as second argument a list of ids and costants. There is a way to pass to callback values of elements by id, AND string costants? Thanks for help.

[web2py] Re: FAQ topic(s) on typical Web2py FUD

2011-04-05 Thread Christopher Steel
It could be interesting to have an IDE configuration section. As far as Eclipse is concerned you can look at these: http://code.google.com/p/neo-web2py2eclipse/ http://pierrethibault.posterous.com/2010/10/web2py-eclipse-pydev-recipe.html Are you currently using an IDE???, which one? On Apr 4,

[web2py] Re: Web2py version 1.94.6 bug?

2011-04-05 Thread Christopher Steel
Understood, just being really lazy ; ) thanks for the fix. http://commons.wikimedia.org/wiki/Category:Erlenmeyer_flasks http://commons.wikimedia.org/wiki/Category:Chemistry_icons On Apr 4, 2:12 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I just fixed this in trunk. please remove

Re: [web2py] Re: PDF writing under GAE

2011-04-05 Thread contatogilson...@gmail.com
There's this plugin for web2py: https://github.com/lucasdavila/appreport __ ___ *Gilson Filho* *Web Developer http://gilsondev.com*

[web2py] Re: web2py/poweredby problem

2011-04-05 Thread Massimo Di Pierro
was a design issue. changed. On Apr 5, 4:15 am, Kenneth Lundström kenneth.t.lundst...@gmail.com wrote: Why is there no link to poweredby page on the frontpage or did I miss it? That sounds strange that you have to login, I don t know why. But if you click on the name below the screencapture

[web2py] Re: PDF writing under GAE

2011-04-05 Thread Massimo Di Pierro
It would be nice if fpdf were to work on GAE out of the box. Moreover I think PIL is available on GAE. On Apr 5, 5:19 am, Martín Mulone mulone.mar...@gmail.com wrote: Well I browse the code of fpdf.py and pil is only using to check is the file is and image format, I think is easy to do to

Re: [web2py] Re: a few comments on session handling

2011-04-05 Thread Jonathan Lundell
On Apr 4, 2011, at 11:22 PM, Anthony wrote: You might also want to lock the session even if it is merely being read -- otherwise, if a second action writes to the session after a first action has read it in, then the first action will be working with a version of the session that is no

Re: [web2py] .represent = ... in left join

2011-04-05 Thread Richard Vézina
About zero option, search in page for zero : http://www.web2py.com/book/default/chapter/07 http://www.web2py.com/book/default/chapter/07There is some explanation near IS_IN_SET... There maybe more detailed information somewhere else too... I don't use it in my code since it arrive after I start

Re: [web2py] .represent = ... in left join

2011-04-05 Thread Richard Vézina
I did not use export_to_csv for now... I just test it sometimes ago... But I guest you should define your .represent for stream table before try to apply them to your csv output... Hope it helps. Richard On Tue, Apr 5, 2011 at 3:27 AM, Johann Spies johann.sp...@gmail.com wrote: On 5 April

Re: [web2py] components and args

2011-04-05 Thread Richard Vézina
Answer below On Mon, Apr 4, 2011 at 7:14 PM, Anthony abasta...@gmail.com wrote: You're saying when the page loads, the LOAD component shows loading..., but the create form never actually loads there? Can you reproduce the problem with a somewhat more simplified example? Yes and I will try

[web2py] Re: ajax function

2011-04-05 Thread Ross Peoples
Could you be a little more specific? Are you trying to pass args and vars? Or are you trying to load HTML using AJAX and sending it to a target DIV? If you are using web2py's ajax function, you may be limited to what you can do. Worst case, you can always try calling jQuery's load() method:

[web2py] SourceKit webeditor - Great Alternative to web editing - works great with dropbox + web2py

2011-04-05 Thread Bruno Rocha
A Textmate like lightweight programmer's text editor right inside of Chrome. It saves files directly to Dropbox, so if you have the Dropbox sync software installed, the changes will appear locally as if you did so with a text editor! Changes will be stored remotely so naturally this same extension

Re: [web2py] components and args

2011-04-05 Thread Richard Vézina
I would like to use the component with jquery ui tabs plugin... So I would like my different form to be accessible in different tabs on the same page... The components seems to me the way to go... Richard On Mon, Apr 4, 2011 at 8:51 PM, pbreit pbreitenb...@gmail.com wrote: I would suggest only

[web2py] Re: auto-update/refresh content

2011-04-05 Thread Ross Peoples
That's basically how it works. Although as you learn more about AJAX, you'll find that there are a bunch of different ways to do this, including more 2-way types of communication, where you would do something with the data returned from the controller before or after displaying it on the page.

[web2py] Re: a few comments on session handling

2011-04-05 Thread VP
Instead of locking by default unless explicitly forgetting, we require locking *only if* sessions is saved/written/modified. You might also want to lock the session even if it is merely being read -- otherwise, if a second action writes to the session after a first action has read it in,

Re: [web2py] Re: a few comments on session handling

2011-04-05 Thread Jonathan Lundell
On Apr 5, 2011, at 8:13 AM, VP wrote: I think the policy is quite simple: you don't lock session, if you are only reading session variables. You lock only if you modify session certain variables; and you lock it immediately before you write, and unlock immediately before you write. If

[web2py] Putting logic back to controller

2011-04-05 Thread kedai
Hi I'm enjoying my dive with web2py. I would like to seek help/pointers re putting logic back at controller. I have two tables, db.define_table('person', Field('name')) db.define_table('cats', Field('name'), Field('owner', db.person)) I have a controller default/index def index():

[web2py] Re: a few comments on session handling

2011-04-05 Thread VP
I think the policy is quite simple:  you don't lock session, if you are only reading session variables.  You lock only if you modify session certain variables; and you lock it immediately before you write, and unlock immediately before you write. If that's your locking policy, I don't

[web2py] Re: Putting logic back to controller

2011-04-05 Thread Ross Peoples
You should really be joining the queries: records = db(db.person.id==db.cats.owner).select(db.cats.ALL, db.person.ALL) Then in your view, you access this by using: {{for record in records:}} b{{=record.person.name}}/b: {{=record.cats.name}} {{pass}}

[web2py] python 2.5 hmac issues

2011-04-05 Thread Matt
I recently attempted to move my web2py install to a different server. All went well except for passwords failing to validate. It turns out that the version of python I was using (2.5.1) had an issue with hmac. Essentialy the following will give an incorrect digest on this version of python:

[web2py] HTML tags vs HTML?

2011-04-05 Thread pbreit
What are people's thoughts on using HTML tags vs plain HTML? I'm thinking of going more towards pure HTML. Will I be losing anything major? For example: a href=/item/{{=item.id}}{{=item.title}}/a {{=A(item.title, _href=URL('default', 'item', extension='', args=item.id))}}

Re: [web2py] Re: a few comments on session handling

2011-04-05 Thread Jonathan Lundell
On Apr 5, 2011, at 8:33 AM, VP wrote: I think the policy is quite simple: you don't lock session, if you are only reading session variables. You lock only if you modify session certain variables; and you lock it immediately before you write, and unlock immediately before you write. If

[web2py] Re: a few comments on session handling

2011-04-05 Thread VP
read-1 read-2 write-2 write-1 ...so any changes #2 makes are lost. I think this sequence is okay, as long as the write's are atomic and they use up-to-date information. It would be undesirable for read-1 to extract a variable and to update it with write-1. But if write-1 manipulates

Re: [web2py] components and args

2011-04-05 Thread Anthony
On Tuesday, April 5, 2011 10:00:52 AM UTC-4, Richard wrote: Also, is that view the 'create.html' view (so, you're loading a 'create' component on the 'create' page itself)? Yes, I was in a pretty early stage of testing the component... I get recursion when it works... I mean when I use

Re: [web2py] HTML tags vs HTML?

2011-04-05 Thread Jonathan Lundell
On Apr 5, 2011, at 9:02 AM, pbreit wrote: What are people's thoughts on using HTML tags vs plain HTML? I'm thinking of going more towards pure HTML. Will I be losing anything major? For example: a href=/item/{{=item.id}}{{=item.title}}/a {{=A(item.title, _href=URL('default', 'item',

[web2py] Re: HTML tags vs HTML?

2011-04-05 Thread Massimo Di Pierro
My rule is: - use html in views - use html helpers in controllers and models - always use URL to generate urls (*) So in your example a href=URL('default','item',args=item.id){{=item.title}}/a The first two rules are a matter of test but (*) is not. Soon or later your code breaks if you do not

[web2py] Require login for whole application

2011-04-05 Thread Fredrik
Hi, is there any suggested way to require login for a whole application. Our application in web2py is for registered customers (whom we manually add) only. For each action we currently have a decorator stating that the user must be logged in. Is there any way to this in one place for the whole

[web2py] Re: HTML tags vs HTML?

2011-04-05 Thread Anthony
The helpers are useful if you need to do server-side DOM parsing ( http://web2py.com/book/default/chapter/05#Server-side-DOM-and-Parsing) -- otherwise, I suppose it's a matter of preference. I think the URL function is generally recommended, particularly if there's a chance you might need to do

[web2py] Re: FAQ topic(s) on typical Web2py FUD

2011-04-05 Thread mikech
Thanks Anthony, that's the information I'm looking for. The only downside re: the blog is that it's marked as old. Is there an updated source?

Re: [web2py] Re: a few comments on session handling

2011-04-05 Thread David Warnock
Jonathan, This policy is okay, but not good for reasons argued above. It is better not acquiring a lock unless you need one than to keeping a lock unless you don't need it. My question is: in your locking policy above, what's the purpose of locking at all? I wonder whether it would be

[web2py] Re: FAQ topic(s) on typical Web2py FUD

2011-04-05 Thread Anthony
On Tuesday, April 5, 2011 12:13:45 PM UTC-4, mikech wrote: Thanks Anthony, that's the information I'm looking for. The only downside re: the blog is that it's marked as old. Is there an updated source? There's a flash message saying the blog is old, but not all the entries are actually

Re: [web2py] Re: a few comments on session handling

2011-04-05 Thread Anthony
On Tuesday, April 5, 2011 12:25:13 PM UTC-4, David Warnock wrote: Jonathan, This policy is okay, but not good for reasons argued above. It is better not acquiring a lock unless you need one than to keeping a lock unless you don't need it. My question is: in your locking policy

[web2py] Re: FAQ topic(s) on typical Web2py FUD

2011-04-05 Thread pbreit
Perception is reality, even more so on these topics.

Re: [web2py] Re: a few comments on session handling

2011-04-05 Thread Jonathan Lundell
On Apr 5, 2011, at 9:25 AM, David Warnock wrote: Jonathan, This policy is okay, but not good for reasons argued above. It is better not acquiring a lock unless you need one than to keeping a lock unless you don't need it. My question is: in your locking policy above, what's the

Re: [web2py] Re: a few comments on session handling

2011-04-05 Thread Anthony
On Tuesday, April 5, 2011 9:46:41 AM UTC-4, Jonathan Lundell wrote: On Apr 4, 2011, at 11:22 PM, Anthony wrote: You might also want to lock the session even if it is merely being read -- otherwise, if a second action writes to the session after a first action has read it in, then the

[web2py] Re: HTML tags vs HTML?

2011-04-05 Thread pbreit
Perfect. Good to know.

[web2py] Re: a few comments on session handling

2011-04-05 Thread VP
My question is: in your locking policy above, what's the purpose of locking at all? If you don't lock during writes (e.g. when updating the counter), two writes might happen simultaneously and cause inconsistent results. Essentially, this is what I think how SQLite works: concurrent reads are

Re: [web2py] Re: a few comments on session handling

2011-04-05 Thread Jonathan Lundell
On Apr 5, 2011, at 9:55 AM, Anthony wrote: Yes, that's a race condition with writing. My point was that even if the first action is merely reading (but not doing any writing), you can have problems. For example: Action 1: read session Action 2: read session Action 2: write session

[web2py] web2py DAL, requests, threads and memory

2011-04-05 Thread Gleb
Hi All, I'm building an app on Pyramid framework and would like to use the web2py-DAL with it. Pyramid makes every request in a single thread, so how should I manage the DAL object? Should it be created once and then passed to every thread? If I do so and some frequent queries are passed to the

Re: [web2py] Re: a few comments on session handling

2011-04-05 Thread Jonathan Lundell
On Apr 5, 2011, at 8:26 AM, VP wrote: read-1 read-2 write-2 write-1 ...so any changes #2 makes are lost. I think this sequence is okay, as long as the write's are atomic and they use up-to-date information. It would be undesirable for read-1 to extract a variable and to update

Re: [web2py] Re: a few comments on session handling

2011-04-05 Thread Anthony
On Tuesday, April 5, 2011 1:19:04 PM UTC-4, Jonathan Lundell wrote: On Apr 5, 2011, at 9:55 AM, Anthony wrote: Yes, that's a race condition with writing. My point was that even if the first action is merely reading (but not doing any writing), you can have problems. For example:

[web2py] Re: FAQ topic(s) on typical Web2py FUD

2011-04-05 Thread Anthony
On Tuesday, April 5, 2011 12:51:46 PM UTC-4, pbreit wrote: Perception is reality, even more so on these topics. Yeah, maybe instead of flashing a warning, the FAQ should just include dates on the postings.

[web2py] Re: HTML tags vs HTML?

2011-04-05 Thread VP
On Apr 5, 11:09 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: My rule is: - use html in views - use html helpers in controllers and models - always use URL to generate urls (*) Should HTML helpers appear frequently in controllers/models? I can see in some ajax stuffs, but

[web2py] Re: FAQ topic(s) on typical Web2py FUD

2011-04-05 Thread pbreit
I think we need a new repository for information. I'm not sure Slices is quite the right approach. A wiki might work better.

[web2py] Re: FAQ topic(s) on typical Web2py FUD

2011-04-05 Thread Anthony
https://groups.google.com/d/topic/web2py/HkkZ_-kMUYE/discussion On Tuesday, April 5, 2011 1:55:35 PM UTC-4, pbreit wrote: I think we need a new repository for information. I'm not sure Slices is quite the right approach. A wiki might work better.

Re: [web2py] Re: HTML tags vs HTML?

2011-04-05 Thread Jonathan Lundell
On Apr 5, 2011, at 10:52 AM, VP wrote: On Apr 5, 11:09 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: My rule is: - use html in views - use html helpers in controllers and models - always use URL to generate urls (*) Should HTML helpers appear frequently in

[web2py] Re: web2py DAL, requests, threads and memory

2011-04-05 Thread Mengu
you can create a new request class extending from the original one and via using config.set_request_factory(YourReqClass)and make dal an attribute of it. whenever the request ends, you can close the connection. On Apr 5, 7:29 pm, Gleb gleb.sternh...@googlemail.com wrote: Hi All, I'm building

Re: [web2py] Re: web2py DAL, requests, threads and memory

2011-04-05 Thread Vasile Ermicioi
I think DAL connection was designed with web2py design in mind: on each request a controller is executed and also are executed all models files including database connection, and after request memory is freed and connection close, I used it successfully in a long running app with a few

[web2py] Re: HTML tags vs HTML?

2011-04-05 Thread Anthony
On Tuesday, April 5, 2011 1:52:48 PM UTC-4, VP wrote: On Apr 5, 11:09 am, Massimo Di Pierro massimo@gmail.com wrote: My rule is: - use html in views - use html helpers in controllers and models - always use URL to generate urls (*) Should HTML helpers appear

[web2py] Re: Require login for whole application

2011-04-05 Thread Ross Peoples
Using the @auth.requires_login() on every function is the only way I know of. However, you may be able to put something like this at the top of each controller: if auth.user is None: redirect(URL('default', 'login')) However, it might cause a problem if you put that in your default

[web2py] Re: Require login for whole application

2011-04-05 Thread Anthony
On Tuesday, April 5, 2011 3:13:22 PM UTC-4, Ross Peoples wrote: Using the @auth.requires_login() on every function is the only way I know of. However, you may be able to put something like this at the top of each controller: if auth.user is None: redirect(URL('default', 'login'))

[web2py] rawsql like operator

2011-04-05 Thread cyber
I need a hint! It seems that LIKE operator doesn't work.Or... I'm not so clever human... Say, how can I deal with rawsql query? I need to find all records but I know only some part of exact value. The code: n=request.vars.num ### it returns only number results=db.executesql(SELECT * FROM autos

[web2py] Re: rawsql like operator

2011-04-05 Thread DenesL
I believe you want results=db(db.autos.num.contains(n)).select() On Apr 5, 3:58 pm, cyber vlad.mul...@gmail.com wrote: I need a hint! It seems that LIKE operator doesn't work.Or... I'm not so clever human... Say, how can I deal with rawsql query? I need to find all records but I know

[web2py] Re: rawsql like operator

2011-04-05 Thread DenesL
... or the equivalent raw sql results=db.executesql(SELECT * FROM autos WHERE num LIKE %%%s%%; %n) On Apr 5, 4:45 pm, DenesL denes1...@yahoo.ca wrote: I believe you want results=db(db.autos.num.contains(n)).select() On Apr 5, 3:58 pm, cyber vlad.mul...@gmail.com wrote: I need a

[web2py] Re: Require login for whole application

2011-04-05 Thread pbreit
And maybe add something like: vars={'_next': request.url} to the URL()

[web2py] Re: auto-update/refresh content

2011-04-05 Thread mart
Wow! didn't know that - You know, there is so much out there, that we (well, me for sure) rarely take the time to discover things fully. I love that when I know in advance that there is something to be had by sticking to something and looking deeper than we (me) usually would! Thanks for the tip,

[web2py] Adding a Widget to a simple FORM() input()

2011-04-05 Thread Lennon
I'm trying to add the jquery UI datepicker from this web2py slice: http://web2pyslices.com/main/slices/take_slice/22 It works well with SQLFORM, but I want to use it on a form I've defined with the FORM() helper. Is there a way to do this using a simple syntax similar to the widget=date_widget

[web2py] z index of plugin mmodal and youtube

2011-04-05 Thread kawate
Hello every body: I have youtube video over the mmodal window in a plugin wiki page. How to change plugin_wiki elements. Is there hidden parameter in widget? It is nice to control the z index of page element. Thank you in advance.

[web2py] Error messages for radio validation

2011-04-05 Thread bluemoth
Hello all, If I have the following: db.define_table('languages', Field('language', 'string')) db.languages.language.requires = \ [IS_IN_SET(['english', 'french', 'german']), \ IS_NOT_EMPTY(error_message='Value required')] db.languages.language.widget =

[web2py] Re: Error messages for radio validation

2011-04-05 Thread DenesL
Hello, to eliminate the possibility of an error message, I would rewrite as: db.languages.language.default = 'english' # or any other in the list db.languages.language.requires = IS_IN_SET(['english', 'french', 'german']) db.languages.language.widget = SQLFORM.widgets.radio.widget On Apr 5,

[web2py] Worked with joined data

2011-04-05 Thread pbreit
Is there some way to work with joined data like this? rows = ((db.item.status=='active') (db.item.created_by==db.auth_user.id)).select() return (rows=rows) {{for item, user in rows.item, rows.auth_user:}} {{=item.id}} by {{=user.first_name}} {{pass}} I'm not sure if it's

[web2py] Re: Adding a Widget to a simple FORM() input()

2011-04-05 Thread DenesL
Just add _class=date to your INPUT field definition. On Apr 5, 5:58 pm, Lennon lpru...@hotmail.com wrote: I'm trying to add the jquery UI datepicker from this web2py slice:http://web2pyslices.com/main/slices/take_slice/22 It works well with SQLFORM, but I want to use it on a form I've

[web2py] Re: auto-update/refresh content

2011-04-05 Thread DenesL
There is something called reverse ajax, one site explaining the technique is http://www.obviously.com/tech_tips/slow_load_technique I have not had the need for it but I would like to hear from you if you get around to use it. On Apr 5, 5:21 pm, mart msenecal...@gmail.com wrote: Wow! didn't

[web2py] Re: Join breaks virtual fields in the new web2py

2011-04-05 Thread pbreit
There's no way to use trunk with the Mac download, correct?

[web2py] too many redirect during checking condition

2011-04-05 Thread 黄祥
hi, i want to use condition that if user not log in will redirect to login page, and if logged in will redirect to index page, heres my controller : if not session.authorized: redirect(URL('user')) else: redirect(URL('index')) def index(): return dict(message=T('Hello

[web2py] Re: Worked with joined data

2011-04-05 Thread DenesL
On Apr 5, 7:05 pm, pbreit pbreitenb...@gmail.com wrote: Is there some way to work with joined data like this? rows = ((db.item.status=='active')             (db.item.created_by==db.auth_user.id)).select() return (rows=rows) {{for item, user in rows.item, rows.auth_user:}}    

[web2py] Re: auto-update/refresh content

2011-04-05 Thread mart
reverse ajax, eh? alright, then I think it should be reversed! :) Of course I usually start anything with the word reversed in it with large pot of of coffee! stay tuned! thanks, Mart :) On Apr 5, 7:23 pm, DenesL denes1...@yahoo.ca wrote: There is something called reverse ajax, one site

Re: [web2py] too many redirect during checking condition

2011-04-05 Thread Martín Mulone
@auth.requires_login() def index(): return dict(message=T('Hello World')) 2011/4/5 黄祥 steve.van.chris...@gmail.com hi, i want to use condition that if user not log in will redirect to login page, and if logged in will redirect to index page, heres my controller : if not

[web2py] Re: Worked with joined data

2011-04-05 Thread pbreit
Yeah, I was trying to avoid the row.table thing. Not a big issue, just wondering.

Re: [web2py] too many redirect during checking condition

2011-04-05 Thread Stifan Kristi
it clear for me right now, thank you so much On Wed, Apr 6, 2011 at 7:02 AM, Martín Mulone mulone.mar...@gmail.comwrote: @auth.requires_login() def index(): return dict(message=T('Hello World')) 2011/4/5 黄祥 steve.van.chris...@gmail.com hi, i want to use condition that if user not

[web2py] Re: Error messages for radio validation

2011-04-05 Thread bluemoth
Thanks DenesL, It was probably the wrong example. I simplified my case but in my case I do expect errors to be reported so I was wanting to group the error messages for the radio buttons into one message. Cheers, Duane. On Apr 6, 10:56 am, DenesL denes1...@yahoo.ca wrote: Hello, to eliminate

[web2py] Re: Error messages for radio validation

2011-04-05 Thread bluemoth
Hi, I originally thought the FIELDSET might hold the solution but no. Maybe it can be used. Otherwise, I think the solution might be to recognise that the radio buttons relate to the same field and treat them as a group. But we still need an appropriate place/target to report the error. This

[web2py] Re: Adding a Widget to a simple FORM() input()

2011-04-05 Thread Lennon
I am aware of that method but I really don't like the default date and datetime widget. I want to use the one from that web2py slice. On Apr 5, 7:12 pm, DenesL denes1...@yahoo.ca wrote: Just add _class=date to your INPUT field definition. On Apr 5, 5:58 pm, Lennon lpru...@hotmail.com wrote:

[web2py] Re: auto-update/refresh content

2011-04-05 Thread Anthony
I think that's another term for Comet, which is just a general term for various server push techniques: http://en.wikipedia.org/wiki/Comet_(programming) Note, if you're using Comet/long-polling techniques, I think it keeps a request open for a long time, so if you're using a server that

Re: [web2py] Re: auto-update/refresh content

2011-04-05 Thread David Warnock
Note, if you're using Comet/long-polling techniques, I think it keeps a request open for a long time, so if you're using a server that blocks a thread for each request, you could run out of threads if you have lots of users connected at once. In that case, you may need to look into a

[web2py] Re: Require login for whole application

2011-04-05 Thread pbreit
Slight correction: if auth.user is None: redirect(URL('default','user', args='login')) And if you want next functionality (not tested): if auth.user is None: redirect(URL('default','user', args='login', vars={'_next': request.url} ))

[web2py] Re: auto-update/refresh content

2011-04-05 Thread mart
Thanks for the replies! :) May be fun to compare... If all goes, i can do this tonight (maybe) Thanks guys! Mart :) On Apr 5, 9:20 pm, David Warnock d...@warnock.me.uk wrote: Note, if you're using Comet/long-polling techniques, I think it keeps a request open for a long time, so if you're

[web2py] Modularity

2011-04-05 Thread pierreth
I wanted to share code from one web2py application to another. So I created two packages with the same name in two different web2py applications. I load the code of the package modules with local_import from the controllers of both application. The two applications are having almost the same

[web2py] Create a new window.

2011-04-05 Thread Mike Veltman
Well as a beginner with web2py I first have to say that I like it. So thank you to all the people who work on it. I am also a beginner with Python so do not expect very complicated questions (yet) Well I am building a application to deploy AIX unix installs on power machines. My application

[web2py] Problem with error_message in routes.py

2011-04-05 Thread pbreit
I uncommented the error_message config in my global routes.py file and it broke my whole site. It seemed to block stylesheets from loading but some site content actually did load. error_message_ticket works OK. Is anyone using this successfully?

[web2py] Re: Modularity

2011-04-05 Thread pierreth
Oups! It does like that it does not work. I was loading old code in my tests. The modules were not reloaded. I have to find another solution... On 5 avr, 22:04, pierreth pierre.thibau...@gmail.com wrote: I wanted to share code from one web2py application to another. So I created two packages

[web2py] Re: Adding a Widget to a simple FORM() input()

2011-04-05 Thread DenesL
OK, now I understand. I would modify web2py_ajax.html at the beginning to include: response.files.append(http://ajax.googleapis.com/ajax/libs/jqueryui/ 1.7.2/jquery-ui.js) or a similar line, and then in the web2py_ajax_init function add:

[web2py] Re: Modularity

2011-04-05 Thread pbreit
Applications are totally discrete so there would be no chance of a collision (if I understand correctly). app1 modules mypackage1 app2 modules mypackage2 Nothing in app1 knows about anything app2 (and vice versa). If you don't want to maintain two copies of the same

Re: [web2py] Re: Python Message Queue

2011-04-05 Thread pbreit
Was anyone able to make any progress with Celery? I am very interested as I am not having much luck with cron and background processes.

[web2py] Re: Modularity

2011-04-05 Thread pierreth
On 5 avr, 22:38, pbreit pbreitenb...@gmail.com wrote: Applications are totally discrete so there would be no chance of a collision (if I understand correctly). app1     modules         mypackage1 app2     modules         mypackage2 Nothing in app1 knows about anything app2 (and vice