[web2py] Session Issues seen when users log into Web2py with an Andriod App

2013-07-11 Thread Ravindra Pai
 

We have decided to use Web2py Framework to develop an Android app. As a 
part of the app, we would like to know the users who have logged in.

My problem is that I can easily accomplish it ( auth.user_id ) though 
browser. However, when used with Andriod App, auth.user_id returns NONE. 

a) Because it works fine on Browser, the auth table is populated correctly. 
So, the AUTH settings are fine.

b) The session ID is okay ( though the IP address is not populated 
correctly ). 

[Thu Jul 11 19:40:15 2013] [error] in Json to g [Thu Jul 11 19:40:15 2013] 
[error] auth.user_id = None [Thu Jul 11 19:40:15 2013] [error] 
response.session_id = None:93a38-4854-441f-a8c8-bcce624b1aff

c) However, as seen above, the user_id returns null. 

d) The "events" table is also empty.

Can anyone please tell me how to debug this issue? 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Cythonizing web2py in its current state-possible? useful?

2013-07-11 Thread tyler . thompson
Hi all,
I'm currently building a custom CMS for a client in web2py and would like 
to optimize performance as much as possible. Is it plausible/does it make 
sense to compile the gluon libraries and any controller code into C with 
Cython? Would simply running on PyPy be a more effective option? Would 
appreciate any help/feedback.

Thanks,
-Tyler

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: from sqlite to mysql with error

2013-07-11 Thread Massimo Di Pierro
Not sure what this is supposed to do but it is definitively wrong:

Field(..., represent=lambda x, row:x and 
A('%s'%(db.equip_docs.f_doc.retrieve(x)[0]))


On Thursday, 11 July 2013 09:17:16 UTC-5, Ramos wrote:
>
> It was working with sqlite !
>
> i use mysqlworkbench and it is not there that table!!!
>
> i read that error 150 could be this
>
> In addition to SHOW 
> ERRORS, 
> in the event of a foreign key error involving InnoDB tables (usually 
> Error 150 in the MySQL Server), you can obtain a detailed explanation of 
> the most recent InnoDB foreign key error by checking the output of SHOW 
> ENGINE INNODB STATUS
> .
>
> and from the error in my ticket that points to this line it leads me 
> thinking in that direction
>
> represent=lambda x, row:x and A('%s'%(db.t_docs.f_doc.retrieve(x)[0]),
>
>
>
>
> my model is attached. Dont be afraid...
>
>
> 2013/7/11 Niphlod >
>
>> then t_docs is definitely ALREADY there! 
>>
>> error 150 from mysql means "I can't create a table cause it's already 
>> there".
>>
>> And there's no way that web2py on an empty database is creating a table 
>> two times unless you're fiddling badly with your models.
>>
>>>
>>>  -- 
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: how to highlight empty field in custom sqlform

2013-07-11 Thread Sarbjit singh
Actually, I am new to web2py and wasn't aware of it. My requirement was 
that my form is having a large number of fields and I want to group them 
logically in html form, the solution provided by you worked well.

I have another question : the message that appears on empty field is "enter 
a value", I want to change this string, can you please point me in which 
file this message is residing.

Thanks,
Sarbjit

On Friday, July 12, 2013 12:10:51 PM UTC+5:30, Niphlod wrote:
>
> if you want to do it by hand you need to code your form in html 
> accordingly. however: why complicate things when you can use 
> form.custom ???
>
> http://web2py.com/books/default/chapter/29/07#Custom-forms
>
> Il giorno venerdì 12 luglio 2013 08:19:35 UTC+2, Sarbjit singh ha scritto:
>>
>>
>> I have defined a model in which some fields were marked as 
>> "IS_NOT_EMPTY", now when I am using SQLFORM generated form, then if a user 
>> clicked on "submit", then if that particular field is empty, it shows a 
>> message in red color indicating which field is having empty value.
>>
>> Now since my requirement wants me to use custom sqlform, I am using it 
>> like 
>>
>> {{extend 'layout.html'}}
>> 
>> 
>> Customer Name
>> 
>> 
>> 
>> 
>>
>> Now if the name field is empty, it do not highlight the name field and do 
>> not tell there is a missing value.
>>
>> Can some one please guide me on how to achieve this using custom sqlform.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: from sqlite to mysql with error

2013-07-11 Thread Niphlod
did you try to remove that requires ?
there's a conceptual problem in that model  you can't represent 
something based on a table that doesn't exist yet. 
Probably you'll hit the same error on a fresh sqlite database. It was 
working because you implemented the model step-by-step adding things in a 
natural development process...

Il giorno giovedì 11 luglio 2013 16:17:16 UTC+2, Ramos ha scritto:
>
> It was working with sqlite !
>
> i use mysqlworkbench and it is not there that table!!!
>
> i read that error 150 could be this
>
> In addition to SHOW 
> ERRORS, 
> in the event of a foreign key error involving InnoDB tables (usually 
> Error 150 in the MySQL Server), you can obtain a detailed explanation of 
> the most recent InnoDB foreign key error by checking the output of SHOW 
> ENGINE INNODB STATUS
> .
>
> and from the error in my ticket that points to this line it leads me 
> thinking in that direction
>
> represent=lambda x, row:x and A('%s'%(db.t_docs.f_doc.retrieve(x)[0]),
>
>
>
>
> my model is attached. Dont be afraid...
>
>
> 2013/7/11 Niphlod >
>
>> then t_docs is definitely ALREADY there! 
>>
>> error 150 from mysql means "I can't create a table cause it's already 
>> there".
>>
>> And there's no way that web2py on an empty database is creating a table 
>> two times unless you're fiddling badly with your models.
>>
>>>
>>>  -- 
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: how to highlight empty field in custom sqlform

2013-07-11 Thread Niphlod
if you want to do it by hand you need to code your form in html 
accordingly. however: why complicate things when you can use 
form.custom ???

http://web2py.com/books/default/chapter/29/07#Custom-forms

Il giorno venerdì 12 luglio 2013 08:19:35 UTC+2, Sarbjit singh ha scritto:
>
>
> I have defined a model in which some fields were marked as "IS_NOT_EMPTY", 
> now when I am using SQLFORM generated form, then if a user clicked on 
> "submit", then if that particular field is empty, it shows a message in red 
> color indicating which field is having empty value.
>
> Now since my requirement wants me to use custom sqlform, I am using it 
> like 
>
> {{extend 'layout.html'}}
> 
> 
> Customer Name
> 
> 
> 
> 
>
> Now if the name field is empty, it do not highlight the name field and do 
> not tell there is a missing value.
>
> Can some one please guide me on how to achieve this using custom sqlform.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] how to highlight empty field in custom sqlform

2013-07-11 Thread Sarbjit singh

I have defined a model in which some fields were marked as "IS_NOT_EMPTY", 
now when I am using SQLFORM generated form, then if a user clicked on 
"submit", then if that particular field is empty, it shows a message in red 
color indicating which field is having empty value.

Now since my requirement wants me to use custom sqlform, I am using it like 

{{extend 'layout.html'}}


Customer Name





Now if the name field is empty, it do not highlight the name field and 
tells there is a missing value.

Can some one please guide me on how to achieve this using custom sqlform.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: web2py EuroPython 2013 Talk

2013-07-11 Thread Massimo Di Pierro
Because I think it is pointless for various reasons:

1) I am biased and people outside the community would not trust it
2) Code changes so it would become obsolete quick
3) One can produce benchmarks to produce almost any result one wants
4) People who are concerned about 2x factors in speed are not web2py 
audience. The point of web2py is security and speed of development. For 
example we can make web2py more than 2x faster moving sessions management 
to the app level (like Flask) and not creating the request.env object. Yet 
we do not do it. What matters is not speed but scalability and web2py 
scales no better or worse than any other major Python framework.
5) Every time I published any comparison between web2py and other 
frameworks in the past, somebody got upset and attacked us. Not worth it.

On Thursday, 11 July 2013 20:44:07 UTC-5, viniciusban wrote:
>
> Massimo, how about you writing an article about this subject and share 
> with us? 
>
> So, this could be spread. 
>
> On Thu, Jul 11, 2013 at 2:12 PM, Massimo Di Pierro 
> > wrote: 
> > I agree. I will do. 
> > 
> > On Thursday, 11 July 2013 11:51:39 UTC-5, Arnon Marcus wrote: 
> >> 
> >> I see. 
> >> In that case, I think it would be advisable to note that in 
> presentations, 
> >> as peope might get the wrong impression... 
> >> 
> >> On Thursday, July 11, 2013, Massimo Di Pierro  
> >> wrote: 
> >> > It is true but not an issue. Django is faster only in hello world 
> >> > examples because does not perform as many header 
> validation/conversions as 
> >> > web2py does and because you cannot turn off sessions in web2py. As 
> soon as 
> >> > one uses templates, web2py is faster. If you use databases the speed 
> is 
> >> > about the same because that becomes the bottle neck. 
> >> > Massimo 
> >> > 
> >> > On Monday, 8 July 2013 17:08:53 UTC-5, Arnon Marcus wrote: 
> >> >> 
> >> >> BTW, is it really true that web2py is twice as slower than django 
> >> >> nowadays? 
> >> >> How can that be? 
> >> >> Didn't it used to be twice as fast? 
> >> >> When I first evaluated it 3 years ago, it was by-far the fastest - 
> what 
> >> >> changed? 
> >> >> You said that one of the core principles of accepting changes to 
> >> >> web2py, is that they should always make it run faster - never 
> slower. Has 
> >> >> that principle been broken? 
> >> >> And what about the whole ORM-vs-DAL fiasco? Didn't you guys always 
> say 
> >> >> that a DAL is always faster than an ORM? Given that it makes sense, 
> how come 
> >> >> Django is faster? Shouldn't it's ORM make it slower? 
> >> >> And as for executing-vs-importing - didn't you say before that it 
> >> >> should be a non-issue in terms of performance? What changed? 
> >> > 
> >> > -- 
> >> > 
> >> > --- 
> >> > You received this message because you are subscribed to a topic in 
> the 
> >> > Google Groups "web2py-users" group. 
> >> > To unsubscribe from this topic, visit 
> >> > https://groups.google.com/d/topic/web2py/kWwIuQjeatQ/unsubscribe. 
> >> > To unsubscribe from this group and all its topics, send an email to 
> >> > web2py+un...@googlegroups.com. 
> >> > For more options, visit https://groups.google.com/groups/opt_out. 
> >> > 
> >> > 
> >> > 
> > 
> > -- 
> > 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "web2py-users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to web2py+un...@googlegroups.com . 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Export not working on filtered table?

2013-07-11 Thread Massimo Di Pierro
Please open a ticket. Will review this asap.

On Thursday, 11 July 2013 16:42:35 UTC-5, greenpoise wrote:
>
> I have *2.5.1 *and if I filter results and click on csv export, I also 
> get a blank csv file..
>
>
>
>
> On Monday, April 15, 2013 5:47:16 PM UTC-7, Tito Garrido wrote:
>>
>> Hi Folks,
>>
>> When I use the search field to filter the results and click on csv to 
>> export the result I get a 0 byte file... is it happening there?
>>
>> 2.4.6-stable+timestamp.2013.04.06.17.37.38
>> (Running on Rocket 1.2.6) 
>>
>> -- 
>>
>> Linux User #387870
>> .
>>  _/_õ|__|
>> ..º[ .-.___.-._| . . . .
>> .__( o)__( o).:___ 
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] External Python Script

2013-07-11 Thread Rohitraj Sharma
Hi Viniciusan

Can you share the link of that thread. 

Thanks

On Tuesday, 9 July 2013 17:13:39 UTC+5:30, viniciusban wrote:
>
> Yes, it is possible. 
>
> I answered the same question yesterday, in another thread. 
>
> On Tue, Jul 9, 2013 at 7:39 AM, Rohitraj Sharma 
> > wrote: 
> > Can it is possible in web2py to run any external script by clicking on 
> > button . I have a script which read csv file and split into parts. I 
> want to 
> > add that script in web2py frame work. Can it possible or not. 
> > Exapmle i have file test.py inside the static folder when ever i will 
> click 
> > on button in view that script should run. 
> > 
> > -- 
> > 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "web2py-users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to web2py+un...@googlegroups.com . 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: web2py EuroPython 2013 Talk

2013-07-11 Thread Vinicius Assef
Massimo, how about you writing an article about this subject and share with us?

So, this could be spread.

On Thu, Jul 11, 2013 at 2:12 PM, Massimo Di Pierro
 wrote:
> I agree. I will do.
>
> On Thursday, 11 July 2013 11:51:39 UTC-5, Arnon Marcus wrote:
>>
>> I see.
>> In that case, I think it would be advisable to note that in presentations,
>> as peope might get the wrong impression...
>>
>> On Thursday, July 11, 2013, Massimo Di Pierro 
>> wrote:
>> > It is true but not an issue. Django is faster only in hello world
>> > examples because does not perform as many header validation/conversions as
>> > web2py does and because you cannot turn off sessions in web2py. As soon as
>> > one uses templates, web2py is faster. If you use databases the speed is
>> > about the same because that becomes the bottle neck.
>> > Massimo
>> >
>> > On Monday, 8 July 2013 17:08:53 UTC-5, Arnon Marcus wrote:
>> >>
>> >> BTW, is it really true that web2py is twice as slower than django
>> >> nowadays?
>> >> How can that be?
>> >> Didn't it used to be twice as fast?
>> >> When I first evaluated it 3 years ago, it was by-far the fastest - what
>> >> changed?
>> >> You said that one of the core principles of accepting changes to
>> >> web2py, is that they should always make it run faster - never slower. Has
>> >> that principle been broken?
>> >> And what about the whole ORM-vs-DAL fiasco? Didn't you guys always say
>> >> that a DAL is always faster than an ORM? Given that it makes sense, how 
>> >> come
>> >> Django is faster? Shouldn't it's ORM make it slower?
>> >> And as for executing-vs-importing - didn't you say before that it
>> >> should be a non-issue in terms of performance? What changed?
>> >
>> > --
>> >
>> > ---
>> > You received this message because you are subscribed to a topic in the
>> > Google Groups "web2py-users" group.
>> > To unsubscribe from this topic, visit
>> > https://groups.google.com/d/topic/web2py/kWwIuQjeatQ/unsubscribe.
>> > To unsubscribe from this group and all its topics, send an email to
>> > web2py+un...@googlegroups.com.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>> >
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: IS_MATCH problem with backslashes

