[web2py] Re: auth_permission at Unittest

2014-11-03 Thread Pedro Henrique Correa Ferreira
Already tried login_bare too... still not working... Em segunda-feira, 3 de novembro de 2014 10h32min47s UTC-2, Pedro Henrique Correa Ferreira escreveu: > > Hello, buddies > > I'd like to know how can I run a Unittest in a fuction that requires > permission. > > The

[web2py] auth_permission at Unittest

2014-11-03 Thread Pedro Henrique Correa Ferreira
ame: "accessible" Object or table name: "/novo/plugin_00030_crm/pessoa" Record id: "0" It was supposed to work, but still returning HTTP 303. How do I fix this? Sorry if this is a duplicated post. Cheers, Pedro. -- Resources: - http://web2py.com - http://web2py

[web2py] form validation with conditional jquery fields

2014-09-24 Thread Pedro
I am using jquery to display a dropdown if a boolean field is not selected. Example below. The form does not pass validation as written. How do I make the validation conditional? thank you fields.append(Field('f_all_user', type='boolean', label=T('Send to All users'), default=True)) fields.a

[web2py] Re: Beginner issues

2014-09-17 Thread Pedro Henrique Correa Ferreira
Thanks, I made it work with a custom validator. Cheers. Em quinta-feira, 11 de setembro de 2014 09h22min04s UTC-3, Pedro Henrique Correa Ferreira escreveu: > > Hey, lads! > > How you're doing? > > I've got a issue with data validation. I gotta use a validator t

[web2py] stdout and scheduler_run.run_output

2014-09-17 Thread Pedro
Anyone have special knowledge of scheduler_run.run_output and best practice to capture stdout? My schedule process runs fine but I do not get all the output stored in scheduler_run.run_output. Its very intermittent. Sometimes I get partial stdout, sometimes nothing, sometimes it work fine. Stra

[web2py] Beginner issues

