[web2py] Re: How do I add JQuery UI to Web2PY

2011-09-17 Thread Anthony
On Sunday, September 18, 2011 2:11:04 AM UTC-4, JavierQQ wrote: > > can I do =form(_class="Dialog-form")? (Dialog-form is the id of > the example) > Not exactly, but assuming 'form' is a web2py FORM or SQLFORM object, you can add a class to it by adding a '_class' attribute. You can either

[web2py] Re: =MENU

2011-09-17 Thread Anthony
On Sunday, September 18, 2011 1:15:44 AM UTC-4, JavierQQ wrote: > > background:url(images/menu_bt.gif) > I don't know how it works but I use ('../') with the dots and the > slash The ../ refers to the parent folder of the current folder. So, if the current folder is /static/css, then ../ r

[web2py] Re: How do I add JQuery UI to Web2PY

2011-09-17 Thread JavierQQ
Can I edit =FORM too? is it difficult? As a example I'm going to insert this http://jqueryui.com/demos/dialog/#modal-form and I have one view called 'regcliente.html' that has this {{extend 'layout.html'}} Registrar cliente Cliente {{=form}} can I do =form(_class="Dialog-

[web2py] Re: The web2py grid/crud plugin you've always dreamed about!

2011-09-17 Thread tomt
Hi, I have a question about using powertable. When I try to build a powertable on the following select: tasks=db(db.task.cpaid==3).select(db.task.cpa,db.task.description,db.task.ls_js) I get the following error: File "/home/xa21/workspace/web2py/applications/cpa4/models/ plugin_powertable.py",

[web2py] Re: Why web2py is in French by default? How can I change it?

2011-09-17 Thread weheh
No problems with book for me. English.

[web2py] Re: How to redirect user to original url he asked after login

2011-09-17 Thread Massimo Di Pierro
In the crud case cud.create(...,next='action/[id]') automatically fills in the id of the record being created. Auth allows you to the same when a new user is created. On Sep 17, 3:30 pm, Jonathan Lundell wrote: > On Sep 17, 2011, at 1:24 PM, Anthony wrote: > > > Sounds like this will be comp

[web2py] Re: How to redirect user to original url he asked after login

2011-09-17 Thread Massimo Di Pierro
There are cases when the original "next" got lost. I did not full track the cause of the problem. The code in Auth was a quick hack to handle it. On Sep 17, 11:26 am, Jonathan Lundell wrote: > On Sep 17, 2011, at 8:46 AM, Massimo Di Pierro wrote: > > > > > > > > > > > The basic use case is this

[web2py] Re: Python Exceptions: how to show in View

2011-09-17 Thread Massimo Di Pierro
Mind try: #do something (*) except Exception, e: db.rollback() # may be needed if (*) fail on db io response.flash = "Error occured %s" % str(e) or if you need more info try: #do something (*) except: import traceback db.rollback() # may be needed if (*) fail on db io respon

[web2py] Re: problem with updating Form with writable=False Fields

2011-09-17 Thread Massimo Di Pierro
Why not just do? auth = Auth() auth.settings.extra_field['auth_user'] = [] auth.define_tables() On Sep 17, 10:46 am, Alex wrote: > Hi, > > first of all, many thanks to Massimo and all other contributers. > web2py is an amazing framework and exactly what I was looking for. > Keep up the excelle

[web2py] Re: web2py with jython on linux

2011-09-17 Thread Massimo Di Pierro
Can you try gluon/dal.py:import copy_reg from the jython shell. That line is in dal.py not in storage.py strange. On Sep 17, 11:56 am, Vasile Ermicioi wrote: > > Can you do import cPickle form a regular jython shell? > > yes > > steps to reproduce: > 1) > install latest jython (2.5.2) > 2) > wg

[web2py] Re: Why web2py is in French by default? How can I change it?

2011-09-17 Thread Anthony
Cleared my session cookie and now back to English (plugin_translate no longer linked in the HTML head). Anthony On Saturday, September 17, 2011 4:40:00 PM UTC-4, Anthony wrote: > > OK, now I'm seeing the book in French rather than English as well (only in > IE, not Chrome). The HTML source code

