Re: [web2py] Re: what's wrong with web2py.com homepage

2015-10-27 Thread Selman Kocael
yes. it is okey.

2015-10-28 8:48 GMT+02:00 黄祥 :

> not sure but right now is back to normal again.
>
> best regards,
> stifan
>
> On Wednesday, October 28, 2015 at 1:21:36 PM UTC+7, xmarx wrote:
>>
>> home page is like this for me right now: web2py.com
>>
>> [image: Satır içi resim 1]
>>
>>
>>
>>
>> --
> 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-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/d/optout.
>



-- 
Selman Kocael
İsabet Yayınları

-- 
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-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/d/optout.


[web2py] Re: what's wrong with web2py.com homepage

2015-10-27 Thread 黄祥
not sure but right now is back to normal again.

best regards,
stifan

On Wednesday, October 28, 2015 at 1:21:36 PM UTC+7, xmarx wrote:
>
> home page is like this for me right now: web2py.com
>
> [image: Satır içi resim 1]
>
>
>
>
>

-- 
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-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/d/optout.


[web2py] what's wrong with web2py.com homepage

2015-10-27 Thread Selman Kocael
home page is like this for me right now: web2py.com

[image: Satır içi resim 1]

-- 
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-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/d/optout.


[web2py] how to find and reference field names in tables

2015-10-27 Thread Alex Glaros
is it possible to do something like this?

For row in tables:  # all the tables
if row.field_name == 'last_name': # only tables with this field name
query = row.organizationID == db.Organization.id #how to reference 
other fields in the located table?


thanks,

Alex Glaros

-- 
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-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/d/optout.


[web2py] Re: pass javascript value into sqlform

2015-10-27 Thread 黄祥
ah, my bad, the position order is not right in the views.
e.g. correct
*views/default/test.html*
{{extend 'layout.html'}}

{{=btn }}

{{=DIV(_id='demo') }}

{{=scr }}

another example that work using javascript and form :
controllers/default.py

def again():
t_name = 'any_tbl' # just for more readable because SQLFORM.factory
latitude = 'any_fld_1'
longitude = 'any_fld_2'
f_id = lambda f, t = t_name: '%s_%s' % (t, f) # return id of html 
INPUT-element corresponding to field name

btn = BUTTON('Try It', _type = "button", _onclick = """getLocation()""" 
)

scr = SCRIPT("""
$(document).ready(getLocation );

function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(showPosition);
} else { 
x.innerHTML = "Geolocation is not supported by this browser.";
}
}

function showPosition(position) {
$('#%s').val(position.coords.latitude);
$('#%s').val(position.coords.longitude);
return
}
""" % (f_id(latitude), f_id(longitude) )
)

frm=SQLFORM.factory(
Field(latitude, 'string', comment = DIV(btn) ), 
Field(longitude, 'string'),
table_name = t_name)
if frm.process().accepted:
response.flash = frm.vars[latitude]+','+frm.vars[longitude]

return dict(frm = frm, scr = scr)

best regards,
stifan

-- 
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-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/d/optout.


[web2py] Re: cannot disable automatic login after registration

2015-10-27 Thread 黄祥
thanks piere

best regards,
stifan

