[web2py] Re: web2py vs others. Status of 2014

2014-06-10 Thread Tim Richardson
THanks for this update Massimo. That sounds great, and it sounds like a 
platform with lots of potential. I just hope there is a way to 
incrementally feed in the improvements.

On Tuesday, 10 June 2014 12:14:03 UTC+10, Massimo Di Pierro wrote:
>
> Good questions.
>
> Web2py has changed less in the last year than in the year before and most 
> of the changes have been small improvements and strengthening security. In 
> my view web2py is a very mature project and users do not want big changes 
> at this point. We have some todo items including a more flexible grid, 
> better CSS customization. I personally did not find much to learn from 
> Django and Rails in the last few years instead I am much more interested in 
> the async capabilities of Python 3.4, and in some javascript libraries like 
> Angular, Ember, and Ractive (my favorite), by hypermedia APIs, and by 
> Semantic-UI.
>
> I think the future is a lighter web2py with a similar IDE but more 
> client-side logic out of the box and more automatic. For example I have 
> ported the web2py helper system (DIV, SPAN, etc.) to JS. I would like to 
> move form generation also clients-side. I would like move away from the MVC 
> and to a mini-MVC patter where an action is responsible for a single 
> component (for example validation) and not for an entire page. Wherever we 
> are going the DAL is staying! 
>
> Massimo
>
>
>
> On Monday, 9 June 2014 07:01:39 UTC-5, Ramos wrote:
>>
>> what is the status of the evolution of web2py compared with other, mainly 
>> rails /or django ?
>>
>>
>> which of these including web2py has gain more improvements over the last 
>> year?
>> Does anybody knows?
>> Is still web2py over the others?
>>
>>
>> From the beginning Massimo used the phrase
>> "Ideas we had , ideas we stole"
>>
>> I would like to know if Massimo  is stealing more ideas from others.
>> Also what new "Killer" ideas are we expecting for near future?
>>
>> 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.


[web2py] Re: Bootstrap 3

2014-06-10 Thread Tim Richardson
See from Massimo: 
https://groups.google.com/d/msg/web2py/lvdb6d9QlRE/HFcXC_cMdSYJ


-- 
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 does not submit,if displayed over jQuery load

2014-06-10 Thread Anthony
The "action" attribute of the form is "#", which means the form will submit 
to the URL of the parent page. Instead, your form must submit to the 
edit_posts action, which means you need to trap the form submission and 
submit it via Ajax as well. The easiest way to do this is to instead put 
the form in a web2py component:

 Edit 



Anthony

On Tuesday, June 10, 2014 2:06:32 AM UTC-4, Najtsirk wrote:
>
> Hi,
>
> in my default.py i have a simple function:
>
> def edit_posts():
> form=SQLFORM(db.postos, request.args(0)).process()
> return dict(form=form)
>
> On my posts page, i have a table of all posts with a button, that calls a 
> SQLFORM with a jQuery load, like this:
>
>   onclick="$('.content').load('{{=URL('default' , 'edit_posts', 
> args=post.id)}}');"> 
> Edit 
>
> Until here, everything works ok. But the problem is, i canot update a post 
> over this form.
>
> SQLFORM, whic is shown ad default/edit_posts/post.id works without 
> problem.
>
> What am I missing here?
>
> Best,
> Kristjan
>

-- 
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 use requires with list:reference

2014-06-10 Thread Mandar Vaze
when using default 'list:reference mytable' all the entries from mytable 
are shown in the dropdown (when using SQLFORM.grid)
I want to show the list in the drop down after applying some filters

Here is an example :

db.define_table('parent',
Field('fname', 'string'),
Field('lname', 'string'),
format='%(fname)s %(lname)s'
)

def get_parents(lname):
return db(db.parent.lname == lname)

db.define_table('child',
Field('first_name', 'string'),
Field('last_name', 'string'),
Field('parents', 'reference parent', 
  requires=IS_IN_DB(lambda row: get_parents(row.child.
last_name), 'parent._format')),
format='%(fname)s %(lname)s'
)


Here the idea is the when associating an entry from parent table - only 
those values are shown where last name of child matches that of the parent
Obviously the example is "made up" - real scenario is bit complicated - but 
I am getting following error : 

AttributeError: 'function' object has no attribute 'db'



web2py™ Version 2.9.5-stable+timestamp.2014.03.16.02.35.39

Traceback

Traceback (most recent call last):
File "/path/to/web2py/gluon/restricted.py", line 220, in restricted
exec ccode in environment
File "/path/to/web2py/applications/parents/controllers/appadmin.py" 
, 
line 674, in 
File "/path/to/web2py/gluon/globals.py", line 385, in 
self._caller = lambda f: f()
File "/path/to/web2py/applications/parents/controllers/appadmin.py" 
, 
line 153, in insert
form = SQLFORM(db[table], ignore_rw=ignore_rw)
File "/path/to/web2py/gluon/sqlhtml.py", line 1151, in __init__
inp = self.widgets.options.widget(field, default)
File "/path/to/web2py/gluon/sqlhtml.py", line 273, in widget
options = requires[0].options()
File "/path/to/web2py/gluon/validators.py", line 559, in options
self.build_set()
File "/path/to/web2py/gluon/validators.py", line 531, in build_set
table = self.dbset.db[self.ktable]
AttributeError: 'function' object has no attribute 'db'

I am OK to use "list:string" with IS_IN_SET() as well - but I am unable to 
use "lambda row: get_parents(row.child.last_name)"
I get "function is not iterable" error (Off course I will change 
get_parents() function to return list of strings based on my query)

-Mandar

-- 
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: How to use requires with list:reference

2014-06-10 Thread Anthony
The first argument to IS_IN_DB must be a DAL object or a Set object -- it 
cannot be a function.

Anthony