Re: [web2py] Nginx-uwsgi problem.

2011-09-17 Thread Michele Comitini
Another thing you should look at is how much paging is the machine doing under load. *vmstat* is your friend... mic 2011/9/17 Bruno Rocha : > I am using threads + Postgresql, I am using disk cache, but I am moving it > for memcache or the new redis suport in trunk. > I will try to change it for

Re: [web2py] Nginx-uwsgi problem.

2011-09-17 Thread Bruno Rocha
I am using threads + Postgresql, I am using disk cache, but I am moving it for memcache or the new redis suport in trunk. I will try to change it for processes. Thanks. On Sat, Sep 17, 2011 at 5:50 PM, Michele Comitini < michele.comit...@gmail.com> wrote: > Hi Bruno! > > Are you using threads or

Re: [web2py] Nginx-uwsgi problem.

2011-09-17 Thread Michele Comitini
Hi Bruno! Are you using threads or processes, sqlite or a rdbms? Seems a timeout while web2py is trying to access some resource. I suggest processes + rdbms (postgresql) mic 2011/9/17 Bruno Rocha : > I am getting a high traffic on the new service I released www.rifar.me > I did not expected too

[web2py] Re: Why web2py is in French by default? How can I change it?

2011-09-17 Thread Anthony
OK, now I'm seeing the book in French rather than English as well (only in IE, not Chrome). The HTML source code is in English, so I guess it is being translated client-side via plugin_translate. I see the following in the head of the HTML: I assume fr.js shouldn't be there. Note,

[web2py] register recepatcha not working

2011-09-17 Thread Avik Basu
I am using recaptcha using the following code (public and private keys not shown): auth.settings.register_captcha = Recaptcha(request, '', 'yy', use_ssl=False, error_message='please complete the reCaptcha') I've registered with recaptcha.net and I not running this from a localho

Re: [web2py] My Journey to web2py

2011-09-17 Thread Michele Comitini
Read first 3 chapters of web2py book then start right away coding with web2py do not waste time , look at the examples and search through the web2py user group messages; most of what you are trying to do has been already answered. Don't learn OOP from Java books you would learn the partial OOP i

Re: [web2py] Re: How to redirect user to original url he asked after login

2011-09-17 Thread Jonathan Lundell
On Sep 17, 2011, at 1:24 PM, Anthony wrote: > Sounds like this will be completely re-thought, so maybe comments on the > current (trunk) code aren't necessary, but here are some observations (not > sure if these are correct because I haven't tested anything, just quickly > looked at the code):

[web2py] Nginx-uwsgi problem.

2011-09-17 Thread Bruno Rocha
I am getting a high traffic on the new service I released www.rifar.me I did not expected too much access, and now my server is running in problems. Anybody has any hint about this error? 2011/09/17 12:56:36 [error] 15855#0: *55651 upstream timed out (*110: Connection timed out*) while reading r

[web2py] Re: Why web2py is in French by default? How can I change it?

2011-09-17 Thread Cliff
Not about the book itself, but apparently fixed now. All Google search hits that referenced the book came with "language=fr" appended as a var. I notice that the book does not rank high in Google searches. Very strange. On Sep 15, 2:56 pm, Massimo Di Pierro wrote: > Is this about the book? > >

[web2py] Re: How to redirect user to original url he asked after login

2011-09-17 Thread Anthony
Sounds like this will be completely re-thought, so maybe comments on the current (trunk) code aren't necessary, but here are some observations (not sure if these are correct because I haven't tested anything, just quickly looked at the code): - It still looks like _auth_next will be the firs

Re: [web2py] Python Exceptions: how to show in View

2011-09-17 Thread Bruno Rocha
try: #do something except Exception, e: response.flash = "Error occured %s" % str(e) On Sat, Sep 17, 2011 at 9:26 AM, Vineet wrote: > Regarding user data validation, I am comfortble with client-side > validation. > I also have server-side customized validation routines. > I am aware that

Re: [web2py] SmartGrid and authentization required for view and edit actions ... why?