On Monday, October 26, 2015 at 3:29:49 PM UTC+7, Pierre wrote:
>
> hi stifan,
>
> add this to db.py :
>
> auth.settings.extra_fields['auth_user']=[Field('geolat','float'),
>  Field('geolng','float')]
>
> db.auth_user._manual_entry = False
>
> if not db.auth_user._manual_entry:
> db.auth_user.geolat.readable = False
> db.auth_user.geolat.writable = False 
> db.auth_user.geolng.readable = False
> db.auth_user.geolng.writable = False 
>
> def check_user_geo(form):
> if session.lat and session.lng:
> return form
> else:
> mess = 'no geo data registration failed'
> redirect(URL('show_message',args=mess))
>
> auth.settings.register_next = URL('update_user')
> auth.settings.register_onvalidation.append(check_user_geo)
>
> add this to user.html :
>
> 
> function getLocation() {
> if(navigator.geolocation)
> {
> navigator.geolocation.getCurrentPosition(postLocation);
> }
> }
> function postLocation(position) {
> jQuery.post( '{{=URL('set_location')}}',{lat: 
> +position.coords.latitude, lng: +position.coords.longitude });
> }
> {{if request.args(0)=='register' and not db.auth_user._manual_entry:}}
> getLocation();
> {{pass}}
> 
>
> put this in default controller :
>
> def set_location():
> session.lat = request.post_vars['lat']
> session.lng = request.post_vars['lng']
>
> def update_user():
> row = db(db.auth_user.id == auth.user_id).select().first()
> row.geolat = session.lat
> row.geolng = session.lng
> row.update_record()
> mess = 'registration succeeded'
> redirect(URL('show_message',args=mess))
>
>
> Le lundi 26 octobre 2015 00:05:34 UTC+1, 黄祥 a écrit :
>>
>> hi, pierre,
>>
>> might i know how do you get the latitude and longitude value for your 
>> form.vars?
>>
>> thanks and best regards,
>> stifan
>>
>> On Monday, October 26, 2015 at 12:45:01 AM UTC+7, Pierre wrote:
>>>
>>> thanks this works : 
>>>
>>> auth.settings.register_onvalidation(check_geo)
>>>
>>> +
>>>
>>> def check_geo(form):
>>>   if not form.vars.lat or not form.vars.lng:
>>> redirect(url('registration_failed'))
>>>
>>>
>>> Le dimanche 25 octobre 2015 13:34:36 UTC+1, Anthony a écrit :

 First, note that auth.settings.login_after_registration is only 
 relevant when auth.settings.registration_requires_verification = True, as 
 that is the only case where it makes sense to differentiate whether login 
 should be allowed immediately or not (when registration does not require 
 verification, the user can immediately login manually, so no reason not to 
 do it automatically).

 Anyway, if "geolocation user acceptance" is something that can be 
 handled automatically at time of registration, then just use an 
 auth.settings.register_onvalidation callback to do the check, and simply 
 reject the registration if the check fails. On the other hand, if some 
 manual approval process is required, then you should set 
 auth.settings.registration_requires_approval 
 = True, and that will disable login until the registration has been 
 approved by an admin.

 Anthony

 On Sunday, October 25, 2015 at 6:29:12 AM UTC-4, Pierre wrote:
>
> Yes ok but this is not what I want :
>
>
> extracted from web2py book:
>
> "
>
> If you want to allow people to register and automatically log them in 
> after registration but still want to send an email for verification so 
> that 
> they cannot login again after logout, unless they completed the 
> instructions in the email, you can accomplish it as follows:
>
> auth.settings.registration_requires_verification = True
> auth.settings.login_after_registration = True
>
> "
> here is the problem :
> I added some extra fields to auth_user to provide geolocation data 
> howewer I cannot predict "geolocation user acceptance" so my idea was to 
> simply delete the user account in case geolocation is refused. but this 
> cannot be done since new user is logged in automatically (he cannot log 
> out 
> if his account is deleted). Now I think about a different strategy using 
> permissions and roles like "cannot login till geolocation data provided". 
> This seems like a lot of complexity to solve a simple task ?
>
> Le dimanche 25 octobre 2015 03:55:34 UTC+1, DenesL a écrit :
>>
>>
>> You also need
>>
>> settings.registration_requires_verification = True
>>
>>
>>
>> On Saturday, October 24, 2015 at 8:30:52 PM UTC-4, Pierre wrote:
>>>
>>> Hi everyone,
>>>
>>> I tried to do it with no success with this:
>>>
>>> auth.settings.login_after_registration = False
>>>
>>> thanks for your help
>>>
>>>

-- 
Resources:
- http://web2py.com
- htt

[web2py] Re: Oracle drivers.

2015-10-27 Thread Michael Messmer
Ok more info.