On Tuesday, June 10, 2014 10:05:21 AM UTC-4, Mandar Vaze wrote:
>
> when using default 'list:reference mytable' all the entries from mytable 
> are shown in the dropdown (when using SQLFORM.grid)
> I want to show the list in the drop down after applying some filters
>
> Here is an example :
>
> db.define_table('parent',
> Field('fname', 'string'),
> Field('lname', 'string'),
> format='%(fname)s %(lname)s'
> )
>
> def get_parents(lname):
> return db(db.parent.lname == lname)
>
> db.define_table('child',
> Field('first_name', 'string'),
> Field('last_name', 'string'),
> Field('parents', 'reference parent', 
>   requires=IS_IN_DB(lambda row: get_parents(row.child.
> last_name), 'parent._format')),
> format='%(fname)s %(lname)s'
> )
>
>
> Here the idea is the when associating an entry from parent table - only 
> those values are shown where last name of child matches that of the parent
> Obviously the example is "made up" - real scenario is bit complicated - 
> but I am getting following error : 
>
> AttributeError: 'function' object has no attribute 'db'
>
>
>
> web2py™ Version 2.9.5-stable+timestamp.2014.03.16.02.35.39
>
> Traceback
>
> Traceback (most recent call last):
> File "/path/to/web2py/gluon/restricted.py", line 220, in restricted
> exec ccode in environment
> File "/path/to/web2py/applications/parents/controllers/appadmin.py" 
> , 
> line 674, in 
> File "/path/to/web2py/gluon/globals.py", line 385, in 
> self._caller = lambda f: f()
> File "/path/to/web2py/applications/parents/controllers/appadmin.py" 
> , 
> line 153, in insert
> form = SQLFORM(db[table], ignore_rw=ignore_rw)
> File "/path/to/web2py/gluon/sqlhtml.py", line 1151, in __init__
> inp = self.widgets.options.widget(field, default)
> File "/path/to/web2py/gluon/sqlhtml.py", line 273, in widget
> options = requires[0].options()
> File "/path/to/web2py/gluon/validators.py", line 559, in options
> self.build_set()
> File "/path/to/web2py/gluon/validators.py", line 531, in build_set
> table = self.dbset.db[self.ktable]
> AttributeError: 'function' object has no attribute 'db'
>
> I am OK to use "list:string" with IS_IN_SET() as well - but I am unable to 
> use "lambda row: get_parents(row.child.last_name)"
> I get "function is not iterable" error (Off course I will change 
> get_parents() function to return list of strings based on my query)
>
> -Mandar
>
>

-- 
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: running web2py in a subdirectory

2014-06-10 Thread Andy Pardue
Yes I do it all the time. Here is the config I use on Ubuntu in 
/etc/apache2/conf.d

 START OF FILE
# most people use /home/www-data I just happend to use /home/web2py instead 
this time
# I put this file in /etc/apache2/conf.d/, This makes it global to the 
apache install.
# the key here is the /w you need to have a routes.py that corresponds with 
the directory name
#
# Put the 2 lines below in a routes.py in /home/web2py/web2py directory and 
restart apache2
#
# routes_in=(('/w/(?P.*)','/\g'),)
# routes_out=(('/(?P.*)','/w/\g'),)


WSGIDaemonProcess web2py user=www-data group=www-data
WSGIProcessGroup web2py
WSGIScriptAlias /w /home/web2py/web2py/wsgihandler.py
WSGIPassAuthorization On

AliasMatch ^/w/([^/]+)/static/(?:_[\d]+.[\d]+.[\d]+/)?(.*) \
   /home/web2py/web2py/applications/$1/static/$2

Options -Indexes
Order Allow,Deny
Allow from all


# can allow certain addresses to access admin

Deny from all
Allow from 162.202.204.106



Deny from all
Allow from 162.202.204.106


CustomLog /var/log/apache2/access.log common
ErrorLog /var/log/apache2/error.log

### END OF FILE

On Wednesday, June 4, 2014 1:33:33 AM UTC-7, Erik Easie Flo wrote:
>
> Aloha is there a solution that allows you to run the web2py in a sub 
> directory?  I've looked through the books blogs and can't find a straight 
> forward solution with either routes.py or in apache.
>
> Thanks,
>

-- 
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: Dynamic Subdomains

2014-06-10 Thread Tito Garrido
Hi Massimo,

Would you recommend to setup anything on routes.py? I have the same
question of Carlos...
In my application all users will select a username and a subdomain will be
available
user1.example.com
user2.example.com

Every time that they use this URL it would go to a specific controller
function (default/mypage) using their usernames as arguments but now
showing off (it is not a redirect). Example:

user1.example.com would open default/mypage -> the personal page of this
user
user1.example.com/articles would open default/articles of this user
and so on, without lose the subdomain.

What is the recommended implementation? Use request.env.http_host or
routes.py? If it is routes could you provide a quick example?

Thanks in advance!

Tito




On Tue, Sep 3, 2013 at 7:56 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> This is trivial. You just need a DNS entry for example.com and not for
> the specific domains (this is the default anyway). Than in web2py you read
> the entry from request.env.http_host
>
> If you use apache (you do not have to use apache) make sure you have a
> catch all virtual host 
>
>
> On Monday, 2 September 2013 16:08:02 UTC-5, Carlos Zenteno wrote:
>>
>> Has anybody done Dynamic Subdomains?
>>
>> What I mean:
>> I want each major user of my app to create a Dynamic subdomain when they
>> register, i.e.:
>>  cowboys.example.com
>>  steelers.example.com
>>  dolphins.example.com
>>
>> The user selects the subdomain when registering.
>>
>> I have read that in some frameworks they have to use Apache redirect
>> "magic",
>> and in other ones they use some kind of internal routing.
>>
>> I read the routing section in the book but did not get any clues of how
>> to do this.
>>
>> Any help and advice is greatly appreciated as usual...
>> Carlos\
>>
>>  --
>
> ---
> 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.
>



-- 

Linux User #387870
.
 _/_õ|__|