2011-09-17 Thread Bruno Rocha
I guess SQLFORM.smartgrid(..., user_signature=False) should not ask for user signature but I do not recommend as your actions will be exposed for logged out users, and you will not b able to track the changes or apply crud permissions. On Sat, Sep 17, 2011 at 12:30 PM, David Marko wrote: > I'

[web2py] Re: problem with updating Form with writable=False Fields

2011-09-17 Thread pbreit
Just wanted to check if you know that Web2py that comes with a complete registration/login capability that works pretty well. You don't have to do any coding.

[web2py] Re: problem with updating Form with writable=False Fields

2011-09-17 Thread Alex
actually it's now working, I don't know exactly what was the reason (I'm using record = db.auth_user(id)) when I output db._lastsql after form.accepts I see that all fields are updated, not just the password field. How can I change it that only the password field is updated in the sql statement?

[web2py] Re: Adding radio buttons to customised form in web2py

2011-09-17 Thread Anthony
It's not in stable yet, but in trunk, you can now specify ul or divs style rather than table style for the radio widget. I think it would be: db.payment_bpay_step1.selection_type.widget = lambda f, v: SQLFORM.widgets.radio.widget(f, v, style='divs') You can also create a custom widget, as descr

Re: [web2py] Re: Ask Web2py Groups: Has anyone here used web2py with JQuery Mobile?

2011-09-17 Thread António Ramos
i have bee using it and it works nice !! 2011/9/17 Pystar > Thanks for the link to the plugin. But I am at loss of how to use it. > I have removed the "extend layout.html" directive in all my layout > files and included "plugin_jqmobile/layout.html". But whenever I visit > any of those pages, I

[web2py] Re: Ask Web2py Groups: Has anyone here used web2py with JQuery Mobile?

2011-09-17 Thread Pystar
Thanks for the link to the plugin. But I am at loss of how to use it. I have removed the "extend layout.html" directive in all my layout files and included "plugin_jqmobile/layout.html". But whenever I visit any of those pages, I see just a barebones page that looks like a html page without any css

Re: [web2py] Determine whether or not jquery-ui is loaded

2011-09-17 Thread Jim Steil
I've done that already. I was just asking because of some ideas I had about how to resolve this. -Jim On 9/17/2011 8:37 AM, Anthony wrote: It sounds like we should just make this easier in SQLFORM.grid -- maybe submit an issue about this on Google Code: http://code.google.com/p/web2py/is

[web2py] Adding radio buttons to customised form in web2py

2011-09-17 Thread Brent Jacobs
I'm trying to display a field as a radio button group in a customised form. I want to place each radio button on a different row in a table. The problem is when I use `{{=form.custom.selection_type[0]}} `, the widget is wrapped in unwanted `tr` and `td` tags. Is there a way to add only the radio

Re: [web2py] Re: web2py with jython on linux

2011-09-17 Thread Vasile Ermicioi
> > Can you do import cPickle form a regular jython shell? yes steps to reproduce: 1) install latest jython (2.5.2) 2) wget http://www.web2py.com/examples/static/web2py_src.zip unzip web2py_src.zip jython web2py.py

Re: [web2py] Re: How to redirect user to original url he asked after login

2011-09-17 Thread Jonathan Lundell
On Sep 17, 2011, at 8:46 AM, Massimo Di Pierro wrote: > The basic use case is this: > User clicks on a link that requires_login and gets redirected to the > login page. After login the user is redirected to the original > requested page. > Exceptions: > - the login is outsourced to janrain > - the

[web2py] Re: problem with updating Form with writable=False Fields

2011-09-17 Thread Alex
I forgot to mention the following: I create the row myself because I simply want to change the password: id = auth.user_id record = Row() record.id = id record.password = '' this row is then passed to SQLForm. If I do this instead: id = auth.user_id record = db.auth_user(id) record.password = ''

[web2py] problem with updating Form with writable=False Fields

2011-09-17 Thread Alex
Hi, first of all, many thanks to Massimo and all other contributers. web2py is an amazing framework and exactly what I was looking for. Keep up the excellent work! I've got a couple of questions and problems so I'll start with the one which is bugging me the most: I've defined the auth_user table

