Re: [web2py] Re: uWSGI Permission denied

2020-11-04 Thread Roberto Perdomo
Try adding this to "[Service]":

User=root
Group=www-data

I think is not a good idea have your app running as root user, you can
change the user,  first move your .ini (don't forget change this path
in your uwsgi.service file) to your app path and do a recursive chown
to define user and group, something like:

chown your_user:www-data -R /var/www/html/your_app

On Wed, Nov 4, 2020 at 1:33 PM Clemens
 wrote:
>
> Is your Python version compatible with you uWSGI lib?
> https://groups.google.com/g/web2py/c/cr2HmXYNieg/m/2YYHFmr_BAAJ
>
> Have a look to "my personal step-by-step deployment guide for web2py and 
> Nginx" (mainly inspired by the shell script setup-web2py-nginx-uwsgi-ubuntu). 
> This configuration works well.
> https://groups.google.com/g/web2py/c/BFvo2tn9IAI/m/GsIBbiVkAwAJ
>
> Or you can even use the Ansible Playbook provided by Jim:
> https://groups.google.com/g/web2py/c/BFvo2tn9IAI/m/nQMgO7HRBAAJ
>
> Hope, this helps!
>
> Best regards
> Clemens
>
>
> On Wednesday, November 4, 2020 at 2:10:52 PM UTC+1 ermolaev...@gmail.com 
> wrote:
>>
>>
>> Please help:
>> https://gitlab.com/d.ermolaev/7pay_in/-/issues/41
>>
> --
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/web2py/7861350d-7b69-4d6d-af7c-a36bb79cc788n%40googlegroups.com.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CALfVey9ana3663qHR3awJ%3Dzr5M6UKL6_AiTnu9oijefjVHwi4g%40mail.gmail.com.


Re: [web2py] Re: web2py with js framework

2020-02-19 Thread Roberto Perdomo
I made an app some time ago with Web2py/Vue is not being maintained
anymore, but maybe can help you.

https://github.com/robertop23/web2py_vuejs_vuetify

On Wed, Feb 19, 2020 at 4:18 PM Geordanis Baño Vega  wrote:
>
> API with web2py and SPA|PWA with Vue, could be an option. Regards
>
> El mié., 19 feb. 2020 a las 11:16, Andrew Rogers () 
> escribió:
>>
>> I've been using Vue for just 30 mins and web2py for not much longer. I just 
>> wanted to get something really, really simple working. All i did was added 
>> this to index.html. I am sure this is bad practice - just a first step to 
>> trying to understand how things fit together. Thanks to Mirek's tip below i 
>> found how to change the Parameters correctly.
>> {{extend 'layout.html'}}
>>
>> {{block header}}
>> 
>> Login Screen
>> 
>> 
>> /{{=request.application}}/{{=request.controller}}/{{=request.function}}
>> 
>> 
>>
>> 
>> ${message}
>> 
>>
>> > src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.11/vue.min.js";>
>> 
>> Vue.mixin({ delimiters: ['${', '}'] ,
>> unsafeDelimiters: ['!{', '}'],
>> silent: false,
>> mixin: async = true
>> });
>>
>> // Configure Vuew
>> new Vue({
>> el: '#app',
>> data: {
>> 'message': 'Hello World'
>> }
>> });
>> 
>>
>> {{end}}
>>
>>
>>
>>
>> On Wednesday, 9 August 2017 07:24:12 UTC+6:30, 黄祥 wrote:
>>>
>>> is there any simple web2py app with js framework (whatever) that have a 
>>> CRUD or GRID example?
>>> want to learn to combine it, but confuse, what is web2py job (define 
>>> models, provide restful api, any others ?), what is js framework job 
>>> (client side response) ? how about the form handling (web2py or js job?)
>>> some of dev in here talk about vuejs, so i just look at it and learn from 
>>> the example
>>> https://vuejs.org/v2/examples/grid-component.html
>>>
>>> but again, don't know how to connect it with web2py, any hints or example 
>>> maybe.
>>>
>>> thanks and 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/620507a2-0ce9-4fbc-ab65-3a4c68162dcc%40googlegroups.com.
>
> --
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/web2py/CAA4GC_vqDSEF245jh6DHNx-neGUqD%3DWu51yZOd56NVsT_atOyA%40mail.gmail.com.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CALfVey81OtpP5DgJKbqhn0nfC_zPMGv8NkQiXnZ3tqGOYrN_xA%40mail.gmail.com.


Re: [web2py] Re: dna analysis web2py github project error ?

2019-07-01 Thread Roberto Perdomo
Try with Python 2.7

On Mon, 1 Jul 2019 at 16:11, imran tube  wrote:
>
> yes .my windows python 3.7.3 now ! what can i do for removing error ? suggest 
> me where i should change for update python code .?
>
> thanks for replay
>
> On Mon, Jul 1, 2019 at 8:29 PM 黄祥  wrote:
>>
>> which python version did you use ?
>> perhaps you using python3 and the source code created in python2, so it'll 
>> return an error according to the module cstringio path
>>
>> 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.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/web2py/2219f103-5397-4b8d-a50c-0da2bdf6da7d%40googlegroups.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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/web2py/CAP%3DDjNJMQNL_yUM3zcBes2GoQ52HVSadCP4GGp4d69FpSJL1Jg%40mail.gmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/CALfVey9BJjkJNm-%3DOuF_4deXobrrPB62h5en_sjW6Q4PUkmskA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Issues using pydal

2018-11-05 Thread Roberto Perdomo
You forgot import Field:

from dal import DAL, Field

El lun., 5 de nov. de 2018 5:25 p. m., Ben Duncan 
escribió:

> I put together this simple test case to get familiar with DAL (using Pydal)
>
> Connection stuff works, but I get this message
> [postgres@su-postgres-ben-3 mec_layouts]$ ./pydalgetrec.py
> postgres://postgres:postgres@localhost:7103/ac03303_live
> postgres
> Traceback (most recent call last):
>   File "./pydalgetrec.py", line 20, in 
> Field('company_number', type='integer'),
> NameError: name 'Field' is not defined
>
> Source is :
>
> 
> #!/usr/bin/env python
> # -*- coding: utf-8 -*-
> # test
> ###
> # Something ...
> 
>
>
> import os, sys, string, copy, time
> import getopt
> from types import *
>
> from pydal import DAL
>
> db = DAL("postgres://postgres:postgres@localhost:7103/ac03303_live",
> pool_size=10, migrate_enabled=False, fake_migrate_all=True )
> print db._uri
> print db._dbname
>
> db.define_table('company',
> Field('company_number', type='integer'),
> Field('company_name', type='string', length=255),
> Field('address_1', type='string', length=255),
> Field('address_2', type='string', length=255),
> Field('city', type='string', length=255),
> Field('state', type='string', length=20),
> Field('zip', type='string', length=10),
> Field('country', type='string', length=255),
> primarykey=['company_number'],
> migrate=False)
>
> sys.exit(0);
> 
>
>
> Any ideas on what is going on?
>
> thanks ..
>
>
>
> *Ben Duncan*
> DBA / Chief Software Architect
> Mississippi State Supreme Court
> Electronic Filing Division
>
> --
> 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.


Re: [web2py] Re: web2py_osx on Sierra (OSX 10.12)

2016-10-25 Thread Roberto Perdomo
I'm using Web2py 2.14.6 in sierra and cannot reproduce your errors.

Can you show the errors or warnings?

El 25 oct. 2016 10:36 AM, "Scott Hunter"  escribió:

> Am I to interpret from the deafening silence that I am the only one seeing
> this problem?  Even if that is the case, any ideas how I can resolve it, or
> where I might go to find any?
>
> - Scott
>
> On Wednesday, October 19, 2016 at 12:17:45 PM UTC-4, Scott Hunter wrote:
>>
>> When I download & run a fresh copy of the web2py_osx app, I get the usual
>> warnings about it not being from a known source (b/c it is unsigned, I
>> presume).  In previous versions, when I told the Security System Preference
>> panel to open it anyway, it did, and all was well.  But now, soon after it
>> launches, I get an all-but-useless error alert "web2py error" with the
>> choices of Show Console (which reveals nothing to my eye) or Terminate.
>>
>> This is happening on 2 separate machines running Sierra.
>>
>> I'm at a loss as to what, if anything, I can do about it.
>>
>> - Scott
>>
> --
> 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.


Re: [web2py] Re: how to show multiple controller's views on the same page?

2016-02-21 Thread Roberto Perdomo
Why not return two vars in one controller?

Instead of two controllers with one return, you can return two vars in
one controller:

return (project1 = project1, project2 = project2)

2016-02-21 17:39 GMT-04:30 Ron Chatterjee :
> Any other way to do this without using LOAD?
>
> I have two controller using the same view pretty much idential html:
>
> def show_project():
> projects = []
> projects = db().select(db.Project.ALL, orderby = db.Project.created_on,
> limitby=(0,100))
> return dict(projects = projects)
>
> def projects_by_clicks()::
> projects = db(db.Project.Terms.contains(project_term)).select()
> return dict(projects = projects)
>
> How to use the same view for multiple controller?
>
> On Wednesday, January 12, 2011 at 8:23:10 AM UTC-5, Mirek Zvolský wrote:
>>
>> > I am wondering whether it is possible to show multiple controller's
>> > views...
>>
>> Inside the controller code you can change to other view:
>> if something:
>> response.view='xxx.html'
>>
>> In the view itself you can have more named parts.
>> In such case the extended layout has not only one {{include}} command,
>> but more {{include xxx}} commands /I don't remember the syntax
>> exactly/.
>> Inside such partial views you can control use of that html part by
>> {{if something:}} Output html here {{pass}}
>
> --
> 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.


Re: [web2py] Re: Handling JSON stream

2016-02-21 Thread Roberto Perdomo
Hello kenneth,

That JSON is not well formed. Try adjusting with this:
js = 
{"product_package":"basic_m","products":"31349","billing_name":"Kenneth","billing_surname":"Lundstr\u00f6m","e_mail":"kenneth.lundst...@tester.com","billing_organization":"Testing","billing_job_description":"Tester","billing_address":"a:7:{s:12:\"thoroughfare\";s:18:\"Teststreet
5\";s:7:\"premise\";s:0:\"\";s:11:\"postal_code\";s:5:\"12\";s:18:\"dependent_locality\";s:0:\"\";s:8:\"locality\";s:5:\"Test
city\";s:19:\"administrative_area\";s:0:\"\";s:7:\"country\";s:2:\"NO\";}","company_business_id":"123456789","billing_phone":"123456789","billing_mobile":"","delivery_checkbox":"","delivery_name":"","delivery_surname":"","delivery_organization":"","delivery_address":"N;","terms__conditions":"agree"}
billing_address = js['billing_address'].split(':', 2)[2]
billing_address = billing_address.replace('s:', '"s_')
billing_address = billing_address.replace(';', ',')
billing_address = billing_address.replace(',}', '}')
billing_address = billing_address.replace(':', '":')
billing_address_js = json.loads(billing_address)

2016-02-21 11:41 GMT-04:30 Kenneth :
> Hi,
>
> the whole set is JSON, I can load it with json.loads och access the
> different fields. But the string inside billing_address is not I think JSON,
> but does anybody have any ideas what it could be and how to access it. I'd
> rather not start splitting it up and do a lot of trial and errors. But maybe
> that is the only way of doing it.
>
>
> Kenneth
>
>
>
> Den söndag 21 februari 2016 kl. 15:59:23 UTC+2 skrev Val K:
>>
>> Maybe I mistake, but JSON means arrays ([1,2, "any string", 5]) , hashes
>> ({"a":1, "b":"any string"}) and combinations ([{"a": [1,2,3], "b":2 }, 2,3
>> ]),
>> so , "a:7:{..." - isn't JSON
>>
>> On Sunday, February 21, 2016 at 2:46:47 PM UTC+3, Kenneth wrote:
>>>
>>> Hi,
>>>
>>> I don't access to change the webform, so I need to get by what I receive.
>>> It is a standard webform in Drupal that sends the JSON.
>>>
>>>
>>> Kenneth
>>>
>>>
>>> Den söndag 21 februari 2016 kl. 13:01:40 UTC+2 skrev Val K:

 How do you serialize form?
 Jquery.param makes json in extended format by default, try use
 traditional=true
>
> --
> 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.


Re: [web2py] Re: Wrong installed apps list in admin

2015-03-18 Thread Roberto Perdomo
Thanks and dont worry.

2015-03-18 10:55 GMT-04:30 Massimo Di Pierro :
> oops. It is broken on my side. Will fix it asap. Sorry.
>
>
> On Tuesday, 17 March 2015 23:15:39 UTC-5, Roberto Perdomo wrote:
>>
>> On a fresh download using web2py_osx.zip after uncompress:
>>
>> ls -las Resources/applications/
>>
>> total 40
>>  0 drwxrwxr-x@ 17 roberto  staff   578 Feb 14 05:54 .
>>  0 drwxrwxr-x@ 29 roberto  staff   986 Feb 15 23:04 ..
>>  8 -rw-rw-r--@  1 roberto  staff   214 Feb 14 05:34 ABOUT
>> 16 -rw-rw-r--@  1 roberto  staff  6826 Feb 14 05:34 LICENSE
>>  8 -rw-rw-r--@  1 roberto  staff 1 Feb 15 23:04 __init__.py
>>  0 drwxrwxr-x@ 14 roberto  staff   476 Mar 20  2014 admin
>>  0 drwxrwxr-x@ 13 roberto  staff   442 Feb 14 05:34 controllers
>>  0 drwxrwxr-x@  4 roberto  staff   136 Feb 14 05:34 cron
>>  0 drwxrwxr-x@ 12 roberto  staff   408 Feb 14 06:12 examples
>>  0 drwxrwxr-x@ 29 roberto  staff   986 Feb 14 05:34 languages
>>  0 drwxrwxr-x@ 10 roberto  staff   340 Feb 14 05:34 models
>>  0 drwxrwxr-x@  3 roberto  staff   102 Feb 14 05:34 modules
>>  0 drwxrwxr-x@  3 roberto  staff   102 Feb 14 05:34 private
>>  8 -rw-rw-r--@  1 roberto  staff   183 Feb 14 05:34 settings.cfg
>>  0 drwxrwxr-x@  9 roberto  staff   306 Feb 14 05:34 static
>>  0 drwxrwxr-x@ 16 roberto  staff   544 Feb 14 05:34 views
>>  0 drwxrwxr-x@ 13 roberto  staff   442 Feb 14 05:54 welcome
>>
>> I always use "compression utility" from Apple or "The Unarchiver" to
>> uncompress, and this software creates automatically a new folder named
>> web2py (web2py 2, ...,  web2py n) with the web2py.app within it
>>
>> 2015-03-17 13:52 GMT-04:30 Massimo Di Pierro :
>> > Can you try again? Get a fresh download and check that the files are not
>> > there. They should not be there.
>> >
>> >
>> > On Tuesday, 17 March 2015 12:52:06 UTC-5, Gray Kanarek wrote:
>> >>
>> >> I also saw all of those when I installed a fresh mac web2py a couple
>> >> weeks
>> >> ago... but when I installed via pythonanywhere, they were not included.
>> >>
>> >> On Tuesday, March 17, 2015 at 10:35:55 AM UTC-4, Massimo Di Pierro
>> >> wrote:
>> >>>
>> >>> ca you get a directory listing under web2py/applications? I think you
>> >>> have accidentally copied something there. I do not see those folders
>> >>> in
>> >>> web2py.
>> >>>
>> >>> On Monday, 16 March 2015 21:01:49 UTC-5, Roberto Perdomo wrote:
>> >>>>
>> >>>> Hi Everybody,
>> >>>>
>> >>>> I recently downloaded the latest version of Web2py for Mac and I see
>> >>>> a
>> >>>> lot of wrong directories in the list of applications  available
>> >>>> (admin/default/site). Anyone know the reason of that?
>> >>>>
>> >>>> Web2py Version: 2.9.12-stable+timestamp.2015.02.15.23.04.25
>> >>>> (Ejecutando en Rocket 1.2.6, Python 2.7.3)
>> >
>> > --
>> > 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.


Re: [web2py] Re: Wrong installed apps list in admin

2015-03-17 Thread Roberto Perdomo
On a fresh download using web2py_osx.zip after uncompress:

ls -las Resources/applications/

total 40
 0 drwxrwxr-x@ 17 roberto  staff   578 Feb 14 05:54 .
 0 drwxrwxr-x@ 29 roberto  staff   986 Feb 15 23:04 ..
 8 -rw-rw-r--@  1 roberto  staff   214 Feb 14 05:34 ABOUT
16 -rw-rw-r--@  1 roberto  staff  6826 Feb 14 05:34 LICENSE
 8 -rw-rw-r--@  1 roberto  staff 1 Feb 15 23:04 __init__.py
 0 drwxrwxr-x@ 14 roberto  staff   476 Mar 20  2014 admin
 0 drwxrwxr-x@ 13 roberto  staff   442 Feb 14 05:34 controllers
 0 drwxrwxr-x@  4 roberto  staff   136 Feb 14 05:34 cron
 0 drwxrwxr-x@ 12 roberto  staff   408 Feb 14 06:12 examples
 0 drwxrwxr-x@ 29 roberto  staff   986 Feb 14 05:34 languages
 0 drwxrwxr-x@ 10 roberto  staff   340 Feb 14 05:34 models
 0 drwxrwxr-x@  3 roberto  staff   102 Feb 14 05:34 modules
 0 drwxrwxr-x@  3 roberto  staff   102 Feb 14 05:34 private
 8 -rw-rw-r--@  1 roberto  staff   183 Feb 14 05:34 settings.cfg
 0 drwxrwxr-x@  9 roberto  staff   306 Feb 14 05:34 static
 0 drwxrwxr-x@ 16 roberto  staff   544 Feb 14 05:34 views
 0 drwxrwxr-x@ 13 roberto  staff   442 Feb 14 05:54 welcome

I always use "compression utility" from Apple or "The Unarchiver" to
uncompress, and this software creates automatically a new folder named
web2py (web2py 2, ...,  web2py n) with the web2py.app within it

2015-03-17 13:52 GMT-04:30 Massimo Di Pierro :
> Can you try again? Get a fresh download and check that the files are not
> there. They should not be there.
>
>
> On Tuesday, 17 March 2015 12:52:06 UTC-5, Gray Kanarek wrote:
>>
>> I also saw all of those when I installed a fresh mac web2py a couple weeks
>> ago... but when I installed via pythonanywhere, they were not included.
>>
>> On Tuesday, March 17, 2015 at 10:35:55 AM UTC-4, Massimo Di Pierro wrote:
>>>
>>> ca you get a directory listing under web2py/applications? I think you
>>> have accidentally copied something there. I do not see those folders in
>>> web2py.
>>>
>>> On Monday, 16 March 2015 21:01:49 UTC-5, Roberto Perdomo wrote:
>>>>
>>>> Hi Everybody,
>>>>
>>>> I recently downloaded the latest version of Web2py for Mac and I see a
>>>> lot of wrong directories in the list of applications  available
>>>> (admin/default/site). Anyone know the reason of that?
>>>>
>>>> Web2py Version: 2.9.12-stable+timestamp.2015.02.15.23.04.25
>>>> (Ejecutando en Rocket 1.2.6, Python 2.7.3)
>
> --
> 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.


Re: [web2py] Re: not web2py question - test timezone detection

2015-02-25 Thread Roberto Perdomo
America/Caracas
El feb. 25, 2015 4:55 PM, "Dave S"  escribió:

>
>
> On Wednesday, February 25, 2015 at 7:45:03 AM UTC-8, Niphlod wrote:
>>
>> if a module is required, it is imported.
>>
>
> What names can be be imported?  Must a 3rd-party module be renamed to fit
> the plug-in scheme?  My understanding is "no".
>
>
>> if it's in two places, the same thing applies. why should it be an issue ?
>>
>
> Updating all copies, but the OP seems to be on linux, so using links can
> help with that.
>
> /dps
>
>
>> On Wednesday, February 25, 2015 at 9:33:35 AM UTC+1, Mirek Zvolský wrote:
>>>
>>> and have TWO identical...
>>>
>>> Dne středa 25. února 2015 9:32:26 UTC+1 Mirek Zvolský napsal(a):

 Hi,
 maybe I don't understand how web2py handles a situation, when some
 python module is required by the web2py plugin.
 I think, web2py cannot recognize it as part of the plugin (because of
 name not starting with plugin_...) or I can rename it (and have to
 identical files with standard and non-standard name).
 Or is here some solution?




 Dne úterý 24. února 2015 21:31:51 UTC+1 Niphlod napsal(a):