..º[ .-.___.-._| . . . .
.__( o)__( o).:___

-- 
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: How to use requires with list:reference

2014-06-10 Thread Mandar Vaze / मंदार वझे
On Tue, Jun 10, 2014 at 7:53 PM, Anthony  wrote:

> The first argument to IS_IN_DB must be a DAL object or a Set object -- it
> cannot be a function.
>

Right, but is there a way to achieve what I am trying to do ? an example
would help.
Can/should I use IS_IN_SET ? (I got different error mentioned above)

I think I'm missing something important

Thanks,
-Mandar



>
> Anthony
>
>
> On Tuesday, June 10, 2014 10:05:21 AM UTC-4, Mandar Vaze wrote:
>>
>> when using default 'list:reference mytable' all the entries from mytable
>> are shown in the dropdown (when using SQLFORM.grid)
>> I want to show the list in the drop down after applying some filters
>>
>> Here is an example :
>>
>> db.define_table('parent',
>> Field('fname', 'string'),
>> Field('lname', 'string'),
>> format='%(fname)s %(lname)s'
>> )
>>
>> def get_parents(lname):
>> return db(db.parent.lname == lname)
>>
>> db.define_table('child',
>> Field('first_name', 'string'),
>> Field('last_name', 'string'),
>> Field('parents', 'reference parent',
>>   requires=IS_IN_DB(lambda row: get_parents(row.child
>> .last_name), 'parent._format')),
>> format='%(fname)s %(lname)s'
>> )
>>
>>
>> Here the idea is the when associating an entry from parent table - only
>> those values are shown where last name of child matches that of the parent
>> Obviously the example is "made up" - real scenario is bit complicated -
>> but I am getting following error :
>>
>> AttributeError: 'function' object has no attribute 'db'
>>
>>
>>
>> web2py™ Version 2.9.5-stable+timestamp.2014.03.16.02.35.39
>>
>> Traceback
>>
>> Traceback (most recent call last):
>> File "/path/to/web2py/gluon/restricted.py", line 220, in restricted
>> exec ccode in environment
>> File "/path/to/web2py/applications/parents/controllers/appadmin.py"
>> ,
>> line 674, in 
>> File "/path/to/web2py/gluon/globals.py", line 385, in 
>> self._caller = lambda f: f()
>> File "/path/to/web2py/applications/parents/controllers/appadmin.py"
>> ,
>> line 153, in insert
>> form = SQLFORM(db[table], ignore_rw=ignore_rw)
>> File "/path/to/web2py/gluon/sqlhtml.py", line 1151, in __init__
>> inp = self.widgets.options.widget(field, default)
>> File "/path/to/web2py/gluon/sqlhtml.py", line 273, in widget
>> options = requires[0].options()
>> File "/path/to/web2py/gluon/validators.py", line 559, in options
>> self.build_set()
>> File "/path/to/web2py/gluon/validators.py", line 531, in build_set
>> table = self.dbset.db[self.ktable]
>> AttributeError: 'function' object has no attribute 'db'
>>
>> I am OK to use "list:string" with IS_IN_SET() as well - but I am unable
>> to use "lambda row: get_parents(row.child.last_name)"
>> I get "function is not iterable" error (Off course I will change
>> get_parents() function to return list of strings based on my query)
>>
>> -Mandar
>>
>>  --
> 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/nDBOL7w6qB4/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.


[web2py] Re: web2py vs others. Status of 2014

2014-06-10 Thread Derek
I'd love to see a DAL-only Python 3.4 release, I could use that in my web 
framework. I think it would be good to steal an idea from Pyramid, make 
your framework piecemeal. Dal, Forms (with built-in protections and 
validations), routing (hopefully simpler than it is now). ,  In any case, I 
love the project as it is now, it's easy to understand, well documented, 
and has a great community.

On Monday, June 9, 2014 7:14:03 PM UTC-7, Massimo Di Pierro wrote:
>
> Good questions.
>
> Web2py has changed less in the last year than in the year before and most 
> of the changes have been small improvements and strengthening security. In 
> my view web2py is a very mature project and users do not want big changes 
> at this point. We have some todo items including a more flexible grid, 
> better CSS customization. I personally did not find much to learn from 
> Django and Rails in the last few years instead I am much more interested in 
> the async capabilities of Python 3.4, and in some javascript libraries like 
> Angular, Ember, and Ractive (my favorite), by hypermedia APIs, and by 
> Semantic-UI.
>
> I think the future is a lighter web2py with a similar IDE but more 
> client-side logic out of the box and more automatic. For example I have 
> ported the web2py helper system (DIV, SPAN, etc.) to JS. I would like to 
> move form generation also clients-side. I would like move away from the MVC 
> and to a mini-MVC patter where an action is responsible for a single 
> component (for example validation) and not for an entire page. Wherever we 
> are going the DAL is staying! 
>
> Massimo
>
>
>
> On Monday, 9 June 2014 07:01:39 UTC-5, Ramos wrote:
>>
>> what is the status of the evolution of web2py compared with other, mainly 
>> rails /or django ?
>>
>>
>> which of these including web2py has gain more improvements over the last 
>> year?
>> Does anybody knows?
>> Is still web2py over the others?
>>
>>
>> From the beginning Massimo used the phrase
>> "Ideas we had , ideas we stole"
>>
>> I would like to know if Massimo  is stealing more ideas from others.
>> Also what new "Killer" ideas are we expecting for near future?
>>
>> 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.


[web2py] Re: web2py vs others. Status of 2014

2014-06-10 Thread Anthony
On Tuesday, June 10, 2014 1:47:55 PM UTC-4, Derek wrote:
>
> I'd love to see a DAL-only Python 3.4 release, I could use that in my web 
> framework. I think it would be good to steal an idea from Pyramid, make 
> your framework piecemeal. Dal, Forms (with built-in protections and 
> validations), routing (hopefully simpler than it is now). ,  In any case, I 
> love the project as it is now, it's easy to understand, well documented, 
> and has a great community.
>

See https://github.com/mdipierro/gluino. 

-- 
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: How to use requires with list:reference

2014-06-10 Thread Anthony
Assuming you have a particular parent last name, it would be:

IS_IN_DB(db(db.parent.lname == last_name), 'parent.id', db.parent._format, 
multiple=True)

Anthony

On Tuesday, June 10, 2014 12:51:20 PM UTC-4, Mandar Vaze wrote:
>
>
> On Tue, Jun 10, 2014 at 7:53 PM, Anthony  wrote:
>
>> The first argument to IS_IN_DB must be a DAL object or a Set object -- it 
>> cannot be a function.
>>
>
> Right, but is there a way to achieve what I am trying to do ? an example 
> would help.
> Can/should I use IS_IN_SET ? (I got different error mentioned above)
>
> I think I'm missing something important
>
> Thanks,
> -Mandar
>
>
>
>>
>> Anthony
>>
>>
>> On Tuesday, June 10, 2014 10:05:21 AM UTC-4, Mandar Vaze wrote:
>>>
>>> when using default 'list:reference mytable' all the entries from mytable 
>>> are shown in the dropdown (when using SQLFORM.grid)
>>> I want to show the list in the drop down after applying some filters
>>>
>>> Here is an example :
>>>
>>> db.define_table('parent',
>>> Field('fname', 'string'),
>>> Field('lname', 'string'),
>>> format='%(fname)s %(lname)s'
>>> )
>>>
>>> def get_parents(lname):
>>> return db(db.parent.lname == lname)
>>>
>>> db.define_table('child',
>>> Field('first_name', 'string'),
>>> Field('last_name', 'string'),
>>> Field('parents', 'reference parent', 
>>>   requires=IS_IN_DB(lambda row: get_parents(row.
>>> child.last_name), 'parent._format')),
>>> format='%(fname)s %(lname)s'
>>> )
>>>
>>>
>>> Here the idea is the when associating an entry from parent table - only 
>>> those values are shown where last name of child matches that of the parent
>>> Obviously the example is "made up" - real scenario is bit complicated - 
>>> but I am getting following error : 
>>>
>>> AttributeError: 'function' object has no attribute 'db'
>>>
>>>
>>>
>>> web2py™ Version 2.9.5-stable+timestamp.2014.03.16.02.35.39
>>>
>>> Traceback
>>>
>>> Traceback (most recent call last):
>>> File "/path/to/web2py/gluon/restricted.py", line 220, in restricted
>>> exec ccode in environment
>>> File "/path/to/web2py/applications/parents/controllers/appadmin.py" 
>>> , 
>>> line 674, in 
>>> File "/path/to/web2py/gluon/globals.py", line 385, in 
>>> self._caller = lambda f: f()
>>> File "/path/to/web2py/applications/parents/controllers/appadmin.py" 
>>> , 
>>> line 153, in insert
>>> form = SQLFORM(db[table], ignore_rw=ignore_rw)
>>> File "/path/to/web2py/gluon/sqlhtml.py", line 1151, in __init__
>>> inp = self.widgets.options.widget(field, default)
>>> File "/path/to/web2py/gluon/sqlhtml.py", line 273, in widget
>>> options = requires[0].options()
>>> File "/path/to/web2py/gluon/validators.py", line 559, in options
>>> self.build_set()
>>> File "/path/to/web2py/gluon/validators.py", line 531, in build_set
>>> table = self.dbset.db[self.ktable]
>>> AttributeError: 'function' object has no attribute 'db'
>>>
>>> I am OK to use "list:string" with IS_IN_SET() as well - but I am unable 
>>> to use "lambda row: get_parents(row.child.last_name)"
>>> I get "function is not iterable" error (Off course I will change 
>>> get_parents() function to return list of strings based on my query)
>>>
>>> -Mandar
>>>
>>>  -- 
>> 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/nDBOL7w6qB4/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.


[web2py] Re: Is there a web2py plugin which lays out divs in a neat grid?

2014-06-10 Thread Derek
There's nothing preventing you from using freewall. What troubles have you 
had with it?

On Monday, June 9, 2014 10:41:46 AM UTC-7, Spokes wrote:
>
> Is anyone aware of a web2py plugin which can take a bunch of divs (let's 
> say, of the same class name) and lay them out, in sequence, in a neat grid? 
> I'm looking for something like the following jquery plugin: 
> http://vnjs.net/www/project/freewall/. Thank you.
>
>
>
>
>

-- 
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 does not submit,if displayed over jQuery load

2014-06-10 Thread Najtsirk
Anthony, many thanks!

Can this be achieved also with setting SQLFORM( _action="") attribute?

Best,
Kristjan

On Tuesday, 10 June 2014 15:42:17 UTC+2, Anthony wrote:
>
> The "action" attribute of the form is "#", which means the form will 
> submit to the URL of the parent page. Instead, your form must submit to the 
> edit_posts action, which means you need to trap the form submission and 
> submit it via Ajax as well. The easiest way to do this is to instead put 
> the form in a web2py component:
>
>  Edit 
>
> 
>
> Anthony
>
> On Tuesday, June 10, 2014 2:06:32 AM UTC-4, Najtsirk wrote:
>>
>> Hi,
>>
>> in my default.py i have a simple function:
>>
>> def edit_posts():
>> form=SQLFORM(db.postos, request.args(0)).process()
>> return dict(form=form)
>>
>> On my posts page, i have a table of all posts with a button, that calls a 
>> SQLFORM with a jQuery load, like this:
>>
>>  > onclick="$('.content').load('{{=URL('default' , 'edit_posts', args=
>> post.id)}}');"> Edit 
>>
>> Until here, everything works ok. But the problem is, i canot update a 
>> post over this form.
>>
>> SQLFORM, whic is shown ad default/edit_posts/post.id works without 
>> problem.
>>
>> What am I missing here?
>>
>> Best,
>> Kristjan
>>
>

