[web2py] Re: Error in Custom Register Page in web2py

2014-01-02 Thread Akash Agrawall
Thanks for marking that error. but after changing that also same error. :( it's urgent... On Tuesday, December 31, 2013 8:33:54 PM UTC+5:30, Anthony wrote: At the end of the form, you have {{=form.custom.begin}}, but it should be {{=form.custom.end}}. On Tuesday, December 31,

Re: [web2py] Re: web2py app like adminer

2014-01-02 Thread rif
https://github.com/rif/web2admin it's something like a django admin. Maybe it can help. -rif joi, 2 ianuarie 2014, 03:54:43 UTC+2, samuel bonill a scris: when it's ready i'll let you know 2014/1/1 Massimo Di Pierro massimo@gmail.com javascript: I look forward to see more of

[web2py] Problem with callback, eval and flash

2014-01-02 Thread Serbitar
I have a controller like this: def test(): return 'jQuery(.flash).html(test2).slideDown();' and a view like this: {{=A(Testbutton, callback=URL('test'),target=':eval', _class='btn')}} When I push the button, nothing is happening. However this works in the view: script

[web2py] Re: Happy New Year everybody!

2014-01-02 Thread weheh
Thank you, Massimo and web2py group. Happy New Year everybody! On Thursday, January 2, 2014 6:06:30 AM UTC+8, Massimo Di Pierro wrote: Happy new year everybody, some good news: 1) python is growing popularity

Re: [web2py] Re: Happy New Year everybody!

2014-01-02 Thread Michele Comitini
Thank you Massimo! Happy 2014 to web2py and all web2py users! mic 2014/1/2 weheh richard_gor...@verizon.net Thank you, Massimo and web2py group. Happy New Year everybody! On Thursday, January 2, 2014 6:06:30 AM UTC+8, Massimo Di Pierro wrote: Happy new year everybody, some good news:

[web2py] Re: Temporarily Poll View

2014-01-02 Thread EW
Anybody have any suggestions? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups

[web2py] Re: Error in Custom Register Page in web2py

2014-01-02 Thread Anthony
Sorry, hadn't looked closely at the controller code. First, your first two lines are useless, as the third line simply overwrites the form variable with a completely new object. Second, auth.register() already handles the form processing, so you cannot subsequently call form.accepts(). If you

Re: [web2py] Re: Happy New Year everybody!

2014-01-02 Thread Adnan Smajlovic
Thank you Massimo, and also wishing everyone happy and prosperous 2014! Adnan On Thu, Jan 2, 2014 at 9:27 AM, Michele Comitini michele.comit...@gmail.com wrote: Thank you Massimo! Happy 2014 to web2py and all web2py users! mic 2014/1/2 weheh richard_gor...@verizon.net Thank you,

Re: [web2py] always get This webpage has a redirect loop if use google oauth2

2014-01-02 Thread Tim Richardson
On Thursday, 2 January 2014 09:02:17 UTC+11, Massimo Di Pierro wrote: Hello Tim please open a ticket. I used this recently without problems. Make sure you list the steps and the code you changed from scaffolding. http://code.google.com/p/web2py/issues/detail?id=1840 I reproduced the

[web2py] Calling function from view not working

2014-01-02 Thread Ruud Schroen
Hi, I want to add a class to the body depending on the controller and function (like Drupal does for example). My function (in db.py): def get_page_class(): page_class = 'page-%s-%s' % (request.controller, request.function) return page_class And in my view: body

[web2py] require based on another field.

2014-01-02 Thread Calvin Morrison
Hi! I have a field called Job Type, and another field database that depends on the type. If the user selects Train for Job Type, they don't need to enter a database (a integer id), but i don't know how to make validators do this for me. Right now I have this: db.jobs.db.requires =

[web2py] Re: Possibly a problem with CAS redirection in v2.8.2

2014-01-02 Thread Vinicius Assef
I've just opened a ticket about it: http://code.google.com/p/web2py/issues/detail?id=1841 On Tue, Dec 24, 2013 at 9:12 AM, Vinicius Assef vinicius...@gmail.com wrote: Anyone? On Fri, Dec 20, 2013 at 6:05 PM, Vinicius Assef vinicius...@gmail.com wrote: Hi guys, I'm playing around with CAS and