2014-09-12 Thread Pedro Henrique Correa Ferreira
Hey, lads! How you're doing? I've got a issue with data validation. I gotta use a validator that depends on a previous field from the same table, for example: db.define_table( 'driver', Field('your_age'), Field('years_as_driver'), #requires IS_INT_IN_RANGE (0,(your_age-18) Field('y

[web2py] Beginner questions

2014-09-12 Thread Pedro Henrique Correa Ferreira
Hi, lads! I'd like to know how can I validate a table Field after a previous field in the same table, for ex: 'Years as driver' = X So 'Years driving actual car' should be INT_IN_RANGE(0, "Years as driver input + 1") Hope you fellows understand my issue. Cheers -- Resources: - http://web2

[web2py] Rendering rows using represent

2014-08-20 Thread Pedro
I am using mongo with example tables: db.define_table('domain', Field('name', 'string'), format='%(name)s' ) db.define_table('whois', Field('domain_id', 'reference domain', represent=lambda id, r: '%s' % (db.domain(id).name)),

[web2py] Re: list:string type field output format

2014-03-22 Thread Pedro Pisandelli
Hi Antony! This made too many things clear to me. I got the point about "represent" function, but i guess the DIV(db...represent(...)) must be at a view file... and what about appadmin? Trying to get the fields value through appadmin, I got the error "*sequence item 0: expected string, long foun

[web2py] Re: Web2Py without Bootstrap

2014-03-17 Thread Pedro Pisandelli
GRID can also be passed a formstyle and will use it for FORMs. Other > css classes can be customized using other arguments. Try help(SQLFORM.grid) > > > > > On Friday, 14 March 2014 13:17:42 UTC-5, Pedro Pisandelli wrote: >> >> Hey guys! >> I love Python, and I´m

[web2py] Web2Py without Bootstrap

2014-03-15 Thread Pedro Pisandelli
Hey guys! I love Python, and I´m getting fascinated about web2py. Nevertheless, I really don´t like the way it works (so tied) with Bootstrap. It´s fine get some help from Bootstrap and Build some prototype screens. But I like to use other (sometimes better) frameworks, like semantic-ui.com At th

[web2py] IMAP URI regular expression

2014-03-09 Thread Pedro Ángel González
quot;, pool_size=1) # port 993 for ssl Parameter extraction: REGEX_URI = re.compile('^(?P[^:]+)(\:(?P[^@]*))?@(?P[^\:@]+)(\:(?P[0-9]+))?$') I couldn't come out with a regular expression capable of matching the URI to propose it here. Thanks to all of you for your contribution

[web2py] Forms - MVC model

2012-06-27 Thread Pedro Casalinho
This may be a dumb question but, should forms be created in controllers and passed to the view or should they be created in the view, taking into consideration the MVC model --

Re: [web2py] Re: Cookbook recipe for nginx/uwsgi woes

2012-04-28 Thread Pedro Vasconcelos
ackage (that is fully modular) you will need to load the http and python plugins adding --plugins http,python to your command line.* Be sure you already installed uwsgi-plugin-python (apt-get install uwsgi-plugin-python). Good luck, -- Pedro Vasconcelos On Friday, April 27, 2012 11:06:26 AM

Re: [web2py] Re: Inheritance and composition of views

2012-03-01 Thread Pedro Pereira
Hi Bruno, it sure definitely helps...thanks a lot!! On Thu, Mar 1, 2012 at 01:55, Bruno Rocha wrote: > Dont know if it helps, but note that you can enclose HTML as a function. > > views/my_html_functions.html >> >> {{def my_html_block(args):}} >>{{if args.:}} >> >>{{pass}} >>

Re: [web2py] Re: Inheritance and composition of views

2012-02-29 Thread Pedro Pereira
view. > > I wound not go this way. > > Massimo > > On Feb 29, 4:06 pm, Pedro Pereira wrote: > > Hi all, > > > > Is it possible to include in a view, an inherited one? The docs aren't > > clear about this issue, so I don't know if the framework is sup

[web2py] Inheritance and composition of views

2012-02-29 Thread Pedro Pereira
{{extend 'component_template.html'}} {{block child}} this is component_a {{end}} Running mytest I was expecting: this is mytest this is component_template this is component_a but it outputs: this is mytest this is component_template Can anyone help? Thanks in advance Pedro

[web2py:17516] Re: Critical point in web2py

2009-03-04 Thread Pedro
So, we got to the point when we should/must figure out how much are both problems connected to each other. Are we lacking man power to write the so necessary docs or do we have them, it's just that a non production ready wiki set up is getting on the way? Or maybe both problems exist. I've always

[web2py:17423] Re: Critical point in web2py

2009-03-03 Thread Pedro
I am still using the first certificate I first accepted. About the location, I think that's one of the things discussed in this topic. I am not sure there is an answer for that question yet. Catching up on previous points, I see a bit of a loss of momentum in this and it's a bit disappointing. Ma

[web2py:17332] Re: team development in web2py

2009-03-02 Thread Pedro
Since web2py ships everything in the server including the webserver and the db you can simply set up a repository (SVN, bazar, whatever you like) and trow the whole thing in there. On Mar 2, 1:59 pm, mdipierro wrote: > Yes there was a bug. It should now be fixed in trunk. It will be fixed > in 1

[web2py:17263] Re: Distribution with PIL

2009-03-01 Thread Pedro
I am not sure what point is discussed in here. What's the advantage of including it in web2py if you can simply drop it in the modules folder? On Mar 1, 9:52 pm, Greg Fuller wrote: > You're right.  I don't see this for production.  But it would be nice > to distribute a  "fully" self contained t

[web2py:17174] Re: Does DAL support IN operator? How?

2009-02-28 Thread Pedro
table.field.belongs(s)).select() > > Massimo > > On Feb 28, 10:54 am, pedro wrote: > > > That is m question. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework"

[web2py:17155] Does DAL support IN operator? How?

2009-02-28 Thread pedro
That is m question. --~--~-~--~~~---~--~~ 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 to web2py+unsu

[web2py:17121] Re: Critical point in web2py

2009-02-27 Thread Pedro
s in web2py wiki: -a page tree -recent changes page and rss feed -a public link to revision history and diffs On Feb 28, 3:47 am, Pedro wrote: > Nice to see some enthusiasm and attitude towards solid documentation. > I was one of those around when the current wiki was put up. The fact >

[web2py:17118] Re: Critical point in web2py

2009-02-27 Thread Pedro
Nice to see some enthusiasm and attitude towards solid documentation. I was one of those around when the current wiki was put up. The fact that it was a bit buggy did interfere with its function. Also the fact that it has a different look and feel from what most users are used to, and some lack of

[web2py:15929] multiple column unique index

2009-02-05 Thread pedro
Do validators support this? I am inserting many to many relationships manually, can I use validators to make sure no two rows are identical? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group

[web2py:15926] Re: KeyError, can't fix it