-- 
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 does not submit,if displayed over jQuery load

2014-06-10 Thread Anthony
On Tuesday, June 10, 2014 2:18:18 PM UTC-4, Najtsirk wrote:
>
> Anthony, many thanks!
>
> Can this be achieved also with setting SQLFORM( _action="") attribute?
>

In that case, it would submit to the correct action, but then the page 
returned by that action would replace the entire page in the browser (i.e., 
equivalent to following a link to a new page). If you you want the form to 
be served by a different action than the one that serves the parent page 
but still keep the form embedded in the page, then you need to use Ajax.

Anthony

-- 
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: RBAC access configuration - giving users permission to give other users permissions

2014-06-10 Thread Niphlod
you just have to figure out a logic where big-super-users can deal only 
with their own smaller-super-users, and another one where 
smaller-super-users can deal with their regular users. If this "logic" 
needs a mapping in a table or not, it's entirely up to you. 

On Tuesday, June 10, 2014 12:09:54 AM UTC+2, Alex Glaros wrote:
>
> I'd like to configure RBAC so that users can give other users permission 
> to give others access. 
>
> Do I need an additional table to do this or is it a matter of defining 
> another group in the regular auth-group, auth-membership, auth-permissions 
> tables?
>
> Example:  All U.S. states will have (a) big-super-users that can give (b) 
> smaller-super-users rights to give (c) regular users access.
>
>
>- So I give big-super-users rights to authorize smaller-super-users.  
>- There's one big-super-user for each state. 
>- There are too many small-super-users for me to manage, so the 
>big-super-users manage them. 
>- Small-super-users would for example give each person in each city of 
>the state they're responsible for, rights to access the system.
>
>
> All I have to worry about is the big-super-users.
>
> 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: Determining the height or width of an HTML object before it is rendered?