>
> I don't see any cons in the actual naming conventions, and frankly, no
> pros on the one you're suggesting...granted, web2py plugins won't work 
> with
> django, but the same applies for django packages: they don't work on 
> web2py.
>
>  --
> 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.


Re: [web2py] after_update

2014-11-24 Thread Roberto Perdomo
I dont ser the displayName field in you SuperObject table. Try change this:

ThisSuperObject.update_record(displayName=displayName)

For this:

ThisSuperObject.update_record(ObjectDisplayName=displayName)
El nov. 24, 2014 3:17 AM, "Alex Glaros"  escribió:

> anyone see what the error is with this after_update function?
>
> # Update displayName in db.SuperObject whenever Suggestion.suggestionTitle
> is updated in db.Suggestion
> def update_SuggestionDisplayName(set, ufields):
>table = 'Suggestion' if ('suggestionTitle' in ufields) else None
>if table:
>name_format = '%(suggestionTitle)s'
> records = set.select()
>for record in records:
>displayName = name_format % record
>ThisSuperObject = db(db.SuperObject.id ==
> record.objectID).select(db.SuperObject.id).first()
>ThisSuperObject.update_record(displayName=displayName)
>db(db.SuperObject.id ==
> ThisSuperObject.objectID).update(objectDisplayName=displayName)
>
>
> db.Suggestion._after_update.append(update_SuggestionDisplayName)
>
>
> Error
>  File "C:/Program Files
> (x86)/web2py/web2py/applications/ES1/models/db.py", line 1441, in
> update_SuggestionDisplayName
> ThisSuperObject.update_record(displayName=displayName)
>   File "gluon/dal.py", line 10866, in __call__
>   File "gluon/dal.py", line 10772, in update
> SyntaxError: No fields to update
>
> Function argument list
> (self=, **update_fields={})
>
> Table SuperObject
> db.define_table('SuperObject',  #
> Field('objectDisplayName','string', label='Object Name'),
> Field('objectTypeID','reference ObjectType', label = 'Object Type'),
> format='%(objectDisplayName)s') ##
>
> Table Suggestion
> db.define_table('Suggestion',
> Field('objectID', 'reference SuperObject'),
> Field('suggestionTitle','string', length=140, label='suggestion Title',
> comment='140 characters max'),
> Field('suggestionShortSummary','string', length=280, label='Summary info',
> comment='short summary - 280 characters max'),
> format='%(suggestionTitle)s')
>
> 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.
>

-- 
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: Bad url decode %2B

2014-08-20 Thread Roberto Perdomo
Thanks Massimo
El ago. 20, 2014 1:41 PM, "Massimo Di Pierro" 
escribió:

> yes. web2py does not like spaces in the URL. If you want you can get the
> request.raw_args before they are parsed.
>
> On Tuesday, 19 August 2014 22:30:37 UTC-5, Roberto Perdomo wrote:
>>
>> Hi everybody,
>>
>> I have a URL with a encoded string as first argument, when this string
>> have a "+", web2py generate the URL with a "%2B", and when web2py go
>> to read this argument, the "+" is converted to a underscore, the
>> question is why?, this is ok?
>>
>> I can solve this using a form with the encoded string, but the idea is
>> keep simple, and the better way is in the URL.
>>
>> Thanks in advance.
>>
>  --
> 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] Bad url decode %2B

2014-08-19 Thread Roberto Perdomo
Hi everybody,

I have a URL with a encoded string as first argument, when this string
have a "+", web2py generate the URL with a "%2B", and when web2py go
to read this argument, the "+" is converted to a underscore, the
question is why?, this is ok?

I can solve this using a form with the encoded string, but the idea is
keep simple, and the better way is in the URL.

Thanks in advance.

-- 
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] Need to have "def 4()" and "def dir()" to 301 redirect. Is it possible?

2014-06-24 Thread Roberto Perdomo
Hello Kenneth,

A way is see the 4 and dir as string argument from the url and read this
from the index function, then check that string argument, and apply a
conditional.

This was not tested, but I think that works for you needs:

def index():
argument = request.args[0]
if argument == '4':
#redirect if 4 value
redirect('/',301)
elif argument == 'dir':
#redirect if dir value
redirect('/',301)
else:
   pass
return dict()


2014-06-24 4:27 GMT-04:30 Kenneth :

> I would like to redirect these two links:
> www.mydomain.com/4 and www.mydomain.com/dir for fixing backlinks I
> previously had for SEO purpose.
>
> I've tried to redirect from the controller but it didn't work.
> --
> def 4():
> redirect('/',301)
> def dir():
> redirect('/',301)
> --
> Obviously this is not possible since dir is a reserved keyword and 4 is
> integer.
>
> Anyway to redirect these two?
>
> 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.
>

-- 
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: appointment application doesn't work out of box

2014-05-10 Thread Roberto Perdomo
This line can work too:

{{for x in db.t_appointment._referenced_by:}}{{t,f = x if
isinstance(x,tuple) else (x.tablename,x.name)}}{{if not
t[-8:]=='_archive':}}[{{=A(t[2:],_href=URL('%s_select'%t[2:],args=(f,
form.record.id)))}}]{{pass}}{{pass}}

You can replace that form with a grid:

http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-grid-and-SQLFORM-smartgrid


2014-05-10 21:13 GMT-04:30 Roberto Perdomo :

> Hello,
>
> Try changing the line 8 in default/appointment_read.html:
>
> {{for t,f in db.t_appointment._referenced_by:}}{{if not
> t[-8:]=='_archive':}}[{{=A(t[2:],_href=URL('%s_select'%t[2:],args=(f,
> form.record.id)))}}]{{pass}}{{pass}}
>
> to this:
>
> {{for f in db.t_appointment._referenced_by:}}{{t=f.tablename}}{{if not
> t[-8:]=='_archive':}}[{{=A(t[2:],_href=URL('%s_select'%t[2:],args=(f,
> form.record.id)))}}]{{pass}}{{pass}}
>
>
> 2014-05-10 19:57 GMT-04:30 LoveWeb2py :
>
> Is there any interest in fixing this app or how I could fix it?
>>
>>
>> On Sunday, April 20, 2014 6:02:03 PM UTC-4, LoveWeb2py wrote:
>>>
>>> Hello,
>>>
>>> I'm trying to create a website for my Mom that she can use to book
>>> appointments. She has a day spa and really could use something like the
>>> appointment manager.
>>>
>>> I have a fresh copy of web2py installed (latest version) and a fresh
>>> install of the appointment manager app.
>>> I installed the app through the app manager and when I try to create an
>>> appointment I get this error:
>>>  too many values to unpack
>>>
>>> here is the traceback:
>>> Traceback
>>>
>>> 1.
>>> 2.
>>> 3.
>>> 4.
>>> 5.
>>> 6.
>>>
>>> Traceback (most recent call last):
>>>   File "/home/web2py/spa/gluon/restricted.py", line 220, in restricted
>>>
>>> exec ccode in environment
>>>   File 
>>> "/home/web2py/spa/applications/appointments/views/default/appointment_read.html",
>>>  line 103, in 
>>> ValueError: too many values to unpack
>>>
>>> and here is the highlighted line of code in appointment_read.html
>>> for t,f in db.t_appointment._referenced_by:
>>>
>>> any thoughts why I might be getting this error?
>>>
>>  --
>> 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.


Re: [web2py] Re: appointment application doesn't work out of box

2014-05-10 Thread Roberto Perdomo
Hello,

Try changing the line 8 in default/appointment_read.html:

{{for t,f in db.t_appointment._referenced_by:}}{{if not
t[-8:]=='_archive':}}[{{=A(t[2:],_href=URL('%s_select'%t[2:],args=(f,
form.record.id)))}}]{{pass}}{{pass}}

to this:

{{for f in db.t_appointment._referenced_by:}}{{t=f.tablename}}{{if not
t[-8:]=='_archive':}}[{{=A(t[2:],_href=URL('%s_select'%t[2:],args=(f,
form.record.id)))}}]{{pass}}{{pass}}


2014-05-10 19:57 GMT-04:30 LoveWeb2py :

> Is there any interest in fixing this app or how I could fix it?
>
>
> On Sunday, April 20, 2014 6:02:03 PM UTC-4, LoveWeb2py wrote:
>>
>> Hello,
>>
>> I'm trying to create a website for my Mom that she can use to book
>> appointments. She has a day spa and really could use something like the
>> appointment manager.
>>
>> I have a fresh copy of web2py installed (latest version) and a fresh
>> install of the appointment manager app.
>> I installed the app through the app manager and when I try to create an
>> appointment I get this error:
>>  too many values to unpack
>>
>> here is the traceback:
>> Traceback
>>
>> 1.
>> 2.
>> 3.
>> 4.
>> 5.
>> 6.
>>
>> Traceback (most recent call last):
>>   File "/home/web2py/spa/gluon/restricted.py", line 220, in restricted
>> exec ccode in environment
>>   File 
>> "/home/web2py/spa/applications/appointments/views/default/appointment_read.html",
>>  line 103, in 
>> ValueError: too many values to unpack
>>
>> and here is the highlighted line of code in appointment_read.html
>> for t,f in db.t_appointment._referenced_by:
>>
>> any thoughts why I might be getting this error?
>>
>  --
> 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.


Re: [web2py] Get data associated with known id from DAL object

2014-04-19 Thread Roberto Perdomo
Simply: phones[1].prof_phone.phone and phones[1].provider.edomain if we
supouse that the id 3 is the second result in the row (1 is the index of
the phones rows).

If you don't know the position in the result, but know the id of the row:

for phone in phones:
if phone.prof_phone.id == 2:
print 'Phone: {}, Provider: {}'.format(phone.prof_phone.phone,
phone.provider.edomain)




2014-04-19 14:54 GMT-04:30 Kurt Jensen :

> I have a left join query:
>
>
> phones=db((db.prof_phone.pid==person_id)&(db.prof_phone.provider>1)).select(db.prof_phone.ALL,db.provider.edomain,
> left=db.provider.on(db.provider.id
> ==db.prof_phone.provider),orderby=db.prof_phone.label)
>
> which gives me an object:
> phones:prof_phone.id prof_phone.label   prof_phone.phone
>  prof_phone.providerprof_phone.pidprof_phone.editedprovider.edomain2
> Cell(360) 123-9876   2Kurt Jensen (11)  2014-03-26 22:34:40
> vmobl.com3Wife Cell(360) 123-4567   2Kurt Jensen (11)2014-04-17 18:02:18
> vmobl.com
>
>
> Given that I know the value of the id (3) in row 2; How can I retrieve "(360)
> 123-4567" and "vmobl.com" out of the object?
>
> In PHP I always used a multidimensional array keyed by id to store query
> results and could just do $phone[3]['phone'] and $phone[3]['edomain'].
>
> 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.
>

-- 
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: T when sending email

2014-04-16 Thread Roberto Perdomo
Try something like this if you are using simple text email:

line1 = T('This is line one')
line2 = T('This is line two')
message = '%s\n%s' % (line1, line2)

mail.send(to='y...@example.com',
  subject='hello',
  # If reply_to is omitted, then mail.settings.sender is used
  reply_to='u...@example.com',
  message=message)

Here "\n" do the new line.

In HTML text email, use " instead of "\n"


2014-04-16 17:36 GMT-04:30 Kenneth :

>
>
> Hello,
>
> text
>
> send.mail()
>
>
> Kenneth
>
>
> what format are you sending the emails ? text or html ? What's the used
>> function to send the emails ?
>>
>> On Wednesday, April 16, 2014 2:20:02 PM UTC+2, Kenneth wrote:
>>>
>>> Hello,
>>>
>>> I'm trying to send email that is made from about 6-7 T('texts'). But
>>> newlines are not inserted into the emails.
>>>
>>> How should I do that?
>>>
>>>
>>> Kenneth
>>>
>>  --
> 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.


Re: [web2py] Re: HELP with bootstrap 3

2014-02-23 Thread Roberto Perdomo
Login menu works good, but web2py menu with submenu appears still
disordered.


2014-02-24 1:17 GMT-04:30 Roberto Perdomo :

> 2014-02-23 23:59 GMT-04:30 Massimo Di Pierro :
>
> What do we need:
>> 1) testing of the latest welcome
>> 2) the Login menu does not work show the dropdown on mouseover. I do not
>> know why.
>>
> Just put this in bootstrap.min.css:
>
> .dropdown:hover .dropdown-menu {
> display: block;
>  }
>
> Missing files:
>
> bootstrap-theme.min.css
> web2py-bootstrap3.js
> web2py-bootstrap3.css
>
>
>>
>> Massimo
>>
>>
>> On Sunday, 23 February 2014 21:56:56 UTC-6, Massimo Di Pierro wrote:
>>>
>>> Urgent. We need help fixing the bootstrap 3 menu in welcome in trunk.
>>> Can it be done without changing any python code, except perhaps the MENU
>>> helper?
>>>
>>  --
>> 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/groups/opt_out.
>>
>
>

-- 
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/groups/opt_out.


Re: [web2py] Re: HELP with bootstrap 3

2014-02-23 Thread Roberto Perdomo
2014-02-23 23:59 GMT-04:30 Massimo Di Pierro :

> What do we need:
> 1) testing of the latest welcome
> 2) the Login menu does not work show the dropdown on mouseover. I do not
> know why.
>
Just put this in bootstrap.min.css:

.dropdown:hover .dropdown-menu {
display: block;
 }

Missing files:

bootstrap-theme.min.css
web2py-bootstrap3.js
web2py-bootstrap3.css


>
> Massimo
>
>
> On Sunday, 23 February 2014 21:56:56 UTC-6, Massimo Di Pierro wrote:
>>
>> Urgent. We need help fixing the bootstrap 3 menu in welcome in trunk.
>> Can it be done without changing any python code, except perhaps the MENU
>> helper?
>>
>  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [web2py] New record creates on Select?