added this to a def and its a copy of code from 'line 1101' of web2py 

/gluon 

/*widget.py* :

def about():
from pydal.drivers import DRIVERS
print 'Database drivers available: %s' % ', '.join(DRIVERS)
return locals()

the about page returns:

{'sqlite3': , 'imaplib': , 'pymysql': , 'pg8000': 
}

just trying to expose something to help jog anything.  And not giving up! 
 :)

On Monday, October 26, 2015 at 5:51:26 PM UTC-7, Michael Messmer wrote:
>
> So i noticed something.  I was in root when when I was seeing cx_Oracle:
>
> # python web2py.py 
> web2py Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2015
> Version 2.12.3-stable+timestamp.2015.08.19.00.18.03
> Database drivers available: sqlite3, imaplib, cx_Oracle, pymysql, pg8000
>
>
> When I was in Standard user:
> $ python web2py.py
> web2py Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2015
> Version 2.12.3-stable+timestamp.2015.08.19.00.18.03
> Database drivers available: sqlite3, imaplib, pymysql, pg8000
>
> 
>
> So I moved the cx_Oracle.so file into /usr/lib64/python2.7/site-packages/ 
> and then chmod so that everyone could see and execute. 
> and now when Im in a standard user:
>
> $ python web2py.py 
> web2py Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2015
> Version 2.12.3-stable+timestamp.2015.08.19.00.18.03
> Database drivers available: sqlite3, imaplib, cx_Oracle, pymysql, pg8000
>
> did a 'systemctl restart httpd"
>
> Still nothing.  I was so hopeful.  Any thoughts of what I may be doing 
> wrong?
>
> Does Apache or mod-wsgi need some special privileges that I have not given 
> to 'cx_Oracle.so'?  As those is running the framework and not my user 
> account nor root.  Thoughts?
>

-- 
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-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/d/optout.


[web2py] Re: CMS WEB2PY

2015-10-27 Thread James Burke
I've posted the source code of my CMS on github:

https://github.com/peregrinius/web2py-liscio

I migrated it onto the latest version of web2py, but there is a change on 
the new version which means a menu items with children is no longer 
clickable link. I guess this is for the benefit of tablets?



-- 
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-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/d/optout.


Re: [web2py] DAL alternatives

2015-10-27 Thread António Ramos
pyDAL is the choice.

But if i use it outside web2py i need an alternative http server/rest
endpoint and something to auth clients.
What do you suggest to add to pyDAL ?

Regards
António

2015-10-22 14:56 GMT+01:00 António Ramos :

> I agree with you except for the "kept secret" because it keeps away people
> that could help make it even better.
> and yes, i meant pyDAL
>
> 2015-10-22 14:53 GMT+01:00 Richard Vézina :
>
>> Do you mean pyDAL?
>>
>> If so, you have to consider that it is very young and may still seems to
>> be web2py related which may make poeple think that they can't use it
>> without web2py...
>>
>> I use to refer many StackOverflow asker to pyDAL as a way to solve their
>> issue, I guess word of mouth is not in use enough.
>>
>> Anyway pyDAL is amanzing piece of software and I don't mind if it stays a
>> really good kept secret...
>>
>> :)
>>
>> Richard
>>
>> On Thu, Oct 22, 2015 at 8:52 AM, António Ramos 
>> wrote:
>>
>>> Why is there very litle interest in the DAL github repo (very litle
>>> forks and stars) ?
>>>
>>> Are people using better alternatives or does it suffer from some lack of
>>> publicity or even worse, people dont like it because they dont like web2py
>>> either.
>>>
>>> Regards
>>> António
>>>
>>>
>>>
>>>
>>> --
>>> 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-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/d/optout.
>>>
>>
>> --
>> 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-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/d/optout.
>>
>
>

-- 
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-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/d/optout.


[web2py] Re: parse_as_rest - filter GET request with parameters rather than patterns

2015-10-27 Thread Mamisoa Andriantafika
Thank you for your answer.

Is there another way to make a rest scaffold service that work with vars in 
web2py?

Le mardi 27 octobre 2015 13:56:43 UTC+1, Niphlod a écrit :
>
> parse_as_rest works exclusively with args, not vars.
>
> On Tuesday, October 27, 2015 at 1:20:03 AM UTC+1, Mamisoa Andriantafika 
> wrote:
>>
>>
>> Hi,
>>
>> Is it possible to GET an answer with a setup restfull service with 
>> parse_as_rest with:
>>
>> /rest/table_name?id=1
>>
>>
>>
>> that is equivalent to the working:
>>
>> /rest/table_name/id/1
>>
>>
>> ?
>>
>> Morever with more parameters:
>>
>> /rest/table_name?id=1&name=Toto
>>
>>
>>
>> Mike
>>
>

-- 
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-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/d/optout.


[web2py] Re: Smartgrid: get the ID of the just inserted row

2015-10-27 Thread Serge Bourgeois
Thanks! oncreate is working perfectly!

Le mardi 27 octobre 2015 11:54:46 UTC+1, Serge Bourgeois a écrit :
>
>
> When creating a new record with smartgrid, the   the 'onvalidation' 
> function cannot give the form.vars.id is since the record is not created 
> yet. 
> I understand that the onvalidation para allow to control what happens 
> before the form is accepted, but I confess I couldnt' find a kind of 
> 'after_validation'. 
> In fact, I'd like to create and insert thumbnails automatically when 
> creating new record. For this, I neew the id of the record, just after 
> creation, as for instance described at the page 145 of the book 'web2py 
> application development cookbook' of Marino Reingart, Pablo Martin Mulone, 
> Massimo Di Pierro, Bruno Cezar Rocha, ... ,in the function ' : 
> make_thumbnail
>
> Thanks in advance for any help!
>
>
>
>
>
>

-- 
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-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/d/optout.


Re: [web2py] logged in user and auth.user_id=None

2015-10-27 Thread Richard Vézina
Can you show the code you change previous and the actual code?

You may have erase something related to the auth...

Richard

On Tue, Oct 27, 2015 at 8:51 AM, Pierre  wrote:

> Hi,
>
> strange..I changed my application adding virtual fields and now it
> seems like the authentification system is corrupted
> I can login and logout but auth.user_id is unavailable
> I login and  type in the shell : print auth.user_id it says None
> auth.user.id gives an error
>
> if I go to the welcome application sign-up+login same problem
>
>
>  I don't understand
>
> --
> 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-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/d/optout.
>

-- 
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-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/d/optout.


[web2py] Re: parse_as_rest - filter GET request with parameters rather than patterns

2015-10-27 Thread Niphlod
parse_as_rest works exclusively with args, not vars.

On Tuesday, October 27, 2015 at 1:20:03 AM UTC+1, Mamisoa Andriantafika 
wrote:
>
>
> Hi,
>
> Is it possible to GET an answer with a setup restfull service with 
> parse_as_rest with:
>
> /rest/table_name?id=1
>
>
>
> that is equivalent to the working:
>
> /rest/table_name/id/1
>
>
> ?
>
> Morever with more parameters:
>
> /rest/table_name?id=1&name=Toto
>
>
>
> Mike
>

-- 
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-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/d/optout.


[web2py] Re: SQLFORM.grid: trigger edit when clicking anywhere on the row itself

2015-10-27 Thread Niphlod
without user_signature=False you can't edit record if the user isn't logged 
in.
Anyway you don't need to fiddle with jquery: just render a hidden button 
with the link and the signature and then just use that as a reference to 
trigger the navigation to the edit form when the user clicks on the table 
row. 

On Tuesday, October 27, 2015 at 11:10:58 AM UTC+1, Julian Sanchez wrote:
>
> Yes, that's what I was generating via jQuery but I (wrongfully) thought 
> that if the _signature argument was missing I would get an error message. 
>  But looks like if you have a user logged in the lack of _signature in the 
> querystring doesn't trigger an error even if you don't specify 
> 'user_signature=False' in the SQLFORM.grid() call.  Learned something new :)
>
> Cheers,
> Julian
>
> On Monday, October 26, 2015 at 4:02:46 AM UTC-5, Niphlod wrote:
>>
>> the edit link isn't that hard to rebuild ...
>>
>> /edit/tablename/record_id
>>
>>
>>
>> On Saturday, October 24, 2015 at 1:02:31 PM UTC+2, Julian Sanchez wrote:
>>>
>>> Is there an easy way to trigger the same URL you get when pressing the 
>>> built-in 'edit' button of the SQLFORM.grid without having to show that 
>>> button?  I have a few grids that would show cleaner if users could go 
>>> directly to the edit page by clicking on the row itself (no need to view 
>>> details).  I can do some jQuery stuff for that but I lose the '_signature' 
>>> argument.  I could disable it but I would rather keep it for added security.
>>>
>>

-- 
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-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/d/optout.


[web2py] logged in user and auth.user_id=None

2015-10-27 Thread Pierre
Hi,

strange..I changed my application adding virtual fields and now it 
seems like the authentification system is corrupted
I can login and logout but auth.user_id is unavailable
I login and  type in the shell : print auth.user_id it says None
auth.user.id gives an error

if I go to the welcome application sign-up+login same problem


 I don't understand

-- 
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-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/d/optout.


Re: [web2py] Re: CMS WEB2PY

2015-10-27 Thread James Burke
Thanks Selman. I have already begun work to put a version up on github.
Hopefully I'll have something up tonight.
On 27 Oct 2015 1:27 PM, "Selman Kocael"  wrote:

> it's nice.
>
> 2015-10-26 21:49 GMT+02:00 James Burke :
>
>> I created a CMS a few years ago now in web2py... It is fairly basic
>> compared to Carlos one.
>>
>> I have a test website for a client on GAE
>>
>> http://badevday-test.appspot.com/
>>
>> to access the backend
>>
>> http://badevday-test.appspot.com/admin
>>
>> login: user-gr...@web2py.com
>> password: passw0rd
>>
>> It doesn't have any credit on it so if you get an error it probably ran
>> out of datastore reads, just wait a day.
>>
>> If anyones interested i'll put it up on github
>>
>> --
>> 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-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/d/optout.
>>
>
>
>
> --
> Selman Kocael
> İsabet Yayınları
>
> --
> 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 a topic in the
> Google Groups "web2py-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/web2py/tFUCApWS2YE/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/d/optout.
>

-- 
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-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/d/optout.


Re: [web2py] Re: CMS WEB2PY

2015-10-27 Thread Selman Kocael
it's nice.

2015-10-26 21:49 GMT+02:00 James Burke :

> I created a CMS a few years ago now in web2py... It is fairly basic
> compared to Carlos one.
>
> I have a test website for a client on GAE
>
> http://badevday-test.appspot.com/
>
> to access the backend
>
> http://badevday-test.appspot.com/admin
>
> login: user-gr...@web2py.com
> password: passw0rd
>
> It doesn't have any credit on it so if you get an error it probably ran
> out of datastore reads, just wait a day.
>
> If anyones interested i'll put it up on github
>
> --
> 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-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/d/optout.
>



-- 
Selman Kocael
İsabet Yayınları

-- 
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-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/d/optout.


Re: [web2py] Smartgrid: get the ID of the just inserted row

2015-10-27 Thread Vinicius Assef
Use the `oncreate` argument.


--
Vinicius Assef



On 27 October 2015 at 08:54, Serge Bourgeois 
wrote:

>
> When creating a new record with smartgrid, the   the 'onvalidation'
> function cannot give the form.vars.id is since the record is not created
> yet.
> I understand that the onvalidation para allow to control what happens
> before the form is accepted, but I confess I couldnt' find a kind of
> 'after_validation'.
> In fact, I'd like to create and insert thumbnails automatically when
> creating new record. For this, I neew the id of the record, just after
> creation, as for instance described at the page 145 of the book 'web2py
> application development cookbook' of Marino Reingart, Pablo Martin Mulone,
> Massimo Di Pierro, Bruno Cezar Rocha, ... ,in the function ' :
> make_thumbnail
>
> Thanks in advance for any help!
>
>
>
>
>
> --
> 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-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/d/optout.
>

-- 
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-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/d/optout.


[web2py] Smartgrid: get the ID of the just inserted row

2015-10-27 Thread Serge Bourgeois

When creating a new record with smartgrid, the   the 'onvalidation' 
function cannot give the form.vars.id is since the record is not created 
yet. 
I understand that the onvalidation para allow to control what happens 
before the form is accepted, but I confess I couldnt' find a kind of 
'after_validation'. 
In fact, I'd like to create and insert thumbnails automatically when 
creating new record. For this, I neew the id of the record, just after 
creation, as for instance described at the page 145 of the book 'web2py 
application development cookbook' of Marino Reingart, Pablo Martin Mulone, 
Massimo Di Pierro, Bruno Cezar Rocha, ... ,in the function ' : 
make_thumbnail

Thanks in advance for any help!





-- 
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-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/d/optout.


[web2py] Re: SQLFORM.grid: trigger edit when clicking anywhere on the row itself

2015-10-27 Thread Julian Sanchez
Yes, that's what I was generating via jQuery but I (wrongfully) thought 
that if the _signature argument was missing I would get an error message. 
 But looks like if you have a user logged in the lack of _signature in the 
querystring doesn't trigger an error even if you don't specify 
'user_signature=False' in the SQLFORM.grid() call.  Learned something new :)

Cheers,
Julian

On Monday, October 26, 2015 at 4:02:46 AM UTC-5, Niphlod wrote:
>
> the edit link isn't that hard to rebuild ...
>
> /edit/tablename/record_id
>
>
>
> On Saturday, October 24, 2015 at 1:02:31 PM UTC+2, Julian Sanchez wrote:
>>
>> Is there an easy way to trigger the same URL you get when pressing the 
>> built-in 'edit' button of the SQLFORM.grid without having to show that 
>> button?  I have a few grids that would show cleaner if users could go 
>> directly to the edit page by clicking on the row itself (no need to view 
>> details).  I can do some jQuery stuff for that but I lose the '_signature' 
>> argument.  I could disable it but I would rather keep it for added security.
>>
>

-- 
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-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/d/optout.


[web2py] Re: About execute sql statement

2015-10-27 Thread DucVa
Hi Anthony,
Are you showing the *exact* code?
That is simple code to understand easily. In my app, I use storeproceduce.

Did you copy the exact application from one machine and move it to another, 
or are there any differences at all?
My code is  same in anywhere.

"pass in fields". I don't know it. Can you explane clearly?
When sue .executesql, how do I do to get result as Rows or how must i 
convert result to Rows object?

Thanks and Regard!


Vào 23:32:17 UTC+7 Thứ Hai, ngày 26 tháng 10 năm 2015, Anthony đã viết:
>
> .executesql() doesn't return a Rows object unless you pass in fields. Are 
> you showing the *exact* code? Did you copy the exact application from one 
> machine and move it to another, or are there any differences at all?
>
> Anthony
>
> On Monday, October 26, 2015 at 3:29:40 AM UTC-4, DucVa wrote:
>>
>> Hi all,
>> I define a table as below:
>> db.define_table('partner',
>> Field('name')
>> )
>> In controller, I use execute to get data:
>> sql = 'select name from partner'
>> rows = db.executesql(sql)
>> In my laptop, type of rows is LIST, but in other computer in my company, 
>> type of rows is ROWS.
>> So, when i print data, raise error.
>> for row in rows:
>> print row.name
>> I get an error: 'Row' object has no attribute 'name'.
>> But in other computer, my code runs very well.
>> I use web2py 2.12.3, python 2.7.8, mssql 2008 r2.
>> Please help me. Regard!
>>
>

-- 
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-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/d/optout.