2014-06-10 Thread Niphlod
there's no such thing around. Every browser has its own rendering engine 
and albeit they "should" render everything as "expected", small differences 
exists. That's why the only way to manage it is in javascript, that can 
accomodate dinamically those differences because the environment where it 
runs is the browser itself. web2py has practically no knowledge beforehand 
on how a particular dom structure will be rendered (and/or the knowledge it 
has is so limited that calculating it would practically mean that you need 
to code every browser out there by yourself (and you can't compare yourself 
with Apple plus Microsoft plus Mozilla Foundation plus Google plus Opera 
engineers)).

On Tuesday, June 10, 2014 1:11:58 AM UTC+2, Spokes wrote:
>
> What was the problem with the approach mentioned above?
>
> Anyway, here is what I was trying to do: my page has a bunch of divs 
> (let's call them cells), each containing content which makes their height 
> distinct from other cells, while the width more or less remains constant. 
> I'd like to arrange these cells in a grid within a parent "#content" div, 
> specifying how many columns there should be in this grid, or alternatively, 
> how wide each column should be. I've tried jquery plugins for this, but 
> they come with their own set of problems, and it would probably be best if 
> the grid were created within the controller, instead of the view (i.e. 
> through jquery). To try to level out the height of the grid columns, it 
> would be useful to know how tall each of the cells is. Any ideas for how to 
> go about doing that?
>

-- 
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] Is This Web2py

2014-06-10 Thread Ovidio Marinho
http://sentibol.com/

Congratulations http://sentibol.com/ourteam

 Universidade de Lavras - Minas Gerais - Brasil.





 Ovidio Marinho Falcao Neto
  ITJP.NET.BR
 ovidio...@gmail.com
 itjp.net...@gmail.com
 Brasil

-- 
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: [web2py-users-brazil:6353] Is This Web2py

2014-06-10 Thread Diogo Munaro
Nossa, parabéns a toda a equipe! Eles estão na comunidade?
Em 10/06/2014 16:43, "Ovidio Marinho"  escreveu:

> http://sentibol.com/
>
> Congratulations http://sentibol.com/ourteam
>
>  Universidade de Lavras - Minas Gerais - Brasil.
>
>
>
>
>
>  Ovidio Marinho Falcao Neto
>   ITJP.NET.BR
>  ovidio...@gmail.com
>  itjp.net...@gmail.com
>  Brasil
>
>
> --
> Você recebeu essa mensagem por estar inscrito no grupo web2py-users-brazil.
> Para enviar uma mensagem ao grupo, envie email a:
> web2py-users-bra...@googlegroups.com
> Para se desinscrever, envie email a:
> web2py-users-brazil+unsubscr...@googlegroups.com
> Para mais opções, visite o site do grupo em:
> http://groups.google.com/group/web2py-users-brazil?hl=en
> ---
> Você recebeu essa mensagem porque está inscrito no grupo
> quot;web2py-users-brazil" dos Grupos do Google.
> Para cancelar inscrição nesse grupo e parar de receber e-mails dele, envie
> um e-mail para web2py-users-brazil+unsubscr...@googlegroups.com.
> Para mais opções, acesse 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: web2py vs others. Status of 2014

2014-06-10 Thread António Ramos
I would love to see DAL as an independent persistence API

just like socket.io we could have a DAL.io






2014-06-10 18:49 GMT+01:00 Anthony :

> On Tuesday, June 10, 2014 1:47:55 PM UTC-4, Derek wrote:
>>
>> I'd love to see a DAL-only Python 3.4 release, I could use that in my web
>> framework. I think it would be good to steal an idea from Pyramid, make
>> your framework piecemeal. Dal, Forms (with built-in protections and
>> validations), routing (hopefully simpler than it is now). ,  In any case, I
>> love the project as it is now, it's easy to understand, well documented,
>> and has a great community.
>>
>
> See https://github.com/mdipierro/gluino.
>
> --
> 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: routing problem

2014-06-10 Thread Júlia Rizza
Any ideias?

Em quinta-feira, 5 de junho de 2014 16h37min55s UTC-3, Júlia Rizza escreveu:
>
> Hello everybody,
>  
> I have an app with app specific routes and I have a function that allows 
> any user to see a project by passing the project's owner username and the 
> project's slug as args. I want the user to access the project just by 
> www.domain.com/username/slug, not showing the function name, but it 
> returns an 'invalid request' error when the slug contains hyphens.
>
> *web2py/routes.py*
>
>
>
> *#coding: utf-8routes_app = ((r'/(?Padmin)\b.*', r'\g'),
>   (r'/(.*)', r'myapp'),  (r'/?(.*)', 
> r'myapp'))myapp/routes.py*
> #coding: utf-8
>
> BASE = ''
> routes_in = (
> (BASE + '/', BASE + '/myapp/panel/index'),
> (BASE + '/$username/$slug', BASE + 
> '/myapp/panel/project/$username/$slug'),
> )
>
> routes_out = [(x, y) for (y, x) in routes_in]
>
> For instance, if I have a project called 'Test', it's slug is 'test' and 
> it's URL is www.domain.com/julia/test. And this works! But if I have a 
> project called 'My Test', it's slug is 'my-test' and it's URL is 
> www.domain.com/julia/my-test, returning an invalid request.
>
> Is there a way to solve this?
>
>
>

-- 
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: trouble with session and default controller

2014-06-10 Thread weheh
Very temporarily :-) I check it out by inspecting session every step of the 
way before, during and after the ajax call.