2013-07-11 Thread Anthony
Or alternatively:

IS_MATCH('server', 'You must provide a valid location')

but don't do that. ;-)

For more details, see 
http://docs.python.org/2/howto/regex.html#the-backslash-plague.

Anthony

On Thursday, July 11, 2013 8:15:56 PM UTC-4, Anthony wrote:
>
> Maybe try:
>
> IS_MATCH(r'server\\', 'You must provide a valid location')
>
> Anthony
>
> On Thursday, July 11, 2013 6:00:46 PM UTC-4, Josh Grigonis wrote:
>>
>> I have a form with a text input, and I want to make sure the user entry 
>> is prefixed with a specific UNC path.
>>
>> For example:
>>
>> \\server\blah\blah\file
>>
>> is acceptable
>>
>> \\bad\boo\hoo
>>
>> is not.
>>
>>
>> In order to get this to work, I've tried the following, among other 
>> things:
>>
>> INPUT(_name='file', requires=IS_MATCH('server\', 'You must provide a 
>> valid location'))
>> INPUT(_name='file', requires=IS_MATCH('^()(server)', 'You must 
>> provide a valid location'))
>>
>> Strangely, either of these seems to allow:
>>
>> \server\foo\bar
>>
>> This seems like a bug to me, or is there something else going on subtle 
>> here.
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: IS_MATCH problem with backslashes

2013-07-11 Thread Anthony
Maybe try:

IS_MATCH(r'server\\', 'You must provide a valid location')

Anthony

On Thursday, July 11, 2013 6:00:46 PM UTC-4, Josh Grigonis wrote:
>
> I have a form with a text input, and I want to make sure the user entry is 
> prefixed with a specific UNC path.
>
> For example:
>
> \\server\blah\blah\file
>
> is acceptable
>
> \\bad\boo\hoo
>
> is not.
>
>
> In order to get this to work, I've tried the following, among other things:
>
> INPUT(_name='file', requires=IS_MATCH('server\', 'You must provide a 
> valid location'))
> INPUT(_name='file', requires=IS_MATCH('^()(server)', 'You must provide 
> a valid location'))
>
> Strangely, either of these seems to allow:
>
> \server\foo\bar
>
> This seems like a bug to me, or is there something else going on subtle 
> here.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] IS_MATCH problem with backslashes

2013-07-11 Thread Josh Grigonis
I have a form with a text input, and I want to make sure the user entry is 
prefixed with a specific UNC path.

For example:

\\server\blah\blah\file

is acceptable

\\bad\boo\hoo

is not.


In order to get this to work, I've tried the following, among other things:

INPUT(_name='file', requires=IS_MATCH('server\', 'You must provide a 
valid location'))
INPUT(_name='file', requires=IS_MATCH('^()(server)', 'You must provide 
a valid location'))

Strangely, either of these seems to allow:

\server\foo\bar

This seems like a bug to me, or is there something else going on subtle 
here.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Did my question get eaten?

2013-07-11 Thread Josh Grigonis
I just posted a question about 30 minutes ago, and I don't see it in the 
forum anywhere.

I thought if I just waited it would show.  It was regarding what I think 
might be a bug in IS_MATCH()

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Export not working on filtered table?

2013-07-11 Thread greenpoise
I have *2.5.1 *and if I filter results and click on csv export, I also get 
a blank csv file..




On Monday, April 15, 2013 5:47:16 PM UTC-7, Tito Garrido wrote:
>
> Hi Folks,
>
> When I use the search field to filter the results and click on csv to 
> export the result I get a 0 byte file... is it happening there?
>
> 2.4.6-stable+timestamp.2013.04.06.17.37.38
> (Running on Rocket 1.2.6) 
>
> -- 
>
> Linux User #387870
> .
>  _/_õ|__|
> ..º[ .-.___.-._| . . . .
> .__( o)__( o).:___ 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Is it possible to concatenate fileds in a grid??

2013-07-11 Thread greenpoise
Must probably because I dont know!  :(   Let me give it a try what you just 
posted and will write back. Thanks!



On Thursday, July 11, 2013 1:58:10 PM UTC-7, Richard wrote:
>
> So you don't want to reference the series and supplier... So, I think that 
> your model should be better in this case if your field were of type 
> 'string', since you control the contain of the dropbox with requires anyway.
>
> That said... What I still don't understand is that you just seems to want 
> the "representation" of the id of the record not a concat compute or your 
> lambda are wrong because you don't know how to acheive it.
>
> For instance it easy to compute a contatation from different selected id 
> of reference table like this :
>
> model
>
> db.define_table('table',
> Field('f1', 'reference table1'),
> Field('f2', 'reference table2'),
> Field('compute_field', 'string', compute=lambda row: '%s - %s' % 
> (db.table1(row.f1).represent_field, db.table2(row.f2).represent_field))
>
> Richard
>
>
> On Thu, Jul 11, 2013 at 4:45 PM, greenpoise 
> > wrote:
>
>> haa..Its an odd model I know. But it works!! punch it in in a blank 
>> project and you will see..
>> With my model I am trying to:
>>
>> 1. Concatenate the fields I just mentioned
>> 2. I want to compute the supplier code for products so I dont have to 
>> add/select it in over and over.
>> 3. I want to export the final output (reason why I need the concatenate 
>> in a compute).
>>
>> Once I export that in CSV, I can bulk upload that worksheet into RMS 
>> (microsoft)..thats the whole reason behind this application and its weird 
>> model.
>> If you can think of a better idea, I am open for input
>>
>>
>> Thanks again!!
>>
>> On Thursday, July 11, 2013 1:39:10 PM UTC-7, Richard wrote:
>>
>>> Hmmm... I think your model is wrong...
>>>
>>> You can't use a compute on a reference field..
>>>
>>> What you are trying to do exactly?
>>>
>>> Why you need to concatenate thing? For representation purpose?
>>>
>>> I think I really can help you what you need is easy but I can't 
>>> understand your goal from the model you posted...
>>>
>>> Richard
>>>
>>>
>>>  On Thu, Jul 11, 2013 at 4:12 PM, greenpoise wrote:
>>>
 Ok..I started playing around with an empty and smaller database for the 
 sake of speed. This is what I have:

 db.define_table('supplier',
 Field('suppliercode'),
 Field('suppliername'),
 format='%(suppliercode)s')
 db.supplier.suppliercode.**requires = IS_NOT_IN_DB(db,db.supplier.**
 suppliercode)
 db.supplier.suppliername.**requires = IS_NOT_IN_DB(db,db.supplier.**
 suppliername)

 db.define_table('series',
  Field('supplier','reference supplier'),
 Field('seriesname'),
 Field('seriesdescription'))
 db.series.supplier.requires = IS_IN_DB(db,db.supplier.id,'%(**
 suppliername)s')

 db.define_table('product',
 Field('series', 'reference series'),
 Field('supplier', 'reference series',compute=lambda row: 
 db.series(row.series).**supplier),
 Field('supptile', 'reference supplier',compute=lambda row: 
 db.series(row.series).**supplier),
 Field('tilename'))
 db.product.series.requires = 
 IS_EMPTY_OR(IS_IN_DB(db,db.**series.id
 ,'%(seriesname)s'))

 I want to concatenate/compute db.product.supptile with 
 db.product.tilename ..Is is possible?? .




 On Thursday, July 11, 2013 11:50:07 AM UTC-7, Anthony wrote:
>
> Oops, sorry, I read that wrong -- thought it was a "represent" 
> function rather than a "compute" function. Yes, not sure you want to 
> store 
> a value other than the db.series.id value in a reference field for 
> db.series.
>
> Anthony
>
> On Thursday, July 11, 2013 2:39:39 PM UTC-4, Richard wrote:
>>
>> But in this case you don't have the id of the referenced record as 
>> relation key... I am not sure it's what you want. But you question is 
>> really vague so difficult to answer correctly to your I think :P
>>
>> Richard
>>
>>
>> On Thu, Jul 11, 2013 at 2:21 PM, Anthony  wrote:
>>
>>> On Thursday, July 11, 2013 1:21:11 PM UTC-4, greenpoise wrote:
>>>
 I think I saw some light in here!  this did the trick for me:

 Field('supplier', 'reference supplier',compute=lambda row: db.
 series(row.series).supplier**),

>>>
>>> Should be the same as:
>>>
>>> lambda row: row.series.supplier
>>>
>>> assuming row.series is a reference field referring to db.series.
>>>
>>> Anthony
>>>
>>>  -- 
>>>  
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, 
>>> send an email to web2py+un...@googlegroups.com.
>>> For more opti

Re: [web2py] Is it possible to concatenate fileds in a grid??

2013-07-11 Thread Richard Vézina
So you don't want to reference the series and supplier... So, I think that
your model should be better in this case if your field were of type
'string', since you control the contain of the dropbox with requires anyway.

That said... What I still don't understand is that you just seems to want
the "representation" of the id of the record not a concat compute or your
lambda are wrong because you don't know how to acheive it.

For instance it easy to compute a contatation from different selected id of
reference table like this :

model

db.define_table('table',
Field('f1', 'reference table1'),
Field('f2', 'reference table2'),
Field('compute_field', 'string', compute=lambda row: '%s - %s' %
(db.table1(row.f1).represent_field, db.table2(row.f2).represent_field))

Richard


On Thu, Jul 11, 2013 at 4:45 PM, greenpoise  wrote:

> haa..Its an odd model I know. But it works!! punch it in in a blank
> project and you will see..
> With my model I am trying to:
>
> 1. Concatenate the fields I just mentioned
> 2. I want to compute the supplier code for products so I dont have to
> add/select it in over and over.
> 3. I want to export the final output (reason why I need the concatenate in
> a compute).
>
> Once I export that in CSV, I can bulk upload that worksheet into RMS
> (microsoft)..thats the whole reason behind this application and its weird
> model.
> If you can think of a better idea, I am open for input
>
>
> Thanks again!!
>
> On Thursday, July 11, 2013 1:39:10 PM UTC-7, Richard wrote:
>
>> Hmmm... I think your model is wrong...
>>
>> You can't use a compute on a reference field..
>>
>> What you are trying to do exactly?
>>
>> Why you need to concatenate thing? For representation purpose?
>>
>> I think I really can help you what you need is easy but I can't
>> understand your goal from the model you posted...
>>
>> Richard
>>
>>
>> On Thu, Jul 11, 2013 at 4:12 PM, greenpoise  wrote:
>>
>>> Ok..I started playing around with an empty and smaller database for the
>>> sake of speed. This is what I have:
>>>
>>> db.define_table('supplier',
>>> Field('suppliercode'),
>>> Field('suppliername'),
>>> format='%(suppliercode)s')
>>> db.supplier.suppliercode.**requires = IS_NOT_IN_DB(db,db.supplier.**
>>> suppliercode)
>>> db.supplier.suppliername.**requires = IS_NOT_IN_DB(db,db.supplier.**
>>> suppliername)
>>>
>>> db.define_table('series',
>>> Field('supplier','reference supplier'),
>>> Field('seriesname'),
>>> Field('seriesdescription'))
>>> db.series.supplier.requires = IS_IN_DB(db,db.supplier.id,'%(**
>>> suppliername)s')
>>>
>>> db.define_table('product',
>>> Field('series', 'reference series'),
>>> Field('supplier', 'reference series',compute=lambda row:
>>> db.series(row.series).**supplier),
>>> Field('supptile', 'reference supplier',compute=lambda row:
>>> db.series(row.series).**supplier),
>>> Field('tilename'))
>>> db.product.series.requires = 
>>> IS_EMPTY_OR(IS_IN_DB(db,db.**series.id
>>> ,'%(seriesname)s'))
>>>
>>> I want to concatenate/compute db.product.supptile with
>>> db.product.tilename ..Is is possible?? .
>>>
>>>
>>>
>>>
>>> On Thursday, July 11, 2013 11:50:07 AM UTC-7, Anthony wrote:

 Oops, sorry, I read that wrong -- thought it was a "represent" function
 rather than a "compute" function. Yes, not sure you want to store a value
 other than the db.series.id value in a reference field for db.series.

 Anthony

 On Thursday, July 11, 2013 2:39:39 PM UTC-4, Richard wrote:
>
> But in this case you don't have the id of the referenced record as
> relation key... I am not sure it's what you want. But you question is
> really vague so difficult to answer correctly to your I think :P
>
> Richard
>
>
> On Thu, Jul 11, 2013 at 2:21 PM, Anthony  wrote:
>
>> On Thursday, July 11, 2013 1:21:11 PM UTC-4, greenpoise wrote:
>>
>>> I think I saw some light in here!  this did the trick for me:
>>>
>>> Field('supplier', 'reference supplier',compute=lambda row: db.series
>>> (row.series).supplier**),
>>>
>>
>> Should be the same as:
>>
>> lambda row: row.series.supplier
>>
>> assuming row.series is a reference field referring to db.series.
>>
>> Anthony
>>
>>  --
>>
>> ---
>> You received this message because you are subscribed to the Google
>> Groups "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to web2py+un...@googlegroups.com.
>> For more options, visit 
>> https://groups.google.com/**grou**ps/opt_out
>> .
>>
>>
>>
>
>  --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+un...@**goog

Re: [web2py] Is it possible to concatenate fileds in a grid??

2013-07-11 Thread greenpoise
haa..Its an odd model I know. But it works!! punch it in in a blank project 
and you will see..
With my model I am trying to:

1. Concatenate the fields I just mentioned
2. I want to compute the supplier code for products so I dont have to 
add/select it in over and over.
3. I want to export the final output (reason why I need the concatenate in 
a compute).

Once I export that in CSV, I can bulk upload that worksheet into RMS 
(microsoft)..thats the whole reason behind this application and its weird 
model.
If you can think of a better idea, I am open for input


Thanks again!!

On Thursday, July 11, 2013 1:39:10 PM UTC-7, Richard wrote:
>
> Hmmm... I think your model is wrong...
>
> You can't use a compute on a reference field..
>
> What you are trying to do exactly?
>
> Why you need to concatenate thing? For representation purpose?
>
> I think I really can help you what you need is easy but I can't understand 
> your goal from the model you posted...
>
> Richard
>
>
> On Thu, Jul 11, 2013 at 4:12 PM, greenpoise 
> > wrote:
>
>> Ok..I started playing around with an empty and smaller database for the 
>> sake of speed. This is what I have:
>>
>> db.define_table('supplier',
>> Field('suppliercode'),
>> Field('suppliername'),
>> format='%(suppliercode)s')
>> db.supplier.suppliercode.requires = 
>> IS_NOT_IN_DB(db,db.supplier.suppliercode)
>> db.supplier.suppliername.requires = 
>> IS_NOT_IN_DB(db,db.supplier.suppliername)
>>
>> db.define_table('series',
>> Field('supplier','reference supplier'),
>> Field('seriesname'),
>> Field('seriesdescription'))
>> db.series.supplier.requires = IS_IN_DB(db,db.supplier.id
>> ,'%(suppliername)s')
>>
>> db.define_table('product',
>> Field('series', 'reference series'),
>> Field('supplier', 'reference series',compute=lambda row: 
>> db.series(row.series).supplier),
>> Field('supptile', 'reference supplier',compute=lambda row: 
>> db.series(row.series).supplier),
>> Field('tilename'))
>> db.product.series.requires = IS_EMPTY_OR(IS_IN_DB(db,db.series.id
>> ,'%(seriesname)s'))
>>
>> I want to concatenate/compute db.product.supptile with 
>> db.product.tilename ..Is is possible?? .
>>
>>
>>
>>
>> On Thursday, July 11, 2013 11:50:07 AM UTC-7, Anthony wrote:
>>>
>>> Oops, sorry, I read that wrong -- thought it was a "represent" function 
>>> rather than a "compute" function. Yes, not sure you want to store a value 
>>> other than the db.series.id value in a reference field for db.series.
>>>
>>> Anthony
>>>
>>> On Thursday, July 11, 2013 2:39:39 PM UTC-4, Richard wrote:

 But in this case you don't have the id of the referenced record as 
 relation key... I am not sure it's what you want. But you question is 
 really vague so difficult to answer correctly to your I think :P

 Richard


 On Thu, Jul 11, 2013 at 2:21 PM, Anthony  wrote:

> On Thursday, July 11, 2013 1:21:11 PM UTC-4, greenpoise wrote:
>
>> I think I saw some light in here!  this did the trick for me:
>>
>> Field('supplier', 'reference supplier',compute=lambda row: db.series(
>> row.series).supplier),
>>
>
> Should be the same as:
>
> lambda row: row.series.supplier
>
> assuming row.series is a reference field referring to db.series.
>
> Anthony
>
>  -- 
>  
> --- 
> You received this message because you are subscribed to the Google 
> Groups "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to web2py+un...@googlegroups.com.
> For more options, visit 
> https://groups.google.com/**groups/opt_out
> .
>  
>  
>

  -- 
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Is it possible to concatenate fileds in a grid??

2013-07-11 Thread Richard Vézina
Hmmm... I think your model is wrong...

You can't use a compute on a reference field..

What you are trying to do exactly?

Why you need to concatenate thing? For representation purpose?

I think I really can help you what you need is easy but I can't understand
your goal from the model you posted...

Richard


On Thu, Jul 11, 2013 at 4:12 PM, greenpoise  wrote:

> Ok..I started playing around with an empty and smaller database for the
> sake of speed. This is what I have:
>
> db.define_table('supplier',
> Field('suppliercode'),
> Field('suppliername'),
> format='%(suppliercode)s')
> db.supplier.suppliercode.requires =
> IS_NOT_IN_DB(db,db.supplier.suppliercode)
> db.supplier.suppliername.requires =
> IS_NOT_IN_DB(db,db.supplier.suppliername)
>
> db.define_table('series',
> Field('supplier','reference supplier'),
> Field('seriesname'),
> Field('seriesdescription'))
> db.series.supplier.requires = IS_IN_DB(db,db.supplier.id
> ,'%(suppliername)s')
>
> db.define_table('product',
> Field('series', 'reference series'),
> Field('supplier', 'reference series',compute=lambda row:
> db.series(row.series).supplier),
> Field('supptile', 'reference supplier',compute=lambda row:
> db.series(row.series).supplier),
> Field('tilename'))
> db.product.series.requires = IS_EMPTY_OR(IS_IN_DB(db,db.series.id
> ,'%(seriesname)s'))
>
> I want to concatenate/compute db.product.supptile with db.product.tilename
> ..Is is possible?? .
>
>
>
>
> On Thursday, July 11, 2013 11:50:07 AM UTC-7, Anthony wrote:
>>
>> Oops, sorry, I read that wrong -- thought it was a "represent" function
>> rather than a "compute" function. Yes, not sure you want to store a value
>> other than the db.series.id value in a reference field for db.series.
>>
>> Anthony
>>
>> On Thursday, July 11, 2013 2:39:39 PM UTC-4, Richard wrote:
>>>
>>> But in this case you don't have the id of the referenced record as
>>> relation key... I am not sure it's what you want. But you question is
>>> really vague so difficult to answer correctly to your I think :P
>>>
>>> Richard
>>>
>>>
>>> On Thu, Jul 11, 2013 at 2:21 PM, Anthony  wrote:
>>>
 On Thursday, July 11, 2013 1:21:11 PM UTC-4, greenpoise wrote:

> I think I saw some light in here!  this did the trick for me:
>
> Field('supplier', 'reference supplier',compute=lambda row: db.series(
> row.series).supplier),
>

 Should be the same as:

 lambda row: row.series.supplier

 assuming row.series is a reference field referring to db.series.

 Anthony

  --

 ---
 You received this message because you are subscribed to the Google
 Groups "web2py-users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to web2py+un...@googlegroups.com.
 For more options, visit 
 https://groups.google.com/**groups/opt_out
 .



>>>
>>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: list:reference + multiple=True, how to format in edit selection listbox?

2013-07-11 Thread Richard Vézina
requires for dropbox control representation (in you requires : '%(name)s'
is what determine what are you option format)
represent for representation on select

Richard



On Thu, Jul 11, 2013 at 4:18 PM, Michael Nagy  wrote:

> Ok, figured it out.  The format specifier in the 'requires' is the magic
> one, not the one in the 'represent'.  So my original:
>
>   db.script.configs.requires = IS_IN_DB(db, db.config, '%(name)s',
> multiple=True)
>
> Became:
>
>   db.script.configs.requires = IS_IN_DB(db, db.config, lambda r:
> format_config(r), multiple=True)
>
> Where format_config(r) is like:
>
> def format_config(r):
> return '%s %s' % (r.name, r.detail)
>
> - Michael
>
>
> On Wednesday, July 10, 2013 3:58:54 PM UTC-4, Michael Nagy wrote:
>>
>> Left out the 'name' field in the 'script' file when I boiled down my
>> example.  Doesn't affect the issue at hand, but just to be clear:
>>
>> db.define_table('script',
>> Field('name'),
>> Field('configs', 'list:reference config'),
>> format='%(name)s')
>>
>> - Michael
>>
>> On Wednesday, July 10, 2013 3:54:34 PM UTC-4, Michael Nagy wrote:
>>>
>>> A simplified view of my db schema, with a 'config' table and a 'script'
>>> table that defines a 'configs' field that references a list of 'config'
>>> records (multiple=True).  I want to be able to use multiple-selection
>>> listbox to edit the list of references on a 'script' record, and have the
>>> list box display the formatted representation of the entries in the
>>> 'config' table as per the format_config() function defined for the 'config'
>>> table.  I have multiple selection working fine, but nothing I have tried
>>> (after a lot of googling) will change what the entries in the
>>> multiple-selection listbox actually look like (I am using a vanilla SQLFORM
>>> edit form).
>>>
>>> What am I missing?  Here are my definitions (simplified):
>>>
>>> db.define_table('config',
>>> Field('name'),
>>> Field('detail'),
>>> format=lambda r: format_config(r)
>>> )
>>>
>>> def format_config(record):
>>> return '%s %s' % (record.name, record.detail)
>>>
>>> db.define_table('script',
>>> Field('configs', 'list:reference config'),
>>> format='%(name)s')
>>>
>>> db.script.configs.requires = IS_IN_DB(db, db.config, '%(name)s',
>>> multiple=True)
>>> db.script.configs.represent = lambda r: format_config(r)
>>>
>>> I would expect that some magic in the last line should allow me to
>>> control the representation of the items in the multiple-selection listbox,
>>> each of which should be a 'config' table reference, but nothing I have
>>> tried works - I always end up with the 'config.name' field only,
>>> without the additional 'config.detail' field that I need.  I can't seem to
>>> figure out how to reference the items in the list of configs within the
>>> lambda, or something.
>>>
>>> - Michael
>>>
>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: list:reference + multiple=True, how to format in edit selection listbox?

2013-07-11 Thread Michael Nagy
Ok, figured it out.  The format specifier in the 'requires' is the magic 
one, not the one in the 'represent'.  So my original:

  db.script.configs.requires = IS_IN_DB(db, db.config, '%(name)s', 
multiple=True)

Became:

  db.script.configs.requires = IS_IN_DB(db, db.config, lambda r: 
format_config(r), multiple=True)

Where format_config(r) is like:

def format_config(r):
return '%s %s' % (r.name, r.detail)

- Michael

On Wednesday, July 10, 2013 3:58:54 PM UTC-4, Michael Nagy wrote:
>
> Left out the 'name' field in the 'script' file when I boiled down my 
> example.  Doesn't affect the issue at hand, but just to be clear:
>
> db.define_table('script',
> Field('name'),
> Field('configs', 'list:reference config'),
> format='%(name)s')
>
> - Michael
>
> On Wednesday, July 10, 2013 3:54:34 PM UTC-4, Michael Nagy wrote:
>>
>> A simplified view of my db schema, with a 'config' table and a 'script' 
>> table that defines a 'configs' field that references a list of 'config' 
>> records (multiple=True).  I want to be able to use multiple-selection 
>> listbox to edit the list of references on a 'script' record, and have the 
>> list box display the formatted representation of the entries in the 
>> 'config' table as per the format_config() function defined for the 'config' 
>> table.  I have multiple selection working fine, but nothing I have tried 
>> (after a lot of googling) will change what the entries in the 
>> multiple-selection listbox actually look like (I am using a vanilla SQLFORM 
>> edit form).
>>
>> What am I missing?  Here are my definitions (simplified):
>>
>> db.define_table('config',
>> Field('name'),
>> Field('detail'),
>> format=lambda r: format_config(r)
>> )
>>
>> def format_config(record):
>> return '%s %s' % (record.name, record.detail)
>>
>> db.define_table('script',
>> Field('configs', 'list:reference config'),
>> format='%(name)s')
>>
>> db.script.configs.requires = IS_IN_DB(db, db.config, '%(name)s', 
>> multiple=True)
>> db.script.configs.represent = lambda r: format_config(r)
>>
>> I would expect that some magic in the last line should allow me to 
>> control the representation of the items in the multiple-selection listbox, 
>> each of which should be a 'config' table reference, but nothing I have 
>> tried works - I always end up with the 'config.name' field only, without 
>> the additional 'config.detail' field that I need.  I can't seem to figure 
>> out how to reference the items in the list of configs within the lambda, or 
>> something.
>>
>> - Michael
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] How can I re-initialize my admin password on Webfaction CentOS 6 - 64bit.

2013-07-11 Thread JoeCodeswell
Thanks, Richard. I'll give this a try.

Love and peace,

Joe

On Thursday, July 11, 2013 1:07:50 PM UTC-7, Richard wrote:
>
> Hello Joe,
>
> I think you want this : sudo -u www-data python -c "from gluon.main import 
> save_password; save_password('123456',443)"
>
> Change the 443 for the appropriate port you use to connect and obviously 
> replace 123456 by you desired password...
>
> Richard
>
>
> On Thu, Jul 11, 2013 at 2:22 PM, JoeCodeswell 
> 
> > wrote:
>
>>
>> Dear web2py,
>>
>> I recently tried to re-initialize the web2py admin password for my 
>> website, joecodeswell.com ,  on Webfaction using CentOS 6 - 64bit.
>>
>> I followed Alexandre Andrade's post 
>> here. 
>> But i continually get "invalid password".
>> Here's the sanitized code for what i did.
>>
>> $ cd /home/path2/apache2/bin
>> $ ./stop
>> $ cd /home/path2/web2py
>> $ python
>> Python 2.7.5 (default, May 16 2013, 20:16:09)
>> [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> import sys
>> >>> sys.exit()
>> $ python web2py.py
>> web2py Web Framework
>> Created by Massimo Di Pierro, Copyright 2007-2013
>> Version 2.4.6-stable+timestamp.2013.04.06.17.37.38
>> Database drivers available: SQLite(sqlite3), MySQL(pymysql), MySQL(
>> MySQLdb), PostgreSQL(psycopg2), PostgreSQL(pg8000), MSSQL(pyodbc), DB2(
>> pyodbc), Teradata(pyodbc), Ingres(pyodbc), IMAP(imaplib)
>> choose a password:
>> please visit:
>> http://127.0.0.1:8000/
>> use "kill -SIGTERM someNumber" to shutdown the web2py server
>> ^C$ cp parameters_8000.py parameters_443.py
>> $ cd /home/jdor/webapps/w2p6427/apache2/bin
>> $ ./start
>> $
>>
>>
>> Any ideas? I'd really like to use web2py to support this site.
>>
>> Thanks for the help in advance.
>>
>> Love and peace,
>>
>> Joe
>>
>> -- 
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Is it possible to concatenate fileds in a grid??

2013-07-11 Thread greenpoise
Ok..I started playing around with an empty and smaller database for the 
sake of speed. This is what I have:

db.define_table('supplier',
Field('suppliercode'),
Field('suppliername'),
format='%(suppliercode)s')
db.supplier.suppliercode.requires = 
IS_NOT_IN_DB(db,db.supplier.suppliercode)
db.supplier.suppliername.requires = 
IS_NOT_IN_DB(db,db.supplier.suppliername)

db.define_table('series',
Field('supplier','reference supplier'),
Field('seriesname'),
Field('seriesdescription'))
db.series.supplier.requires = IS_IN_DB(db,db.supplier.id,'%(suppliername)s')

db.define_table('product',
Field('series', 'reference series'),
Field('supplier', 'reference series',compute=lambda row: 
db.series(row.series).supplier),
Field('supptile', 'reference supplier',compute=lambda row: 
db.series(row.series).supplier),
Field('tilename'))
db.product.series.requires = 
IS_EMPTY_OR(IS_IN_DB(db,db.series.id,'%(seriesname)s'))

I want to concatenate/compute db.product.supptile with db.product.tilename 
..Is is possible?? .



On Thursday, July 11, 2013 11:50:07 AM UTC-7, Anthony wrote:
>
> Oops, sorry, I read that wrong -- thought it was a "represent" function 
> rather than a "compute" function. Yes, not sure you want to store a value 
> other than the db.series.id value in a reference field for db.series.
>
> Anthony
>
> On Thursday, July 11, 2013 2:39:39 PM UTC-4, Richard wrote:
>>
>> But in this case you don't have the id of the referenced record as 
>> relation key... I am not sure it's what you want. But you question is 
>> really vague so difficult to answer correctly to your I think :P
>>
>> Richard
>>
>>
>> On Thu, Jul 11, 2013 at 2:21 PM, Anthony  wrote:
>>
>>> On Thursday, July 11, 2013 1:21:11 PM UTC-4, greenpoise wrote:
>>>
 I think I saw some light in here!  this did the trick for me:

 Field('supplier', 'reference supplier',compute=lambda row: db.series(
 row.series).supplier**),

>>>
>>> Should be the same as:
>>>
>>> lambda row: row.series.supplier
>>>
>>> assuming row.series is a reference field referring to db.series.
>>>
>>> Anthony
>>>
>>>  -- 
>>>  
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] How can I re-initialize my admin password on Webfaction CentOS 6 - 64bit.

2013-07-11 Thread Richard Vézina
Hello Joe,

I think you want this : sudo -u www-data python -c "from gluon.main import
save_password; save_password('123456',443)"

Change the 443 for the appropriate port you use to connect and obviously
replace 123456 by you desired password...

Richard


On Thu, Jul 11, 2013 at 2:22 PM, JoeCodeswell wrote:

>
> Dear web2py,
>
> I recently tried to re-initialize the web2py admin password for my
> website, joecodeswell.com ,  on Webfaction using CentOS 6 - 64bit.
>
> I followed Alexandre Andrade's post 
> here.
> But i continually get "invalid password".
> Here's the sanitized code for what i did.
>
> $ cd /home/path2/apache2/bin
> $ ./stop
> $ cd /home/path2/web2py
> $ python
> Python 2.7.5 (default, May 16 2013, 20:16:09)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import sys
> >>> sys.exit()
> $ python web2py.py
> web2py Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2013
> Version 2.4.6-stable+timestamp.2013.04.06.17.37.38
> Database drivers available: SQLite(sqlite3), MySQL(pymysql), MySQL(MySQLdb
> ), PostgreSQL(psycopg2), PostgreSQL(pg8000), MSSQL(pyodbc), DB2(pyodbc),
> Teradata(pyodbc), Ingres(pyodbc), IMAP(imaplib)
> choose a password:
> please visit:
> http://127.0.0.1:8000/
> use "kill -SIGTERM someNumber" to shutdown the web2py server
> ^C$ cp parameters_8000.py parameters_443.py
> $ cd /home/jdor/webapps/w2p6427/apache2/bin
> $ ./start
> $
>
>
> Any ideas? I'd really like to use web2py to support this site.
>
> Thanks for the help in advance.
>
> Love and peace,
>
> Joe
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: How can I re-initialize my admin password on Webfaction CentOS 6 - 64bit.

2013-07-11 Thread JoeCodeswell
I just thought, could the following be causing a problem?

$ uname -a
Linux web396.webfaction.com 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Mar 13 
00:26:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ python
Python 2.7.5 (default, May 16 2013, 20:16:09)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

Does anyone know if the python version shown is compatible with a 64 bit 
machine? I will ask them at WebFaction as well.

Thanks for the help.

Love and peace,

Joe
Joe

On Thursday, July 11, 2013 11:22:15 AM UTC-7, JoeCodeswell wrote:
>
>
> Dear web2py,
>
> I recently tried to re-initialize the web2py admin password for my 
> website, joecodeswell.com ,  on Webfaction using CentOS 6 - 64bit.
>
> I followed Alexandre Andrade's post 
> here. 
> But i continually get "invalid password".
> Here's the sanitized code for what i did.
>
> $ cd /home/path2/apache2/bin
> $ ./stop
> $ cd /home/path2/web2py
> $ python
> Python 2.7.5 (default, May 16 2013, 20:16:09)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import sys
> >>> sys.exit()
> $ python web2py.py
> web2py Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2013
> Version 2.4.6-stable+timestamp.2013.04.06.17.37.38
> Database drivers available: SQLite(sqlite3), MySQL(pymysql), MySQL(MySQLdb
> ), PostgreSQL(psycopg2), PostgreSQL(pg8000), MSSQL(pyodbc), DB2(pyodbc), 
> Teradata(pyodbc), Ingres(pyodbc), IMAP(imaplib)
> choose a password:
> please visit:
> http://127.0.0.1:8000/
> use "kill -SIGTERM someNumber" to shutdown the web2py server
> ^C$ cp parameters_8000.py parameters_443.py
> $ cd /home/jdor/webapps/w2p6427/apache2/bin
> $ ./start
> $
>
>
> Any ideas? I'd really like to use web2py to support this site.
>
> Thanks for the help in advance.
>
> Love and peace,
>
> Joe
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Web2py {compile} slowing down response times (x-post from stackoverflow)

2013-07-11 Thread Massimo Di Pierro
Let's please move this discussion on web2py-developers. Open a new thread. 
Anyway. There are two possibilities:

1) calls to re.compile (compiles regular expressions) there are many but 
should only happen at startup

2) https://github.com/web2py/web2py/blob/master/gluon/restricted.py#L194 
This is executed for every models and every controller are every request 
but the output should be cached in Ram. Perhaps the caching is not working 
as expected?

On Thursday, 11 July 2013 14:30:41 UTC-5, zaschu wrote:
>
> (Original 
> questionposted
>  to SO, but I realized this may be a better venue)
>
> I am trying to boost the performance of a web2py application I have 
> running so I turned on the profiler and noticed an item that is 
> consistently on the top:
>
> 54126 function calls (53838 primitive calls) in 0.565 seconds
> Ordered by: internal timeList reduced from 698 to 80 due to restriction <80>
>
> ncalls  tottime  percall  cumtime  percall filename:lineno(function)
> 290.1970.0070.1970.007 {compile}
>
> From most of the profiles that were taking, this one item accounts for 
> roughly a third of the request time and is naturally something worth 
> looking into. Does anyone know what this {compile} step is and how to 
> reduce or remote its impact?
>
> I'd like to note that this shows up on *every* request, which is counter 
> to my understanding that python wouldn't recompile source files if they 
> hadn't changed.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Web2py {compile} slowing down response times (x-post from stackoverflow)

2013-07-11 Thread zaschu


(Original 
questionposted
 to SO, but I realized this may be a better venue)

I am trying to boost the performance of a web2py application I have running 
so I turned on the profiler and noticed an item that is consistently on the 
top:

54126 function calls (53838 primitive calls) in 0.565 seconds
Ordered by: internal timeList reduced from 698 to 80 due to restriction <80>

ncalls  tottime  percall  cumtime  percall filename:lineno(function)
290.1970.0070.1970.007 {compile}

>From most of the profiles that were taking, this one item accounts for 
roughly a third of the request time and is naturally something worth 
looking into. Does anyone know what this {compile} step is and how to 
reduce or remote its impact?

I'd like to note that this shows up on *every* request, which is counter to 
my understanding that python wouldn't recompile source files if they hadn't 
changed.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: better calendar.js?

2013-07-11 Thread Jim S
I agree it is nicer and easier to use than the current date/time popup. 
 Yes, it does support time.  Is there a way it could be an optional feature 
you could turn on if you're using bootstrap?

-Jim

On Thursday, July 11, 2013 1:03:09 PM UTC-5, Massimo Di Pierro wrote:
>
> But we do not want the popup to break when people replace bootstrap with a 
> different style.
>
> On Thursday, 11 July 2013 12:19:33 UTC-5, VP wrote:
>>
>> Massimo:
>>
>> I just came across it, so I don't know 100% for sure.  But I think it 
>> only depends on bootstrap which is included in web2py.
>>
>>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: How does SQLFORM.grid know which table to edit?

2013-07-11 Thread Jim S
Ticket 1581



On Thursday, July 11, 2013 1:13:06 PM UTC-5, Jim S wrote:
>
> I'll make up a little test app, submit a ticket and add the app for 
> testing.
>
>
> On Thu, Jul 11, 2013 at 1:04 PM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> Good point! It should be the first table mentioned in the query but, this 
>> could be customizable. Please open a ticket about this.
>>
>>
>> On Thursday, 11 July 2013 12:47:42 UTC-5, Jim S wrote:
>>
>>> Thanks for the reply Massimo.  I know grid can only edit one table and 
>>> that is what I want.  I'm just wondering how it chooses which table it is 
>>> editing if the left parameter is specified.  Also, in my example above, it 
>>> should be
>>>
>>> grid = SQLFORM.grid(query, left=left)
>>>
>>> -Jim
>>>
>>>
>>> On Thu, Jul 11, 2013 at 12:08 PM, Massimo Di Pierro <
>>> massimo@gmail.com> wrote:
>>>
 grid can only edit one table. smartgrid can edit referenced tables but 
 not join them.
 Unfortunately we cannot support both because logically it would be too 
 complex. You can create your own custom button.


 On Thursday, 11 July 2013 09:02:09 UTC-5, Jim S wrote:
>
> I have a controller method with a SQLFORM.grid in it.
>
> The following setup:
>
>
> query = db.pricingIngredient.**pricingIn**gredientId > 0
> left = [db.productSite.on(db.**pricingI**ngredient.**
> productSiteId==db.**productSite.**productSiteId),
> db.site.on(db.productSite.**site**Id==db.site.siteId),
> db.product.on(db.productSite.**p**roductId==db.product.**
> productId**)]
>
> grid = SQLFORM.grid(query, left)
>
> When I click on the edit button I want to edit the pricingIngredient 
> table.  However, SQLFORM.grid is taking me to edit the product table.
>
> Is there a way to override this and force it to edit the 
> pricingIngredient table without coding my own custom edit button?
>
> -Jim
>
>  -- 
  
 --- 
 You received this message because you are subscribed to a topic in the 
 Google Groups "web2py-users" group.
 To unsubscribe from this topic, visit https://groups.google.com/d/**
 topic/web2py/Yl-6-oYA9C4/**unsubscribe
 .
 To unsubscribe from this group and all its topics, send an email to 
 web2py+un...@**googlegroups.com.

 For more options, visit 
 https://groups.google.com/**groups/opt_out
 .
  
  

>>>
>>>  -- 
>>  
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/Yl-6-oYA9C4/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Is it possible to concatenate fileds in a grid??

2013-07-11 Thread Anthony
Oops, sorry, I read that wrong -- thought it was a "represent" function 
rather than a "compute" function. Yes, not sure you want to store a value 
other than the db.series.id value in a reference field for db.series.

Anthony

On Thursday, July 11, 2013 2:39:39 PM UTC-4, Richard wrote:
>
> But in this case you don't have the id of the referenced record as 
> relation key... I am not sure it's what you want. But you question is 
> really vague so difficult to answer correctly to your I think :P
>
> Richard
>
>
> On Thu, Jul 11, 2013 at 2:21 PM, Anthony  >wrote:
>
>> On Thursday, July 11, 2013 1:21:11 PM UTC-4, greenpoise wrote:
>>
>>> I think I saw some light in here!  this did the trick for me:
>>>
>>> Field('supplier', 'reference supplier',compute=lambda row: db.series(row
>>> .series).supplier**),
>>>
>>
>> Should be the same as:
>>
>> lambda row: row.series.supplier
>>
>> assuming row.series is a reference field referring to db.series.
>>
>> Anthony
>>
>>  -- 
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Is it possible to concatenate fileds in a grid??

2013-07-11 Thread Richard Vézina
But in this case you don't have the id of the referenced record as relation
key... I am not sure it's what you want. But you question is really vague
so difficult to answer correctly to your I think :P

Richard


On Thu, Jul 11, 2013 at 2:21 PM, Anthony  wrote:

> On Thursday, July 11, 2013 1:21:11 PM UTC-4, greenpoise wrote:
>
>> I think I saw some light in here!  this did the trick for me:
>>
>> Field('supplier', 'reference supplier',compute=lambda row: db.series(row.
>> series).supplier**),
>>
>
> Should be the same as:
>
> lambda row: row.series.supplier
>
> assuming row.series is a reference field referring to db.series.
>
> Anthony
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] How can I re-initialize my admin password on Webfaction CentOS 6 - 64bit.

2013-07-11 Thread JoeCodeswell

Dear web2py,

I recently tried to re-initialize the web2py admin password for my website, 
joecodeswell.com ,  on Webfaction using CentOS 6 - 64bit.

I followed Alexandre Andrade's post 
here. 
But i continually get "invalid password".
Here's the sanitized code for what i did.

$ cd /home/path2/apache2/bin
$ ./stop
$ cd /home/path2/web2py
$ python
Python 2.7.5 (default, May 16 2013, 20:16:09)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.exit()
$ python web2py.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2013
Version 2.4.6-stable+timestamp.2013.04.06.17.37.38
Database drivers available: SQLite(sqlite3), MySQL(pymysql), MySQL(MySQLdb), 
PostgreSQL(psycopg2), PostgreSQL(pg8000), MSSQL(pyodbc), DB2(pyodbc), 
Teradata(pyodbc), Ingres(pyodbc), IMAP(imaplib)
choose a password:
please visit:
http://127.0.0.1:8000/
use "kill -SIGTERM someNumber" to shutdown the web2py server
^C$ cp parameters_8000.py parameters_443.py
$ cd /home/jdor/webapps/w2p6427/apache2/bin
$ ./start
$


Any ideas? I'd really like to use web2py to support this site.

Thanks for the help in advance.

Love and peace,

Joe

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: IS_IN_SET(multiple=True) does not get displayed properly in UDPATE forms

2013-07-11 Thread VP
After search I found the solution to this.   The "type" of the field should 
be "list:string".  

Thanks.



On Thursday, July 11, 2013 1:18:18 PM UTC-5, VP wrote:
>
> I have a field that is similar to this:   Field('fav', 
> requires=IS_IN_SET(['red','green','blue')], multiple=True))
>
> Let's say I have an entry with this field selected with multiple values. 
>  On an update form, the existing values should have been selected.  But 
> they are not selected.  I think this could be a serious bug (but should be 
> easy to fix).
>
> Thanks.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Is it possible to concatenate fileds in a grid??

2013-07-11 Thread Anthony
On Thursday, July 11, 2013 1:21:11 PM UTC-4, greenpoise wrote:

> I think I saw some light in here!  this did the trick for me:
>
> Field('supplier', 'reference supplier',compute=lambda row: db.series(row.
> series).supplier),
>

Should be the same as:

lambda row: row.series.supplier

assuming row.series is a reference field referring to db.series.

Anthony

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] IS_IN_SET(multiple=True) does not get displayed properly in UDPATE forms

2013-07-11 Thread VP
I have a field that is similar to this:   Field('fav', 
requires=IS_IN_SET(['red','green','blue')], multiple=True))

Let's say I have an entry with this field selected with multiple values. 
 On an update form, the existing values should have been selected.  But 
they are not selected.  I think this could be a serious bug (but should be 
easy to fix).

Thanks.


-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: How does SQLFORM.grid know which table to edit?

2013-07-11 Thread Jim Steil
I'll make up a little test app, submit a ticket and add the app for testing.


On Thu, Jul 11, 2013 at 1:04 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> Good point! It should be the first table mentioned in the query but, this
> could be customizable. Please open a ticket about this.
>
>
> On Thursday, 11 July 2013 12:47:42 UTC-5, Jim S wrote:
>
>> Thanks for the reply Massimo.  I know grid can only edit one table and
>> that is what I want.  I'm just wondering how it chooses which table it is
>> editing if the left parameter is specified.  Also, in my example above, it
>> should be
>>
>> grid = SQLFORM.grid(query, left=left)
>>
>> -Jim
>>
>>
>> On Thu, Jul 11, 2013 at 12:08 PM, Massimo Di Pierro <
>> massimo@gmail.com> wrote:
>>
>>> grid can only edit one table. smartgrid can edit referenced tables but
>>> not join them.
>>> Unfortunately we cannot support both because logically it would be too
>>> complex. You can create your own custom button.
>>>
>>>
>>> On Thursday, 11 July 2013 09:02:09 UTC-5, Jim S wrote:

 I have a controller method with a SQLFORM.grid in it.

 The following setup:


 query = db.pricingIngredient.**pricingIn**gredientId > 0
 left = [db.productSite.on(db.**pricingI**ngredient.**
 productSiteId==db.**productSite.**productSiteId),
 db.site.on(db.productSite.**site**Id==db.site.siteId),
 db.product.on(db.productSite.**p**roductId==db.product.**
 productId**)]

 grid = SQLFORM.grid(query, left)

 When I click on the edit button I want to edit the pricingIngredient
 table.  However, SQLFORM.grid is taking me to edit the product table.

 Is there a way to override this and force it to edit the
 pricingIngredient table without coding my own custom edit button?

 -Jim

  --
>>>
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "web2py-users" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>>> topic/web2py/Yl-6-oYA9C4/**unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> web2py+un...@**googlegroups.com.
>>>
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out
>>> .
>>>
>>>
>>>
>>
>>  --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/Yl-6-oYA9C4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: How does SQLFORM.grid know which table to edit?

2013-07-11 Thread Massimo Di Pierro
Good point! It should be the first table mentioned in the query but, this 
could be customizable. Please open a ticket about this.

On Thursday, 11 July 2013 12:47:42 UTC-5, Jim S wrote:
>
> Thanks for the reply Massimo.  I know grid can only edit one table and 
> that is what I want.  I'm just wondering how it chooses which table it is 
> editing if the left parameter is specified.  Also, in my example above, it 
> should be
>
> grid = SQLFORM.grid(query, left=left)
>
> -Jim
>
>
> On Thu, Jul 11, 2013 at 12:08 PM, Massimo Di Pierro 
> 
> > wrote:
>
>> grid can only edit one table. smartgrid can edit referenced tables but 
>> not join them.
>> Unfortunately we cannot support both because logically it would be too 
>> complex. You can create your own custom button.
>>
>>
>> On Thursday, 11 July 2013 09:02:09 UTC-5, Jim S wrote:
>>>
>>> I have a controller method with a SQLFORM.grid in it.
>>>
>>> The following setup:
>>>
>>>
>>> query = db.pricingIngredient.**pricingIngredientId > 0
>>> left = [db.productSite.on(db.**pricingIngredient.**
>>> productSiteId==db.productSite.**productSiteId),
>>> db.site.on(db.productSite.**siteId==db.site.siteId),
>>> db.product.on(db.productSite.**productId==db.product.**
>>> productId)]
>>>
>>> grid = SQLFORM.grid(query, left)
>>>
>>> When I click on the edit button I want to edit the pricingIngredient 
>>> table.  However, SQLFORM.grid is taking me to edit the product table.
>>>
>>> Is there a way to override this and force it to edit the 
>>> pricingIngredient table without coding my own custom edit button?
>>>
>>> -Jim
>>>
>>>  -- 
>>  
>> --- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "web2py-users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/web2py/Yl-6-oYA9C4/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: better calendar.js?

2013-07-11 Thread Massimo Di Pierro
But we do not want the popup to break when people replace bootstrap with a 
different style.

On Thursday, 11 July 2013 12:19:33 UTC-5, VP wrote:
>
> Massimo:
>
> I just came across it, so I don't know 100% for sure.  But I think it only 
> depends on bootstrap which is included in web2py.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: How does SQLFORM.grid know which table to edit?

2013-07-11 Thread Jim Steil
Thanks for the reply Massimo.  I know grid can only edit one table and that
is what I want.  I'm just wondering how it chooses which table it is
editing if the left parameter is specified.  Also, in my example above, it
should be

grid = SQLFORM.grid(query, left=left)

-Jim


On Thu, Jul 11, 2013 at 12:08 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> grid can only edit one table. smartgrid can edit referenced tables but not
> join them.
> Unfortunately we cannot support both because logically it would be too
> complex. You can create your own custom button.
>
>
> On Thursday, 11 July 2013 09:02:09 UTC-5, Jim S wrote:
>>
>> I have a controller method with a SQLFORM.grid in it.
>>
>> The following setup:
>>
>>
>> query = db.pricingIngredient.**pricingIngredientId > 0
>> left = [db.productSite.on(db.**pricingIngredient.**
>> productSiteId==db.productSite.**productSiteId),
>> db.site.on(db.productSite.**siteId==db.site.siteId),
>> db.product.on(db.productSite.**productId==db.product.**
>> productId)]
>>
>> grid = SQLFORM.grid(query, left)
>>
>> When I click on the edit button I want to edit the pricingIngredient
>> table.  However, SQLFORM.grid is taking me to edit the product table.
>>
>> Is there a way to override this and force it to edit the
>> pricingIngredient table without coding my own custom edit button?
>>
>> -Jim
>>
>>  --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/Yl-6-oYA9C4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Is it possible to concatenate fileds in a grid??

2013-07-11 Thread greenpoise
I think I saw some light in here!  this did the trick for me:

Field('supplier', 'reference supplier',compute=lambda row: 
db.series(row.series).supplier),

didnt know you could do that. Thanks Richard for the offer. I might come 
back to it later on though!  :)




On Thursday, July 11, 2013 9:54:49 AM UTC-7, Richard wrote:
>
> I can save you some time with the initialization, just ask here I will 
> take look a couples more times...
>
>
> On Thu, Jul 11, 2013 at 12:47 PM, greenpoise 
> > wrote:
>
>> Thanks Richard! appreciate your help! I might revisit datatables. I 
>> remember trying it before. 
>>
>> THanks again!
>>
>> d
>>
>>
>> On Thursday, July 11, 2013 8:30:03 AM UTC-7, Richard wrote:
>>
>>> Personnaly, I use Datatables.net and it button export facility...
>>>
>>> Richard
>>>
>>>
>>> On Thu, Jul 11, 2013 at 11:28 AM, Richard Vézina 
>>> wrote:
>>>
 I think to get the represent in csv you need a custom csv export 
 function... I understand you want represent in SQLFROM.grid... Sorry.

 Richard


 On Wed, Jul 10, 2013 at 5:49 PM, greenpoise wrote:

> read it. Dont have a clue yet.. If I use represent, the values wont 
> show up in a csv export...sort of looking for alternatives now. Thanks
>
>
>
>
> On Wednesday, July 10, 2013 1:30:41 PM UTC-7, Richard wrote:
>
>> Here you can get more clue about what I mean :
>>
>> https://groups.google.com/**foru**m/#!topic/web2py/**wUBbAzFHbxs
>>  
>>
>> On Wed, Jul 10, 2013 at 4:27 PM, Richard Vézina <
>> ml.richa...@gmail.com> wrote:
>>
>>> If you pass to grid a select I think yes...
>>>
>>>  Richard
>>>
>>>
>>> On Wed, Jul 10, 2013 at 4:21 PM, greenpoise wrote:
>>>
 Is it possible to concatenate fileds in a grid??

  -- 
  
 --- 
 You received this message because you are subscribed to the Google 
 Groups "web2py-users" group.
 To unsubscribe from this group and stop receiving emails from it, 
 send an email to web2py+un...@**googlegroups.com.

 For more options, visit https://groups.google.com/**grou**
 ps/opt_out .
  
  

>>>
>>>
>>  -- 
>  
> --- 
> You received this message because you are subscribed to the Google 
> Groups "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to web2py+un...@**googlegroups.com.
> For more options, visit 
> https://groups.google.com/**groups/opt_out
> .
>  
>  
>


>>>  -- 
>>  
>> --- 
>> You received this message because you are subscribed to the Google Groups 
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: better calendar.js?

2013-07-11 Thread VP
Massimo:

I just came across it, so I don't know 100% for sure.  But I think it only 
depends on bootstrap which is included in web2py.

On Thursday, July 11, 2013 12:11:28 PM UTC-5, Massimo Di Pierro wrote:
>
> The requirement is to have a calendar that does not depend on other JS 
> (apart for jQuery) and CSS and supports both date and datetime.
> Does the calendar you propose meet these specs?
>
> On Thursday, 11 July 2013 11:51:34 UTC-5, VP wrote:
>>
>> The current calendar.js is fine for date picker, but for datetime picker 
>> it is not so good; select a specific time is a headache.
>>
>> It seems this one is superior:  
>> http://tarruda.github.io/bootstrap-datetimepicker/
>>
>> I wanted to swap out but that doesn't seem to be easy.  Any idea?
>>
>> Thanks,
>>
>> VP
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: better calendar.js?

2013-07-11 Thread Massimo Di Pierro
The requirement is to have a calendar that does not depend on other JS 
(apart for jQuery) and CSS and supports both date and datetime.
Does the calendar you propose meet these specs?

On Thursday, 11 July 2013 11:51:34 UTC-5, VP wrote:
>
> The current calendar.js is fine for date picker, but for datetime picker 
> it is not so good; select a specific time is a headache.
>
> It seems this one is superior:  
> http://tarruda.github.io/bootstrap-datetimepicker/
>
> I wanted to swap out but that doesn't seem to be easy.  Any idea?
>
> Thanks,
>
> VP
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: web2py EuroPython 2013 Talk

2013-07-11 Thread Massimo Di Pierro
I agree. I will do.

On Thursday, 11 July 2013 11:51:39 UTC-5, Arnon Marcus wrote:
>
> I see.
> In that case, I think it would be advisable to note that in presentations, 
> as peope might get the wrong impression...
>
> On Thursday, July 11, 2013, Massimo Di Pierro 
> > 
> wrote:
> > It is true but not an issue. Django is faster only in hello world 
> examples because does not perform as many header validation/conversions as 
> web2py does and because you cannot turn off sessions in web2py. As soon as 
> one uses templates, web2py is faster. If you use databases the speed is 
> about the same because that becomes the bottle neck.
> > Massimo
> >
> > On Monday, 8 July 2013 17:08:53 UTC-5, Arnon Marcus wrote:
> >>
> >> BTW, is it really true that web2py is twice as slower than django 
> nowadays?
> >> How can that be?
> >> Didn't it used to be twice as fast?
> >> When I first evaluated it 3 years ago, it was by-far the fastest - what 
> changed?
> >> You said that one of the core principles of accepting changes to 
> web2py, is that they should always make it run faster - never slower. Has 
> that principle been broken?
> >> And what about the whole ORM-vs-DAL fiasco? Didn't you guys always say 
> that a DAL is always faster than an ORM? Given that it makes sense, how 
> come Django is faster? Shouldn't it's ORM make it slower?
> >> And as for executing-vs-importing - didn't you say before that it 
> should be a non-issue in terms of performance? What changed?
> >
> > --
> >  
> > ---
> > You received this message because you are subscribed to a topic in the 
> Google Groups "web2py-users" group.
> > To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/web2py/kWwIuQjeatQ/unsubscribe.
> > To unsubscribe from this group and all its topics, send an email to 
> web2py+un...@googlegroups.com .
> > For more options, visit https://groups.google.com/groups/opt_out.
> >  
> >  
> > 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: How does SQLFORM.grid know which table to edit?

2013-07-11 Thread Massimo Di Pierro
grid can only edit one table. smartgrid can edit referenced tables but not 
join them.
Unfortunately we cannot support both because logically it would be too 
complex. You can create your own custom button.


On Thursday, 11 July 2013 09:02:09 UTC-5, Jim S wrote:
>
> I have a controller method with a SQLFORM.grid in it.
>
> The following setup:
>
>
> query = db.pricingIngredient.pricingIngredientId > 0
> left = 
> [db.productSite.on(db.pricingIngredient.productSiteId==db.productSite.productSiteId),
> db.site.on(db.productSite.siteId==db.site.siteId),
> db.product.on(db.productSite.productId==db.product.productId)]
>
> grid = SQLFORM.grid(query, left)
>
> When I click on the edit button I want to edit the pricingIngredient 
> table.  However, SQLFORM.grid is taking me to edit the product table.
>
> Is there a way to override this and force it to edit the pricingIngredient 
> table without coding my own custom edit button?
>
> -Jim
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Basic Auth - Can't send WWW-Authenticate header when raising 401

2013-07-11 Thread Cristoffer Fairweather
Hey Massimo et al, 
Your diligence in forums in commendable, and it definitely helps in times 
like this!

I have a situation where I want to run basic auth in a single controller 
only, and, instead of authenticating against the auth_user table, I want to 
do my own custom username/password verification (basically a data and 
signature match).

Okay, one would think it to be easy, and I've done the following:

   - Make sure WSGIPassAuthorization On is present in apache config (just 
   as it's defined in the ubuntu startup script)
   - Enable allow_basic_login for a specific controller, and authenticate:
  - if request and request.controller == 'download':
  auth.settings.allow_basic_login = True
  auth.basic(basic_auth_realm="MyRealm")
  - Get code from git commits so that basic_auth_realm has any meaning 
   and use it my custom auth class 
(this
and this 
too
   )

*My problem is* that when I
raise HTTP(401, u'Not Authorized', **{'WWW-Authenticate': u'Basic realm="' 
+ basic_realm + '"'})
like is done in the new basic method (or anywhere, in fact), the 
WWW-Authenticate header is not being sent. 
If I raise any other error, like a 403, the WWW-Authenticate header is sent!

Looking in the gluon HTTP code, it looks like something is done to headers 
with a 4XX code in the to() method, but I don't think that's the problem 
because it works with a 403. 

For reference, I have the latest version of apache (2.2.22-1ubuntu1.3), 
web2py (2.5.1-stable+timestamp.2013.06.06.15.39.19), and mod_wsgi (
3.3-4build1).

I would someone's assistance; maybe they can point out a fundamental 
misunderstanding.
Thanks!

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: better calendar.js?

2013-07-11 Thread Cristoffer Fairweather
Have you given jQuery UI a chance?
You can roll your own themes to match your site, too:
http://jqueryui.com/datepicker/

On Thursday, July 11, 2013 9:51:34 AM UTC-7, VP wrote:
>
> The current calendar.js is fine for date picker, but for datetime picker 
> it is not so good; select a specific time is a headache.
>
> It seems this one is superior:  
> http://tarruda.github.io/bootstrap-datetimepicker/
>
> I wanted to swap out but that doesn't seem to be easy.  Any idea?
>
> Thanks,
>
> VP
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: MemoryError using sqlite

2013-07-11 Thread Massimo Di Pierro
blobs in DB are base64 encoded in ram. that menas you probably need twice 
that in ram.

On Wednesday, 10 July 2013 06:32:34 UTC-5, Joel Samuelsson wrote:
>
> Hi,
>
> I am using an sqlite db to store a blob locally. The blob is a pickled 
> file of a list I have in memory. Reading the entire list into memory causes 
> no issues, nor does saving the pickled file into the db. However, when I 
> try to pull the blob from the database, I get a MemoryError exception, the 
> last line run being:
> web2py/gluon/dal.py", line 1809, in parse_value
> value = value.encode('utf-8')
>
> The file in which the database lies is 443MB (meaning my blob can be no 
> larger than that). I'm having more than 4GB of free memory when I run the 
> script so loading the blob into memory shouldn't be a problem.
>
> Are there any other limits on memory usage I need to be aware of?
>
> Best regards,
> Joel Samuelsson
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] External Python Script

2013-07-11 Thread Massimo Di Pierro
What is difficult is communicating asynchronously with the script. 
You can use processing.Popen to start the script. Here is an example inside 
existing web2py code:

https://github.com/web2py/web2py/blob/master/applications/admin/controllers/gae.py#L77


On Tuesday, 9 July 2013 06:43:39 UTC-5, viniciusban wrote:
>
> Yes, it is possible. 
>
> I answered the same question yesterday, in another thread. 
>
> On Tue, Jul 9, 2013 at 7:39 AM, Rohitraj Sharma 
> > wrote: 
> > Can it is possible in web2py to run any external script by clicking on 
> > button . I have a script which read csv file and split into parts. I 
> want to 
> > add that script in web2py frame work. Can it possible or not. 
> > Exapmle i have file test.py inside the static folder when ever i will 
> click 
> > on button in view that script should run. 
> > 
> > -- 
> > 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "web2py-users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to web2py+un...@googlegroups.com . 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Is it possible to concatenate fileds in a grid??

2013-07-11 Thread Richard Vézina
I can save you some time with the initialization, just ask here I will take
look a couples more times...


On Thu, Jul 11, 2013 at 12:47 PM, greenpoise wrote:

> Thanks Richard! appreciate your help! I might revisit datatables. I
> remember trying it before.
>
> THanks again!
>
> d
>
>
> On Thursday, July 11, 2013 8:30:03 AM UTC-7, Richard wrote:
>
>> Personnaly, I use Datatables.net and it button export facility...
>>
>> Richard
>>
>>
>> On Thu, Jul 11, 2013 at 11:28 AM, Richard Vézina 
>> wrote:
>>
>>> I think to get the represent in csv you need a custom csv export
>>> function... I understand you want represent in SQLFROM.grid... Sorry.
>>>
>>> Richard
>>>
>>>
>>> On Wed, Jul 10, 2013 at 5:49 PM, greenpoise  wrote:
>>>
 read it. Dont have a clue yet.. If I use represent, the values wont
 show up in a csv export...sort of looking for alternatives now. Thanks




 On Wednesday, July 10, 2013 1:30:41 PM UTC-7, Richard wrote:

> Here you can get more clue about what I mean :
>
> https://groups.google.com/**foru**m/#!topic/web2py/**wUBbAzFHbxs
>
>
> On Wed, Jul 10, 2013 at 4:27 PM, Richard Vézina  > wrote:
>
>> If you pass to grid a select I think yes...
>>
>>  Richard
>>
>>
>> On Wed, Jul 10, 2013 at 4:21 PM, greenpoise wrote:
>>
>>> Is it possible to concatenate fileds in a grid??
>>>
>>>  --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to web2py+un...@**googlegroups.com.
>>>
>>> For more options, visit 
>>> https://groups.google.com/**grou**ps/opt_out
>>> .
>>>
>>>
>>>
>>
>>
>  --

 ---
 You received this message because you are subscribed to the Google
 Groups "web2py-users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to web2py+un...@**googlegroups.com.
 For more options, visit 
 https://groups.google.com/**groups/opt_out
 .



>>>
>>>
>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] better calendar.js?

2013-07-11 Thread VP
The current calendar.js is fine for date picker, but for datetime picker it 
is not so good; select a specific time is a headache.

It seems this one is superior: 
 http://tarruda.github.io/bootstrap-datetimepicker/

I wanted to swap out but that doesn't seem to be easy.  Any idea?

Thanks,

VP

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: web2py EuroPython 2013 Talk

2013-07-11 Thread Arnon Marcus
I see.
In that case, I think it would be advisable to note that in presentations,
as peope might get the wrong impression...

On Thursday, July 11, 2013, Massimo Di Pierro 
wrote:
> It is true but not an issue. Django is faster only in hello world
examples because does not perform as many header validation/conversions as
web2py does and because you cannot turn off sessions in web2py. As soon as
one uses templates, web2py is faster. If you use databases the speed is
about the same because that becomes the bottle neck.
> Massimo
>
> On Monday, 8 July 2013 17:08:53 UTC-5, Arnon Marcus wrote:
>>
>> BTW, is it really true that web2py is twice as slower than django
nowadays?
>> How can that be?
>> Didn't it used to be twice as fast?
>> When I first evaluated it 3 years ago, it was by-far the fastest - what
changed?
>> You said that one of the core principles of accepting changes to web2py,
is that they should always make it run faster - never slower. Has that
principle been broken?
>> And what about the whole ORM-vs-DAL fiasco? Didn't you guys always say
that a DAL is always faster than an ORM? Given that it makes sense, how
come Django is faster? Shouldn't it's ORM make it slower?
>> And as for executing-vs-importing - didn't you say before that it should
be a non-issue in terms of performance? What changed?
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
https://groups.google.com/d/topic/web2py/kWwIuQjeatQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Is it possible to concatenate fileds in a grid??

2013-07-11 Thread greenpoise
Thanks Richard! appreciate your help! I might revisit datatables. I 
remember trying it before. 

THanks again!

d


On Thursday, July 11, 2013 8:30:03 AM UTC-7, Richard wrote:
>
> Personnaly, I use Datatables.net and it button export facility...
>
> Richard
>
>
> On Thu, Jul 11, 2013 at 11:28 AM, Richard Vézina 
> 
> > wrote:
>
>> I think to get the represent in csv you need a custom csv export 
>> function... I understand you want represent in SQLFROM.grid... Sorry.
>>
>> Richard
>>
>>
>> On Wed, Jul 10, 2013 at 5:49 PM, greenpoise 
>> > wrote:
>>
>>> read it. Dont have a clue yet.. If I use represent, the values wont show 
>>> up in a csv export...sort of looking for alternatives now. Thanks
>>>
>>>
>>>
>>>
>>> On Wednesday, July 10, 2013 1:30:41 PM UTC-7, Richard wrote:
>>>
 Here you can get more clue about what I mean :

 https://groups.google.com/**forum/#!topic/web2py/**wUBbAzFHbxs
  

 On Wed, Jul 10, 2013 at 4:27 PM, Richard Vézina 
 wrote:

> If you pass to grid a select I think yes...
>
>  Richard
>
>
> On Wed, Jul 10, 2013 at 4:21 PM, greenpoise wrote:
>
>> Is it possible to concatenate fileds in a grid??
>>
>>  -- 
>>  
>> --- 
>> You received this message because you are subscribed to the Google 
>> Groups "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, 
>> send an email to web2py+un...@**googlegroups.com.
>>
>> For more options, visit 
>> https://groups.google.com/**groups/opt_out
>> .
>>  
>>  
>>
>
>
  -- 
>>>  
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to web2py+un...@googlegroups.com .
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: web2py EuroPython 2013 Talk

2013-07-11 Thread Massimo Di Pierro
It is true but not an issue. Django is faster only in hello world examples 
because does not perform as many header validation/conversions as web2py 
does and because you cannot turn off sessions in web2py. As soon as one 
uses templates, web2py is faster. If you use databases the speed is about 
the same because that becomes the bottle neck.

Massimo

On Monday, 8 July 2013 17:08:53 UTC-5, Arnon Marcus wrote:
>
> BTW, is it really true that web2py is twice as slower than django nowadays?
> How can that be?
> Didn't it used to be twice as fast?
> When I first evaluated it 3 years ago, it was by-far the fastest - what 
> changed?
> You said that one of the core principles of accepting changes to web2py, 
> is that they should always make it run faster - never slower. Has that 
> principle been broken?
> And what about the whole ORM-vs-DAL fiasco? Didn't you guys always say 
> that a DAL is always faster than an ORM? Given that it makes sense, how 
> come Django is faster? Shouldn't it's ORM make it slower?
> And as for executing-vs-importing - didn't you say before that it should 
> be a non-issue in terms of performance? What changed?
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Rendering image buffer with IMG() helper?

2013-07-11 Thread Massimo Di Pierro
Do not use pylab, not thread safe. Use the normal OOP interface to 
matplotlib. Here is an example:
https://github.com/mdipierro/canvas/blob/master/canvas.py#L27

On Monday, 8 July 2013 12:38:56 UTC-5, Lamps902 wrote:
>
> I'm attempting to do the following:
>
> img_buffer = io.BytesIO()
> pylab.savefig(img_buffer, format = 'png')
> img_buffer.seek(0)
> IMG(_src=img_buffer, _alt = 'image buffer not displaying')
>
> This shows the _alt message. Any ideas on how to get it to show the image? 
> Thanks.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: How to start external python script from my web2py controller (Solution needed as soon as possible )

2013-07-11 Thread Massimo Di Pierro
1) Do not do .sys.path.append(...) in a controller. it is not thread safe 
and you will end up with a memory leak.
2) You should use processing.Popen('external script') you can cache in ram 
the resulting object.

On Monday, 8 July 2013 14:20:56 UTC-5, pratt wrote:
>
> *
> *
> *I would like to run the external python script testQEF when the button 
> on the html page is clicked.The below code is my html page*
>
> index.html
>
> -
> {{extend 'layout.html'}}
>
> Please Enter the old Modcod
>
> 
> 
> onclick="ajax('{{=URL('data')}}',['q'],'target');"/>
> 
> 
> 
>
>
> --
> The below code is my controller default.py
>
> # coding: utf8
> # try something like
> import threading
> import time
> import sys
> sys.path.append('C:/Users/pratt/Workspace_Eclipse/Copy of 
> MasterSolution_COPY')
> *# I am importing the external python script  using sys,path*
> import testQEF
> a = 0
> heyo = 'zero'
>
> def index():
> 
> return dict(toobar=response.toolbar())
>
> def data():
>   
> if not session.m or len(session.m)==20: session.m=[]
> if request.vars.q: session.m.append(request.vars.q)
> session.m.sort()
> *#  starting the thread to run my external python script*
> h.start()
> return TABLE(*[TR(v) for v in session.m]).xml()
> #return dict(toobar=response.toolbar())
> #hey = wut()
> 
> *# I have created a class to create the thread*
> class testrun(threading.Thread):
> def __init__(self):
> threading.Thread.__init__(self)
> 
> def run(self):
>   
> #heyo = 'heyo'
> #self.newtest = 'hey new test'
> #if a == 0:
>  #   response.flash=T("you have run the thread a successfully")
> #time.sleep(10)
> #response.flash=T("you have run the thread a unsuccessfully")
> 
> testQEF.testFunc(999,
> 9,
> 0.9,
> 1,
> 30.0,
> 0.0,
> 0.1,
> "10.169.6.74",
> 3,
> 3,
> 1,
> 2,
> str("C:/testdir/webservertest"))
>
> *#Initiating the Thread   *
> h = testrun()
>
> def returnA(): return 'A'
>
> class wut():
> def __init__(self):
> self.foo = 'B'
>
>
>
>
> *I cannot run my external python script when I click the button and also 
> When  I do this the server is freezing.I am new to Web2py,Could Anyone help 
> me in this Regard.I need solution as soon as possible.* 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Possible to use pylab for visualization in web2py environment?

2013-07-11 Thread Massimo Di Pierro
It is possible to use matplotlib but do not use the pylab interface because 
it is not thread safe.
Use this or examples of code from it:
https://github.com/mdipierro/canvas

On Monday, 8 July 2013 10:43:34 UTC-5, Lamps902 wrote:
>
> Is it possible to use pylab in web2py to generate a visualization? 
> Something along these lines:
>
> import pylab
>
> x, y = ...
> pylab.plot(x,y)
> pylab.show()
>
> Doing so produces this error: "no display name and no $DISPLAY environment 
> variable "
>
> Thank you.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: sql statement trimmed / cut-off

2013-07-11 Thread Massimo Di Pierro
I am using trunk and I cannot reproduce this.

On Monday, 8 July 2013 04:22:12 UTC-5, Edwin Haver wrote:
>
> Hello,
>
> The SQL statement produced by the following query is trimmed or cut-off 
> somehow and therefore produces an error. Surely this must be a bug?
>
> In [5] : print db(db.holiday.leave_type == db.leave_type.id)._select(
> db.leave_type.name, db.holiday.working_days.sum(), 
> groupby=db.holiday.leave_type)
> SELECT  leave_type.name, SUM(holiday.working_days) FROM leave_type, 
> holiday WHERE (holiday.leave_type = leave_type.id) GROUP BY 
> holiday.leave_typ;
>
> As you can see the GROUP BY field has been cut-off and show "leave_typ" 
> instead of "leave_type".
>
> I think this is only happening in MS SQL Server as I did not have this 
> issue when using SQLite.
>
> I am using the following web2py version: Version 
> 2.4.5-stable+timestamp.2013.03.18.22.46.22
>
> Does anyone else experience this issue?
>
> Regards, Edwin.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Create a pdf and attach it to a mail

2013-07-11 Thread Jaime Herrero
Thanks a lot Alan for the idea, I just tested and I had to do some 
modifications to the code:

pdfasastring = fpdfobject.output(dest="S")
import StringIO
sio = StringIO.StringIO()
sio.write(pdfasastring)
sio.seek(0)

The following instruction create a mime type for the attachment and now, 
the object created (att1) can be used in the mail object

att1 = Mail.Attachment(sio, filename="mandatory.ext")


mail.send(to=['sam...@abc.com'],
  subject='An email with a pdf attached to it',
  message='test',
  attachments = (att1,)
)

BR
Jaime

El domingo, 17 de marzo de 2013 17:45:53 UTC-6, Alan Etkin escribió:
>
> > I'm not sure what you mean in the second option
>
> I meant that you could:
> "... even leave the filelike object which receives the fpdf output open 
> and use that instead as attachment input without the need to write to the 
> filesystem ..."
>
> > when you say filelike object what are you referring to?
>
> http://docs.python.org/2/glossary.html#term-file-object
>
> > attachments = mail.Attachment(pdf, filename='sample.pdf'))
>
> What does pdf contain?
>
> For creating the attachments, this should work for App Engine:
>
> You should be allowed to get the fpdf output as a string with something 
> like
>
> pdfasastring = fpdfobject.output(dest="S")
>
> Then store this output with a file-like object
>
> import StringIO
> sio = StringIO.StringIO()
>
> Now store the pdf string on the StringIO object
>
> sio.write(pdfasastring)
>
> Perhaps you need to return the seek position in case that the Attachment 
> class uses the .read() method
> sio.seek(0)
>
> Then, you supposedly can add an attachment with:
>
> mail.Attachment(sio, filename="mandatory.ext")
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: RuntimeError: table appears corrupted

2013-07-11 Thread Tomek Krasuski
THX.



W dniu sobota, 29 grudnia 2012 06:48:51 UTC+1 użytkownik Richard Penman 
napisał:
>
> These work: 
> DAL(uri, migrate=False, fake_migrate=False) 
> DAL(uri, migrate=False, fake_migrate=True) 
>
> These produce Runtime error: 
> DAL(uri, migrate=True, fake_migrate=False) 
> DAL(uri, migrate=True, fake_migrate=True) 
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] detect end of stream

2013-07-11 Thread Richard
Hello,

I would like to know when the browser have finish to receive a file with 
response.stream(file)... Is any one had implement something about that? 
First answer here explain a technic 
: 
http://stackoverflow.com/questions/1106377/detect-when-browser-receives-file-download

Thanks

Richard

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Is it possible to concatenate fileds in a grid??

2013-07-11 Thread Richard Vézina
Personnaly, I use Datatables.net and it button export facility...

Richard


On Thu, Jul 11, 2013 at 11:28 AM, Richard Vézina <
ml.richard.vez...@gmail.com> wrote:

> I think to get the represent in csv you need a custom csv export
> function... I understand you want represent in SQLFROM.grid... Sorry.
>
> Richard
>
>
> On Wed, Jul 10, 2013 at 5:49 PM, greenpoise wrote:
>
>> read it. Dont have a clue yet.. If I use represent, the values wont show
>> up in a csv export...sort of looking for alternatives now. Thanks
>>
>>
>>
>>
>> On Wednesday, July 10, 2013 1:30:41 PM UTC-7, Richard wrote:
>>
>>> Here you can get more clue about what I mean :
>>>
>>> https://groups.google.com/**forum/#!topic/web2py/**wUBbAzFHbxs
>>>
>>>
>>> On Wed, Jul 10, 2013 at 4:27 PM, Richard Vézina 
>>> wrote:
>>>
 If you pass to grid a select I think yes...

  Richard


 On Wed, Jul 10, 2013 at 4:21 PM, greenpoise wrote:

> Is it possible to concatenate fileds in a grid??
>
>  --
>
> ---
> You received this message because you are subscribed to the Google
> Groups "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to web2py+un...@**googlegroups.com.
>
> For more options, visit 
> https://groups.google.com/**groups/opt_out
> .
>
>
>


>>>  --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Is it possible to concatenate fileds in a grid??

2013-07-11 Thread Richard Vézina
I think to get the represent in csv you need a custom csv export
function... I understand you want represent in SQLFROM.grid... Sorry.

Richard


On Wed, Jul 10, 2013 at 5:49 PM, greenpoise  wrote:

> read it. Dont have a clue yet.. If I use represent, the values wont show
> up in a csv export...sort of looking for alternatives now. Thanks
>
>
>
>
> On Wednesday, July 10, 2013 1:30:41 PM UTC-7, Richard wrote:
>
>> Here you can get more clue about what I mean :
>>
>> https://groups.google.com/**forum/#!topic/web2py/**wUBbAzFHbxs
>>
>>
>> On Wed, Jul 10, 2013 at 4:27 PM, Richard Vézina wrote:
>>
>>> If you pass to grid a select I think yes...
>>>
>>> Richard
>>>
>>>
>>> On Wed, Jul 10, 2013 at 4:21 PM, greenpoise  wrote:
>>>
 Is it possible to concatenate fileds in a grid??

  --

 ---
 You received this message because you are subscribed to the Google
 Groups "web2py-users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to web2py+un...@**googlegroups.com.

 For more options, visit 
 https://groups.google.com/**groups/opt_out
 .



>>>
>>>
>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Quoting in export_to_csv_file() / import_from_csv_file()

2013-07-11 Thread dlypka
I was able to import rows which have minimal quotes, using the default 
import settings.
Here is a sample row which worked for me:

Atlanta,4214,GANGV19175,GANGV1917,S2C1,437,RBS6601W,"15-B 
Gainesville_3C",F3,NRCSGAJTCRBR12,Yes,Yes,Yes,Yes,No,Yes,Yes,Yes,CXP9018350/1_R10A/1,IP,Yes,Yes,Yes,Yes,Yes,FALSE,Yes,454,325,454,Yes,CXP9014711/7_R10CA24,Yes,"2013-06-06
 
10:06:46"


On Wednesday, July 10, 2013 4:40:59 PM UTC-5, Wes Hall wrote:
>
> After using import_from_csv_file(), additional quotes are showing up in 
> the db.
>
> Should I be using some different quoting in export_to_csv_file() or is 
> this an inherent problem with specifying filter_out in in the model, or am 
> I completely off the mark?
>
> Exporting db = 2.4.6
> Importing db = 2.5.1
>
> Table definition
> db.define_table('evaluation',
> Field('form', type='text',
>   label=T('Evaluation form')),
> Field('results', type='text',
>   label=T('JSON results')),
> auth.signature,
> format='%(form)s',
> migrate=settings.migrate)
>
> db.evaluation.results.filter_in = lambda obj, dumps=dumps: dumps(obj)
> db.evaluation.results.filter_out = lambda txt, loads=loads: loads(txt)
>
> Export
> db.export_to_csv_file(open('test.csv', 'w'))
>
> (Excerpt from test.csv)
> 89,se2,"{u'name': u'Good User', u'answers': {u'q1': u'5', u'comment1': 
> u""This answer should've had an apostrophe.""}, u'email': 
> u'...@mail.com
> '}",
>
> Import
> db.import_from_csv_file(open('test.csv', 'r'))
>
> MySQL row.results from within current application on original and new db
> {"name": "Good User", "answers": {"q1": "5", "comment1": "This answer 
> should've had an apostrophe."}, "email": "u...@mail.com "}
>
> MySQL row.results from import on new db (note the new enclosing double 
> quotes)
> "{u'name': u'Good User', u'answers': {u'q1': u'5', u'comment1': u\"This 
> answer should've had an apostrophe.\"}, u'email': u'...@mail.com
> '}"
>
> This all leads to the following error:
>
> evaluation.results['name']),
> TypeError: string indices must be integers
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: how to indicate which table to delete from when querying from 2?

2013-07-11 Thread Vinicius Assef
I don't think it's portable accross different rdbms.

One can use raw sql as a last resort, if there are many Matches in
this situation.

On Thu, Jul 11, 2013 at 10:42 AM, Niphlod  wrote:
> there's no support for deleting records that are a result of a join.
> However, if you are NOT using the devious mysql, you can delete a subselect.
>
> db(db.whatever.field.belongs(yourquery_withjoins._select()).delete()
>
> Il giorno giovedì 11 luglio 2013 14:17:46 UTC+2, Jurgis Pralgauskis ha
> scritto:
>>
>> db( (db.MatchPlayers.player==playerID) & (db.MatchPlayers.match_ ==
>> db.Matches.id) & (db.Matches.started == None) ).delete()
>>
>> gives:
>>
>> raise RuntimeError("Too many tables selected")
>>
>> any hints?
>>
>>
>> http://web2py.com/books/default/chapter/29/06#count,-isempty,-delete,-update
>> I don't find examples for similar cases
>>
>> I could select first , and then loop deleting records of needed table ...
>> but would be not very efficiet
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: from sqlite to mysql with error

2013-07-11 Thread António Ramos
It was working with sqlite !

i use mysqlworkbench and it is not there that table!!!

i read that error 150 could be this

In addition to SHOW
ERRORS,
in the event of a foreign key error involving InnoDB tables (usually Error
150 in the MySQL Server), you can obtain a detailed explanation of the most
recent InnoDB foreign key error by checking the output of SHOW ENGINE
INNODB STATUS .

and from the error in my ticket that points to this line it leads me
thinking in that direction


represent=lambda x, row:x and A('%s'%(db.t_docs.f_doc.retrieve(x)[0]),




my model is attached. Dont be afraid...


2013/7/11 Niphlod 

> then t_docs is definitely ALREADY there!
>
> error 150 from mysql means "I can't create a table cause it's already
> there".
>
> And there's no way that web2py on an empty database is creating a table
> two times unless you're fiddling badly with your models.
>
>>
>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




db.py
Description: Binary data


[web2py] How does SQLFORM.grid know which table to edit?

2013-07-11 Thread Jim S
I have a controller method with a SQLFORM.grid in it.

The following setup:


query = db.pricingIngredient.pricingIngredientId > 0
left = 
[db.productSite.on(db.pricingIngredient.productSiteId==db.productSite.productSiteId),
db.site.on(db.productSite.siteId==db.site.siteId),
db.product.on(db.productSite.productId==db.product.productId)]

grid = SQLFORM.grid(query, left)

When I click on the edit button I want to edit the pricingIngredient table. 
 However, SQLFORM.grid is taking me to edit the product table.

Is there a way to override this and force it to edit the pricingIngredient 
table without coding my own custom edit button?

-Jim

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: from sqlite to mysql with error

2013-07-11 Thread Niphlod
then t_docs is definitely ALREADY there! 

error 150 from mysql means "I can't create a table cause it's already 
there".

And there's no way that web2py on an empty database is creating a table two 
times unless you're fiddling badly with your models.

>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: how to indicate which table to delete from when querying from 2?

2013-07-11 Thread Niphlod
there's no support for deleting records that are a result of a join. 
However, if you are NOT using the devious mysql, you can delete a subselect.

db(db.whatever.field.belongs(yourquery_withjoins._select()).delete()

Il giorno giovedì 11 luglio 2013 14:17:46 UTC+2, Jurgis Pralgauskis ha 
scritto:
>
> db( (db.MatchPlayers.player==playerID) & (db.MatchPlayers.match_ == 
> db.Matches.id) & (db.Matches.started == None) ).delete()
>
> gives:
>
> raise RuntimeError("Too many tables selected")
>
> any hints?
>
>
> http://web2py.com/books/default/chapter/29/06#count,-isempty,-delete,-update
>  
> I don't find examples for similar cases
>
> I could select first , and then loop deleting records of needed table ... 
> but would be not very efficiet
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: how to indicate which table to delete from when querying from 2?

2013-07-11 Thread Jurgis Pralgauskis
ps: by the way, would be nice to have a shortcut 
db( (db.MatchPlayers.player==playerID) & (db.MatchPlayers.match_.started == 
None) ).

(for me it didn't work, but in in W2P nonquery syntax this works (and in 
Django such magic works i queries, if I recon  correctly )

2013 m. liepa 11 d., ketvirtadienis 15:17:46 UTC+3, Jurgis Pralgauskis rašė:
>
> db( (db.MatchPlayers.player==playerID) & (db.MatchPlayers.match_ == 
> db.Matches.id) & (db.Matches.started == None) ).delete()
>
> gives:
>
> raise RuntimeError("Too many tables selected")
>
> any hints?
>
>
> http://web2py.com/books/default/chapter/29/06#count,-isempty,-delete,-update
>  
> I don't find examples for similar cases
>
> I could select first , and then loop deleting records of needed table ... 
> but would be not very efficiet
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] how to indicate which table to delete from when querying from 2?

2013-07-11 Thread Jurgis Pralgauskis


> From which table do you want to delete records? 
>

 MatchPlayers , but Matches would be left intact
 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] how to indicate which table to delete from when querying from 2?

2013-07-11 Thread Vinicius Assef
You cannot update() or delete() when there are joins.

>From which table do you want to delete records? MatchPlayers or
Matches? Or both?

If you set the ondelete=cascade (I think it's the name of it) in your
parent table, children records will be deleted when you delete one
record from it.


On Thu, Jul 11, 2013 at 9:17 AM, Jurgis Pralgauskis
 wrote:
> db( (db.MatchPlayers.player==playerID) & (db.MatchPlayers.match_ ==
> db.Matches.id) & (db.Matches.started == None) ).delete()
>
> gives:
>
> raise RuntimeError("Too many tables selected")
>
> any hints?
>
> http://web2py.com/books/default/chapter/29/06#count,-isempty,-delete,-update
> I don't find examples for similar cases
>
> I could select first , and then loop deleting records of needed table ...
> but would be not very efficiet
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] how to indicate which table to delete from when querying from 2?

2013-07-11 Thread Jurgis Pralgauskis
db( (db.MatchPlayers.player==playerID) & (db.MatchPlayers.match_ == 
db.Matches.id) & (db.Matches.started == None) ).delete()

gives:

raise RuntimeError("Too many tables selected")

any hints?

http://web2py.com/books/default/chapter/29/06#count,-isempty,-delete,-update
 
I don't find examples for similar cases

I could select first , and then loop deleting records of needed table ... 
but would be not very efficiet

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: from sqlite to mysql with error

2013-07-11 Thread António Ramos
the same error ( previous email i deleted the sql.log)


Traceback (most recent call last):
  File "/home/ubuntu/web2py/gluon/restricted.py", line 212, in restricted

exec ccode in environment
  File "/home/ubuntu/web2py/applications/EMPRE/models/db.py"
, line 134, in


represent=lambda x, row:x and A('%s'%(db.t_docs.f_doc.retrieve(x)[0]),

  File "/home/ubuntu/web2py/gluon/dal.py", line 7755, in define_table

table = self.lazy_define_table(tablename,*fields,**args)

  File "/home/ubuntu/web2py/gluon/dal.py", line 7792, in lazy_define_table

polymodel=polymodel)
  File "/home/ubuntu/web2py/gluon/dal.py", line 963, in create_table

self.create_sequence_and_triggers(query,table)

  File "/home/ubuntu/web2py/gluon/dal.py", line 1781, in
create_sequence_and_triggers

self.execute(query)
  File "/home/ubuntu/web2py/gluon/dal.py", line 1798, in execute

return self.log_execute(*a, **b)

  File "/home/ubuntu/web2py/gluon/dal.py", line 1792, in log_execute

ret = self.cursor.execute(command, *a[1:], **b)

  File "/home/ubuntu/web2py/gluon/contrib/pymysql/cursors.py", line
117, in execute

self.errorhandler(self, exc, value)

  File "/home/ubuntu/web2py/gluon/contrib/pymysql/connections.py",
line 202, in defaulterrorhandler

raise errorclass, errorvalue
InternalError: (1005, u"Can't create table 'empre.t_docs' (errno: 150)")





2013/7/11 António Ramos 

> here the new log
>
>
> timestamp: 2013-07-11T11:46:35.319760
>
> CREATE TABLE t_docs(
> id INT AUTO_INCREMENT NOT NULL,
> f_trab_ref INT, INDEX f_trab_ref__idx (f_trab_ref), FOREIGN KEY 
> (f_trab_ref) REFERENCES trabalhador (id) ON DELETE CASCADE,
>
>
> f_titulo VARCHAR(512),
> f_doc VARCHAR(512),
> PRIMARY KEY(id)
> ) ENGINE=InnoDB CHARACTER SET utf8;
>
>
>
> 2013/7/11 António Ramos 
>
>> Il try that.
>> Thank you Niphold for your time, as always :)
>>
>> Best regards
>> António
>>
>>
>> 2013/7/11 Niphlod 
>>
>>> as you can see it holds all the commands issued to the database. It will
>>> be more helpful if you move databases/sql.log to sql.log.bak and let web2py
>>> recreate to see what commands are indeed failing. your current one shows
>>> ALL the history including the creation of the tables in your previous dbs.
>>>
>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: from sqlite to mysql with error

2013-07-11 Thread António Ramos
here the new log


timestamp: 2013-07-11T11:46:35.319760
CREATE TABLE t_docs(
id INT AUTO_INCREMENT NOT NULL,
f_trab_ref INT, INDEX f_trab_ref__idx (f_trab_ref), FOREIGN KEY
(f_trab_ref) REFERENCES trabalhador (id) ON DELETE CASCADE,

f_titulo VARCHAR(512),
f_doc VARCHAR(512),
PRIMARY KEY(id)
) ENGINE=InnoDB CHARACTER SET utf8;



2013/7/11 António Ramos 

> Il try that.
> Thank you Niphold for your time, as always :)
>
> Best regards
> António
>
>
> 2013/7/11 Niphlod 
>
>> as you can see it holds all the commands issued to the database. It will
>> be more helpful if you move databases/sql.log to sql.log.bak and let web2py
>> recreate to see what commands are indeed failing. your current one shows
>> ALL the history including the creation of the tables in your previous dbs.
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "web2py-users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to web2py+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: from sqlite to mysql with error

2013-07-11 Thread António Ramos
Il try that.
Thank you Niphold for your time, as always :)

Best regards
António


2013/7/11 Niphlod 

> as you can see it holds all the commands issued to the database. It will
> be more helpful if you move databases/sql.log to sql.log.bak and let web2py
> recreate to see what commands are indeed failing. your current one shows
> ALL the history including the creation of the tables in your previous dbs.
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: from sqlite to mysql with error

2013-07-11 Thread Niphlod
as you can see it holds all the commands issued to the database. It will be 
more helpful if you move databases/sql.log to sql.log.bak and let web2py 
recreate to see what commands are indeed failing. your current one shows 
ALL the history including the creation of the tables in your previous dbs.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: How to get selective update rows from SQLFROM.grid

2013-07-11 Thread Sarbjit singh
Finally, I am able to do it :)

http://www.web2pyslices.com/slice/show/1622/how-to-authorize-users-editing-records-only-for-records-that-were-created-by-tho

On Thursday, July 11, 2013 12:37:53 PM UTC+5:30, Sarbjit singh wrote:
>
> Just to be clear on my requirement :
>
> Taking "Image Blog" example provided in web2py manual as reference, I want 
> to achieve the following functionality :
>
> 1) Multiple user's to be able to add images.
> 2) There should be one "View Records" page which should display all the 
> records with buttons like edit/delete/view etc, same as manage view 
> provided in the example with one difference :- Edit/Delete button should be 
> visible only for user which is currently logged-in into the system and for 
> the entries made by other users, only view button should be visible. So in 
> my case, I will add all the users to manage group such that they will be 
> able to view the grid. But I want only few rows to be made editable.
>
> Can some one please help me in context of Image Blog example, on how to 
> achieve this?
>
> Thanks
> Sarbjit
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: getting duplicate results using with_alias

2013-07-11 Thread Simon Carr
Not sure what is going on here. The code that I posted above generates the 
following SQL which does not make sense

SELECT  risks.id, risks.title, risks.status, risks.description, risks.
event_description, risks.cause_description, risks.result_description, risks.
team, risks.user, risks.risk_owner, risks.date_added, risks.csr_impacted,risks
.id_review_meeting, risks.id_platform, risks.id_contract, 
risks.id_supplier,risks
.csr_reference, risks.maximum_cost FROM suppliers, risks JOIN suppliers AS 
id_supplier ON (suppliers.id = risks.id_supplier) WHERE (risks.id IS NOT 
NULL);

There is no mention of the users, teams, contracts or platforms tables. 
However when I run the code for real i.e. without the _select it does fetch 
fields from these tables but as I say it duplicates each record 5 times, 
once for each table in the query.

Since I am using gluon with PyQt rather than web2py I am not able to 
provide a working app for you.


On Wednesday, 10 July 2013 15:32:40 UTC+1, Niphlod wrote:
>
> check the _select() to see what's going on. if you think the generated SQL 
> is wrong, pack a MINIMAL app with test database records to show what you 
> want to achieve with what you are starting from.
>
>
>
> Il giorno mercoledì 10 luglio 2013 15:22:00 UTC+2, Simon Carr ha scritto:
>>
>> The following code duplicate records based on the number of tables 
>> referenced using with_alias. You see below that I have a reference to 5 
>> tables which is resulting in every record being duplicated 5 times. If I 
>> make a reference to a sixth table I get every record duplicated 6 times.
>>
>> Anu idwhat is going wrong.
>>
>>  RSRisks = db(
>>  (db.risks.user == userid)&
>>  (db.risks.status == status)
>>  ).select(
>> join = [db.teams.with_alias('team').on(db.teams.id == db.
>> risks.team).
>> db.users.with_alias('user').on(db.users.id == db.
>> risks.user).
>> db.users.with_alias('risk_owner').on(db.users.id 
>> == db.risks.risk_owner).
>> db.platforms.with_alias('id_platform').on(db.
>> platforms.id == db.risks.id_platform).
>> db.contracts.with_alias('id_contract').on(db.
>> contracts.id == db.risks.id_contract).
>> db.suppliers.with_alias('id_supplier').on(db.
>> suppliers.id == db.risks.id_supplier)
>> ]
>>   )
>>
>> Is this is a bug in gluon? or have I done something wrong in this code?
>>
>> Thanks
>> So,pm
>>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [web2py] Re: from sqlite to mysql with error

2013-07-11 Thread Niphlod
post your sql.log . 

Il giorno mercoledì 10 luglio 2013 17:45:30 UTC+2, Ramos ha scritto:
>
> I started a new mysql database to make sure the no table exists.
> Still the same error
> ( I´m using mysql on amazon RDS )
>
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
> 15.
> 16.
> 17.
> 18.
> 19.
> 20.
> 21.
> 22.
> 23.
>
> Traceback (most recent call last):
>   File "/home/ubuntu/web2py/gluon/restricted.py", line 212, in restricted
>
>
> exec ccode in environment
>   File "/home/ubuntu/web2py/applications/EMPRE/models/db.py" 
> , line 134, in 
> 
>
>
> represent=lambda x, row:x and A('%s'%(db.t_docs.f_doc.retrieve(x)[0]),
>
>
>   File "/home/ubuntu/web2py/gluon/dal.py", line 7755, in define_table
>
>
> table = self.lazy_define_table(tablename,*fields,**args)
>
>
>   File "/home/ubuntu/web2py/gluon/dal.py", line 7792, in lazy_define_table
>
>
> polymodel=polymodel)
>   File "/home/ubuntu/web2py/gluon/dal.py", line 963, in create_table
>
>
> self.create_sequence_and_triggers(query,table)
>
>
>   File "/home/ubuntu/web2py/gluon/dal.py", line 1781, in 
> create_sequence_and_triggers
>
>
> self.execute(query)
>   File "/home/ubuntu/web2py/gluon/dal.py", line 1798, in execute
>
>
> return self.log_execute(*a, **b)
>
>
>   File "/home/ubuntu/web2py/gluon/dal.py", line 1792, in log_execute
>
>
> ret = self.cursor.execute(command, *a[1:], **b)
>
>
>   File "/home/ubuntu/web2py/gluon/contrib/pymysql/cursors.py", line 117, in 
> execute
>
>
> self.errorhandler(self, exc, value)
>
>
>   File "/home/ubuntu/web2py/gluon/contrib/pymysql/connections.py", line 202, 
> in defaulterrorhandler
>
>
> raise errorclass, errorvalue
> InternalError: (1005, u"Can't create table 'empre.t_docs' (errno: 150)")
>
>
>
> 2013/7/10 Niphlod >
>
>> d let DAL recreate it.
>
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: postgis with web2py

2013-07-11 Thread Niphlod
https://groups.google.com/d/msg/web2py/feh1ksfdkGk/YoY9jUTXDi4J

Il giorno mercoledì 10 luglio 2013 11:50:16 UTC+2, Sushant Hosley ha 
scritto:
>
> Can we write postgis (postgresql) queries i.e spatial queries in web2py . 
> if yes please explain with an example  , 

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: How to get selective update rows from SQLFROM.grid

2013-07-11 Thread Sarbjit singh
Just to be clear on my requirement :

Taking "Image Blog" example provided in web2py manual, I want to achieve 
the following functionality :

1) Multiple user's to be able to add images.
2) There should be one "View Records" page which should display all the 
records with buttons like edit/delete/view etc, same as manage view 
provided in the example with one difference :- Edit/Delete button should be 
visible only for user which is currently logged-in into the system and for 
the entries made by other users, only view button should be visible. So in 
my case, I will add all the users to manage group such that they will be 
able to view the grid. But I want only few rows to be made editable.

Can some one please help me in context of Image Blog example, on how to 
achieve this?

Thanks
Sarbjit

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Failed to Insert into Mysql Database

2013-07-11 Thread Niphlod
you need to db.commit() after creating the table

Il giorno mercoledì 10 luglio 2013 09:21:39 UTC+2, Prasad Muley ha scritto:
>
> Hello all,
>I have created one table called 'Programmer'. Table 
> creation is done successfully but whenever I tried to insert data it shows 
> me errors 'test.Programmer' doesn't exist. I have done in following way.
>
> prankester@Altocumulus: ~ master ⚡
> $ bash cmdweb2py.sh   [12:37:21]
> web2py Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2013
> Version 2.6.0-development+timestamp.2013.07.03.01.52.44
> Database drivers available: SQLite(sqlite3), MySQL(pymysql), 
> MySQL(MySQLdb), PostgreSQL(pg8000), IMAP(imaplib)
> WARNING:web2py:import IPython error; use default python shell
> Python 2.7.3 (default, Apr 10 2013, 05:46:21) 
> [GCC 4.6.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> (InteractiveConsole)
> >>> db=DAL("mysql://root:root@localhost/test")
> >>> db.define_table('Programmer',
> ... Field('username',type='string',length=100,unique=True),
> ... Field('password',type='password',notnull=True),
> ... Field('level',notnull=True),
> ... format='%(username)s',
> ... migrate=False)
> 
> >>> db.Programmer.username #table created successfully
> 
> >>> 
> db.Programmer.insert(username="Prasad",password="web2py",level="Beginner")
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/home/prankester/web2py-master/gluon/dal.py", line 8579, in insert
> ret =  self._db._adapter.insert(self, self._listify(fields))
>   File "/home/prankester/web2py-master/gluon/dal.py", line 1209, in insert
> raise e
> ProgrammingError: (1146, "Table 'test.Programmer' doesn't exist")
> >>>#what's going on wrong
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.