2009-02-05 Thread pedro
Thank yo massimo, I didn't see that. This is cool, I get my questions answered by the man himself. On 3 Feb, 05:18, mdipierro wrote: > matches=db(db.matches.kick_off_datetime>datetime.now()).select > (orderby=~db.matches.kick_off_datetime) > > Massimo > > On Feb 2, 8:5

[web2py:15797] KeyError, can't fix it

2009-02-02 Thread pedro
Ok, I might ping this list a bit to often now... I'll probably use this topic for a few errors I might have trouble to sort out. This like is guiving me a KeyError: matches=db().select(db.matches.kick_off_datetime>datetime.now(), orderby=~db.matches.kick_off_datetime) KeyError: "kick_off_date

[web2py:15796] Re: What's this? web2py.org

2009-02-02 Thread pedro
Sorry if I am honest, but I imagine that should have been a funny situation, not for everybody of though. On 2 Feb, 07:07, mdipierro wrote: > I did it once in a class at the university and the class was recorded. > > Massimo > > On Feb 1, 5:31 pm, Baron wrote: > > > gaah, I openedhttp://pytho

[web2py:15789] Re: How to rollback a transaction

2009-02-02 Thread pedro
thank you massimo. On 2 Feb, 22:29, mdipierro wrote: > db.rollback() > > you can do this for example... > > try: do your stuff > except: db.rollback() > > On Feb 2, 3:22 pm, pedro wrote: > > > Ok, I don't want to reinvent the wheel, in the book it says

[web2py:15784] How to rollback a transaction

2009-02-02 Thread pedro
Ok, I don't want to reinvent the wheel, in the book it says that the actions are wrapped in a transaction.. So my question is: what's the best/simplest/more recommended way to rollback? I need to insert a few records per action or rollback in case one fails. Am I ok if i simply raise an exceptio

[web2py:13814] Re: tip of the day: syntax highlighter

2008-12-18 Thread pedro
That's cool. Is there plana to add others? > Do you know that web2py include a syntax highlighter for python, > web2py, html, C/C++/Java? > > {{prg="for i in range(10): print i}} > {{=CODE(prg,language="python")}} > > language can be "python", "web2py", "html" (assumed embedded web2py), > "html_p

[web2py:13808] Re: Need some help with simple form submission

2008-12-18 Thread pedro
wrote: > which version of web2py are you using. With some old versions there > was a problem if you serialized the same form twice. > > Massimo > > On Dec 18, 7:06 am, pedro wrote: > > > I didn't notice that, i put fives out of mistake, but if i put for > > examples

[web2py:13802] Re: Need some help with simple form submission