Now, one new thing I noticed is that my number of sessions has exploded, 
which makes no sense at all. The ajax call to the default controller is 
happening from within an anonymous function triggered by a bootstrap nav 
click. Looks something like this:

mytabs.on("show.bs.tab", function(e) {
ajax("{{= URL('default', 'settab', args=[...])",[],":eval");
web2py_component(...);  // used to populate contents of tab
});

I'm not sure whether this would account for why I have so many sessions 
sprouting up. But I do know that when I took out this code and found a 
different implementation that sets the session from within the controller 
that does the populating of the tab's div on click, then all of a sudden my 
problems go away.

So bottom line, I go this solved. But the reasons are mysterious to me. I 
don't see why I should be getting so many sessions from the ajax call, or 
even whether that was my culprit. Unfortunately, I lost so much time 
chasing this issue I have to move on. But I'd like to figure out what 
actually was going on under the hood.


On Friday, June 6, 2014 9:33:02 PM UTC+8, Anthony wrote:
>
> You said the dict gets deleted temporarily? How temporarily? How are you 
> checking that? Is it only deleted during the current request? If so, sounds 
> like for some reason the session isn't getting saved. Are you using the 
> default file based sessions?
>
> On Friday, June 6, 2014 9:08:38 AM UTC-4, weheh wrote:
>>
>> Fair question. Dunno the answer. It was just an example. The real 
>> application is that I'm filling the dict with other stuff. It's keeping 
>> track of the state of my GUI -- active tabs and stuff. So in that case, the 
>> empty session.myvar condition would not be triggered. In any event, I have 
>> a breakpoint set on session.myvar getting reset and it is never reached, so 
>> the empty dict condition isn't getting triggered.
>>
>>
>> On Friday, June 6, 2014 8:28:29 PM UTC+8, Anthony wrote:
>>>
>>> Just to be clear, when you delete session.myvars[somevar], you are sure 
>>> session.myvars still contains other dictionaries and is not at this point 
>>> an empty dictionary (which would trigger the model code to refill it)?
>>>
>>> On Friday, June 6, 2014 3:46:11 AM UTC-4, weheh wrote:

 I'm using an ajax call to default.py controller. The default.py sets a 
 session variable. Paraphrased, it looks like this:

 # model
 if not session.myvars:
 session.myvars = dict(
 somevar=dict(),
 othervar=dict(),
 ...
 )


 # view
  
 ...
 ajax("{{= URL('default', 'setvar', args=[...])}}",[],":eval");
 ...
 



 # default.py
 if False:
 session = current.session  # to make Eclipse happy

 def setvar():
 ...
 del session.myvars['somevar']
 ...
 return ''





 In other controllers, the session.myvars['somevar'] is given a useful 
 value.

 Here's the really strange thing. If the ajax script is triggered, the 
 session.myvars['someval'] dict gets deleted as desired. However, only 
 temporarily! When another controller later on uses session.myvars, the old 
 session.myvars['somevar'] is still in existence.

 If I reproduce this by putting the del session.myvars['somevar'] in one 
 of my other controllers, the session.myvars['somevar'] gets deleted 
 permanently, as desired.

 This doesn't just happen for deleting session variables. It also 
 happens for setting session variables inside the default.py controller.

 OK, here's another clue. Ready? When I put a breakpoint in eclipse and 
 stop the default controller from executing straight through, then the 
 session variable gets deleted for sure.

 Why is this happening? This has got my head spinning! Is there 
 something special about default.py that I don't know about? Are you not 
 supposed to manipulate session variables in there? Is there a cache issue 
 going on here?



-- 
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: trouble with session and default controller

2014-06-10 Thread Anthony
Well, you're making two Ajax calls simultaneously, so I would think there 
could be a race condition with the sessions, but with file based sessions, 
access to the session should be serialized.

Anthony

On Tuesday, June 10, 2014 9:15:37 PM UTC-4, weheh wrote:
>
> Very temporarily :-) I check it out by inspecting session every step of 
> the way before, during and after the ajax call.
>
> Now, one new thing I noticed is that my number of sessions has exploded, 
> which makes no sense at all. The ajax call to the default controller is 
> happening from within an anonymous function triggered by a bootstrap nav 
> click. Looks something like this:
>
> mytabs.on("show.bs.tab", function(e) {
> ajax("{{= URL('default', 'settab', args=[...])",[],":eval");
> web2py_component(...);  // used to populate contents of tab
> });
>
> I'm not sure whether this would account for why I have so many sessions 
> sprouting up. But I do know that when I took out this code and found a 
> different implementation that sets the session from within the controller 
> that does the populating of the tab's div on click, then all of a sudden my 
> problems go away.
>
> So bottom line, I go this solved. But the reasons are mysterious to me. I 
> don't see why I should be getting so many sessions from the ajax call, or 
> even whether that was my culprit. Unfortunately, I lost so much time 
> chasing this issue I have to move on. But I'd like to figure out what 
> actually was going on under the hood.
>
>
> On Friday, June 6, 2014 9:33:02 PM UTC+8, Anthony wrote:
>>
>> You said the dict gets deleted temporarily? How temporarily? How are you 
>> checking that? Is it only deleted during the current request? If so, sounds 
>> like for some reason the session isn't getting saved. Are you using the 
>> default file based sessions?
>>
>> On Friday, June 6, 2014 9:08:38 AM UTC-4, weheh wrote:
>>>
>>> Fair question. Dunno the answer. It was just an example. The real 
>>> application is that I'm filling the dict with other stuff. It's keeping 
>>> track of the state of my GUI -- active tabs and stuff. So in that case, the 
>>> empty session.myvar condition would not be triggered. In any event, I have 
>>> a breakpoint set on session.myvar getting reset and it is never reached, so 
>>> the empty dict condition isn't getting triggered.
>>>
>>>
>>> On Friday, June 6, 2014 8:28:29 PM UTC+8, Anthony wrote:

 Just to be clear, when you delete session.myvars[somevar], you are sure 
 session.myvars still contains other dictionaries and is not at this point 
 an empty dictionary (which would trigger the model code to refill it)?

 On Friday, June 6, 2014 3:46:11 AM UTC-4, weheh wrote:
>
> I'm using an ajax call to default.py controller. The default.py sets a 
> session variable. Paraphrased, it looks like this:
>
> # model
> if not session.myvars:
> session.myvars = dict(
> somevar=dict(),
> othervar=dict(),
> ...
> )
>
>
> # view
>  
> ...
> ajax("{{= URL('default', 'setvar', args=[...])}}",[],":eval");
> ...
> 
>
>
>
> # default.py
> if False:
> session = current.session  # to make Eclipse happy
>
> def setvar():
> ...
> del session.myvars['somevar']
> ...
> return ''
>
>
>
>
>
> In other controllers, the session.myvars['somevar'] is given a useful 
> value.
>
> Here's the really strange thing. If the ajax script is triggered, the 
> session.myvars['someval'] dict gets deleted as desired. However, only 
> temporarily! When another controller later on uses session.myvars, the 
> old 
> session.myvars['somevar'] is still in existence.
>
> If I reproduce this by putting the del session.myvars['somevar'] in 
> one of my other controllers, the session.myvars['somevar'] gets deleted 
> permanently, as desired.
>
> This doesn't just happen for deleting session variables. It also 
> happens for setting session variables inside the default.py controller.
>
> OK, here's another clue. Ready? When I put a breakpoint in eclipse and 
> stop the default controller from executing straight through, then the 
> session variable gets deleted for sure.
>
> Why is this happening? This has got my head spinning! Is there 
> something special about default.py that I don't know about? Are you not 
> supposed to manipulate session variables in there? Is there a cache issue 
> going on here?
>
>

-- 
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 receiv

[web2py] Uploading a Package

2014-06-10 Thread Priyank Yadav
Hello,
I am new to web2py. Somebody sent me a tgz file which contained the source 
code.
I am trying to upload thar code in my admin interface but first i have to 
convert that into w2p extension...
Help
Thank you

-- 
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] Developer wanted!

2014-06-10 Thread Yanni Shainsky
I am looking for a paid developer for project that goes from 
concept-to-completion. 

1. Database driven

2. Functionality similar to yelp, craiglist, angieslist

3. We will have at least 5 different user-types: visitors, authenticated 
users, business users, moderators, administrators

4. Users are able to submit how much they paid for a service.

5. Graphs and tables that display information. The individual items on the 
graph are linked to specific submissions. 

6. Would prefer a modern design, utilizing HTML5 and/or Bootstrap.

7. Would prefer Python based development, using a web framework such as 
Web2Py or Django

8. Would need some basic authentication integration with Facebook and/or 
Google.

9. Would prefer someone that has experience building sites that consider 
geographical areas (zip codes,

area codes).

10. Would prefer someone that has worked on a classified's type project. 


The budget for the project is $8k - but somewhat flexible (initial 
deployment), and then per-hour support.

Please email me at yanni.shain...@gmail.com, or reply here if you're 
interested. I will invite you to bid a private project on oDesk.com, so if 
possible please provide your oDesk contact information. 

 

-- 
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] Signature error

2014-06-10 Thread Ajeigbe Yekeen
Hello,

I am having some issues with signature - TypeError: define_tables() got an 
unexpected keyword argument 'signature'

I initially though it was my code (because I am new to Python & web2py) but 
then installed the EStore appliance & and had the same error code. A 
screenshot is attached.

Your help would be highly appreciated, Thank you.

-- 
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: Is there a web2py plugin which lays out divs in a neat grid?

2014-06-10 Thread Spokes
It's a good plugin, and it seems to work fine with a page that is being 
loaded or refreshed in a standard sense. However, my page has a scroll 
feature in which the #content div's contents are updated (i.e. replaced 
through an ajax call to a controller function that performs db queries and 
returns a bunch of divs/cells which are not neatly arranged) - when this 
scroll feature is utilized with freewall, you can see the cells (which 
contain images) being shifted around within the #content div into a grid 
arrangement. It's sort of a cool animation-like effect, but I'm not sure 
that I want it for this page. It would be great if I could just generate 
the grid server-side, but for that, I'd need to know the heights of the 
individual cells/divs, and those heights are variable and not set in 
advance (i.e. no styling is applied). Is there some way that I could just 
find out the heights of these div cells within the controller?


On Tuesday, June 10, 2014 1:02:15 PM UTC-5, Derek wrote:
>
> There's nothing preventing you from using freewall. What troubles have you 
> had with it?
>
> On Monday, June 9, 2014 10:41:46 AM UTC-7, Spokes wrote:
>>
>> Is anyone aware of a web2py plugin which can take a bunch of divs (let's 
>> say, of the same class name) and lay them out, in sequence, in a neat grid? 
>> I'm looking for something like the following jquery plugin: 
>> http://vnjs.net/www/project/freewall/. Thank you.
>>
>>
>>
>>
>>

-- 
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: Determining the height or width of an HTML object before it is rendered?

2014-06-10 Thread Spokes
Thanks, Niphlod. Seems like such a simple task to arrange divs into a grid 
with approximately even column heights, but I guess it does appear fairly 
unfeasible to do this in the controller. Guess I'll have to optimize my 
jquery solution to this issue...

On Tuesday, June 10, 2014 2:07:18 PM UTC-5, Niphlod wrote:
>
> there's no such thing around. Every browser has its own rendering engine 
> and albeit they "should" render everything as "expected", small differences 
> exists. That's why the only way to manage it is in javascript, that can 
> accomodate dinamically those differences because the environment where it 
> runs is the browser itself. web2py has practically no knowledge beforehand 
> on how a particular dom structure will be rendered (and/or the knowledge it 
> has is so limited that calculating it would practically mean that you need 
> to code every browser out there by yourself (and you can't compare yourself 
> with Apple plus Microsoft plus Mozilla Foundation plus Google plus Opera 
> engineers)).
>
> On Tuesday, June 10, 2014 1:11:58 AM UTC+2, Spokes wrote:
>>
>> What was the problem with the approach mentioned above?
>>
>> Anyway, here is what I was trying to do: my page has a bunch of divs 
>> (let's call them cells), each containing content which makes their height 
>> distinct from other cells, while the width more or less remains constant. 
>> I'd like to arrange these cells in a grid within a parent "#content" div, 
>> specifying how many columns there should be in this grid, or alternatively, 
>> how wide each column should be. I've tried jquery plugins for this, but 
>> they come with their own set of problems, and it would probably be best if 
>> the grid were created within the controller, instead of the view (i.e. 
>> through jquery). To try to level out the height of the grid columns, it 
>> would be useful to know how tall each of the cells is. Any ideas for how to 
>> go about doing that?
>>
>

-- 
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] get value of value attribute of input of SQLFORM