[web2py] GAE: defaults on _tableobj

2014-01-02 Thread Quint
Hello everybody, Happy New Year! I'm using GAE and sometimes a need to call some GAE datastore functions directly. (For instance when I want to supply a key_name when I put() an entity so I can have better performance to get() that entity from db. Or when I want to use put_multi()) Anyway, I

[web2py] Re: Adding elements (e.g. a button) to SQLFORM.grid

2014-01-02 Thread Kyle Flanagan
Thanks for the insight. What I eventually did was use the btn CSS class to stylize a link as a button. a class=btn href={{=URL('function', vars=request.vars)}}Submit/a On Tuesday, December 31, 2013 7:45:25 PM UTC-6, Tim Richardson wrote: I've been experimenting with this (see this for

Re: [web2py] Calling function from view not working

2014-01-02 Thread Federico Ferraro
body class={{=get_page_class()}} El ene 2, 2014 1:11 p.m., Ruud Schroen r...@formatics.nl escribió: Hi, I want to add a class to the body depending on the controller and function (like Drupal does for example). My function (in db.py): def get_page_class(): page_class = 'page-%s-%s' %

[web2py] Re: Temporarily Poll View

2014-01-02 Thread Anthony
You can set a component to reload indefinitely and then stop the reloading by doing: jQuery('#mydiv').addClass('w2p_component_stop'); However, in this case, rather than continually reloading the entire grid while waiting for the database insert, it might be better to simply poll the server

[web2py] executesql as_dict=True replacing ids during join