2014-01-25 Thread Roberto Perdomo
With "SQLFORM(db.mascotas," you generate a form with Database
(insert/update/delete), try using SQLFORM.factory or SQLFORM without
database IO (
http://www.web2py.com/book/default/chapter/07#SQLFORM-without-database-IO)


2014/1/25 Luciano Laporta Podazza 

> Hello,
>
> I created a form(SQLFORM) to perform a search(without using crud.search)
> and for some reason, every time I do a search, a new record is created with
> default values. I really don't know if I'm doing something wrong or is it a
> bug.
> Tested with Web2py 2.8.2 on Mac OS X 10.9.1 and MySQL 5. All data created
> from scratch.
>
> Here is the *db.py*:
>
> from gluon.tools import Auth, Crud, Service, PluginManager, prettydate
> auth = Auth(db)
> crud, service, plugins = Crud(db), Service(), PluginManager()
>
>
>
>
> auth.settings.extra_fields['auth_user']= [
> Field('facebook_id', 'string'),
> Field('calle', 'string'),
> Field('numero', 'integer'),
> Field('ciudad', 'string'),
> Field('provincia', 'string'),
> Field('pais', 'string'),
> Field('telefono', 'string'),
> Field('celular', 'string'),
> Field('first_time', 'boolean', default=1),
> Field('asociacion', 'boolean', default=1),
> Field('nombre_asociacion', 'string'),
> Field('email_asociacion', 'string'),
> Field('telefono_asociacion', 'string'),
> ]
>
>
>
>
> ## create all tables needed by auth if not custom tables
> auth.define_tables(username=False, signature=False)
>
> db.define_table('especies',
> Field('nombre_especie', 'string', requires=IS_IN_SET(['Canino',
> 'Felino'], zero=None)),
> Field('nombre_raza', 'string'),
> )
>
> db.define_table('mascotas',
> Field('mascotas_id', db.auth_user),
> Field('foto_mascota', 'upload'),
> Field('nombre', 'string'),
> Field('especie', 'string', requires=IS_IN_SET(['Canino','Felino'],zero
> =None)),
> Field('raza_canino', db.especies, label="Raza"),
> Field('raza_felino', db.especies, label="Raza"),
> Field('color', 'string'),
> Field('nacimiento', 'date'),
> Field('genero', 'string', requires=IS_IN_SET(['Macho','Hembra'] , zero
> =None)),
> Field('cruza', 'boolean', default=0),
> Field('adopcion', 'boolean', default=0),
> Field('pedigree', 'boolean', default=0),
> )
> db.mascotas.raza_canino.requires = IS_EMPTY_OR(IS_IN_DB(db(db.especies.
> nombre_especie=='Canino'), db.especies.id,'%(nombre_raza)s', zero='Elegir
> raza'))
> db.mascotas.raza_felino.requires = IS_EMPTY_OR(IS_IN_DB(db(db.especies.
> nombre_especie=='Felino'), db.especies.id,'%(nombre_raza)s', zero='Elegir
> raza'))
>
>
> Table *especies *is where I add some pet species(cats or dogs) and their
> races.
>
> Here is the search on *controller.py*:
>
> def search():
> search = SQLFORM(db.mascotas,
> fields=[
> 'especie',
> 'raza_canino',
> 'raza_felino',
> 'genero'])
> if search.process().accepted:
> query = db((db.auth_user.id==db.mascotas.mascotas_id)&
> (db.mascotas.especie==search.vars.especie)&
> ((db.mascotas.raza_canino==search.vars.raza_canino)|
> (db.mascotas.raza_felino==search.vars.raza_felino))&
> (db.mascotas.genero==search.vars.genero)).select(db.mascotas.
> nombre,
> db.mascotas.nacimiento,
> db.auth_user.id,db.mascotas.id)
> return dict(query=query,search=search)
> elif search.errors:
> response.flash = 'form has errors'
> else:
> response.flash = 'please fill out the form'
> query=''
> return dict(search=search,query=query)
>
> Thanks for you 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [web2py] How to include symbols as ✎ or ✆ in a the helper A()?

2013-12-17 Thread Roberto Perdomo
Try with something like:

{{=A(XML('✖'), _href=URL('default', 'delete', args=[row.id]))}}




2013/12/17 Omar Meat Boy Gutiérrez 

>
> I have a table of items with a special column to delete each item. I'd
> like include a symbol like: ✖ or ✕ or ✗, in this way:
>
>  X   Y   Z   Delete
> -
>  xy   z   [✖]
>  xy   z   [✖]
>
> I am trying with:
>
> {{=A('✖', _href=URL('default', 'delete', args=[row.id]))}}
>
> however my result is more or less:
>
>  X   Y   Z   Delete
> -
>  xy   z   [✖]
>  xy   z   [✖]
>
> When I use:
>
> ✖
>
> it works (symbols are correctly displayed) but I'd like to use A helper
> because is a more pythonic way to do it.
>
> What am I doing wrong!
>
> --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [web2py] Re: Proposal for big but simple improvement: [add view] in IDE view

2013-12-09 Thread Roberto Perdomo
https://github.com/web2py/web2py/pull/322/


2013/12/9 Roberto Perdomo 

> Sometime ago I do an "Create" button in the "files toggle" menu, to allow
> create files from the editor page, when a new file is created the "files
> toggle" menu is updated using javascript to show the new files created.
>
> Due to something problems I forgot to send the pull request for this, I
> can try update this work today and send the pull, to allow create
> view/model/controller.
>
>
> 2013/12/9 paolo.vall...@gmail.com 
>
> You are right, technically speaking it is true we already have the name of
>> views and we can avoid to ask them again to the users.
>> However what you proposed It's not so straightforward  with the current
>> editor structure, I don't say it is impossible. At first sight we should:
>>
>> 1- migrate the file list sidebar into an indipendent component (currently
>> it is part of the editor page) (backend part)
>> 2- for each opened file(tab) stores in a javascript variable the current
>> available views (js)
>> 3- periodically or on demand, parse the python file to find the current
>> declared endpoints (js)
>> 4- remove from the declared endpoints(discovered in point3) those already
>> available (point 2). (js)
>> 5- feed the dropdown menu with those discovered in point4   (js)
>> 6- when a new file is created, add the new view to the available
>> views(point3) and update the file list sidebar(point 1).(backend/js)
>>
>> I start with 1, I can work on the other points in the coming days/week.
>>
>>
>>  Paolo
>>
>>
>> 2013/12/9 Mika Sjöman 
>>
>>>  Well, I was thinking that usually you write the controller first. If
>>> you click an [Add view] button, it could check which functions are missing
>>> a view and give you two options in a popup, or pop-down? (don't know what
>>> it is called);
>>>
>>> -
>>> Add view for function:
>>>   [Link: missing_view_function1]
>>>   [Link: missing_view_function2]
>>>
>>> OR add one with name:
>>> Name: [  ] [Add View]
>>> --
>>>
>>> Mostly you would just click on the missing view function link and you
>>> would not misspell the file name, which is a quite common error and it
>>> would reduce writing. Also you would not add one by mistake if there is one
>>> already.
>>>
>>> // cheers
>>>
>>>
>>>
>>>
>>> On Monday, December 9, 2013 5:10:20 PM UTC+1, Paolo Valleri wrote:
>>>>
>>>> It is a good idea that could speed up the initial development phase;
>>>> We could start by implementing some like that: while you edit the
>>>> controller test.py at the top you will get a button 'add view' that when
>>>> clicked creates a file (a view actually) in the directory app/views/test;
>>>> the file name could be get by a dialog. Let me think about that a bit more.
>>>>
>>>> For the [Add or +] in the file list, if I remember correctly Roberto
>>>> (in CC) has started something a while ago.
>>>>
>>>> Paolo
>>>>
>>>> On Monday, December 9, 2013 4:57:25 PM UTC+1, Mika Sjöman wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> I just noticed watching Massimo's video tutorials, how often we need
>>>>> to open a second tab in Chrome when we want to create a
>>>>> view/controller/model file. It often leads us to get conflicts since we do
>>>>> not want to close the previous (having multiple tabs open we are working
>>>>> on).
>>>>>
>>>>> If we could add a view with a button "add view" when looking at a
>>>>> controller and the list of views, we could basically stop opening multiple
>>>>> chrome tabs and also reduce the merges we need to do.
>>>>>
>>>>> *Edit views:* view1, view2, [Add view]
>>>>>
>>>>> Clicking it would open the new text file immediately in another tab.
>>>>>
>>>>> It should also reload the files toggle view on the left. An [add or +]
>>>>> button could also be added after each section in the files toggle view to
>>>>> the left, and it would feel really complete. Even though I guess we would
>>>>> still open it sometime, it would reduce the times we need to click Edit
>>>>> link at the top bar.
>>>>>
>>>>

Re: [web2py] Re: Proposal for big but simple improvement: [add view] in IDE view

2013-12-09 Thread Roberto Perdomo
Sometime ago I do an "Create" button in the "files toggle" menu, to allow
create files from the editor page, when a new file is created the "files
toggle" menu is updated using javascript to show the new files created.

Due to something problems I forgot to send the pull request for this, I can
try update this work today and send the pull, to allow create
view/model/controller.


2013/12/9 paolo.vall...@gmail.com 

> You are right, technically speaking it is true we already have the name of
> views and we can avoid to ask them again to the users.
> However what you proposed It's not so straightforward  with the current
> editor structure, I don't say it is impossible. At first sight we should:
>
> 1- migrate the file list sidebar into an indipendent component (currently
> it is part of the editor page) (backend part)
> 2- for each opened file(tab) stores in a javascript variable the current
> available views (js)
> 3- periodically or on demand, parse the python file to find the current
> declared endpoints (js)
> 4- remove from the declared endpoints(discovered in point3) those already
> available (point 2). (js)
> 5- feed the dropdown menu with those discovered in point4   (js)
> 6- when a new file is created, add the new view to the available
> views(point3) and update the file list sidebar(point 1).(backend/js)
>
> I start with 1, I can work on the other points in the coming days/week.
>
>
>  Paolo
>
>
> 2013/12/9 Mika Sjöman 
>
>> Well, I was thinking that usually you write the controller first. If you
>> click an [Add view] button, it could check which functions are missing a
>> view and give you two options in a popup, or pop-down? (don't know what it
>> is called);
>>
>> -
>> Add view for function:
>>   [Link: missing_view_function1]
>>   [Link: missing_view_function2]
>>
>> OR add one with name:
>> Name: [  ] [Add View]
>> --
>>
>> Mostly you would just click on the missing view function link and you
>> would not misspell the file name, which is a quite common error and it
>> would reduce writing. Also you would not add one by mistake if there is one
>> already.
>>
>> // cheers
>>
>>
>>
>>
>> On Monday, December 9, 2013 5:10:20 PM UTC+1, Paolo Valleri wrote:
>>>
>>> It is a good idea that could speed up the initial development phase;
>>> We could start by implementing some like that: while you edit the
>>> controller test.py at the top you will get a button 'add view' that when
>>> clicked creates a file (a view actually) in the directory app/views/test;
>>> the file name could be get by a dialog. Let me think about that a bit more.
>>>
>>> For the [Add or +] in the file list, if I remember correctly Roberto (in
>>> CC) has started something a while ago.
>>>
>>> Paolo
>>>
>>> On Monday, December 9, 2013 4:57:25 PM UTC+1, Mika Sjöman wrote:

 Hi

 I just noticed watching Massimo's video tutorials, how often we need to
 open a second tab in Chrome when we want to create a view/controller/model
 file. It often leads us to get conflicts since we do not want to close the
 previous (having multiple tabs open we are working on).

 If we could add a view with a button "add view" when looking at a
 controller and the list of views, we could basically stop opening multiple
 chrome tabs and also reduce the merges we need to do.

 *Edit views:* view1, view2, [Add view]

 Clicking it would open the new text file immediately in another tab.

 It should also reload the files toggle view on the left. An [add or +]
 button could also be added after each section in the files toggle view to
 the left, and it would feel really complete. Even though I guess we would
 still open it sometime, it would reduce the times we need to click Edit
 link at the top bar.

>>>  --
>> 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/JO4PrRnDpnU/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> web2py+unsubscr...@googlegroups.com.
>>
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>  --
> 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/groups/opt_out.
>

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

Re: [web2py] Re: codemirror tabbing problem

2013-10-12 Thread Roberto Perdomo
Dont be angry, only write us, and we help to solve your suggestions.

For now, codemirror have the extrakeys option "indentMore" but the
"IndentLess" is missing.

Thanks for reporting, I have tested and sent a pull request to add
"IndentLess"


2013/10/12 LightOfMooN 

> fixed by adding extraKeys in admin/views/edit.html:
>
> CodeMirror.defaults.extraKeys["Tab"] = "indentMore";
> CodeMirror.defaults.extraKeys["Shift-Tab"] = "indentLess";
>
> вторник, 5 марта 2013 г., 20:19:48 UTC+6 пользователь LightOfMooN написал:
>
>> How to disable wrong codemirror smart-tabbing? It really makes me angry
>> when I'm coding.
>> smartIndent: false don't help.
>> I need tabbing like in the editArea, where "tab" makes +4 spaces for all
>> selected lines and "shift+tab" makes -4 spaces for all selected lines. thx
>>
>  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [web2py] Re: Newer version worse and worse

2013-10-11 Thread Roberto Perdomo
https://github.com/web2py/web2py/pull/248

Please check and comment/send suggestions if you find errors.

Tested with Chrome in Mac OS X


2013/10/11 LightOfMooN 

> To reproduce redirect problems please look here:
> https://groups.google.com/forum/#!topic/web2py/qZFL6kLNIp0
>
> суббота, 12 октября 2013 г., 5:10:55 UTC+6 пользователь Massimo Di Pierro
> написал:
>
>> Since we have problems reproducing two of your issues (redirect after
>> login and editor js) I suspect you have an incomplete installation. Did you
>> upgrade via admin?
>>
>> I suggest you get a clean web2py_src.zip and unzip over the existing one.
>>
>> Anyway, wait one hour and I will have a 2.7.3 with fixes for other small
>> issues.
>>
>> Massimo
>>
>>
>>
>> On Friday, 11 October 2013 17:52:12 UTC-5, LightOfMooN wrote:
>>>
>>> OS Ubuntu 12.04
>>> Tested browsers Firefox 24.0 and Google Chrome 30.0.1599.69 m
>>>
>>> суббота, 12 октября 2013 г., 4:14:28 UTC+6 пользователь Massimo Di
>>> Pierro написал:

 Let's keep this thread about the problem with the editor. @LightOfMooN,
 please send us more info about browser and os.

 The redirect issue will be addressed on a different thread. I am
 working on it trying to reproduce it.

 On Friday, 11 October 2013 07:55:55 UTC-5, LightOfMooN wrote:
>
> It's really headache for me with new 2.7.2 version of web2py.
>
> There are no more redirects after users login and logout.
> Double click in mirror editor on empty string leads to crash browser.
> (fixed by removing 
> from admin/views/default/edit.html)
> Stupid  needs
> to be removed too. It doesn't improve, but only complicates the coding.
> When decorate function, parameter _next does not processed by url
> rewrite function.
> And many many many other.
>
> So, it's really easier to install something like 2.4.6 version and
> forget for updating at all.
>
>  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [web2py] Re: Newer version worse and worse

2013-10-11 Thread Roberto Perdomo
We can add an option button in the editor config page to enable autoclose
tags
El oct 11, 2013 6:40 PM, "Massimo Di Pierro" 
escribió:

> Since we have problems reproducing two of your issues (redirect after
> login and editor js) I suspect you have an incomplete installation. Did you
> upgrade via admin?
>
> I suggest you get a clean web2py_src.zip and unzip over the existing one.
>
> Anyway, wait one hour and I will have a 2.7.3 with fixes for other small
> issues.
>
> Massimo
>
>
>
> On Friday, 11 October 2013 17:52:12 UTC-5, LightOfMooN wrote:
>>
>> OS Ubuntu 12.04
>> Tested browsers Firefox 24.0 and Google Chrome 30.0.1599.69 m
>>
>> суббота, 12 октября 2013 г., 4:14:28 UTC+6 пользователь Massimo Di Pierro
>> написал:
>>>
>>> Let's keep this thread about the problem with the editor. @LightOfMooN,
>>> please send us more info about browser and os.
>>>
>>> The redirect issue will be addressed on a different thread. I am working
>>> on it trying to reproduce it.
>>>
>>> On Friday, 11 October 2013 07:55:55 UTC-5, LightOfMooN wrote:

 It's really headache for me with new 2.7.2 version of web2py.

 There are no more redirects after users login and logout.
 Double click in mirror editor on empty string leads to crash browser.
 (fixed by removing 
 from admin/views/default/edit.html)
 Stupid  needs
 to be removed too. It doesn't improve, but only complicates the coding.
 When decorate function, parameter _next does not processed by url
 rewrite function.
 And many many many other.

 So, it's really easier to install something like 2.4.6 version and
 forget for updating at all.

  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [web2py] Newer version worse and worse

2013-10-11 Thread Roberto Perdomo
El oct 11, 2013 8:25 AM, "LightOfMooN"  escribió:
>
> It's really headache for me with new 2.7.2 version of web2py.
>
> There are no more redirects after users login and logout.
> Double click in mirror editor on empty string leads to crash browser.
(fixed by removing  from
admin/views/default/edit.html)

Please, indicate your OS and navigator ir order to reproduce this problem,
I use Debian and.Windows with Chrome and Firefox and dont crash (I test
with version 16 of codemirror, new version is 18, I dont test this version)

> Stupid  needs to be
removed too. It doesn't improve, but only complicates the coding.

Is necesary say "Stupid" to this? This option works in html edit mode of
codemirror, and is great improvement (at least for me), because do
autoclose for html tags.

> When decorate function, parameter _next does not processed by url rewrite
function.
> And many many many other.
>
> So, it's really easier to install something like 2.4.6 version and forget
for updating at all.
>
> --
> 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/groups/opt_out.

-- 
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/groups/opt_out.


Re: [web2py] Re: contributing patches

2013-09-27 Thread Roberto Perdomo
We speak about that few days ago here:

https://groups.google.com/forum/m/#!topic/web2py-developers/DvRqziEe_GE
El sep 27, 2013 2:28 PM, "Michele Comitini" 
escribió:

> Massimo, Niphlod
>  can we add those instructions to the book? A chapter "Contributing to
> web2py" can be helpful, don't you think?
>
>
>
> 2013/9/27 Niphlod 
>
>> in addition to joining the developers group, there are some (absolutely
>> not required, but good to have) main ideas to follow (it's how currently
>> most of contributors are dealing with PR):
>> - github is preferred for their PR system
>> - make your patch on a topic branch against current master trunk
>> - it should be a patch that can be fast-forwarded (i.e. merged
>> automatically in current master)
>> - composed of a single commit (unless the patch is long and needs
>> specific commit "comments" to track it later)
>> - commit message **should** include a "thanks to @someone" if it was
>> someone else that pointed out the bug or raised the request for the feature
>> - if the commit contains a new feature it should come with the relative
>> tests (unittest in gluon/tests)
>>
>> I have another one, but it seems that I'm the only one (would be good if
>> we agree on something consistent):
>> - every bug-fixing commit should come from a branch named
>> "issue/number_of_the_issue_on_google_code" (like issue/1684)
>> - every enhancement commit should come in a branch named
>> "enhancement/title_of_the_enhancement" (like enhancement/trapped_links)
>>
>>
>>
>>
>> On Friday, September 27, 2013 5:43:51 PM UTC+2, Ricardo Cárdenas wrote:
>>>
>>> (Apologies if this has been asked before.)
>>>
>>> Kudos for web2py and for this community; happy to have found you.
>>> Web2py's very useful for my projects; even enjoyable!
>>>
>>> I'd like to pay it back, starting with minor patches that I think could
>>> be useful to others. I can fork and watch on github, and generate PRs,
>>> but... Is there a document with guidelines on doing so? (I don't mean
>>> github instructions, more like "what you are looking for in good PRs") I
>>> saw reference to an agreement that should be signed? Mailing lists one can
>>> join to get the hang of etiquette and how the devs currently manage the
>>> process?
>>>
>>> best regards -Ricardo
>>>
>>  --
>> 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/groups/opt_out.
>>
>
>  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [web2py] Trouble Updating to 2.6.4 from 2.5.1

2013-09-22 Thread Roberto Perdomo
What kind of failure you are presenting?


2013/9/22 

> When I try to update from 2.5.1 to 2.6.4 the admin is no longer
> operational. Is there any fix for this? I am not sure where the error logs
> are held.
>
>
> --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [web2py] Re: Frustration with SQLFORM and date formata

2013-09-20 Thread Roberto Perdomo
Try changing this in web2py_ajax.html:

var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
var w2p_ajax_datetime_format = "{{=T('%Y-%m-%d %H:%M:%S')}}";




2013/9/20 Joe Barnhart 

> Hi Niphlod --
>
> This is what I thought as well.  Yet in my controller I have set this:
>
>
>
> dbrw.birth.requires=[IS_DATE_IN_RANGE(maximum=target,format="%m-%d-%Y")]
>
>
> Still, I do not get the format mm-dd- but rather -mm-dd when the
> form is displayed.  I have tried it with and without the enclosing list
> and, although it will correctly read back the format I specified, it always
> displays the form initially with the wrong date format.
>
> -- Joe
>
> On Friday, September 20, 2013 4:11:38 AM UTC-7, Niphlod wrote:
>>
>>
>> BTW, a simple requires=IS_DATE(format='%d-%**m%-%Y') works, given that
>> no '%d-%m-%Y' is never translated.
>>
>>>
>>>  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [web2py] Re: web2py 2.6.1 is OUT - IMPORTANT READ

2013-09-12 Thread Roberto Perdomo
Great news!.

Thanks to everybody for do a better web2py every day.
El sep 12, 2013 8:21 PM, "Massimo Di Pierro" 
escribió:

> Thank you. The majority of the improvements in this version come from you
> (Michele) and niphlod (Simone).
>
> Massimo
>
> On Thursday, 12 September 2013 18:53:50 UTC-5, Michele Comitini wrote:
>>
>> +1
>>
>> Thank you Massimo!
>>
>>
>> Il giorno venerdì 13 settembre 2013 00:27:37 UTC+2, Massimo Di Pierro ha
>> scritto:
>>>
>>> Web2py 2.6.1 is finally OUT. It needs some more testing.
>>>
>>> READ BELOW BEFORE UPGRADING
>>>
>>>  Attention all users: For pre 2.6 applications to work with web2py
>>> >=2.6, you must copy static/js/web2py.js, controllers/appadmin.py, and
>>> views/appadmin.html from the welcome app to your own apps (all of them).
>>>
>>>  Attention production users: The updated handlers and examples are
>>> in handlers/ and examples/. The updated ones will not override the existing
>>> ones. To use the new ones it is not sufficient to upgrade web2py, you also
>>> need to copy the desired handler/example in the root web2py/ folder.
>>>
>>>  Attention MySQL users: The length of string fields changed from 255
>>> to 512 bytes. If you have migrations enabled this will trigger a large
>>> migration. To prevent it, first set migrate_enabled=False, upgrade, check
>>> everything is ok, then add length=255 to your string Fields, then re-enable
>>> migrations with migrate_enabled=True if needed.
>>>
>>> - better directory structure: handlers/ extras/ examples/
>>> - better MongoDb support, thanks Alan
>>> - better Admin editor interface, thanks Paolo, Roberto (codemirror 3),
>>> and Lightdot
>>> - better layout.html and web2py_bootstrap.css, thanks Paolo
>>> - refactored web2py.js makes code more readable, thanks Niphlod
>>> - compute fields can depend on other compute(d) fields
>>> - more functions in appadmin (/manage/auth), thanks Anthony
>>> - support for CAST in SQL generation
>>> - new API jQuery('#component').reload()
>>> - new API rows.render()
>>> - new API table.field.referent, table._references
>>> - new API db(...).validate_and_update(..**.)
>>> - new API Wiki(..., force_render=True) renders the page source again
>>> instead of using cached
>>> - Wiki now automatically parses named component arguments
>>> @{f:a=1,b='twp',c=variable}
>>> - auth.get_or_create_user(login=**False)
>>> - auth = Auth(crsf_protection = False) prevents creating sessions in
>>> login/register forms.
>>> - enable multiple renderers in wiki, thanks Alan
>>> - log messages from Auth are no longer translated (for speed and
>>> readability)
>>> - update jQuery mobile to 1.3.1
>>> - reduced memory footprint by conditionally loading Tk
>>> - faster pbkdf2 uses OpenSSL, thanks Michele
>>> - many speed improvements, thanks Michele
>>> - better session logic, prevents false positive when detecting session
>>> changes.
>>> - scripts/import_static.py converts a static site to a web2py app
>>> (experimental)
>>> - support for new http error code 451
>>> - profiler saves dump in dir, thanks Niphlod
>>> - upgraded pyfpdf, thanks Mariano
>>> - gluon/contrib/pdfinvoice.py for generating PDF invoices (assumes
>>> reportlab)
>>> - no more double submission of forms (even without crsf protection),
>>> thanks Niphlod
>>> - speedup for define_table, thanks Michele
>>> - settings.cfg to admin, thanks Paolo
>>> - many bugs fixed, thanks Niphlod, Michele, Roberto, Jonathan, and many
>>> others
>>>
>>  --
> 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/groups/opt_out.
>

-- 
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/groups/opt_out.


Re: [web2py] Smartgrid line color

2013-08-29 Thread Roberto Perdomo
Hi António,

You can use a conditional represent to change the color of the date field
in your outdated record.

something like:

1) db.table.field.represent =lambda value, row: ""+value+"" if CONDITION else value

Or you can put the outdated field inside an specific div with an id and
iterate over the smartgrid table with Jquery to find the id, I Jquery find
the id, then change the row color:

2) db.table.field.represent =lambda value, row: ""+value+"" if CONDITION else value

I used something like the option 1, but I can not find the project at this
moment.




2013/8/29 António Ramos 

> Hello ,
>
> i need a table (smartgrid) that highlights outdated records, for example
> forcing the outdated record line inside the table to be filled with red
> background and yellow text.
>
>
> Can i do it with form.smartgrid?
>
>
> Thank you
> António
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 

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


Re: [web2py] Begginer questions about web2py

2013-08-27 Thread Roberto Perdomo
Hi,

2013/8/27 Gallien Labeyrie 

> Hello,
>
> Coming from a PHP background, I've recently discovered Web2Py framework
> and I am amazed Its embed functionalities.
> However I'm wondering If someone among the community could enlighten me :
>
> - What's the easiest way to debbug in web2py ? (=> what would be the
> equivalent to dump variable content such as print_r() in php ?)
> I tried PDB but I don't find It really convinient...
>

see this:
http://stackoverflow.com/questions/2187821/what-is-the-equivalent-of-phps-print-r-in-python


> - How to connect an external MySQL database ?
> According to the official docs I tried the script given*
>  extract_mysql_models.py *
> but It only gives me a one line script like with the string connection.
> (It doesn't generate the model ?)
>
> legacy_db = DAL('mysql://password@somewebsite/dbname')
>
> You lost the username and check that somewebsite are the host name of your
MySQL Server.

legacy_db = DAL('mysql://username:password@somewebsite/dbname

where:

username = the name of the database user
password = the password of the database
somewebsite = is the host name of your server
dbname = The name of your database

See that the DAL is inside legacy_db, you need to change every  concidence
on the web2py docs of "db." to "legacy_db."

http://www.web2py.com/book/default/chapter/06#Connection-strings

> I put that line in a model file, but It doesn't seems to work. Plus I
> still have to declare all the tables manually which is a bit boring ...
>
> - Except the official website, are there any other useful resources online
> ?
>

Yes, you can check here: http://www.web2pyslices.com

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

-- 

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


Re: [web2py] How to detect the browser time zone?

2013-08-12 Thread Roberto Perdomo
Doing some research, I found this, it might be what you need:

https://github.com/niphlod/w2p_timezone_plugin


2013/8/12 Luca 

> I see that the validators (such as DATETIME) take a timezone object, so
> that the time can be stored in utc and converted to localtime.
> However, I did not see if there is support in web2py for querying the
> browser time zone.
> This was discussed in this group back in March, but I did not see (or
> could not find) the information on browser timezone detection.
>
> Is this a plugin?  Has any solution been posted?
>
> Many thanks!
>
> --Luca
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 

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




Re: [web2py] Bootstrap Carousel and bootstrap

2013-08-08 Thread Roberto Perdomo
dont worry, it's a pleasure for me. ;-)

Kind Regards.


2013/8/8 Hugo Costa 

> You sir, made my day.
>
> Thanks a lot Roberto! :)
>
> Quinta-feira, 8 de Agosto de 2013 20:33:45 UTC+1, Roberto Perdomo escreveu:
>>
>> The {{pass}} of the if is not needed :-S
>>
>>
>> 2013/8/8 Hugo Costa 
>>
>> Yeah, I have. 3 is the magic number :)
>>>
>>> I did not understand this question.
>>>
>>> The third is missing
>>>
>>> 
>>>
>>>
>>>
>>>>> src="/diogo/static/images/**carousel/carousel3.jpg"
>>> alt="banner1">
>>>Azeite Vinaldo
>>>Guache sobre Tela, 75x30
>>> cm.
>>>2013-08-07 18:03:38.774240
>>>
>>>>> src="/diogo/static/images/**carousel/carousel1.jpg"
>>> alt="banner2">
>>> Bezegaio Frito
>>>Acrilico sobre Tela, 45x40
>>> cm
>>>2013-08-07 17:52:27.399172
>>>
>>>
>>>
>>>   
>>>
>>> The code in the source in browser.
>>>
>>> Quinta-feira, 8 de Agosto de 2013 19:43:36 UTC+1, Roberto Perdomo
>>> escreveu:
>>>>
>>>> Good news!
>>>>
>>>> You really have three post?
>>>> Can you print the three posts in a .html without carousel?
>>>> You have checked the source of your index.html (in the browser) and
>>>> search the three div inside "carousel-inner"?
>>>>
>>>>
>>>> 2013/8/8 Hugo Costa 
>>>>
>>>> Sorry about the delay.
>>>>>
>>>>> The first one works fine, but only works for the first and the second.
>>>>>
>>>>> The code I used is:
>>>>>
>>>>> *index.html*
>>>>> *
>>>>> *
>>>>> 
>>>>>   
>>>>> >>>> data-slide-to="0" class="active">
>>>>> >>>> data-slide-to="1">
>>>>> >>>> data-slide-to="2">
>>>>>   
>>>>>   
>>>>>  {{for index, post in enumerate(news):}}
>>>>>
>>>>> {{if index==0:}}
>>>>>
>>>>>{{=post.title}}
>>>>>{{=post.**po**st}}
>>>>>{{=post.**cre**ated_on}}
>>>>>
>>>>> {{pass}}
>>>>>
>>>>> {{else:}}
>>>>>>>>> src="{{=URL('static','images/carousel/%s'
>>>>> %(post.image))}}" alt="banner2" />
>>>>> {{=post.title}}
>>>>>{{=post.**po**st}}
>>>>>{{=post.**cre**ated_on}}
>>>>>
>>>>> {{pass}}
>>>>> {{pass}}
>>>>>   
>>>>>   >>>> href="#carousel-example-**generi**c" data-slide="prev">‹
>>>>>   >>>> href="#carousel-example-**generi**c" data-slide="next">›
>>>>> 
>>>>> 
>>>>>
>>>>> What could it be?
>>>>>
>>>>> Quarta-feira, 7 de Agosto de 2013 20:56:17 UTC+1, Roberto Perdomo
>>>>> escreveu:
>>>>>>
>>>>>> you forgot the ":" on the else and pass on the if. index var not
>>>>>> exist, was my example, you need get the index of the iteration, may be 
>>>>>> with
>>>>>> news.index(post) or using enumerate. Try this two example:
>>>>>>
>>>>>> 
>>>>>>   
>>>>>> >>>>> data-slide-to="0" class="active">
>>>>>> >>>>> data-slide-to="1">
>>>>>> >>>>> data-slide-to="2">
>>>>>>   
>>>>>>   
>>>>>> {{for index, post in enumerate(news):}}
>>>>>> {{if index==0:}}
>>>>>>>&