2014-06-10 Thread lucas
so i have an SQLFORM and if i drill down enough i get the INPUT object:

uform[0][0][1]

where uform is an SQLFORM object.

but how can i read the value of the value attribute?

thanx in advance, lucas

-- 
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: get value of value attribute of input of SQLFORM

2014-06-10 Thread lucas
omg, i figured it out.  i had to drill down one more layer.

uform[0][0][1][0]['value']

where, form is the form element itself, the first [0] is the table, the 
second [0] is the first TR line of the table, the [1] is the TD element of 
the TR line, and the last [0] is the INPUT element under the TD.

i had a brainy storm.  thanx, lucas

-- 
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: Problem using multiple grids in single view

2014-06-10 Thread Sarbjit
Can some one please conform if it would be possible to use multiple grids 
in single view using web2py as LOAD doesn't seems to give the expected 
results.

-Sarbjit

-- 
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: Problem using multiple grids in single view

2014-06-10 Thread LaDarrius Stewart
Name the grids.
grid = SQLFORM.grid(db.table, formname='cadd', formstyle="bootstrap")

On Monday, June 9, 2014 3:47:37 AM UTC-5, Sarbjit wrote:
>
> I am using two grids in my application but I have observed that when I use 
> Edit/View button for GRID1 and return back (i.e. submit any changes from 
> Edit option or use back button from View option), then the layout of the 
> grid is not proper (Data from Grid1 is not seen and only GRID2 data is 
> seen) and default layout doesn't seems to be loaded.
>
> NOTE :-
>
> Since web2py doesn't supports two grids in one view, I am using LOAD for 
> one gird and second grid is loaded directly. 
>
> Reason, I want to display second grid directly is that I want to customize 
> the edit function for the grid.
>
> Below is the sample Code 
>
> *Views :*
>
> {{extend 'layout.html'}}
> {{if grid.view_form:}}
> {{=grid}}
> {{elif grid.update_form:}}
> {{=grid}}
> {{else:}}
> {{=grid}}
> {{=LOAD('default','loadGrid1',ajax=True)}}
> {{pass}}
>
> *Controller :*
>
> @auth.requires_login()  
> def index():
> grid = 
> SQLFORM.grid(query=db.person,csv=False,create=False,deletable=False,paginate=20,sortable=True)
> return dict(grid=grid)
>
> def loadGrid1():
> grid1 = 
> SQLFORM.grid(query=db.dog,csv=False,create=False,deletable=False,paginate=20,sortable=True)
> 
>
> return grid1
>
> *Model :*
>
> db.define_table('person', 
> Field('name'), 
> Field('countyry'))
>
> db.define_table('dog',
> Field('name'),
> Field('ownername'))Models :
>
> *SECOND APPROACH *:
>
> Another approach that I have tried was to load both the grids using .load 
> which could help me to customize the view form (Not sure about this?)
>
> *Controller:*
>
> def test1():
> grid1 = 
> SQLFORM.grid(query=db.person,csv=False,create=False,deletable=False,paginate=20,sortable=True)
> 
>
> return grid1   
> 
> def test2():
> grid2 = 
> SQLFORM.grid(query=db.dog,csv=False,create=False,deletable=False,paginate=20,sortable=True)
> 
>
> return grid2  
>
> *Views:*
>
> {{extend 'layout.html'}}
> {{=LOAD('default','test1.load',ajax=True)}}
> {{=LOAD('default','test2.load',ajax=True)}}
>
> *.load files (test1/test2)*
>
> {{=grid1}} / {{=grid2}}
>
>
> Using this approach, both the grids started showing the same data once I 
> use edit/view on one of the gird (appeared to be random).
>
> My requirement is that I want to display both the grids on the same page 
> but when a user uses edit/view, data corresponding to a particular grid to 
> be shown only. Also, in view mode for grid1, I want to display additional 
> information for which I require the custom grid support as well.
>
> Can someone please help me to resolve this issue.
>
> Thanks
> Sarbjit
>
>
>
-- 
This message is for named person(s) only.  It may contain confidential 
and/or legally privileged information.  No confidentiality or privilege is 
waived or lost should mis-transmission occur.  If you receive this message 
in error, delete it (and all copies) and notify the sender.  You must not, 
directly or indirectly,use, disclose, distribute, print, or copy any part 
of this message if you are not the intended recipient. GAD GROUP 
TECHNOLOGY, INC. reserves the right to monitor all e-mail communications 
through its networks.

Any views expressed in this message are those of the individual sender, 
except where the message states otherwise and the sender is authorized to 
state them to be the views of any such entity.

This e-mail has been virus and content scanned by GAD GROUP TECHNOLOGY, INC.

-- 
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: get value of value attribute of input of SQLFORM

2014-06-10 Thread Limedrop
A more robust way to do this is to use the element search helper.  Use the 
id (or whatever) to find the INPUT like this:

element = form.element(_id='table_field')

and then the value will be:

element['_value']

See the book for all the other cool things you can do:
http://www.web2py.com/books/default/chapter/29/05/the-views?search=element#elements


On Wednesday, June 11, 2014 3:39:35 PM UTC+12, lucas wrote:
>
> omg, i figured it out.  i had to drill down one more layer.
>
> uform[0][0][1][0]['value']
>
> where, form is the form element itself, the first [0] is the table, the 
> second [0] is the first TR line of the table, the [1] is the TD element of 
> the TR line, and the last [0] is the INPUT element under the TD.
>
> i had a brainy storm.  thanx, lucas
>

-- 
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: Problem using multiple grids in single view

2014-06-10 Thread 黄祥
that's right, please use formname, for example you can check out this 
discussion :
https://groups.google.com/forum/#!topic/web2py/4CvyTR_y_kE

niphlod give an example for multiple grid using load

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.