[web2py] Re: How to redirect user to original url he asked after login

2011-09-17 Thread Massimo Di Pierro
Fixed a typo: The basic use case is this: User clicks on a link that requires_login and gets redirected to the login page. After login the user is redirected to the original requested page. Exceptions: - the login is outsourced to janrain - the login is outsourced to cas or other open-id - the log

[web2py] Re: How to redirect user to original url he asked after login

2011-09-17 Thread Massimo Di Pierro
The basic use case is this: User clicks on a link that requires_login and gets redirected to the login page. After login the user is redirected to the original requested page. Exceptions: - the login is outsourced to janrain - the login is outsourced to cas or other open-id - the login is not pos

[web2py] Re: markmin vs. reST

2011-09-17 Thread Gour-Gadadhara Dasa
On Sat, 17 Sep 2011 08:37:45 -0700 (PDT) Massimo Di Pierro wrote: > Footnotes can be added easily > and sublists too. It is on the todo list. That's great. Thank you. btw, hearing that markmin is more powerful than markdown, maybe it should be renamed to MarkUp, or, at least, markmax. ;) Sinc

[web2py] Re: markmin vs. reST

2011-09-17 Thread Massimo Di Pierro
More complex tables are not possible. Footnotes can be added easily and sublists too. It is on the todo list. On Sep 17, 10:05 am, Gour-Gadadhara Dasa wrote: > On Sat, 17 Sep 2011 07:59:44 -0700 (PDT) > Massimo Di Pierro > > wrote: > > > Our goals were: > > - simpler then reST, similar to Markdo

[web2py] Re: How to redirect user to original url he asked after login

2011-09-17 Thread Massimo Di Pierro
> It seems to me that there are two issues here. One is cleaning up the logic > to make it uniform, DRY and understandable. The other is deciding where to > put the next link (and doing proper validation of the URL). > > I understand (I think) the basic use case for @requires_login, I think. > >

[web2py] Re: How to redirect user to original url he asked after login

2011-09-17 Thread weheh
@sagar: FWIW, this is what I usually do: def login(): return dict(form=auth.login(next=request.vars._next or auth.settings.login_next)) My site combines pages that don't require login with those that do.

[web2py] SmartGrid and authentization required for view and edit actions ... why?

2011-09-17 Thread David Marko
I'm testing SQLFORM.smartgrid() feature ... I can see the list of items but when clicking on view or edit links, I can just see flash message 'not authorized' . Why is this? How can I avoid this or even how to handle autorization correctly ... where to define it. I can imagine many different s

[web2py] Re: Ask Web2py Groups: How to implement infinite login session

2011-09-17 Thread pbreit
Unsafe and unnecessary. Wouldn't 10 or 20 or 50 years be ok?

[web2py] Re: Data stored in memory

2011-09-17 Thread Anthony
Also, note that your 'results' dict will only persist for the duration of a single request. Each request is handled by a new thread (from a thread pool). Anthony On Saturday, September 17, 2011 11:06:14 AM UTC-4, Massimo Di Pierro wrote: > > On Sep 17, 6:31 am, Chris Rowson wrote: > > Hi folk

[web2py] Re: markmin vs. reST

2011-09-17 Thread Gour-Gadadhara Dasa
On Sat, 17 Sep 2011 07:59:44 -0700 (PDT) Massimo Di Pierro wrote: > > Our goals were: > - simpler then reST, similar to Markdown but more powerful That's good one...I like markdown as well. > - extensible Any more info about it? Do you find markmin semantically rich-enough for writing books

Re: [web2py] Re: How to redirect user to original url he asked after login

2011-09-17 Thread Jonathan Lundell
On Sep 17, 2011, at 7:51 AM, Massimo Di Pierro wrote: >> I also don't entirely understand this: >> >> def pop_next(self): >> next = current.session._auth_next >> if next and next.startswith(URL()): >> next = current.session._auth_next = None >> return next

[web2py] Re: Data stored in memory