2008-12-18 Thread pedro
ot indented. BTW, is there any way to indent the output HTML? It would help the debugging process. Pedro On 18 Dec, 03:41, DenesL wrote: > pedro, > > those '5' scores will not validate using requires=IS_IN_SET > (['-','0','1','2','

[web2py:13762] Re: Need some help with simple form submission

2008-12-17 Thread pedro
27;t it validate the condition: if form.accepts(request.vars,session) ? On 17 Dec, 22:50, DenesL wrote: > pedro, your request.vars only include "t1scoreX" and "t2scoreX" (where > X is the match.id) and those are not fields in your table, are they?. > > In the gen

[web2py:13750] Re: t3 on launchpad, t2 will die

2008-12-17 Thread pedro
Persoanlly I don't think I'll use T2. If T2 comes with T3 which it necessarily has to, what's the problem of whomever wants to use T2 getting it by downloading T3? My guess is that you'll end up using T3 anyway and eventually going a bit to a lower level here and there to achieve a bit more custom

[web2py:13745] Need some help with simple form submission

2008-12-17 Thread pedro
I am trying to submit a simple form, but for some reason it's failing all the time It never gets accepted, I can't figure out why Here's the code... http://paste.pocoo.org/show/95762/ What am i doing wrong? --~--~-~--~~~---~--~~ You received this message because

[web2py:13536] Re: new web2py wiki

2008-12-13 Thread pedro
a double colon :: > > See the wiki for an example. > > > I also find it hard at times to use ReST (or markdown) being new to > > it, but the advantage I see in using ReST is that it can create > > printable documentation, even in PDF. > > > On Dec 13, 7:39 am, pedr

[web2py:13530] Re: new web2py wiki

2008-12-13 Thread pedro
I've registered and I started playing around and submitting some content. Should this take off we need to discuss some important things. The first and most important for the moment is the markup. I am not sure Rest or markdown are suited for this job. Personally I like markdown, but AFAIK there is

[web2py:13519] Re: free surveys for everybody

2008-12-12 Thread pedro
Worked like a charm to me. I like it. I got an error somewhere when creating a survey, but unfortunately I am not being able to replicate it. On 12 Dec, 23:19, mdipierro wrote: > how should branching be handled? > > On Dec 12, 3:36 pm, Fran wrote: > > > On Dec 12, 7:59 pm, mdipierro wrote: >

[web2py:13372] Re: query with two relationships

2008-12-11 Thread pedro
am not sure how CPU costly those double joins are but pedro could > have used: > > teams=dict(db().select(db.team.ALL).response) > matches=db().select(db.match.ALL) > for m in matches: print m.id,teams[m.t1],teams[m.t2] --~--~-~--~~~---~--~~ You received

[web2py:13362] Re: T3 is out!!!!!!!!!

2008-12-11 Thread pedro
able to help with docs since all this is relatively new. /Pedro On 11 Dec, 16:36, "Yarko Tymciurak" <[EMAIL PROTECTED]> wrote: > T3 is at a high level of abstraction:  it is a configurable application;  it > as a way to rapidly prototype (right from the app itself), once you k

[web2py:13307] Re: query with two relationships

2008-12-10 Thread pedro
On 10 Dec, 23:35, DenesL <[EMAIL PROTECTED]> wrote: > > SELECT * FROM teams, matches WHERE matches.team1_id=teams.id AND > > matches.team2_id=teams.id > > If I interpret that correctly it means: look for all matches where a > team played itself. > Unless you are looking for wrongly entered match i

[web2py:13301] query with two relationships

2008-12-10 Thread pedro
Ok, this is what i am trying to replicate using web2py data object model: SELECT * FROM teams, matches WHERE matches.team1_id=teams.id AND matches.team2_id=teams.id This is what I've used, but it returns an empty record. partidas = db( db.matches.team1_id==db.teams.id) & (db.matches.team2_id==

[web2py:13227] Re: T3 is out!!!!!!!!!

2008-12-09 Thread pedro
Wow! Like someone said before, it should be something you put in your coffee. I feel tempted to say: "slow down with the creation of awesome development tools, I can't keep up". I mean... I've been working here and there (in my spare time) on a web2py project and then I see T2 and think if I shoul

[web2py:10643] Re: need help tracing an error

2008-10-26 Thread pedro
ble. > > On Oct 26, 7:20 am, pedro <[EMAIL PROTECTED]> wrote: > > > Hi there. > > I am getting an error whose trace has no reference to any point of my > > code... > > Here's the trace: > > > Traceback (most recent call last): > >   File "

[web2py:10626] need help tracing an error

2008-10-26 Thread pedro
Hi there. I am getting an error whose trace has no reference to any point of my code... Here's the trace: Traceback (most recent call last): File "/home/p/Desktop/web2py/gluon/main.py", line 210, in wsgibase File "/home/p/Desktop/web2py/gluon/globals.py", line 203, in _try_store_on_disk Fi

[web2py:10104] Re: How do I prevent my functions to be exposed as actions?

2008-10-11 Thread pedro
Arkar" <[EMAIL PROTECTED]> wrote: > 1)def  a function with a parameter > 2)def  __functioname__ > > On Sat, Oct 11, 2008 at 9:35 PM, pedro <[EMAIL PROTECTED]> wrote: > > > That is the question. I guess placing them in an external module would > > do it, but

[web2py:10096] How do I prevent my functions to be exposed as actions?

2008-10-11 Thread pedro
That is the question. I guess placing them in an external module would do it, but it should be a way to define them in a controller and prevent them for being exposed... how does one achieve that? --~--~-~--~~~---~--~~ You received this message because you are subsc

[web2py:10075] Re: questions about sessions, user authentication, etc

2008-10-10 Thread pedro
browser or the user visits a > page in web2py that has "session.clear()" in it. > > Does that clear things up? > > pedro wrote: > > My doubts are more like: > > > When exactly does a session start and ends? > > Does closing the browser ends current session? > &

[web2py:10072] Re: questions about sessions, user authentication, etc

2008-10-10 Thread pedro
My doubts are more like: When exactly does a session start and ends? Does closing the browser ends current session? Thank you On 10 Okt, 05:53, "Steve Shepherd" <[EMAIL PROTECTED]> wrote: > I will have a go at this. > > 1. The Google account does not reply on GAE. You could be in our out of GA

[web2py:10028] questions about sessions, user authentication, etc

2008-10-09 Thread pedro
lar fashion? If not what are the main differences? /Pedro --~--~-~--~~~---~--~~ 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 un