Re: [web2py] Bootstrap Carousel and bootstrap

2013-08-08 Thread Roberto Perdomo
The {{pass}} of the if is not needed :-S


2013/8/8 Hugo Costa 

> Yeah, I have. 3 is the magic number :)
>
> I did not understand this question.
>
> The third is missing
>
> 
>
>
>
> src="/diogo/static/images/carousel/carousel3.jpg" alt="banner1">
>Azeite Vinaldo
>Guache sobre Tela, 75x30 cm.
>2013-08-07 18:03:38.774240
>
> src="/diogo/static/images/carousel/carousel1.jpg" alt="banner2">
> Bezegaio Frito
>Acrilico sobre Tela, 45x40 cm
>2013-08-07 17:52:27.399172
>
>
>
>   
>
> The code in the source in browser.
>
> Quinta-feira, 8 de Agosto de 2013 19:43:36 UTC+1, Roberto Perdomo escreveu:
>>
>> Good news!
>>
>> You really have three post?
>> Can you print the three posts in a .html without carousel?
>> You have checked the source of your index.html (in the browser) and
>> search the three div inside "carousel-inner"?
>>
>>
>> 2013/8/8 Hugo Costa 
>>
>> Sorry about the delay.
>>>
>>> The first one works fine, but only works for the first and the second.
>>>
>>> The code I used is:
>>>
>>> *index.html*
>>> *
>>> *
>>> 
>>>   
>>> >> data-slide-to="0" class="active">
>>> >> data-slide-to="1">
>>> >> data-slide-to="2">
>>>   
>>>   
>>> {{for index, post in enumerate(news):}}
>>>
>>> {{if index==0:}}
>>>
>>>{{=post.title}}
>>>{{=post.**post}}
>>>{{=post.**created_on}}
>>>
>>> {{pass}}
>>>
>>> {{else:}}
>>>    >> src="{{=URL('static','images/**carousel/%s'
>>> %(post.image))}}" alt="banner2" />
>>> {{=post.title}}
>>>{{=post.**post}}
>>>{{=post.**created_on}}
>>>
>>> {{pass}}
>>> {{pass}}
>>>   
>>>   >> href="#carousel-example-**generic" data-slide="prev">‹
>>>   >> href="#carousel-example-**generic" data-slide="next">›
>>> 
>>> 
>>>
>>> What could it be?
>>>
>>> Quarta-feira, 7 de Agosto de 2013 20:56:17 UTC+1, Roberto Perdomo
>>> escreveu:
>>>>
>>>> you forgot the ":" on the else and pass on the if. index var not exist,
>>>> was my example, you need get the index of the iteration, may be with
>>>> news.index(post) or using enumerate. Try this two example:
>>>>
>>>> 
>>>>   
>>>> >>> data-slide-to="0" class="active">
>>>> >>> data-slide-to="1">
>>>> >>> data-slide-to="2">
>>>>   
>>>>   
>>>> {{for index, post in enumerate(news):}}
>>>> {{if index==0:}}
>>>>
>>>>{{=post.title}}
>>>>{{=post.**po**st}}
>>>>{{=post.**cre**ated_on}}
>>>>
>>>> {{pass}}
>>>> {{else:}}
>>>>>>> src="{{=URL('static','images/**c**arousel/%s'
>>>> %(post.image))}}" alt="banner2" />
>>>> {{pass}}
>>>> {{pass}}
>>>>   
>>>>   >>> href="#carousel-example-**generi**c" data-slide="prev">‹
>>>>   >>> href="#carousel-example-**generi**c" data-slide="next">›
>>>> 
>>>> 
>>>>
>>>> or:
>>>>
>>>> 
>>>>   
>>>> >>> data-slide-to="0" class="active">
>>>> >>> data-slide-to="1">
>>>> >>> data-slide-to="2">
>>>>   
>>>>   
>>>> {{for post in news:}}
>>>> {{if news.index(post)=

Re: [web2py] Bootstrap Carousel and bootstrap

2013-08-08 Thread Roberto Perdomo
Good news!

You really have three post?
Can you print the three posts in a .html without carousel?
You have checked the source of your index.html (in the browser) and search
the three div inside "carousel-inner"?


2013/8/8 Hugo Costa 

> Sorry about the delay.
>
> The first one works fine, but only works for the first and the second.
>
> The code I used is:
>
> *index.html*
> *
> *
> 
>   
>  class="active">
>  data-slide-to="1">
>  data-slide-to="2">
>   
>   
> {{for index, post in enumerate(news):}}
>
> {{if index==0:}}
>  src="{{=URL('static','images/carousel/%s' %(post.image))}}" alt="banner1"
> />
>{{=post.title}}
>{{=post.post}}
>{{=post.created_on}}
>
> {{pass}}
>
> {{else:}}
>  src="{{=URL('static','images/carousel/%s' %(post.image))}}" alt="banner2"
> />
> {{=post.title}}
>{{=post.post}}
>{{=post.created_on}}
>
> {{pass}}
> {{pass}}
>   
>href="#carousel-example-generic" data-slide="prev">‹
>href="#carousel-example-generic" data-slide="next">›
> 
> 
>
> What could it be?
>
> Quarta-feira, 7 de Agosto de 2013 20:56:17 UTC+1, Roberto Perdomo escreveu:
>>
>> you forgot the ":" on the else and pass on the if. index var not exist,
>> was my example, you need get the index of the iteration, may be with
>> news.index(post) or using enumerate. Try this two example:
>>
>> 
>>   
>> > class="active">
>> > data-slide-to="1">
>> > data-slide-to="2">
>>   
>>   
>> {{for index, post in enumerate(news):}}
>> {{if index==0:}}
>>> src="{{=URL('static','images/**carousel/%s'
>> %(post.image))}}" alt="banner1" />
>>{{=post.title}}
>>{{=post.**post}}
>>{{=post.**created_on}}
>>
>> {{pass}}
>> {{else:}}
>>> src="{{=URL('static','images/**carousel/%s'
>> %(post.image))}}" alt="banner2" />
>> {{pass}}
>> {{pass}}
>>   
>>   > href="#carousel-example-**generic" data-slide="prev">‹
>>   > href="#carousel-example-**generic" data-slide="next">›
>> 
>> 
>>
>> or:
>>
>> 
>>   
>> > class="active">
>> > data-slide-to="1">
>> > data-slide-to="2">
>>   
>>   
>> {{for post in news:}}
>> {{if news.index(post)==0:}}
>>> src="{{=URL('static','images/**carousel/%s'
>> %(post.image))}}" alt="banner1" />
>>{{=post.title}}
>>{{=post.**post}}
>>{{=post.**created_on}}
>>
>> {{pass}}
>> {{else:}}
>>> src="{{=URL('static','images/**carousel/%s'
>> %(post.image))}}" alt="banner2" />
>> {{pass}}
>> {{pass}}
>>   
>>   > href="#carousel-example-**generic" data-slide="prev">‹
>>   > href="#carousel-example-**generic" data-slide="next">›
>> 
>> 
>>
>> Is an example, this was not tested
>>
>>
>> 2013/8/7 Hugo Costa 
>>
>> Hey Roberto!
>>>
>>> So, I've used your code and this turned out:
>>>
>>> *index.html*
>>> *
>>> *
>>> 
>>>
>>>   
>>> >> data-slide-to="0" class="active">
>>> >> data-slide-to="1">
>>> >> data-slide-to="2">
>>>   
>>>   
>>> {{for post in news:}}
>>> {{if index==0:}}
>>>
>>>{{=post.title}}
>>>{{=post.**post}}
>>>{{=post.**created_on}}
>>>
&g

Re: [web2py] Bootstrap Carousel and bootstrap

2013-08-07 Thread Roberto Perdomo
you forgot the ":" on the else and pass on the if. index var not exist, was
my example, you need get the index of the iteration, may be with
news.index(post) or using enumerate. Try this two example:


  



  
  
{{for index, post in enumerate(news):}}
{{if index==0:}}
   
   {{=post.title}}
   {{=post.post}}
   {{=post.created_on}}
   
{{pass}}
{{else:}}
   
{{pass}}
{{pass}}
  
  ‹
  ›



or:


  



  
  
{{for post in news:}}
{{if news.index(post)==0:}}
   
   {{=post.title}}
   {{=post.post}}
   {{=post.created_on}}
   
{{pass}}
{{else:}}
   
{{pass}}
{{pass}}
  
  ‹
  ›



Is an example, this was not tested


2013/8/7 Hugo Costa 

> Hey Roberto!
>
> So, I've used your code and this turned out:
>
> *index.html*
> *
> *
> 
>
>   
>  class="active">
>  data-slide-to="1">
>  data-slide-to="2">
>   
>   
> {{for post in news:}}
> {{if index==0:}}
>  src="{{=URL('static','images/carousel/%s' %(post.image))}}" alt="banner1"
> />
>{{=post.title}}
>{{=post.post}}
>{{=post.created_on}}
>
> {{else}}
>  src="{{=URL('static','images/carousel/%s' %(post.image))}}" alt="banner2"
> />
> {{pass}}
> {{pass}}
>   
>href="#carousel-example-generic" data-slide="prev">‹
>    href="#carousel-example-generic" data-slide="next">›
> 
> 
>
>
> I don't understand why, but I'm getting this error:
>
>  invalid syntax (index.html, line 70)
>
> What could it be?
>
> Quarta-feira, 7 de Agosto de 2013 18:37:54 UTC+1, Roberto Perdomo escreveu:
>>
>> Hi Hugo, I dont know bootstrap carousel, but in the view you are iterating
>> many times the main div "carousel-example-generic".
>>
>> In your case you need iterate only the dinamic content of the carousel,
>> and the carousel content are divs.
>>
>> See this example with my comments:
>>
>> 
>>   
>>  
>> > class="active">
>> 
>> 
>>   
>>   
>>   
>> 
>> 
>> 
>> 
>> > />
>> 
>> 
>>   
>>   
>>   > data-slide="prev">‹
>>   > data-slide="next">›
>> 
>>
>> hope I've helped with this example.
>>
>>
>> 2013/8/7 Hugo Costa 
>>
>>> Hello!
>>>
>>> I'm doing a website where I have a carousel in which should be the 3
>>> latest news, going to search for Title, Content and Date to the database
>>> but isn't working like I wanted.
>>>
>>> The code:
>>>
>>> *default.py*
>>>
>>> def index():
>>> """
>>> example action using the internationalization operator T and flash
>>> rendered by views/default/index.html or views/generic.html
>>>
>>> if you need a simple wiki simple replace the two lines below with:
>>> return auth.wiki()
>>> """
>>> if auth.user:
>>> response.flash = T('Welcome %s %s' % (auth.user.first_name,
>>> auth.user.last_name))
>>> else:
>>> response.flash = T('Welcome Visitor')
>>> news = db(db.posts).select(orderby=~d**b.posts.id<http://db.posts.id>,
>>> limitby=(0, 3))
>>> return dict(news=news)
>>>
>>>  *index.html*
>>> *
>>> *
>>> {{for post in news:}}
>>> 
>>> 
>>> >> data-slide-to="0" class="">
>>> >> data-slide-to="1" class="">
>>> >> data-slide-to="2" class="">
>>> 
>>>
>>> 
>>>   
>>> >> alt="900x500" src="http://payload.**cargocollective.com/1/0/221/**
>>> 2318/08-Poster-2_900.jpg<http://payload.cargocollective.com/1/0/221/2318/08-Poster

Re: [web2py] Bootstrap Carousel and bootstrap

2013-08-07 Thread Roberto Perdomo
Hi Hugo, I dont know bootstrap carousel, but in the view you are iterating
many times the main div "carousel-example-generic".

In your case you need iterate only the dinamic content of the carousel, and
the carousel content are divs.

See this example with my comments:


  
 



  
  
  







  
  
  ‹
  ›


hope I've helped with this example.


2013/8/7 Hugo Costa 

> Hello!
>
> I'm doing a website where I have a carousel in which should be the 3
> latest news, going to search for Title, Content and Date to the database
> but isn't working like I wanted.
>
> The code:
>
> *default.py*
>
> def index():
> """
> example action using the internationalization operator T and flash
> rendered by views/default/index.html or views/generic.html
>
> if you need a simple wiki simple replace the two lines below with:
> return auth.wiki()
> """
> if auth.user:
> response.flash = T('Welcome %s %s' % (auth.user.first_name,
> auth.user.last_name))
> else:
> response.flash = T('Welcome Visitor')
> news = db(db.posts).select(orderby=~db.posts.id, limitby=(0, 3))
> return dict(news=news)
>
>  *index.html*
> *
> *
> {{for post in news:}}
> 
> 
>  class="">
>  class="">
>  class="">
> 
>
> 
>   
>  src="http://payload.cargocollective.com/1/0/221/2318/08-Poster-2_900.jpg";>
> 
>   {{=post.title}}
>   {{=XML(markdown(post.post))}}
>   {{=post.created_on}}
> 
>   
>
> 
>
>   
>data-slide="prev">
> 
>   
>data-slide="next">
> 
>   
> 
> {{pass}}
>
> If you guys could give me a hand on this I'd apreciate it :)
>
> Thanks,
>
> Hugo
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

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




Re: [web2py] Re: Scheduler period

2013-08-03 Thread Roberto Perdomo
:-D Thanks Niphold, using repeats = 2 and no stop_time is the best
solution. I did not realize that I could do it that way.

Thanks again.

Best regards.


2013/8/3 Niphlod 

> ok, explanation is clearer. Although scheduler was not meant to be
> executing task on a precise-timing (its a queue processor, not cron), but
> instead it executes the tasks that are available, all that is needed is for
> you to understand how it works.
>
> It's not as precise as cron, because scheduler polls every x seconds the
> scheduler_task table to see if there is anything to do, and then spawns a
> process to execute the task.
> If you need your mails to start exactly at 12:00:00 and at 14:00:00, I'm
> assuming you understood how to make it work in the wrong way.
>
> Scheduling a start_time of 12:00:00 and a stop_time of 14:00:00 assures
> you that no tasks will be picked before 12:00:00 and later than 14:00:00.
> If you need that task to fire two times only, then setting a period of 4
> hours will never get you 2 executions, because if the first task is picked
> around 12:00:00 it will be "rescheduled" for execution 4 hours later, at
> 16:00:00. The point is, you set the task to never execute past 14:00:00, so
> the second execution will never take place at 16:00:00.
>
> Be careful though: the scheduler can "spend" some seconds of "sleep"
> before picking the tasks, so calculating those times so precisely can get
> you in the situation where you set 12:00:00 as start_time, 14:00:00 at
> stop_time and 7200 as period, but never get to the second execution.
>
> That's because scheduler uses the time the task was picked up (that may
> very well be 12:00:05) to calculate the next time a task will be
> effectively be able to be picked up, and in that case, it will be 14:00:05.
>
> If so, you have a few choices (based on your loads - meaning how many
> concurrent task you may have at 12:00:00), the simplest of them all (given
> your current mindset) is to set stop_time at 14:01:00 instead of 14:00:00,
> assuming you can "forgive" that one minute ahead.
>
> But, if I understood your requirements, why don't you just use repeats=2,
> start_time=12:00:00, period=7200 and no stop_time at all ?
> This will guarantee that the first execution will take place after
> 12:00:00 (again, assuming a normal load, it could be picked up a few
> seconds later, e.g. 12:00:15) and the second one at , e.g., 14:00:15 , and
> then the task will result as COMPLETED after exactly 2 executions.
>
>
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

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