2014-01-02 Thread ssuresh
I found a peculiar problem when executing a join query on two tables. I have two tables table1 and table2. Both have ids as their pks. table1 has a FK on table2 using table2_id field. Now when i do an executesql of the following query, rows=executesql('select * from table1,table2 where

[web2py] Re: Help with query from multiple tables and groupby

2014-01-02 Thread Francisco
Thanks Niphlod (By the way I thought I have answered but can't find my answer so if I duplicate the entry sorry) I had never worked with PostgreSQL nor any other compliant engine. I have the bad habits of MySQL and SQLite. So I was expecting the same behavoir. Below is the sample data, thanks

[web2py] Re: Problem with callback, eval and flash

2014-01-02 Thread Anthony
target=:eval is for the ajax() function, not the A() helper. Instead, in your test() function, try: response.js = 'jQuery(.flash).html(test2).slideDown();' Anthony On Thursday, January 2, 2014 7:41:08 AM UTC-5, Serbitar wrote: I have a controller like this: def test(): return

[web2py] Re: Temporarily Poll View

2014-01-02 Thread EW
Thanks, but I don't understand..how would I know when the insert (scheduler task) has completed? On Thursday, January 2, 2014 11:14:00 AM UTC-8, Anthony wrote: You can set a component to reload indefinitely and then stop the reloading by doing:

[web2py] Re: Virtual field for latitude and longitude from geometry field?

2014-01-02 Thread Christian Foster Howes
i bet that by the time your lambda is running the point has been converted to a string already. can you see if that is true? i'm not sure how to invoke db functions in a lambda of a virtual field. :( On Wednesday, January 1, 2014 5:50:54 PM UTC-8, User wrote: Suppose I have a table like:

[web2py] Re: Can somebody help me to integrate Web2Py on Hostagtor?

2014-01-02 Thread Dave S
On Monday, December 30, 2013 8:21:56 PM UTC-8, Paulo wrote: I'm having my first steps on web2py and python and would really benefit from a dummy tutorial... Thanks, I can't help you with the hostgator environment, but did you have a practice environment on a local machine first? That's

[web2py] Re: Happy New Year everybody!

2014-01-02 Thread samuel bonill
*thanks massimo, I just hope this year we give the jump to pythoon 3.x* El miércoles, 1 de enero de 2014 17:06:30 UTC-5, Massimo Di Pierro escribió: Happy new year everybody, some good news: 1) python is growing popularity

[web2py] Re: Help with query from multiple tables and groupby

2014-01-02 Thread Niphlod
Given your expected resultset, first and foremost the price_list table is out of the picture. That's because you want just all the fields from products (id, name, description), attach the price from product_prices (but you NEED to choose what price (default or discount), else you'd have

[web2py] OT: movuca internal error on comment

2014-01-02 Thread Manuele Pesenti
@rochabruno I guess... Internal error Ticket issued: init/94.36.44.58.2014-01-02.21-55-54.40671429-3f5a-47a1-9dac-f68a7103160b http://www.web2pyslices.com/admin/default/ticket/init/94.36.44.58.2014-01-02.21-55-54.40671429-3f5a-47a1-9dac-f68a7103160b that's what I get trying to add a comment

[web2py] request desktop site is not work when open web2py admin in mobile

2014-01-02 Thread 黄祥
hi, i figure it out that request desktop site is not work when open web2py admin in mobile, is it normal? i think i can use upload and install packed installation from mobile when request desktop site is enable. i test it with chrome and firefox on android but got the same result. thanks and

[web2py] Re: Help with query from multiple tables and groupby

2014-01-02 Thread Francisco
Thanks a lot Niphlod. I will modify and code to match that. Thanks again. El jueves, 2 de enero de 2014 15:26:27 UTC-6, Niphlod escribió: Given your expected resultset, first and foremost the price_list table is out of the picture. That's because you want just all the fields from products

[web2py] Re: OT: movuca internal error on comment

2014-01-02 Thread rochacbruno
Hi Manuele, Thanks for the report. I will check the problem ASAP. Alan (spametki), Anthony and Massimo are also able to access the web2pyslices admin. BTW: web2pyslices needs more contributors, some things needs rewrite, if anybody wants to become a contributor feel free to contact one of

[web2py] Re: Help with query from multiple tables and groupby

2014-01-02 Thread 黄祥
just a suggestion, why not redefine your table models simpler? e.g. db.define_table('products', Field('name'), Field('description'), Field('selling_price', 'decimal(14,6)'), Field('promotion_price', 'decimal(14,6)'), Field('image_thumb', 'upload'), Field('image_ori', 'upload') ) best regards,

[web2py] Re: executesql as_dict=True replacing ids during join

2014-01-02 Thread Massimo Di Pierro
I think it is a bug. Please open a ticket linking this thread. On Thursday, 2 January 2014 13:20:04 UTC-6, ssuresh wrote: I found a peculiar problem when executing a join query on two tables. I have two tables table1 and table2. Both have ids as their pks. table1 has a FK on table2 using

[web2py] Re: executesql as_dict=True replacing ids during join

2014-01-02 Thread Anthony
This may be tricky. In case of as_dict=True, executesql() uses the adapter.cursor.description to get the column names, but there is no indication which column name comes from which table, so if both tables have the same column name, the dict will only get one of the columns. executesql() does

[web2py] Re: executesql as_dict=True replacing ids during join

2014-01-02 Thread Anthony
Another solution is to identify duplicate names and simply append numbers (e.g., id_1, id_2), but in most cases it would probably be preferable to directly specify the colnames. If we don't take that approach, it would probably be better to raise an exception when duplicate column names are

[web2py] Re: Select all fields plus a calculated field?

2014-01-02 Thread User
My workaround is to change this: location = db(db.location.id == loc_id).select(db.location.ALL, db.location.point.st_x(). with_alias('latitude'), db.location.point.st_y(). with_alias('longitude')).first() into

[web2py] Can't get web2py working with GAE locally

2014-01-02 Thread Jaime Sempere
Hi everyone, this is driving me mad. I used web2py and GAE one year ago and I liked a lot, fast and easy to work with gae. Now that I wanted to start another app, I have download GAE and Web2Py again (for having last releases and starting in a cleannew folder). So, first change that I see is

[web2py] Re: Error in Custom Register Page in web2py

2014-01-02 Thread Akash Agrawall
Yaa thanx for pointing that out.. have removed the 3rd line it would be much helpful if you can explain the usage of auth.message On Thursday, January 2, 2014 8:55:07 PM UTC+5:30, Anthony wrote: Sorry, hadn't looked closely at the controller code. First, your first two lines

[web2py] Re: Error in Custom Register Page in web2py

2014-01-02 Thread Akash Agrawall
Also if I remove the controller's flash line i.e. my new controller is: Controller: default.py def register(): form=auth.register() form.add_button('Cancel', URL('register')) return dict(form=form) Still it doesn't work i.e. it redirects to register.html with the data