Do you are speaking about a couple of examples of "How to" ?
Em domingo, 9 de abril de 2017 11:35:04 UTC-3, Andrea Fae' escreveu:
>
> Web2py is wonderful, but it has a big challenge. No documentation. Or at
> least no complete documentation. It's all based on the book and some site
> that can gi
On Sunday, April 9, 2017 at 10:57:08 PM UTC-4, Alfonso Serra wrote:
>
> Thanks Anthony, but thats the matter, redirection is not optional. It will
> happen regardless. I would like not to redirect to make use of form.errors,
> form.accepted to style the view.
>
The redirect happens only if the f
Yes, that's what i'm trying to achive.
For now i have three tables: ingredients, tags and data.
Data table defined with - Field('ingredients', 'list:reference tag_ingr'),
tags - db.define_table('tag_ingr',
Field('name', type='string'),
format='%(name)s')
And in
// This moderation is really useless
For the sake of this question, i implemented this thing in that way:
User select image via IMG tag:
Then JavaScript comes in hand:
$('.fruits-main').click(function() {
if ($(this).hasClass("selected")) {
$(this).removeClass('select
On Sunday, April 9, 2017 at 11:03:21 PM UTC-4, Alfonso Serra wrote:
>
> I have implemented an admin impersonating users successfully, but was
> wondering if theres any way to go back to the admin while impersonating
> without having to manually logout - loging.
>
Just post user_id=0 to the /impe
I have a picklist type of field where the user selects from a set of
predefined values. I am using IS_IN_SET(list_of_values) in the Field
constructor.
The form cannot be saved unless a value is selected, i.e. the field is
essentially a required field.
I would like to allow the user NOT to selec
tried this?
requires=IS_EMPTY_OR(IS_IN_SET(...))
2017-04-10 14:07 GMT+02:00 Karoly Kantor :
> I have a picklist type of field where the user selects from a set of
> predefined values. I am using IS_IN_SET(list_of_values) in the Field
> constructor.
> The form cannot be saved unless a value is sel
Thank you, it works, you saved me the time for lunch :-)
On Monday, April 10, 2017 at 2:14:12 PM UTC+2, Marvix wrote:
>
> tried this?
> requires=IS_EMPTY_OR(IS_IN_SET(...))
>
> 2017-04-10 14:07 GMT+02:00 Karoly Kantor >:
>
>> I have a picklist type of field where the user selects from a set of
>>
Here have some files to do that
https://github.com/web2py/web2py/tree/master/gluon/contrib/markmin
Do you tried use them ?
Em sábado, 8 de abril de 2017 11:49:11 UTC-3, alex escreveu:
>
> I have downloaded and used the book app
> https://github.com/web2py/web2py-book to write some documentation
Maybe creating a validation function which checks the different values and
depending on them fills the form.errors values when a validation error
happens? Take a look
to
http://web2py.com/books/default/chapter/29/07/forms-and-validators#onvalidation
--
Resources:
- http://web2py.com
- http:/
There are this places..
https://github.com/web2py/web2py/blob/master/gluon/tools.py#L1487
http://web2py.readthedocs.io/en/latest/tools.html?highlight=auth#gluon.tools.Auth
Em domingo, 9 de abril de 2017 13:16:31 UTC-3, Rudy escreveu:
>
> Sorry Anthony, i just checked, your suggestion works when
On Monday, April 10, 2017 at 4:49:01 AM UTC-7, Scorpa wrote:
>
> Yes, that's what i'm trying to achive.
>
> For now i have three tables: ingredients, tags and data.
> Data table defined with - Field('ingredients', 'list:reference tag_ingr'),
>
>
> tags - db.define_table('tag_ingr',
>
>
>
> This might be as simple as emptying out the "requires" attribute if the
> "show_if" causes the field to be visible. But I don't change core code --
> I don't want the hassle of departing from the stock distro of web2py.
>
You could change the core code and submit a pull request. ;-)
--
it just a bunch of ids that's taken from URI.
So it's list of id like [1L,2L,3L] and so on.
It's working when i'm searching throught table, for example
db(db.t_filter.id.belongs(ids)).select()
But wont work with list:reference.
can i fix it somehow ?
понедельник, 10 апреля 2017 г., 21:11:49 UTC+
Have you restarted web2py after the change?
Paolo
2017-04-10 0:02 GMT+02:00 黄祥 :
> after adding the code, still got the same error : AttributeError:
> 'MemcacheClientObj' object has no attribute 'initialize'
> *e.g.*
> class MemcacheClientObj(Client):
> def initialize(self):
> pass
Hello Anthony,
Is there a way to manipulate auth.navbar content from model file somehow
avoiding repeat this in every layout file I have?
Thanks
Richard
On Sun, May 24, 2015 at 9:55 AM, Neeraj Shukla
wrote:
> Thanks Anthony...
>
>
> On Sunday, 24 May 2015 03:16:00 UTC+5:30, Anthony wrote:
>>
Nevermind, I have extract header of every layout I have anyway into
header.html that I include back in each layout so, my app stay DRY.
I am glad I had issue with selecting navbar jquery injected element that I
can't select with selenium/splinter as it allow me to figure an new way to
include my t
On one of my Linux systems, I was starting web2py (2.14.6) from the command
line with the usual -i 0.0.0.0, and the automatic visit via the local
browser worked just fine, but I couldn't get there over the wire. Not a
firewall problem, because I could run a different server (nodejs based) on
t
*change gluon/contrib/memcache/__init__.py*
class MemcacheClientObj(Client):
def initialize(self):
pass
*start web2py*
python ~/web2py/web2py.py --nogui --no-banner -a 'a' -i 0.0.0.0 -p 8000
*create new webapp and add code on top of models/db.py*
from gluon.contrib.memcache import Mem
Well, I'm not sure there's a nice general solution to this one. Since
"show_if" is kind of an add-on to Field and isn't really a part of
Expression or Validator or anything else. Here's what I came up with...
First I created my set of "show_if" fields and set their validators to the
existing
Andrea do you see what i see ?
http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer
Its only the DAL chapter...
2017-04-10 12:07 GMT+01:00 Marlysson Silva :
> Do you are speaking about a couple of examples of "How to" ?
>
>
> Em domingo, 9 de abril de 2017 11:35:
This is one of those head-scratchers Marcelo. Note the "onvalidation"
function is called AFTER the validation is done on the form. By then it's
too late to prevent the validators from being run on the hidden fields. I
could monkey around with the added "error" stuff after the fact, but that's
NOTE : To the reader of this thread it appears that section pointed out
"Settings-and-messages" is now name "Auth-Settings-and-messages" :
http://web2py.com/books/default/chapter/29/9#Auth-Settings-and-messages
On Mon, May 21, 2012 at 10:14 PM, Anthony wrote:
> On Monday, May 21, 2012 9:32:04 PM
Oh boy. And it just keeps growing hair -- in this case to spoof the
"options" portion of the validator. Well, this worked for me...
class OR(Validator):
def __init__(self, first, second, multiple=False):
self.first = first if isinstance(first,(list,tuple)) else [first]
self.
Hi Marlysson, thanks so much for the links you shared, they are very
helpful. I actually read your previous post to another user suggesting to
look into tools.py, i did, now i understand better after looking into the
web2py.readthedocs API reference.
Thanks much Anthony, Marlysson.
On Monday,
25 matches
Mail list logo