Re: [web2py] Re: Scheduler period

2013-08-03 Thread Roberto Perdomo
Ummm, may be my poor english :-(

Let me explain with an example:

I need a task to be executed multiple times, only two times (in other case
more times in periods of 48 hours), this task send a notification by email.

The times are:

start_time = 2013-08-02 12:00:00 (n_hours here are 2 hours before stop_time)
next_run_time = 2013-08-02 14:00:00
stop_time = 2013-08-02 14:00:00
period = 14400 (4 hours in seconds)

The problem is presented in the first run, here, web2py set the
next_run_time, and the fields change to:

start_time = 2013-08-02 12:00:00
next_run_time = 2013-08-02 14:00:08 <- here i need  "2013-08-02 14:00:00"
stop_time = 2013-08-02 14:00:00

At this point, the task has changed the status to expired. The question is,
how I can make the next_run_date not change, or change just the value I need
(the value of the field stop_time).

A solution could be to create multiple tasks, in this case would be two
tasks, but there are situations where I need the job to run several days in
advance in periods of 48 hours and have many tasks to a single action does
not seem very logical and orderly.

Thanks again.


2013/8/3 Niphlod 

> ehm what ? I didn't understand completely what you need and what
> you're tryning to achieve, however, if you set a period, your task needs to
> be executed multiple times...  is that the case ?
> Why do you need to set such a high period (assuming it's indeed derived
> from hours) ?
>
>
> On Saturday, August 3, 2013 7:21:23 AM UTC+2, Roberto Perdomo wrote:
>>
>> Hi,
>>
>> I have a little question:
>>
>> Exists a way to disable the period of a scheduler_task row?
>>
>> I have to do a task  in a stop_time - n_hours and stop_time, I have set
>> the period to n_hours (in seconds), but in the first run the next_run_time
>> field is set to stop_time + few seconds and this are over than stop_time,
>> this cause the status expired of my scheduler_task row.
>>
>> Thanks in advance.
>>
>>
>>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

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




[web2py] Scheduler period

2013-08-02 Thread Roberto Perdomo
Hi,

I have a little question:

Exists a way to disable the period of a scheduler_task row?

I have to do a task  in a stop_time - n_hours and stop_time, I have set the
period to n_hours (in seconds), but in the first run the next_run_time
field is set to stop_time + few seconds and this are over than stop_time,
this cause the status expired of my scheduler_task row.

Thanks in advance.

-- 

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




Re: [web2py] SQLFORM.grid icons

2013-05-13 Thread Roberto Perdomo
If you like change the icons I recomend rewrite the links with the links
parameter of the grid, something like:

links = [lambda row: A(TAG[''](SPAN(_class="icon icon-list"),SPAN('List',
_class="buttontext button", _title="list")), _class="w2p_trap button btn",
_href=URL('see_list', args=[row.id])),
 lambda row: A(TAG[''](SPAN(_class="icon
icon-user"),SPAN('Users', _class="buttontext button", _title="CC a")),
_class="w2p_trap button btn", _href=URL('users', args=[row.id]))]
grid = SQLFORM.grid(query, fields = fields,deletable=deletable,
editable=editable, details = details,create=create, csv=False, orderby =
orderby, links = links)

See that _class="icon icon-list" set the icon of the button. You can get
the entire list from the css file bootstrap.min.css inside static -> css ->
folder from your applications

-- 

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




Re: [web2py] SQLFORM.grid icons

2013-05-13 Thread Roberto Perdomo
2013/5/12 Ovidio Marinho 

> How to replace icons link inside the sqlform.grid???
>
>
>
>  Ovidio Marinho Falcao Neto
>  Web Developer
>  ovidio...@gmail.com
>83   8826 9088 - Oi
>83   9336 3782 - Claro
> Brasil
>
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

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




Re: [web2py] code generation in web2py like cake bake in cakephp

2013-05-05 Thread Roberto Perdomo
Web2py does not have a console for scaffolding like cake bake.

I think a CLI like cake bake or Spring Roo would be an interesting proposal
for Web2py
 El may 5, 2013 9:00 AM, "黄祥"  escribió:

> hi folks,
>
> is web2py support for code generation in web2py like cake bake in cakephp?
> if support did anyone know how to do it?
>
> thanks and best regards
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

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




Re: [web2py] Re: Why compute does not work to get image filename?

2013-03-27 Thread Roberto Perdomo
Sorry, the function must be return a string in order to concatenate with
the  filename
El mar 27, 2013 4:59 PM, "Roberto Perdomo"  escribió:

> And what about something like this:
>
> Field('image_filename', readable=False, writable=False, compute = lambda
> row: request.post_vars.image.filename + next_id())
>
> def next_id():
> last_row = db().select(db.table.id).last()
> last_id = int(last_row[`table.id`])
> return last_id + 1
>
> This was written from my cel phone and dont test it but  hope that helps
> ;-)
>  El mar 27, 2013 3:25 PM, "Roberto Perdomo" 
> escribió:
>
>> :-S
>> I was thinking on represent attribute from fields, not compute.
>> El mar 27, 2013 3:07 PM, "Niphlod"  escribió:
>>
>>> boys . how can the id be present if what you're trying to insert is
>>> not yet a row in a table 
>>>
>>> On Wednesday, March 27, 2013 8:18:38 PM UTC+1, Roberto Perdomo wrote:
>>>>
>>>> Ummm, the id is readable?
>>>>
>>>> db.table.id.readable = True
>>>> El mar 27, 2013 12:55 PM, "Tito Garrido"  escribió:
>>>>
>>>>> I just checked... id is not present:
>>>>> ">>>> b2754a53c6cdcc7e.**69626d2d4c6f676f2e6a7067.jpg', 'novela': '9',
>>>>> 'slug': '', 'descricao': ''}>"
>>>>>
>>>>>
>>>>> On Wed, Mar 27, 2013 at 2:24 PM, Roberto Perdomo 
>>>>> wrote:
>>>>>
>>>>>> Try:
>>>>>>
>>>>>> Field('image_filename', readable=False, writable=False, compute =
>>>>>> lambda row: request.post_vars.image.**filename + row.id),
>>>>>> El mar 27, 2013 12:39 PM, "Tito Garrido" 
>>>>>> escribió:
>>>>>>
>>>>>> How could I also append the id of the row in image_filename?
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>> Tito
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Mar 25, 2013 at 4:58 PM, Tito Garrido wrote:
>>>>>>>
>>>>>>>> Worked! It should go to the book :) http://web2py.com/books/**
>>>>>>>> default/chapter/29/07#Storing-**the-original-filename<http://web2py.com/books/default/chapter/29/07#Storing-the-original-filename>
>>>>>>>>
>>>>>>>> Thanks!
>>>>>>>>
>>>>>>>> Tito
>>>>>>>>
>>>>>>>>
>>>>>>>> On Mon, Mar 25, 2013 at 4:53 PM, Massimo Di Pierro <
>>>>>>>> massimo@gmail.com> wrote:
>>>>>>>>
>>>>>>>>> You can use this:
>>>>>>>>>  Field('image_filename', readable=False, writable=False, compute =
>>>>>>>>> lambda row: request.post_vars.image.**filename),
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On Monday, 25 March 2013 13:28:19 UTC-5, Tito Garrido wrote:
>>>>>>>>>>
>>>>>>>>>> Hi!
>>>>>>>>>>
>>>>>>>>>> Why this does not work:
>>>>>>>>>> Field('image', 'upload', requires=IS_NOT_EMPTY(),
>>>>>>>>>> uploadseparate=True, autodelete=True,),
>>>>>>>>>> Field('image_filename', readable=False, writable=False,
>>>>>>>>>> compute = lambda row: row.image.filename),
>>>>>>>>>>
>>>>>>>>>> Using a form I can follow the book and fill the image filename:
>>>>>>>>>> if request.vars.image!=None:
>>>>>>>>>> try:
>>>>>>>>>> form.vars.image_filename = request.vars.image.filename
>>>>>>>>>> except:
>>>>>>>>>> form.vars.image_filename = request.vars.image
>>>>>>>>>>
>>>>>>>>>> How can I do the same using SQLFORM.grid?
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>>
>>>>>>>>

Re: [web2py] Re: Why compute does not work to get image filename?

2013-03-27 Thread Roberto Perdomo
And what about something like this:

Field('image_filename', readable=False, writable=False, compute = lambda
row: request.post_vars.image.filename + next_id())

def next_id():
last_row = db().select(db.table.id).last()
last_id = int(last_row[`table.id`])
return last_id + 1

This was written from my cel phone and dont test it but  hope that helps ;-)
 El mar 27, 2013 3:25 PM, "Roberto Perdomo"  escribió:

> :-S
> I was thinking on represent attribute from fields, not compute.
> El mar 27, 2013 3:07 PM, "Niphlod"  escribió:
>
>> boys . how can the id be present if what you're trying to insert is
>> not yet a row in a table 
>>
>> On Wednesday, March 27, 2013 8:18:38 PM UTC+1, Roberto Perdomo wrote:
>>>
>>> Ummm, the id is readable?
>>>
>>> db.table.id.readable = True
>>> El mar 27, 2013 12:55 PM, "Tito Garrido"  escribió:
>>>
>>>> I just checked... id is not present:
>>>> ">>> b2754a53c6cdcc7e.**69626d2d4c6f676f2e6a7067.jpg', 'novela': '9',
>>>> 'slug': '', 'descricao': ''}>"
>>>>
>>>>
>>>> On Wed, Mar 27, 2013 at 2:24 PM, Roberto Perdomo wrote:
>>>>
>>>>> Try:
>>>>>
>>>>> Field('image_filename', readable=False, writable=False, compute =
>>>>> lambda row: request.post_vars.image.**filename + row.id),
>>>>> El mar 27, 2013 12:39 PM, "Tito Garrido" 
>>>>> escribió:
>>>>>
>>>>> How could I also append the id of the row in image_filename?
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> Tito
>>>>>>
>>>>>>
>>>>>> On Mon, Mar 25, 2013 at 4:58 PM, Tito Garrido wrote:
>>>>>>
>>>>>>> Worked! It should go to the book :) http://web2py.com/books/**
>>>>>>> default/chapter/29/07#Storing-**the-original-filename<http://web2py.com/books/default/chapter/29/07#Storing-the-original-filename>
>>>>>>>
>>>>>>> Thanks!
>>>>>>>
>>>>>>> Tito
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Mar 25, 2013 at 4:53 PM, Massimo Di Pierro <
>>>>>>> massimo@gmail.com> wrote:
>>>>>>>
>>>>>>>> You can use this:
>>>>>>>>  Field('image_filename', readable=False, writable=False, compute =
>>>>>>>> lambda row: request.post_vars.image.**filename),
>>>>>>>>
>>>>>>>>
>>>>>>>> On Monday, 25 March 2013 13:28:19 UTC-5, Tito Garrido wrote:
>>>>>>>>>
>>>>>>>>> Hi!
>>>>>>>>>
>>>>>>>>> Why this does not work:
>>>>>>>>> Field('image', 'upload', requires=IS_NOT_EMPTY(),
>>>>>>>>> uploadseparate=True, autodelete=True,),
>>>>>>>>> Field('image_filename', readable=False, writable=False,
>>>>>>>>> compute = lambda row: row.image.filename),
>>>>>>>>>
>>>>>>>>> Using a form I can follow the book and fill the image filename:
>>>>>>>>> if request.vars.image!=None:
>>>>>>>>> try:
>>>>>>>>> form.vars.image_filename = request.vars.image.filename
>>>>>>>>> except:
>>>>>>>>> form.vars.image_filename = request.vars.image
>>>>>>>>>
>>>>>>>>> How can I do the same using SQLFORM.grid?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> Tito
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> Linux User #387870
>>>>>>>>> .
>>>>>>>>>  _/_õ|__|
>>>>>>>>> ..º[ .-.___.-._| . . . .
>>>>>>>>> .__( o)__( o).:___
>>>>>>>>>
>>>>>>>>  --
>>>>>>>>
>>>>>>>> 

Re: [web2py] Re: Why compute does not work to get image filename?

2013-03-27 Thread Roberto Perdomo
:-S
I was thinking on represent attribute from fields, not compute.
El mar 27, 2013 3:07 PM, "Niphlod"  escribió:

> boys . how can the id be present if what you're trying to insert is
> not yet a row in a table 
>
> On Wednesday, March 27, 2013 8:18:38 PM UTC+1, Roberto Perdomo wrote:
>>
>> Ummm, the id is readable?
>>
>> db.table.id.readable = True
>> El mar 27, 2013 12:55 PM, "Tito Garrido"  escribió:
>>
>>> I just checked... id is not present:
>>> ">> b2754a53c6cdcc7e.**69626d2d4c6f676f2e6a7067.jpg', 'novela': '9',
>>> 'slug': '', 'descricao': ''}>"
>>>
>>>
>>> On Wed, Mar 27, 2013 at 2:24 PM, Roberto Perdomo wrote:
>>>
>>>> Try:
>>>>
>>>> Field('image_filename', readable=False, writable=False, compute =
>>>> lambda row: request.post_vars.image.**filename + row.id),
>>>> El mar 27, 2013 12:39 PM, "Tito Garrido"  escribió:
>>>>
>>>> How could I also append the id of the row in image_filename?
>>>>>
>>>>> Thanks!
>>>>>
>>>>> Tito
>>>>>
>>>>>
>>>>> On Mon, Mar 25, 2013 at 4:58 PM, Tito Garrido wrote:
>>>>>
>>>>>> Worked! It should go to the book :) http://web2py.com/books/**
>>>>>> default/chapter/29/07#Storing-**the-original-filename<http://web2py.com/books/default/chapter/29/07#Storing-the-original-filename>
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> Tito
>>>>>>
>>>>>>
>>>>>> On Mon, Mar 25, 2013 at 4:53 PM, Massimo Di Pierro <
>>>>>> massimo@gmail.com> wrote:
>>>>>>
>>>>>>> You can use this:
>>>>>>>  Field('image_filename', readable=False, writable=False, compute =
>>>>>>> lambda row: request.post_vars.image.**filename),
>>>>>>>
>>>>>>>
>>>>>>> On Monday, 25 March 2013 13:28:19 UTC-5, Tito Garrido wrote:
>>>>>>>>
>>>>>>>> Hi!
>>>>>>>>
>>>>>>>> Why this does not work:
>>>>>>>> Field('image', 'upload', requires=IS_NOT_EMPTY(),
>>>>>>>> uploadseparate=True, autodelete=True,),
>>>>>>>> Field('image_filename', readable=False, writable=False, compute
>>>>>>>> = lambda row: row.image.filename),
>>>>>>>>
>>>>>>>> Using a form I can follow the book and fill the image filename:
>>>>>>>> if request.vars.image!=None:
>>>>>>>> try:
>>>>>>>> form.vars.image_filename = request.vars.image.filename
>>>>>>>> except:
>>>>>>>> form.vars.image_filename = request.vars.image
>>>>>>>>
>>>>>>>> How can I do the same using SQLFORM.grid?
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Tito
>>>>>>>>
>>>>>>>> --
>>>>>>>>
>>>>>>>> Linux User #387870
>>>>>>>> .
>>>>>>>>  _/_õ|__|
>>>>>>>> ..º[ .-.___.-._| . . . .
>>>>>>>> .__( o)__( o).:___
>>>>>>>>
>>>>>>>  --
>>>>>>>
>>>>>>> ---
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "web2py-users" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to web2py+un...@**googlegroups.com.
>>>>>>> For more options, visit 
>>>>>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>>>>>> .
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Linux User #387870
>>&g

Re: [web2py] Re: Why compute does not work to get image filename?

2013-03-27 Thread Roberto Perdomo
Ummm, the id is readable?

db.table.id.readable = True
El mar 27, 2013 12:55 PM, "Tito Garrido"  escribió:

> I just checked... id is not present:
> " 'personagem.image.b2754a53c6cdcc7e.69626d2d4c6f676f2e6a7067.jpg', 'novela':
> '9', 'slug': '', 'descricao': ''}>"
>
>
> On Wed, Mar 27, 2013 at 2:24 PM, Roberto Perdomo wrote:
>
>> Try:
>>
>> Field('image_filename', readable=False, writable=False, compute = lambda
>> row: request.post_vars.image.filename + row.id),
>> El mar 27, 2013 12:39 PM, "Tito Garrido" 
>> escribió:
>>
>> How could I also append the id of the row in image_filename?
>>>
>>> Thanks!
>>>
>>> Tito
>>>
>>>
>>> On Mon, Mar 25, 2013 at 4:58 PM, Tito Garrido wrote:
>>>
>>>> Worked! It should go to the book :)
>>>> http://web2py.com/books/default/chapter/29/07#Storing-the-original-filename
>>>>
>>>> Thanks!
>>>>
>>>> Tito
>>>>
>>>>
>>>> On Mon, Mar 25, 2013 at 4:53 PM, Massimo Di Pierro <
>>>> massimo.dipie...@gmail.com> wrote:
>>>>
>>>>> You can use this:
>>>>>  Field('image_filename', readable=False, writable=False, compute =
>>>>> lambda row: request.post_vars.image.filename),
>>>>>
>>>>>
>>>>> On Monday, 25 March 2013 13:28:19 UTC-5, Tito Garrido wrote:
>>>>>>
>>>>>> Hi!
>>>>>>
>>>>>> Why this does not work:
>>>>>> Field('image', 'upload', requires=IS_NOT_EMPTY(),
>>>>>> uploadseparate=True, autodelete=True,),
>>>>>> Field('image_filename', readable=False, writable=False, compute =
>>>>>> lambda row: row.image.filename),
>>>>>>
>>>>>> Using a form I can follow the book and fill the image filename:
>>>>>> if request.vars.image!=None:
>>>>>> try:
>>>>>> form.vars.image_filename = request.vars.image.filename
>>>>>> except:
>>>>>> form.vars.image_filename = request.vars.image
>>>>>>
>>>>>> How can I do the same using SQLFORM.grid?
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Tito
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Linux User #387870
>>>>>> .
>>>>>>  _/_õ|__|
>>>>>> ..º[ .-.___.-._| . . . .
>>>>>> .__( o)__( o).:___
>>>>>>
>>>>>  --
>>>>>
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "web2py-users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to web2py+unsubscr...@googlegroups.com.
>>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Linux User #387870
>>>> .
>>>>  _/_õ|__|
>>>> ..º[ .-.___.-._| . . . .
>>>> .__( o)__( o).:___
>>>>
>>>
>>>
>>>
>>> --
>>>
>>> Linux User #387870
>>> .
>>>  _/_õ|__|
>>> ..º[ .-.___.-._| . . . .
>>> .__( o)__( o).:___
>>>
>>> --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>  --
>>
>> ---
>> 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).:___
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

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




Re: [web2py] Re: Why compute does not work to get image filename?

2013-03-27 Thread Roberto Perdomo
Try:

Field('image_filename', readable=False, writable=False, compute = lambda
row: request.post_vars.image.filename + row.id),
El mar 27, 2013 12:39 PM, "Tito Garrido"  escribió:

> How could I also append the id of the row in image_filename?
>
> Thanks!
>
> Tito
>
>
> On Mon, Mar 25, 2013 at 4:58 PM, Tito Garrido wrote:
>
>> Worked! It should go to the book :)
>> http://web2py.com/books/default/chapter/29/07#Storing-the-original-filename
>>
>> Thanks!
>>
>> Tito
>>
>>
>> On Mon, Mar 25, 2013 at 4:53 PM, Massimo Di Pierro <
>> massimo.dipie...@gmail.com> wrote:
>>
>>> You can use this:
>>>  Field('image_filename', readable=False, writable=False, compute =
>>> lambda row: request.post_vars.image.filename),
>>>
>>>
>>> On Monday, 25 March 2013 13:28:19 UTC-5, Tito Garrido wrote:

 Hi!

 Why this does not work:
 Field('image', 'upload', requires=IS_NOT_EMPTY(), uploadseparate=True,
 autodelete=True,),
 Field('image_filename', readable=False, writable=False, compute =
 lambda row: row.image.filename),

 Using a form I can follow the book and fill the image filename:
 if request.vars.image!=None:
 try:
 form.vars.image_filename = request.vars.image.filename
 except:
 form.vars.image_filename = request.vars.image

 How can I do the same using SQLFORM.grid?

 Regards,

 Tito

 --

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

>>>  --
>>>
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to web2py+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>
>>
>> --
>>
>> Linux User #387870
>> .
>>  _/_õ|__|
>> ..º[ .-.___.-._| . . . .
>> .__( o)__( o).:___
>>
>
>
>
> --
>
> Linux User #387870
> .
>  _/_õ|__|
> ..º[ .-.___.-._| . . . .
> .__( o)__( o).:___
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

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




Re: [web2py] Re: REF: Change order of fields in a form??!

2013-01-04 Thread Roberto Perdomo
try changing font-style in web2py.css
from web2py/applications/admin/static/codemirror/theme.

Something like:

.cm-s-web2py {
  line-height: 1.40em;
  font-family: "sans-serif"; /* set your font style here */
}


2013/1/5 Teddy Nyambe 

> Thanks, what about the ide font in web2py how do u change it?
> On Jan 5, 2013 6:46 AM, "Christian Espinoza"  wrote:
>
>> Is easy use a custom form instead of {{=form}}, then you can control
>> where put your input fields...
>>
>> {{=form.custom.begin}}
>> Image name: {{=form.custom.widget.name}}
>> Image file: {{=form.custom.widget.file}}
>> Click here to upload: {{=form.custom.submit}}
>> {{=form.custom.end}}
>>
>> Reference:
>> http://web2py.com/books/default/chapter/29/07#Custom-forms
>> Christian.
>>
>>
>>
>> El viernes, 4 de enero de 2013 04:22:51 UTC-3, software.ted escribió:
>>>
>>> How do you change the order of the form after it has been created using:
>>>
>>> form = SQLFORM(db.table)
>>>
>>> Also how do you change the font of the web2py editor???
>>>
>>> --
>>> ..**..**
>>> ...
>>> Teddy Lubasi Nyambe
>>> Opensource Zambia
>>> Lusaka, ZAMBIA
>>>
>>> Cell: +260 97 7760473
>>> website: http://www.opensource.org.zm
>>>
>>> ~/
>>> Human Knowledge belongs to the world! - AntiTrust
>>>
>>> Man is a tool-using animal. Without tools he is nothing, with tools he
>>> is all - Thomas Carlyle 1795-1881
>>>
>>> /~
>>>
>>  --
>>
>>
>>
>>
>  --
>
>
>
>

-- 





Re: [web2py] Update codemirror to V3 on admin

2013-01-03 Thread Roberto Perdomo
Is a good idea, i see that Mariano edited the file ajax_editor.js, is a
great idea integrate this to mi changes.

Mariano, I open a ticket:
http://code.google.com/p/web2py/issues/detail?id=1256

I fix the highlight, the search, replace and matchbrackets.


2013/1/3 Massimo Di Pierro 

> I'd be happy to incude this when the debugger issue is fixed. Can you and
> Mariano work together to fix this problem?
>
> On Thursday, 3 January 2013 19:01:48 UTC-6, Roberto Perdomo wrote:
>>
>> 2013/1/3 Mariano Reingart 
>>
>> On Thu, Jan 3, 2013 at 5:54 AM, Roberto Perdomo 
>>> wrote:
>>> > Hi,
>>> >
>>> > I have changed the edit.html from admin to get work codemirror 3.
>>> >
>>> > In some changes, I include closetag.js to autocomplete html tags and
>>> works
>>> > fine.
>>> >
>>> > Please check if all works fine and consider the update.
>>> >
>>> > PS: the zip contains the new codemirror (need some clean files)
>>> >
>>>
>>> Please post this on web2py-developers (or even better, open a ticket
>>> in the bug tracker):
>>>
>>> https://groups.google.com/**forum/?fromgroups#!forum/**web2py-developers<https://groups.google.com/forum/?fromgroups#!forum/web2py-developers>
>>>
>>> Ready, thanks.
>>
>>
>>> Did you check the toggle breakpoint (debugger) functionality?
>>> (either using the button or also clicking over the line number)
>>> it uses gutter marker API that has changed between versions.
>>>
>>> Yes, and doenst work, make the page dont load anymore (need restart
>> web2py
>> )
>>
>>> Line highlight (i.e. saving a file on syntax errors) also seems not
>>> working properly (it selects from the offending line to the end of the
>>> 5file...).
>>
>> ummm, yes you are correct, I not see that.
>>
>>>
>>
>> I've experienced some other CodeMirror bugs (like not repainting when
>>> scrolling with the mouse wheel), but those are less reproduce-able.
>>>
>>> Best regards,
>>>
>>>
>>> Mariano Reingart
>>> http://www.sistemasagiles.com.**ar <http://www.sistemasagiles.com.ar>
>>> http://reingart.blogspot.com
>>>
>>> --
>>>
>>>
>>>
>>>
>>  --
>
>
>
>

-- 





Re: [web2py] Update codemirror to V3 on admin

2013-01-03 Thread Roberto Perdomo
2013/1/3 Mariano Reingart 

> On Thu, Jan 3, 2013 at 5:54 AM, Roberto Perdomo 
> wrote:
> > Hi,
> >
> > I have changed the edit.html from admin to get work codemirror 3.
> >
> > In some changes, I include closetag.js to autocomplete html tags and
> works
> > fine.
> >
> > Please check if all works fine and consider the update.
> >
> > PS: the zip contains the new codemirror (need some clean files)
> >
>
> Please post this on web2py-developers (or even better, open a ticket
> in the bug tracker):
>
> https://groups.google.com/forum/?fromgroups#!forum/web2py-developers
>
> Ready, thanks.


> Did you check the toggle breakpoint (debugger) functionality?
> (either using the button or also clicking over the line number)
> it uses gutter marker API that has changed between versions.
>
> Yes, and doenst work, make the page dont load anymore (need restart web2py
)

> Line highlight (i.e. saving a file on syntax errors) also seems not
> working properly (it selects from the offending line to the end of the
> 5file...).

ummm, yes you are correct, I not see that.

>

I've experienced some other CodeMirror bugs (like not repainting when
> scrolling with the mouse wheel), but those are less reproduce-able.
>
> Best regards,
>
>
> Mariano Reingart
> http://www.sistemasagiles.com.ar
> http://reingart.blogspot.com
>
> --
>
>
>
>

-- 





Re: [web2py] Re: Form Vars and request Vars

2012-12-31 Thread Roberto Perdomo
The problem is that Lanier_report don't have request.vars when is
redirected.

Try putting something like:

redirect(URL('Labor_report', args=[form.vars.startDt, form.cars.endDT]))
El 31/12/2012 20:21, "Paul Rykiel"  escribió:

>
> On Monday, December 31, 2012 6:29:33 PM UTC-6, Paul Rykiel wrote:
>>
>> hello,
>>
>> I have two form vars
>>
>> 1) startDt (defined as _class="date"
>> 2) endDt (defined as _class="date"
>>
>> if form.accepts(request,session)
>>redirect (URL('Labor_report'))
>>
>> def Labor_report():
>>   strDT = request.vars(0)
>>   endDT = request.vars(1)
>>
>> My issue is strDT and endDT are both NONE...
>> I cannot use strDT or endDT in my query since it is not passing the value
>>
>> any advice would be appreciated.
>>
>> The form works great with "Date picker"
>>
>> Now, I want to use these two variables in a query and I am using
>> request.vars
>>
>>
>>
>  --
>
>
>
>

-- 





Re: [web2py] book 5th ed. Need help

2012-12-27 Thread Roberto Perdomo
I can help with that. Tonight beginning, and I send you some example.

PS: No need to pay me for it.

Regards.


2012/12/27 Massimo Di Pierro 

> I need help to redo all screenshots in the book using the latest web2py.
>
> I am looking for a few volunteers. Almost all of the screenshots are in
> chapter 3, 7, and 9.
>
> They should be done using Chrome without toolbars.
> Here are current screenshots:
>
> https://github.com/mdipierro/web2py-book/tree/master/sources/29-web2py-english/images
> The new screenshots should have the same name and format.
>
> If one of you wants to them all and can do in 3 days, send me an example
> of a couple of screenshots privately (to make sure they look good) and I
> will pay you $150 for all of them.
>
>  --
>
>
>
>

-- 





Re: [web2py] General iframes question

2012-12-24 Thread Roberto Perdomo
I work with iframes loading form generated by web2py controllers and all
works without problems, only session.flash does not show because I remove
the include of layout.html but for me is not a problem.
El 24/12/2012 16:58, "jarrodwilcox"  escribió:

> Is anyone using iframes to bring in own website content to a view?  Web2py
> finds the pages fine through the URL facility, but does not seem to process
> them after that.
>
> Apologies for duplicate question.  Not sure if first one posted correctly.
>
> --
>
>
>
>

-- 





Re: [web2py] help with finding syntax error in nested if loop in view

2012-12-24 Thread Roberto Perdomo
Why not try this:






-- 





Re: [web2py] Merry Christmas everybody!

2012-12-24 Thread Roberto Perdomo
Thanks Massimo for your good wishes.

May this and all your days are filled with health and wellness and enjoy it
in the company of their loved ones.

A big hug to everybody.
El 24/12/2012 13:52, "Massimo Di Pierro" 
escribió:

Merry Christmas everybody!

--

-- 





Re: [web2py] Re: Smartgrid searching a referenced column

2012-12-05 Thread Roberto Perdomo
Sorry, the conversation is here:

https://groups.google.com/forum/?fromgroups=#!searchin/web2py/reference$20web2py$20smartgrid/web2py/xN0813r58Nc/aSGonwPH580J

and the patch:

https://gist.github.com/ff543a5c6d3bc14b9079

2012/12/5 Massimo Di Pierro 

> I do not recall what this is about and the link is broken? Where is this
> pending patch?

-- 





Re: [web2py] Re: Smartgrid searching a referenced column

2012-12-04 Thread Roberto Perdomo
The solution to this problem was resolved by Mike Leone and wait for the
approval of Massimo.

Conversation can be found here:

https://groups.google.com/forum/?fromgroups=#!topic/web2py/xN0813r58N

May soon be included in Web2py.


2012/12/4 Derek 

> I did a search on this error message and everything I saw said that there
> is some invalid data in the database (ie - the data doesn't match the
> schema).
>
>
> On Tuesday, December 4, 2012 6:34:00 AM UTC-7, Rakesh Singh wrote:
>>
>> Hi,
>>
>> I am having an issue querying a referenced column using the smartgrid
>> search widget.
>>
>> Let's say I have a table defined as follows:
>>
>> db.define_table('countries',
>> Field('country_name', 'string', unique=True, required=True),
>> format='%(country_name)s')
>>
>> Data
>> 1  Austria
>> 2  Brazil
>> 5  China etc.
>>
>> The second table is as follows:
>>
>> db.define_table('users',
>> Field('user_name', 'string'),
>> Field('country', db.countries))
>>
>> db.users.country.writeable = False
>>
>>
>> The controller is as follows:
>>
>> def user_list():
>> grid = SQLFORM.smartgrid(db.users, linked_tables=['db.countries']
>> **)
>> return dict(grid=grid)
>>
>>
>> Using the grid search function, click on the Search field, and select
>> Country from the drop down field.
>> Choose = 'China' and Add.
>> This will result in an error. You would have to search for the numeric
>> ID, 5 in this case.
>> (Incidentally, the same will occur if you choose ID form the dropdown,
>> but search for a string instead of a numeric')
>>  invalid literal for int() with base 10:
>> 'BOT' So the question is :
>> - As in the example, what is the correct way to search for all users from
>> China?
>> - Any way to prevent an error if a user enters a string where a numeric
>> is expected in the search?
>>
>> NB. I typed in the above code directly into the email, so there may be
>> typos.
>>
>> Thanks a lot.
>>
>> Regards,
>>
>> Rakesh
>>
>>
>>
>>  --
>
>
>
>

-- 





Re: [web2py] Problem with fresh install of web2py on Linux

2012-11-14 Thread Roberto Perdomo
El 14/11/2012 07:44, "gabriele dantona"  escribió:
>
> Hello,

Hi,

> I've installed web2py on Linux Redhat 64bit with Python 2.7.3.
>
> After starting the server, the first request fails with this stack trace.
Anyone can help please?
> Thanks
>
> friol@test:~/web2py> python web2py.py --ip 192.168.168.131
> web2py Web Framework
> Created by Massimo Di Pierro, Copyright 2007-2012
> Version 2.2.1 (2012-10-21 16:57:04) stable
> Database drivers available: MySQL(pymysql), PostgreSQL(pg8000),
IMAP(imaplib)

What database are you using? May be using Sqlite, and this not appear on
this list, install it first.

Show us your model.

> WARNING:web2py:GUI not available because Tk library is not installed
> choose a password:
> please visit:
> http://192.168.168.131:8000
> use "kill -SIGTERM 4341" to shutdown the web2py server
> DEBUG: connect attempt 0, connection error:
> Traceback (most recent call last):
>   File "/home/aomoper/web2py/gluon/dal.py", line 6755, in __init__
> self._adapter = ADAPTERS[self._dbname](**kwargs)
>   File "/home/aomoper/web2py/gluon/dal.py", line 2079, in __init__
> if do_connect: self.find_driver(adapter_args)
>   File "/home/aomoper/web2py/gluon/dal.py", line 695, in find_driver
> raise RuntimeError, "no driver available %s" % self.drivers
> TypeError: not all arguments converted during string formatting
> DEBUG: connect attempt 1, connection error:
> Traceback (most recent call last):
>   File "/home/aomoper/web2py/gluon/dal.py", line 6755, in __init__
> self._adapter = ADAPTERS[self._dbname](**kwargs)
>   File "/home/aomoper/web2py/gluon/dal.py", line 2079, in __init__
> if do_connect: self.find_driver(adapter_args)
>   File "/home/aomoper/web2py/gluon/dal.py", line 695, in find_driver
> raise RuntimeError, "no driver available %s" % self.drivers
> TypeError: not all arguments converted during string formatting
> DEBUG: connect attempt 2, connection error:
> Traceback (most recent call last):
>   File "/home/aomoper/web2py/gluon/dal.py", line 6755, in __init__
> self._adapter = ADAPTERS[self._dbname](**kwargs)
>   File "/home/aomoper/web2py/gluon/dal.py", line 2079, in __init__
> if do_connect: self.find_driver(adapter_args)
>   File "/home/aomoper/web2py/gluon/dal.py", line 695, in find_driver
> raise RuntimeError, "no driver available %s" % self.drivers
> TypeError: not all arguments converted during string formatting
> DEBUG: connect attempt 3, connection error:
> Traceback (most recent call last):
>   File "/home/aomoper/web2py/gluon/dal.py", line 6755, in __init__
> self._adapter = ADAPTERS[self._dbname](**kwargs)
>   File "/home/aomoper/web2py/gluon/dal.py", line 2079, in __init__
> if do_connect: self.find_driver(adapter_args)
>   File "/home/aomoper/web2py/gluon/dal.py", line 695, in find_driver
> raise RuntimeError, "no driver available %s" % self.drivers
> TypeError: not all arguments converted during string formatting
> DEBUG: connect attempt 4, connection error:
> Traceback (most recent call last):
>   File "/home/aomoper/web2py/gluon/dal.py", line 6755, in __init__
> self._adapter = ADAPTERS[self._dbname](**kwargs)
>   File "/home/aomoper/web2py/gluon/dal.py", line 2079, in __init__
> if do_connect: self.find_driver(adapter_args)
>   File "/home/aomoper/web2py/gluon/dal.py", line 695, in find_driver
> raise RuntimeError, "no driver available %s" % self.drivers
> TypeError: not all arguments converted during string formatting
>
> --
>
>
>

-- 





Re: [web2py] Grid inside Form

2012-10-27 Thread Roberto Perdomo
Try changing the route for the edit button with routes.py, and before
create your own controller with the form edit and the grid
El 27/10/2012 09:45, "Santiago Avendaño"  escribió:

> Hello,
>
> My example app has two models.
>
> db.define_table('person', Field('name'))
> db.define_table('dog', Field('name'), Field('owner',db.person))
>
> In controller/default.py I define this method:
>
> def manage_person():
>  form = SQLFORM.grid(db.person)
>  return dict(form=form)
>
> This code render the table of persons. When I click on edit button in a
> row, the app goes to the person edit page.
>
> Inside this page I want to add a SQLFORM.grid of dogs owned by this
> person, to allow add dogs, since I edit person.
>
> How can I do that?
>
>
>
>
>  --
>
>
>
>

-- 





[web2py] Grid with multiple joins

2012-10-14 Thread Roberto Perdomo
Hi,

the grid support left joins from multiple tables?

I try this code:

 fields=
[db.examen_factura.id_factura, db.factura.fecha, db.examen.descripcion]
 left = (db.factura.on(db.factura.id==db.examen_factura.id_factura),
db.examen.on(db.examen.id==db.examen_factura.id_examen))
 orderby = ['factura.fecha',]
 query = ((db.examen_factura.id_paciente == registro) &
(db.examen_factura.procesado==True))
 grid = SQLFORM.grid(query = query, fields= fields, left = left,
user_signature=False, deletable=True, editable=False, details =
False,create=True, csv=False)

But only show the field id_factura, i I tried to solve it in various ways,
but I can not figure it out.

If try only one left, show that field,  but when i like one or more fields
in left, does not work.

anyone know who might be going?

thanks in advance.

PD: web2py 2.0.9

-- 





Re: [web2py] Re: delete row question

2012-05-25 Thread Roberto Perdomo
_after_delete.append is a great improvement.

I really like to run a function after the user press the default
delete button from a smartgrid, I can hide this button and add a
custom delete button, but whit _after_delete.append(function) is a
best solution.

Thanks.

2012/5/25 Anthony :
> Not in current stable, but in trunk, you can do:
>
> db.mytable._after_delete.append(myfunction)
>
> The _after_delete attribute of the table is a list of functions that take
> the table as an argument and are run after any delete is performed. There's
> also _before_delete as well as similar lists for before and after insert and
> update.
>
> If the deletion is happening via a form submission, you could also simply
> add some logic to the form processing code to run the function.
>
> Anthony
>
> On Friday, May 25, 2012 12:19:37 PM UTC-4, Roberto Perdomo wrote:
>>
>> Hi,
>>
>> I have a single question,
>>
>> There is a way to run a feature automatically when you delete a record
>> from a particular table?


[web2py] delete row question

2012-05-25 Thread Roberto Perdomo
Hi,

I have a single question,

There is a way to run a feature automatically when you delete a record
from a particular table?


[web2py] Date search and smartgrid

2012-03-02 Thread Roberto Perdomo
Sorry,  the date search is implemented in grid and smartgrid?

I Haven a table only with date fields and  this option not works


Re: [web2py] Cherokee deployment config

2012-01-27 Thread Roberto Perdomo
Thank for you suggest. The next monday i try.

Today with cherokee and fastcgi the welcome app work fine, but only show
the index, and with other apps is the same problem.
El 27/01/2012 16:15, "Michele Comitini" 
escribió:

> I know it is not fcgi but I suggest scgi, it is simpler and couples
> very well with web2py.
> In the new web2py cookbook there is a recipe for using cherokee with
> scgi, there you will find a detailed setup description.
>
> The essence is that you create an scgi handler in cherokee.  You set
> cherokee to use scgihandler.py inside the root of web2py as startup
> process in that same scgihandler.  Then you are done.
>
> Else use nginx it is excellent see this:
> http://www.web2pyslices.com/slices/take_slice/143
>
> There you see a simplified setup.  In production I suggest to use
> daemontools to manage the scgihandler process: works like a charm.
>
> mic
>
> p.s. ;-) good thing you can't use apache+wsgi with cherokee+scgi my
> system is able to handle 5 times more requests (with session.forget())
> ;-)
>
>
>
> 2012/1/27 Roberto Perdomo :
> > Hi,
> >
> > I have problems with the configuration of a server cherokee with we2py.
> >
> > I follow the  Cherokee with FastCGI manual from:
> > http://www.web2py.com/books/default/chapter/29/13.
> >
> > 1) create the file /var/web2py/startweb2py.sh and set as executable
> > with this content:
> >
> > #!/bin/sh
> > sudo -u www-data python /var/web2py/fcgihandler.fcgi &
> >
> > 2) enter in cherokee-admin al port 9090 and config sources with:
> >
> > Nick: web2py
> > Connection: /tmp/fcgi.sock
> > Interpreter: /var/web2py/startweb2py.sh
> >
> > 3) edit vserver default handler with fastcgi and FastCGI Specific set
> > round robin and Assign Information Sources to web2py source
> >
> > before start cherokee server, execute startweb2py.sh and enter to mi
> > ip in the webbrowser al show the startpage from cherokee, i use mi
> > ip/web2py and show error 404.
> >
> > what is wrong?
> >
> > I also try lighttp but the configuration not was successfull.
> >
> > PD: i cant use apache
>