2011-09-17 Thread Massimo Di Pierro
On Sep 17, 6:31 am, Chris Rowson wrote: > Hi folks, > > I'm trying to get my head around what happens to data stored in memory when > it isn't needed anymore. > > Let me give you an example. Let's say I create a function which returns a > dict called 'results' populated with data from an external

[web2py] Re: web2py with jython on linux

2011-09-17 Thread Massimo Di Pierro
Can you do import cPickle form a regular jython shell? On Sep 17, 4:35 am, Vasile Ermicioi wrote: > gluon.storage line 15

[web2py] Re: markmin vs. reST

2011-09-17 Thread Massimo Di Pierro
Good question. Our goals were: - simpler then reST, similar to Markdown but more powerful - support for HTML 5 - extensible - avoid conflits with natural language as much as possible In reST: .. image:: images/biohazard.png In Markmin [[description images/biohazard.png center 200px]] In reST yo

[web2py] Re: How to redirect user to original url he asked after login

2011-09-17 Thread Massimo Di Pierro
> I also don't entirely understand this: > >     def pop_next(self): >         next = current.session._auth_next >         if next and next.startswith(URL()): >             next = current.session._auth_next = None >         return next > > The startswith test: are we simply saying that if the start

[web2py] Re: Ask Web2py Groups: Has anyone here used web2py with JQuery Mobile?

2011-09-17 Thread Anthony
Check out http://web2py.com/plugins/plugin_jqmobile/about. On Saturday, September 17, 2011 9:45:19 AM UTC-4, Pystar wrote: > > I would like to know if anyone here has used web2py with JQuery > Mobile? And what the experience was.

[web2py] Ask Web2py Groups: Has anyone here used web2py with JQuery Mobile?

2011-09-17 Thread Pystar
I would like to know if anyone here has used web2py with JQuery Mobile? And what the experience was.

Re: [web2py] Determine whether or not jquery-ui is loaded

2011-09-17 Thread Anthony
It sounds like we should just make this easier in SQLFORM.grid -- maybe submit an issue about this on Google Code: http://code.google.com/p/web2py/issues/list On Saturday, September 17, 2011 1:14:04 AM UTC-4, Jim S wrote: > > The reason I'm asking is because I'm looking for a way to modify > SQ

Re: [web2py] Data stored in memory

2011-09-17 Thread Chris Rowson
I had read a little about that already, but found myself a little confused as to when an object does or does not continue to refer to another object as described in reference counts. At least you've confirmed I'm on the right track. I'll go back to the books. Thank-you Chris On Sep 17, 2011 2:08

Re: [web2py] Data stored in memory

2011-09-17 Thread Vasile Ermicioi
google for python garbage collection

[web2py] Python Exceptions: how to show in View

2011-09-17 Thread Vineet
Regarding user data validation, I am comfortble with client-side validation. I also have server-side customized validation routines. I am aware that a token is issued for an error. Whenever an exception is raised server-side, what is the simplest way to show it in a messagebox or a DIV (maybe in "f

[web2py] Data stored in memory

2011-09-17 Thread Chris Rowson
Hi folks, I'm trying to get my head around what happens to data stored in memory when it isn't needed anymore. Let me give you an example. Let's say I create a function which returns a dict called 'results' populated with data from an external source each time a user registers (for instance let's

[web2py] My Journey to web2py

2011-09-17 Thread binaryghost
Before anything else, I would like to introduce myself. I am a passionate computer programmer. I started to learn programming thru Turbo Pascal and learned the essential concepts in C. I learned C++ and Java in school but sad to say, I haven’t got a firm grip on those languages even thinking in

Re: [web2py] Re: web2py with jython on linux

2011-09-17 Thread Vasile Ermicioi
gluon.storage line 15

[web2py] markmin vs. reST

2011-09-17 Thread Gour-Gadadhara Dasa
Hello! I see that markmin is kind of 'standard' markup supported in web2py, but I use reST markup and lot (even submitted feature request to Instant Press to support it), but I wonder how does markmin, in general, compare with reST? I noticed that there is no support for footnotes, tables look pr