[web2py] Re: Cherokee deployment config

2012-01-27 Thread Roberto Perdomo
I found that setting alternative doccument root to
/var/web2py/applications the server work, but in the documentation
that change does not appear.

Solved my self, thanks

2012/1/27 Roberto Perdomo :
> Hi,
>
> I have problems with the configuration of a server cherokee with we2py.
>
> I follow the  Cherokee with FastCGI manual from:
> http://www.web2py.com/books/default/chapter/29/13.
>
> 1) create the file /var/web2py/startweb2py.sh and set as executable
> with this content:
>
> #!/bin/sh
> sudo -u www-data python /var/web2py/fcgihandler.fcgi &
>
> 2) enter in cherokee-admin al port 9090 and config sources with:
>
> Nick: web2py
> Connection: /tmp/fcgi.sock
> Interpreter: /var/web2py/startweb2py.sh
>
> 3) edit vserver default handler with fastcgi and FastCGI Specific set
> round robin and Assign Information Sources to web2py source
>
> before start cherokee server, execute startweb2py.sh and enter to mi
> ip in the webbrowser al show the startpage from cherokee, i use mi
> ip/web2py and show error 404.
>
> what is wrong?
>
> I also try lighttp but the configuration not was successfull.
>
> PD: i cant use apache


[web2py] Cherokee deployment config

2012-01-27 Thread Roberto Perdomo
Hi,

I have problems with the configuration of a server cherokee with we2py.

I follow the  Cherokee with FastCGI manual from:
http://www.web2py.com/books/default/chapter/29/13.

1) create the file /var/web2py/startweb2py.sh and set as executable
with this content:

#!/bin/sh
sudo -u www-data python /var/web2py/fcgihandler.fcgi &

2) enter in cherokee-admin al port 9090 and config sources with:

Nick: web2py
Connection: /tmp/fcgi.sock
Interpreter: /var/web2py/startweb2py.sh

3) edit vserver default handler with fastcgi and FastCGI Specific set
round robin and Assign Information Sources to web2py source

before start cherokee server, execute startweb2py.sh and enter to mi
ip in the webbrowser al show the startpage from cherokee, i use mi
ip/web2py and show error 404.

what is wrong?

I also try lighttp but the configuration not was successfull.

PD: i cant use apache


[web2py] Smartgrid and create link

2011-11-04 Thread Roberto Perdomo
Hi, i need to put this code in new form from the add button of smartgrid:


$(document).ready(function() {
   $('#beneficiarios_cedula_personal__row').hide();
});


I can edit the edit and delete links, but i need a custom new link. How i
can do this?

Thanks.


[web2py] Smartgrid litle bug

2011-10-03 Thread Roberto Perdomo
When i delete a row, the records dissapear fron the grid, but the counter
still mantains the previus value


Re: [web2py] Re: Adding hidden field to a form

2011-09-29 Thread Roberto Perdomo
Do the form normally and try this with jquery:

$('#totalitems').hide();

2011/9/28 Anthony 

> I think the 'hidden' argument goes inside FORM() -- looks like you've got
> it inside DIV().
>
> Anthony
>
>
> On Wednesday, September 28, 2011 10:14:40 PM UTC-4, Joseph Jude wrote:
>>
>> Hi,
>> I define the below form in controller but the hidden field is not present
>> in the view. Note that, field 'totalitems' is not in the db. Let me know how
>> to add hidden fields to FORM.
>>
>> form = FORM(
>> DIV(
>> LABEL("Checklist Items:"),
>> UL(
>> SPAN(INPUT(_type="text", _name="citems"),
>> IMG(_class="add", _src=URL('static', 'images/add.png')),
>> IMG(_class="remove",_src=URL('**static', 'images/delete.png'))),
>> ),
>> hidden=dict(totalitems='1')
>> ))
>> Thank you,
>> Joseph
>>
>


Re: [web2py] Re: table, grid, smartgrid, getting better

2011-09-27 Thread Roberto Perdomo
Can change the line 1556 of sqlhtml.py from:

message = error or T('%(nrows)s records found' % dict(nrows=nrows))

to:

message = error or '%(nrows)s' % dict(nrows=nrows) +  T(' records found')

because every time a new row appear y get 1 records found, 2 records found
... n records found, and i have to translate every line in es-es.py.

I Think that fix works for all languages.

2011/9/26 Bruno Rocha 

> You can set showbuttontext=False you will get only icons.
>
> http://zerp.ly/rochacbruno
> Em 26/09/2011 07:56, "António Ramos"  escreveu:
>
> > can i create a collapsible/expandable column ?
> >
> > Also the edit button and delete button takes a lot of space in the right
> > side of the table.Also they repeat for each row. This i think is not
> pretty
> > and functional.
> > Could it be improved ?
> >
> > 2011/9/26 JmiXIII 
> >
> >> +1 Powertable intant search for each column is really powerfull
> >>
>


Re: [web2py] Re: table, grid, smartgrid, getting better

2011-09-23 Thread Roberto Perdomo
Thanks you

2011/9/23 Jim Steil 

>  Ok, do this.
>
> linked_tables = ['memberTag']
> grid = SQLFORM.smartgrid(db.member, linked_tables=linkedTables)
>
> Only the related tables included in the list will be displayed.
>
>     -Jim
>
> On 9/23/2011 2:59 PM, Roberto Perdomo wrote:
>
> Hi,
>
>  Can I Hide the aditional links created at every row related to foreign
> heys in SQLFORM.smartgrid?
>
>  I have many tables relationed to the table that I using with smartgrid
> and this added button to that tables making the row very long
>
> 2011/9/23 Jim Steil 
>
>>  Add paginate=5 to your smartgrid call:
>>
>> grid = SQLFORM.smartgrid(db.member, paginate=5)
>>
>> -Jim
>>
>>
>> On 9/23/2011 9:51 AM, António Ramos wrote:
>>
>> But imagine i want a web page with 4 smartgrids. I need space for the 4
>> smartgrids so i have to make them smaller.
>>
>>  How do i resize them to only show for example 5 records each?
>>
>>
>>
>>
>> 2011/9/23 Massimo Di Pierro 
>>
>>> It paginates automatically
>>>
>>> On Sep 23, 6:50 am, António Ramos  wrote:
>>> > how to paginate with the smartgrid?
>>> >
>>>  > 2011/8/29 stephanl 
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > > Hi,
>>> >
>>> > > I found a small bug:
>>> >
>>> > > You can get to the edit form by clicking the 'Edit' button in one row
>>> of
>>> > > the grid.
>>> > > It calls this URL:
>>>  > >
>>> http://127.0.0.1:8000/test/default/index/person/edit/person/1?_signat..
>>> ..
>>> > > ..
>>> > > So far so good
>>> >
>>> > > Using the view button in a row you can get to the non editable form
>>> of a
>>> > > single record. There is an 'Edit' button too, but that one is
>>> defunct. It
>>> > > tries to send you to that URL:
>>>  > >
>>> http://127.0.0.1:8000/test/default/index/person/Edit/person/1?_signat..
>>> ..
>>>  > > ..
>>> > > the difference is the capitalised 'Edit' in the URL, which causes the
>>> > > problem.
>>> >
>>> > > In any case, I think the grid/smartgrid thingy is a great new feature
>>> of a
>>> > > great framework, thank you for that.
>>> >
>>> > > stephan
>>>
>>
>>
>


Re: [web2py] Re: table, grid, smartgrid, getting better

2011-09-23 Thread Roberto Perdomo
Hi,

Can I Hide the aditional links created at every row related to foreign heys
in SQLFORM.smartgrid?

I have many tables relationed to the table that I using with smartgrid and
this added button to that tables making the row very long

2011/9/23 Jim Steil 

>  Add paginate=5 to your smartgrid call:
>
> grid = SQLFORM.smartgrid(db.member, paginate=5)
>
> -Jim
>
>
> On 9/23/2011 9:51 AM, António Ramos wrote:
>
> But imagine i want a web page with 4 smartgrids. I need space for the 4
> smartgrids so i have to make them smaller.
>
>  How do i resize them to only show for example 5 records each?
>
>
>
>
> 2011/9/23 Massimo Di Pierro 
>
>> It paginates automatically
>>
>> On Sep 23, 6:50 am, António Ramos  wrote:
>> > how to paginate with the smartgrid?
>> >
>>  > 2011/8/29 stephanl 
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > Hi,
>> >
>> > > I found a small bug:
>> >
>> > > You can get to the edit form by clicking the 'Edit' button in one row
>> of
>> > > the grid.
>> > > It calls this URL:
>>  > >
>> http://127.0.0.1:8000/test/default/index/person/edit/person/1?_signat
>> > > ..
>> > > So far so good
>> >
>> > > Using the view button in a row you can get to the non editable form of
>> a
>> > > single record. There is an 'Edit' button too, but that one is defunct.
>> It
>> > > tries to send you to that URL:
>>  > >
>> http://127.0.0.1:8000/test/default/index/person/Edit/person/1?_signat
>>  > > ..
>> > > the difference is the capitalised 'Edit' in the URL, which causes the
>> > > problem.
>> >
>> > > In any case, I think the grid/smartgrid thingy is a great new feature
>> of a
>> > > great framework, thank you for that.
>> >
>> > > stephan
>>
>
>


Re: [web2py] Re: Some powerTable questions

2011-08-31 Thread Roberto Perdomo
Bruno, please add #refreshLabel = 'Refresh' to you example of powergrid, or
the best solution: why not use T('label') as example
self.attributes['refreshLabel'] = T('Refresh') in  powergrid.py for
translate support?



2011/8/29 Bruno Rocha 

> something like this:
> http://wijmo.com/Wijmo-Complete/samples/#tree|overview
>
> or may be this:
> http://wijmo.com/Wijmo-Complete/samples/#grid|grouping-and-aggregates
>
> (the column resizing you talk
> http://wijmo.com/Wijmo-Complete/samples/#grid|column-resizing)
>


Re: [web2py] Re: table, grid, smartgrid, getting better

2011-08-21 Thread Roberto Perdomo
and new link too

2011/8/21 Roberto Perdomo 

> Great work, thanks
>
> I just wanted to make a suggestion, you can place the links to to view and
> edit as modal windows , and when close it, reload the table page?
>
>
>
> 2011/8/21 mart 
>
>> Hi Massimo,
>>
>> So all is working great! I just have one question :)
>>
>> i think I am making a real mess of things while trying to add an xtra
>> link.
>>
>> this is in my test controller function:
>>
>> def test()
>>table=SQLFORM.grid(db.buildSpec,links=[lambda
>> r:A('build',_href=(f=queue_it ...   --> the rest is way to ugly to
>> show ;)
>>
>>return dict(table=table)
>>
>>
>> which should call this function when the link is clicked:
>>
>> def queue_it():
>>Q=os.path.abspath('../../../Q')
>>id=request.args(2)
>>
>>name=db(db[request.args(1)].id==id).select()\
>> .last().name
>>
>>content=db(db[request.args(1)].id==id).select()\
>> .last().content
>>
>>client_system=db(db[request.args(1)].id==id).select()\
>> .last().client_system
>>
>>change=db(db[request.args(1)].id==id).select()\
>> .last().change
>>
>>changed_by=db(db[request.args(1)].id==id).select()\
>> .last().changed_by
>>
>>date=db(db[request.args(1)].id==id).select()\
>> .last().date
>>
>>description=db(db[request.args(1)].id==id).select()\
>> .last().description
>>
>>is_head=db(db[request.args(1)].id==id).select()\
>> .last().is_head
>>
>>if os.path.exists(Q):
>>bsPath='{0}/{1}'.format(Q,name)
>>if os.path.exists(bsPath):
>>try:
>>os.remove(bsPath)
>>except Exception as err:
>>print('could not remove existing file
>> {0}\n{1}'.format(bsPath,err))
>>
>>oFile=open(bsPath,'a')
>>for cItem in content.split('\n'):
>>if '>cItem='{0}\n\t\tbuildSpec_id="{1}"'.format(cItem,id)
>>oFile.write('{0}\n'.format(cItem))
>>oFile.close()
>>
>>response.flash='{0} has been dropped in the blueLite Q'\
>> .format(name)
>>
>>return dict(form=crud()\
>>,name=name\
>>,client_system=client_system\
>>,change=change\
>>,changed_by=changed_by\
>>,date=date\
>>,description=description\
>>,is_head=is_head)
>>
>>
>> any help would be appreciated (and sorry for the dumb question :) ),
>> Thanks,
>> Mart :)
>>
>> On Aug 19, 12:28 pm, Richard Vézina 
>> wrote:
>> > ;-D
>> >
>> > Think we will be needing a recent advance briefing email througth the
>> > list...
>> >
>> > Richard
>> >
>> > On Fri, Aug 19, 2011 at 5:57 AM, Martín Mulone > >wrote:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > The web2py is advancing so fast, that the documentation get deprecated
>> > > before get published. :)
>> >
>> > > 2011/8/18 Massimo Di Pierro 
>> >
>> > >> Actually I just killed myself in the foot... I am writing a packt
>> book
>> > >> with some other members of the list. Have to deliver it in 5 days.
>> > >> Today 10-20% of the book recipes become obsolete and I have to
>> rewrite
>> > >> them. At the same time I am not ready to commit to the API of the new
>> > >> SQLFORM.grid.  :-(
>> >
>> > >> On Aug 18, 6:32 pm, mart  wrote:
>> > >> > WOW! Thank you! this is awesome! :)
>> >
>> > >> > Mart :)
>> >
>> > >> > On Aug 18, 5:03 pm, Massimo Di Pierro 
>> > >> > wrote:
>> >
>> > >> > > This is a new API so it expects a new syntax for represent that
>> takes
>> > >> > > two arguments. The second argument is the record.
>> >
>> > >> > > On Aug 18, 2:47 pm, pbreit  wrote:
>> >
>> > >> > > > I'm getting errors on my tables. auth_user works OK but I get
>> these
>> > >> errors
>> > >> > > > on three of my other tables.
>> >
>> > >> > > > Tracebac

Re: [web2py] Re: table, grid, smartgrid, getting better

2011-08-21 Thread Roberto Perdomo
Great work, thanks

I just wanted to make a suggestion, you can place the links to to view and
edit as modal windows , and when close it, reload the table page?


2011/8/21 mart 

> Hi Massimo,
>
> So all is working great! I just have one question :)
>
> i think I am making a real mess of things while trying to add an xtra
> link.
>
> this is in my test controller function:
>
> def test()
>table=SQLFORM.grid(db.buildSpec,links=[lambda
> r:A('build',_href=(f=queue_it ...   --> the rest is way to ugly to
> show ;)
>
>return dict(table=table)
>
>
> which should call this function when the link is clicked:
>
> def queue_it():
>Q=os.path.abspath('../../../Q')
>id=request.args(2)
>
>name=db(db[request.args(1)].id==id).select()\
> .last().name
>
>content=db(db[request.args(1)].id==id).select()\
> .last().content
>
>client_system=db(db[request.args(1)].id==id).select()\
> .last().client_system
>
>change=db(db[request.args(1)].id==id).select()\
> .last().change
>
>changed_by=db(db[request.args(1)].id==id).select()\
> .last().changed_by
>
>date=db(db[request.args(1)].id==id).select()\
> .last().date
>
>description=db(db[request.args(1)].id==id).select()\
> .last().description
>
>is_head=db(db[request.args(1)].id==id).select()\
> .last().is_head
>
>if os.path.exists(Q):
>bsPath='{0}/{1}'.format(Q,name)
>if os.path.exists(bsPath):
>try:
>os.remove(bsPath)
>except Exception as err:
>print('could not remove existing file
> {0}\n{1}'.format(bsPath,err))
>
>oFile=open(bsPath,'a')
>for cItem in content.split('\n'):
>if 'cItem='{0}\n\t\tbuildSpec_id="{1}"'.format(cItem,id)
>oFile.write('{0}\n'.format(cItem))
>oFile.close()
>
>response.flash='{0} has been dropped in the blueLite Q'\
> .format(name)
>
>return dict(form=crud()\
>,name=name\
>,client_system=client_system\
>,change=change\
>,changed_by=changed_by\
>,date=date\
>,description=description\
>,is_head=is_head)
>
>
> any help would be appreciated (and sorry for the dumb question :) ),
> Thanks,
> Mart :)
>
> On Aug 19, 12:28 pm, Richard Vézina 
> wrote:
> > ;-D
> >
> > Think we will be needing a recent advance briefing email througth the
> > list...
> >
> > Richard
> >
> > On Fri, Aug 19, 2011 at 5:57 AM, Martín Mulone  >wrote:
> >
> >
> >
> >
> >
> >
> >
> > > The web2py is advancing so fast, that the documentation get deprecated
> > > before get published. :)
> >
> > > 2011/8/18 Massimo Di Pierro 
> >
> > >> Actually I just killed myself in the foot... I am writing a packt book
> > >> with some other members of the list. Have to deliver it in 5 days.
> > >> Today 10-20% of the book recipes become obsolete and I have to rewrite
> > >> them. At the same time I am not ready to commit to the API of the new
> > >> SQLFORM.grid.  :-(
> >
> > >> On Aug 18, 6:32 pm, mart  wrote:
> > >> > WOW! Thank you! this is awesome! :)
> >
> > >> > Mart :)
> >
> > >> > On Aug 18, 5:03 pm, Massimo Di Pierro 
> > >> > wrote:
> >
> > >> > > This is a new API so it expects a new syntax for represent that
> takes
> > >> > > two arguments. The second argument is the record.
> >
> > >> > > On Aug 18, 2:47 pm, pbreit  wrote:
> >
> > >> > > > I'm getting errors on my tables. auth_user works OK but I get
> these
> > >> errors
> > >> > > > on three of my other tables.
> >
> > >> > > > Traceback (most recent call last):
> > >> > > >   File "/Users/pbreit/web2py/gluon/restricted.py", line 194, in
> > >> restricted
> > >> > > > exec ccode in environment
> > >> > > >   File
> > >> "/Users/pbreit/web2py/applications/init/controllers/default.py" <
> > >>
> http://pb-dev.pricetack.com:8001/admin/edit/init/controllers/default.py>,
> > >> line 107, in 
> > >> > > >   File "/Users/pbreit/web2py/gluon/globals.py", line 145, in
> > >> 
> > >> > > > self._caller = lambda f: f()
> > >> > > >   File
> > >> "/Users/pbreit/web2py/applications/init/controllers/default.py" <
> > >>
> http://pb-dev.pricetack.com:8001/admin/edit/init/controllers/default.py>,
> > >> line 12, in grid
> > >> > > > table = SQLFORM.grid(db.purchase)
> > >> > > >   File "/Users/pbreit/web2py/gluon/sqlhtml.py", line 1408, in
> grid
> > >> > > > value=field.represent(value,row)
> > >> > > >   File "/Users/pbreit/web2py/gluon/dal.py", line 3730, in
> repr_ref
> > >> > > > def repr_ref(id, r=referenced, f=ff): return f(r, id)
> > >> > > >   File "/Users/pbreit/web2py/gluon/dal.py", line 3699, in ff
> > >> > > > row=r(id)
> > >> > > >   File "/Users/pbreit/web2py/gluon/dal.py", line 3805, in
> __call__
> > >> > > > return self.__getitem__(key)
> > >> > > >   File "/Users/pbreit/web2py/gluon/dal.py", line 3802, in
> > >> __getitem__
> > >> > > > return dict.__getitem__(self, key)
> > >> > > > KeyError: '1

Re: [web2py] Re: powertable ( multiple tables on the same page )

2011-07-20 Thread Roberto Perdomo
Bruno, if you can send me PowerGrid for test it, i'd appreciate it, looks
great.


2011/7/20 Roberto Perdomo 

> Hi, thanks for your work with powertables.
>
> Today i resolved the problem, editing plugin_powertable.py.
>
> I have replace live for bind, but not only load the details for the first
> 10 records. The solution was load the table with all records (iDisplayLength
> = -1), but recentlly discovered that live is not recomended.
>
> Finally replace live with delegate and works very fine usind LOAD method
> from web2py.
>
> thanks you.
>
> Attached plugin_powertable.py modified.
>
>
> 2011/7/20 Bruno Rocha 
>
>> Sorry,
>>
>> Powertable is 'alpha' and I have too much work to do to improve it.
>> I am trying to solve things..
>>
>> BTW: I am comming with a new grid system, a complete one, based on CRUD
>> http://labs.blouweb.com/PowerGrid/default/noimages
>>
>> (in tests)
>>
>
>


Re: [web2py] Re: powertable ( multiple tables on the same page )

2011-07-20 Thread Roberto Perdomo
Hi, thanks for your work with powertables.

Today i resolved the problem, editing plugin_powertable.py.

I have replace live for bind, but not only load the details for the first 10
records. The solution was load the table with all records (iDisplayLength =
-1), but recentlly discovered that live is not recomended.

Finally replace live with delegate and works very fine usind LOAD method
from web2py.

thanks you.

Attached plugin_powertable.py modified.


2011/7/20 Bruno Rocha 

> Sorry,
>
> Powertable is 'alpha' and I have too much work to do to improve it.
> I am trying to solve things..
>
> BTW: I am comming with a new grid system, a complete one, based on CRUD
> http://labs.blouweb.com/PowerGrid/default/noimages
>
> (in tests)
>
# -*- coding: utf-8 -*-
###
#AUTHOR AND LICENSE
###
# This is an ALPHA VERSION
# This uses code taken from web2py gluon/sqlhtml.py, plugin_datatable,plugin_webgrid 
#
# Web2py plugin powerTable ( Version ALPHA 0.1.1 : 2010-12-28 ) 
# Copyright (c) 2010 Rocha, Bruno Cezar
# @rochacbruno
# https://bitbucket.org/rochacbruno/powertable
# http://powertable.blouweb.com
#
# License Code: GPL, General Public License v. 2.0
# License Content: Creative Commons Attribution 3.0 
#
# Also visit: www.web2py.com 
# or Groups: http://groups.google.com/group/web2py 
#http://groups.google.com/group/web2py-usuarios  
#
#
#  This program is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see 

Re: [web2py] Re: powertable ( multiple tables on the same page )

2011-07-20 Thread Roberto Perdomo
i think that you code is wrong, try with:

return dict( ownedByUser = ownTable.create(), sharedWithUser
= sharedWithUser.create() )

you were doubling ownTable on the dict.



2011/7/20 Chris Baron 

> I'm still having a problem getting two powertables on one page.  If I
> comment out the code for the second powertable, everything is fine,
> but it seems the first powertable can't find its data.  Please refer
> to code posted above.  I think this has something to do with
> instantiation, specifically, I think that this is my problem :
>
>ownTable = plugins.powerTable
># do stuff with ownTable
>
>shareTable = plugins.powerTable
> #do stuff with shareTable
>
>return dict( ownedByUser = ownTable.create(), sharedWithUser =
> ownTable.create() )
>
>
> How do I get separate instances?
>
> On Jul 20, 9:40 am, Chris Baron  wrote:
> > Thank you for the prompt responses.
> >
> > On Jul 19, 4:12 pm, Roberto Perdomo  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hello, it's me again.
> >
> > > Well, I discovered that the problem of loading the table with "load" is
> in
> > > the event "live" plugin_powertable.py. I've replaced the event "live"
> for
> > > "bind", and, works, but just load the details for the first 10 rows
> > > displayed when loading the table.
> >
> > > Is there any way to fix this error?
> >
> > > thanks
> > > 2011/7/19 Bruno Rocha 
> >
> > > > this should be:
> >
> > > > table.dtfeatures['aoColumns'] = ''
> >
> > > > dtfeatures implement any option from datatables.net
> >
> > > > On Tue, Jul 19, 2011 at 1:32 PM, Christopher Baron <
> cba...@fieldmuseum.org
> > > > > wrote:
> >
> > > >> Does anyone know where, what to set the 'aoColumns' property to ?
> >
> > > >> The documentation for this plugin is not helpful...
> >
> > > >> On Jul 18, 1:25 pm, Roberto Perdomo  wrote:
> > > >> > I now discover that only show the details only for the first 10
> records.
> >
> > > >> > I send you to your mail my app, because is very hevy for the group
> mail.
> >
> > > >> > 2011/7/18 Bruno Rocha 
> >
> > > >> > > include ownTable._id = "something" and ownTable._class =
> "something"
> > > >> to set
> > > >> > > different class and id to the tables.
> >
> > > >> > > On Mon, Jul 18, 2011 at 12:57 PM, Chris Baron <
> topher.ba...@gmail.com
> > > >> >wrote:
> >
> > > >> > >> How do you do it ?
> >
> > > >> > >> Here is my controller :
> >
> > > >> > >> ownDataSource = db( db.gtree.contributor == '
> > > >> > >> '.join( [ auth.user.first_name, auth.user.last_name ] )
> ).select()
> >
> > > >> > >>class ownVirtualFields(object):
> > > >> > >>@virtualsettings(label='Tree')
> > > >> > >>def tree_url(self):
> > > >> > >>gtree = self.gtree.id
> > > >> > >>u = URL(c="gtree",f="view",args=self.gtree.id,
> > > >> > >> vars=dict(treeType='grafted'))
> > > >> > >>return A('grafted', _href=u)
> >
> > > >> > >>ownTable = plugins.powerTable
> > > >> > >>ownTable.datasource = ownDataSource
> > > >> > >>ownTable.dtfeatures["sScrollY"] = "200px"
> > > >> > >>ownTable.dtfeatures["sScrollX"] = "100%"
> > > >> > >>ownTable.virtualfields = ownVirtualFields()
> > > >> > >>ownTable.headers = "labels"
> > > >> > >>ownTable.showkeycolumn = False
> > > >> > >>ownTable.dtfeatures["bJQueryUI"] =
> > > >> > >> request.vars.get("jqueryui",True)
> > > >> > >>## ownTable.uitheme = request.vars.get("theme","cupertino")
> > > >> > >>ownTable.uitheme = request.vars.get("theme","smoothness")
> > > >> > >>ownTable.dtfeatures["iDispl

Re: [web2py] Re: powertable ( multiple tables on the same page )

2011-07-19 Thread Roberto Perdomo
Hello, it's me again.

Well, I discovered that the problem of loading the table with "load" is in
the event "live" plugin_powertable.py. I've replaced the event "live" for
"bind", and, works, but just load the details for the first 10 rows
displayed when loading the table.

Is there any way to fix this error?

thanks
2011/7/19 Bruno Rocha 

> this should be:
>
> table.dtfeatures['aoColumns'] = ''
>
> dtfeatures implement any option from datatables.net
>
>
>
> On Tue, Jul 19, 2011 at 1:32 PM, Christopher Baron  > wrote:
>
>> Does anyone know where, what to set the 'aoColumns' property to ?
>>
>> The documentation for this plugin is not helpful...
>>
>> On Jul 18, 1:25 pm, Roberto Perdomo  wrote:
>> > I now discover that only show the details only for the first 10 records.
>> >
>> > I send you to your mail my app, because is very hevy for the group mail.
>> >
>> > 2011/7/18 Bruno Rocha 
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > include ownTable._id = "something" and ownTable._class = "something"
>> to set
>> > > different class and id to the tables.
>> >
>> > > On Mon, Jul 18, 2011 at 12:57 PM, Chris Baron > >wrote:
>> >
>> > >> How do you do it ?
>> >
>> > >> Here is my controller :
>> >
>> > >> ownDataSource = db( db.gtree.contributor == '
>> > >> '.join( [ auth.user.first_name, auth.user.last_name ] ) ).select()
>> >
>> > >>class ownVirtualFields(object):
>> > >>@virtualsettings(label='Tree')
>> > >>def tree_url(self):
>> > >>gtree = self.gtree.id
>> > >>u = URL(c="gtree",f="view",args=self.gtree.id,
>> > >> vars=dict(treeType='grafted'))
>> > >>return A('grafted', _href=u)
>> >
>> > >>ownTable = plugins.powerTable
>> > >>ownTable.datasource = ownDataSource
>> > >>ownTable.dtfeatures["sScrollY"] = "200px"
>> > >>ownTable.dtfeatures["sScrollX"] = "100%"
>> > >>ownTable.virtualfields = ownVirtualFields()
>> > >>ownTable.headers = "labels"
>> > >>ownTable.showkeycolumn = False
>> > >>ownTable.dtfeatures["bJQueryUI"] =
>> > >> request.vars.get("jqueryui",True)
>> > >>## ownTable.uitheme = request.vars.get("theme","cupertino")
>> > >>ownTable.uitheme = request.vars.get("theme","smoothness")
>> > >>ownTable.dtfeatures["iDisplayLength"] = 25
>> > >>ownTable.dtfeatures["aaSorting"] = [[6,'desc']]
>> > >>ownTable.dtfeatures["sPaginationType"] = request.vars.get(
>> > >>"pager","full_numbers"
>> > >>) # two_button scrolling
>> > >>ownTable.columns = ["gtree.id",
>> > >>  "virtual.tree_url",
>> > >>  "gtree.mtime",
>> > >>  "gtree.title",
>> > >>  "gtree.comment" ]
>> >
>> > >>ownTable.extra = dict(autoresize=True)
>> >
>> > >>
>> >
>> > >>uniqueUserId = db( db.user_map.auth_user_id ==
>> > >> auth.user.id ).select()[0].unique_user_id
>> >
>> > >>shareDataSource = db( ( db.gtree.id == db.gtree_share.gtree ) &
>> > >>  ( db.gtree_share.user ==
>> > >> uniqueUserId ) ).select()
>> >
>> > >>class shareVirtualFields(object):
>> > >>@virtualsettings(label='Tree')
>> > >>def tree_url(self):
>> > >>gtree = self.gtree.id
>> > >>u = URL(c="gtree",f="view",args=self.gtree.id,
>> > >> vars=dict(treeType='grafted'))
>> > >>return A('grafted', _href=u)
>> > >> shareTable = plugins.powerTable
>> > >>shareTable.datasource = shareDataSource
>> > >>

Re: [web2py] powertable ( multiple tables on the same page )

2011-07-18 Thread Roberto Perdomo
I now discover that only show the details only for the first 10 records.

I send you to your mail my app, because is very hevy for the group mail.

2011/7/18 Bruno Rocha 

> include ownTable._id = "something" and ownTable._class = "something" to set
> different class and id to the tables.
>
>
>
> On Mon, Jul 18, 2011 at 12:57 PM, Chris Baron wrote:
>
>> How do you do it ?
>>
>>
>> Here is my controller :
>>
>>
>> ownDataSource = db( db.gtree.contributor == '
>> '.join( [ auth.user.first_name, auth.user.last_name ] ) ).select()
>>
>>class ownVirtualFields(object):
>>@virtualsettings(label='Tree')
>>def tree_url(self):
>>gtree = self.gtree.id
>>u = URL(c="gtree",f="view",args=self.gtree.id,
>> vars=dict(treeType='grafted'))
>>return A('grafted', _href=u)
>>
>>ownTable = plugins.powerTable
>>ownTable.datasource = ownDataSource
>>ownTable.dtfeatures["sScrollY"] = "200px"
>>ownTable.dtfeatures["sScrollX"] = "100%"
>>ownTable.virtualfields = ownVirtualFields()
>>ownTable.headers = "labels"
>>ownTable.showkeycolumn = False
>>ownTable.dtfeatures["bJQueryUI"] =
>> request.vars.get("jqueryui",True)
>>## ownTable.uitheme = request.vars.get("theme","cupertino")
>>ownTable.uitheme = request.vars.get("theme","smoothness")
>>ownTable.dtfeatures["iDisplayLength"] = 25
>>ownTable.dtfeatures["aaSorting"] = [[6,'desc']]
>>ownTable.dtfeatures["sPaginationType"] = request.vars.get(
>>"pager","full_numbers"
>>) # two_button scrolling
>>ownTable.columns = ["gtree.id",
>>  "virtual.tree_url",
>>  "gtree.mtime",
>>  "gtree.title",
>>  "gtree.comment" ]
>>
>>ownTable.extra = dict(autoresize=True)
>>
>>
>>
>>uniqueUserId = db( db.user_map.auth_user_id ==
>> auth.user.id ).select()[0].unique_user_id
>>
>>shareDataSource = db( ( db.gtree.id == db.gtree_share.gtree ) &
>>  ( db.gtree_share.user ==
>> uniqueUserId ) ).select()
>>
>>class shareVirtualFields(object):
>>@virtualsettings(label='Tree')
>>def tree_url(self):
>>gtree = self.gtree.id
>>u = URL(c="gtree",f="view",args=self.gtree.id,
>> vars=dict(treeType='grafted'))
>>return A('grafted', _href=u)
>> shareTable = plugins.powerTable
>>shareTable.datasource = shareDataSource
>>shareTable.dtfeatures["sScrollY"] = "200px"
>>shareTable.dtfeatures["sScrollX"] = "100%"
>>shareTable.virtualfields = shareVirtualFields()
>>shareTable.headers = "labels"
>>shareTable.showkeycolumn = False
>>shareTable.dtfeatures["bJQueryUI"] =
>> request.vars.get("jqueryui",True)
>>## shareTable.uitheme = request.vars.get("theme","cupertino")
>>shareTable.uitheme = request.vars.get("theme","smoothness")
>>shareTable.dtfeatures["iDisplayLength"] = 25
>>shareTable.dtfeatures["aaSorting"] = [[6,'desc']]
>>shareTable.dtfeatures["sPaginationType"] = request.vars.get(
>>"pager","full_numbers"
>>) # two_button scrolling
>>shareTable.columns = ["gtree.id",
>>  "virtual.tree_url",
>>  "gtree.mtime",
>>  "gtree.title",
>>  "gtree.comment" ]
>>
>>shareTable.extra = dict(autoresize=True)
>>
>>return dict( ownedByUser = ownTable.create(), sharedWithUser =
>> ownTable.create() )
>>
>>
>>
>> Here is my view :
>>
>> 
>>
>>
>>Grafted Tables You Own
>>{{=ownedByUser}}
>>
>>
>>
>>Grafted Tables Shared With You
>>{{=sharedWithUser}}
>>
>>
>>
>> 
>
>
>
>
> --
>
>
>
> --
> Bruno Rocha
> [ About me: http://zerp.ly/rochacbruno ]
> [ Aprenda a programar: http://CursoDePython.com.br ]
> [ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
> [ Consultoria em desenvolvimento web: http://www.blouweb.com ]
>
>


Re: [web2py] Re: Load view or controllers without load

2011-07-18 Thread Roberto Perdomo
Bruno, finally i fix that, changing "live" to "bind" in
plugin_powertable.py.

If you consideer update the plugin code to fix this error.

Thanks you so much.

2011/7/18 apple 

> If you have multiple tables then you must give each table a unique id.
>
> Bruno tells me this can be done in web2py controller:
>table = plugins.PowerTable
>table._id = "mytable1"
>
> On Jul 18, 3:31 am, Roberto Perdomo  wrote:
> > Hi, i have problems loading powertables with LOAD and I wonder if
> > there is a way
> > to get from one view to another controller without using LOAD or view as
> > hereby POWERTABLES tables do not work properly.
> >
> > Mainly I like to charge two or three tables from a controller in a view.
> >
> > thanks in advance
>


[web2py] Load view or controllers without load

2011-07-17 Thread Roberto Perdomo
Hi, i have problems loading powertables with LOAD and I wonder if
there is a way
to get from one view to another controller without using LOAD or view as
hereby POWERTABLES tables do not work properly.

Mainly I like to charge two or three tables from a controller in a view.

thanks in advance


Re: [web2py] Problem using load with powertables

2011-07-15 Thread Roberto Perdomo
OK, thanks.

I need to place many tables inside different tabs of jquery ui, exist other
way to do that without load?

2011/7/15 Bruno Rocha 

> The problem is that the JavaScript necessary to load data to table is not
> being loaded in the component, I will try to reproduce it here to test.
>
> I never tested PowerTable plugin within a component or ajax modals, I need
> to test to see what to do with Java Script needed to load.
>
> Can you open an issue on bitbucket?
>
> https://bitbucket.org/rochacbruno/powertable/issues?status=new&status=open
>
> On Fri, Jul 15, 2011 at 2:30 PM, Roberto Perdomo wrote:
>
>> Hi, i am using powertables an i like load a table using
>> {{=LOAD(c='default',f='finction',args='',extension='html',ajax=False,ajax_trap=False)}},
>> but the table not show details when click the green plus button.
>>
>> The error is: Cannot read property '_aData' of undefined.
>>
>> I load the table inside a tab, inside other page, but the error persist.
>>
>> I dont know what happen, I appreciate your suggestions.
>>
>>
>>
>
>
> --
>
>
>
> --
> Bruno Rocha
> [ About me: http://zerp.ly/rochacbruno ]
> [ Aprenda a programar: http://CursoDePython.com.br ]
> [ O seu aliado nos cuidados com os animais: http://AnimalSystem.com.br ]
> [ Consultoria em desenvolvimento web: http://www.blouweb.com ]
>
>


[web2py] Problem using load with powertables

2011-07-15 Thread Roberto Perdomo
Hi, i am using powertables an i like load a table using
{{=LOAD(c='default',f='finction',args='',extension='html',ajax=False,ajax_trap=False)}},
but the table not show details when click the green plus button.

The error is: Cannot read property '_aData' of undefined.

I load the table inside a tab, inside other page, but the error persist.

I dont know what happen, I appreciate your suggestions.


Re: [web2py] Re: Powertable and virtual columns

2011-07-12 Thread Roberto Perdomo
Do with links. I add a new column with links to edit and delete records.

The example:

 @virtualsettings(label=T('Acciones'))
def editar(self):
id = 1
link_editar = URL(request.application,'default',
'editar_tipo_nomina/')
link_icono_editar = IMG(_src=URL(r=request,c='static',
f='images/edit-icon24.png'), _alt='Editar')
link_eliminar= URL(r =request,f='eliminar_registro',
args=[self.tipo_nomina.id
,'eliminar','tipo_nomina'])
link_icono_eliminar= IMG(_src=URL(r=request,c='static',
 f='images/delete-icon24.png'),

 _alt='Eliminar',
_onclick="ajax('"+link_eliminar+"',[],'');"
)
return (A(link_icono_editar, _href= link_editar + str(
self.tipo_nomina.id)), ' | ' ,A(link_icono_eliminar))

2011/7/12 DenesL 

> Hi Kenneth,
>
> it really depend more on what you want the links to look like than
> anything else.
> You could have them one after the other:
>
> return SPAN(A('Edit', _href=URL('receipt', 'create_receipt',
> args=[self.t_receipt.id])),
>XML(' '),
>A('another link', _href=...))
>
> or you could use DIVs, TABLE, UL/OL or CSS to have them stacked.
>
> Denes.
>
> On Jul 12, 9:47 am, Kenneth Lundström 
> wrote:
> > Hello list,
> >
> > I m using Powertable to show a list of records. With virtual columns I
> > create links to modify, copy and so on. To save space I d like to add
> > more links into one column.
> >
> > I m using:
> >  @virtualsettings(label=T('Edit'))
> >  def edit(self):
> >  return A('Edit', _href=URL('receipt', 'create_receipt',
> > args=[self.t_receipt.id]))
> >
> > to declare a new column, is it possible somehow to return 2 or more
> links?
> >
> > Kenneth
>


Re: [web2py] Re: Datatables, jqgrid

2011-07-11 Thread Roberto Perdomo
Thanks,

was solved using: onclick="$('#id_tab').load('url_to_page');"

My complete code of the tans page:

{{extend 'layout.html'}}

$(function() {
$("#tabs").tabs();
$("#tabs1").tabs();
$("#tabs2").tabs();
});




{{=T('Nomina').capitalize()}}
{{=T('Unidad Ejecutora').capitalize()}}



   

Agregar
Listar




{{=LOAD(c='default',f='agregar_tipo_nomina',args='',extension='html',ajax=True,ajax_trap=False)}}



{{=LOAD(c='default',f='listar_tipo_nomina',args='',extension='html',ajax=True,ajax_trap=False)}}






Agregar
Listar



hola

 
mundo

 
 



2011/7/11, Ross Peoples :
> I think because when a table is hidden behind a tab that it can't resize
> what's not visible. So if you listen for the tab change event and force
> datatables to refresh after a tab change, that should solve the problem.


[web2py] Datatables, jqgrid

2011-07-09 Thread Roberto Perdomo
Hi, i need know how is your experience in the use of javascript tables.

I like to do a system and need a good table that can update and delete record 
from the client size.

the table must be localizated in jquery ui tabs. I do tabs with powertables, 
but when put the table in  a tab inside other tab, the table lost the column 
size, somebosy knows why?

Thanks

Enviado de Samsung Mobile