Re: [web2py] SQLFORM question

2013-01-09 Thread b00m_chef
I found why it wasn't working. It is because the db was set to 
migrate=False.

However, the code doesn't work. I still get a listing of all Collars from 
all owners.



On Wednesday, January 9, 2013 10:25:25 PM UTC-8, b00m_chef wrote:
>
> I get an error on loading the new puppy page for first time. I had to 
> change your code as it didn't work to the following:
>
> requires=IS_IN_DB(*db(db.owner.user == db.auth_user.id
> )*, 'owner.id', '%(name)s')
>
> Now I get an error:
>  no such table: owner
>
> However, the table IS there...no idea what's causing this...
>
>
> Thanks for the help!!
>
>
> On Wednesday, January 9, 2013 9:40:18 PM UTC-8, rochacbruno wrote:
>>
>>
>> On Thu, Jan 10, 2013 at 3:09 AM, b00m_chef  wrote:
>>
>>> requires=IS_IN_DB(*db(db.owner.user == auth.user.id)*, 'owner.id', 
>>> '%(name)s')
>>>
>>
>>
>>

-- 





Re: [web2py] SQLFORM question

2013-01-09 Thread b00m_chef
I get an error on loading the new puppy page for first time. I had to 
change your code as it didn't work to the following:

requires=IS_IN_DB(*db(db.owner.user == db.auth_user.id
)*, 'owner.id', '%(name)s')

Now I get an error:
 no such table: collars

However, the table IS there...no idea what's causing this...


Thanks for the help!!


On Wednesday, January 9, 2013 9:40:18 PM UTC-8, rochacbruno wrote:
>
>
> On Thu, Jan 10, 2013 at 3:09 AM, b00m_chef 
> > wrote:
>
>> requires=IS_IN_DB(*db(db.owner.user == auth.user.id)*, 'owner.id', 
>> '%(name)s')
>>
>
>
>

-- 





Re: [web2py] SQLFORM question

2013-01-09 Thread Bruno Rocha
On Thu, Jan 10, 2013 at 3:09 AM, b00m_chef  wrote:

> requires=IS_IN_DB(*db(db.owner.user == auth.user.id)*, 'owner.id',
> '%(name)s')
>

-- 





Re: [web2py] Re: cpdb errors

2013-01-09 Thread Simon Ashley
I hate this.
Its fixed (stable) for the time being, but cant clearly identify the cause. 
I'm sure that there is a still memory leak and it may appear again.. 
Early in the process, Ubuntu was acting similarly to Windows 7 i.e. 
consuming memory when importing the csv file and eventually failing. 

Steps taken were:

   - installed psycopg2 (still had issues)
   - took the table definition in the DAL back to the first few fields 
   (imported OK)
   - Gradually added the fields back in (import OK on each iteration)
   - when the complete/ original table imported, re imported the entire app 
   data (OK)

The table definition in the DAL has approx 150 fields (and string fields 
had been left at their default length)


-- 





[web2py] SQLFORM question

2013-01-09 Thread b00m_chef
I need the code below to generate a form with a list of only names that are 
owned by the user logged in, not all names made by all people.

db.define_table('owner', Field('user', db.auth_user), Field('name', 
'string'))
db.define_table('collar', Field('user', db.auth_user), Field('name', 
'string'), Field('type', 'string'))
db.define_table('puppy', Field('collar', db.collar, requires=IS_IN_DB(db, 
'collar.id', '%(name)s'), Field('owner', db.owner, requires=IS_IN_DB(db, 
'owner.id', '%(name)s'), Field('name', 'string'))

SQLFORM(db.puppy, fields=['name', 'collar'])

How do I make sure only the collars created by the user logged in are 
displayed in the list generated by the SQLFORM above?

-- 





[web2py] how to quote & in markmin

2013-01-09 Thread weheh
How to quote & to get markmin to print & instead of &?

-- 





[web2py] Re: raspberry pi

2013-01-09 Thread Massimo Di Pierro
You are #6 or reddit.com front page! :-)

On Wednesday, 9 January 2013 12:37:45 UTC-6, Peter Etchells wrote:
>
> web2py for home automation:
>>
>>
> http://www.instructables.com/id/Raspberry-Pi-GPIO-home-automation/#intro
>

-- 





Re: [web2py] Re: Official site quotes

2013-01-09 Thread Massimo Di Pierro
We can but should we? Let's discuss it on web2py developers.

On Wednesday, 9 January 2013 18:27:42 UTC-6, Michele Comitini wrote:
>
> massimo btw can we show the #web2py twits not only to @web2py is 
> possible in the admin app? 
>
> 2013/1/9 Alan Etkin >: 
> > Ok. Let me think of something. Thanks 
> > 
> > -- 
> > 
> > 
> > 
>

-- 





Re: [web2py] Re: Official site quotes

2013-01-09 Thread Michele Comitini
massimo btw can we show the #web2py twits not only to @web2py is
possible in the admin app?

2013/1/9 Alan Etkin :
> Ok. Let me think of something. Thanks
>
> --
>
>
>

-- 





[web2py] Re: web2py application cookbook - reporting recipe

2013-01-09 Thread Massimo Di Pierro
The fpdf that comes with web2py has been modifed from the official one (to 
fix some compatibility problems) and changes where never merged into the 
official fpdf.

On Wednesday, 9 January 2013 17:25:01 UTC-6, Alan Etkin wrote:
>
> > hello
> > i was reading the book and using the code for the label/badge generation 
> i got an error on
>
> Odd. I think I tested that example with Linux. Perhaps this is caused by a 
> code update in the fpdf library.
>

-- 





[web2py] width

2013-01-09 Thread Saba
db.define_table('emp',
Field('name') -- some of the data in this column has really long values.
)
 
 db.define_table('emp_details',
Field('name'),requires=[IS_IN_DB(db,'employee.name')]),
Field('details')
)
 
I'm using SQLFORM.grid to manage the data in the above tables. The 
SQLFORM.grid for the emp_details creates a dropdown list for the name 
column. Some of the data in this column are really lengthy and I can't 
actually see the whole value. How can I increase the width of the dropdown 
so I can see the whole value. can you please suggest?

-- 





[web2py] Re: web2py application cookbook - reporting recipe

2013-01-09 Thread Alan Etkin
> hello
> i was reading the book and using the code for the label/badge generation 
i got an error on

Odd. I think I tested that example with Linux. Perhaps this is caused by a 
code update in the fpdf library.

-- 





[web2py] Re: error in mysql ?

2013-01-09 Thread samuel bonilla
thanks bruno. you're a genius

El jueves, 3 de enero de 2013 20:30:53 UTC-5, samuel bonilla escribió:
>
> this is the error
>
>  (1452, 'Cannot add or update a 
> child row: a foreign key constraint fails 
> (`samuel$otra`.`article_category`, CONSTRAINT `article_category_ibfk_1` 
> FOREIGN KEY (`parent_id`) REFERENCES `article_category` (`id`) ON DELETE 
> CASCADE)')
>
> help me please
>

-- 





Re: [web2py] Re: SQLFORM Next Item in Database

2013-01-09 Thread Derek
Well, perhaps you could have a function called 'getNextID' which would 
query the database for the next higher ID value.

On Wednesday, January 9, 2013 11:15:21 AM UTC-7, D.P. wrote:
>
> I considered that idea, but the selection from the larger database may not 
> always be consecutive in ID value.  In that scenario, a user may end up 
> editing an entry that the shouldn't have been looking at in the first place.
>
> Good suggestion though.
>
>
> On Tue, Jan 8, 2013 at 3:57 PM, Derek >wrote:
>
>> It seems to me that you could add a 'next' button on that page, which 
>> would take request.args(0)+1 and formulate your HREF that way.
>>
>>
>> On Tuesday, January 8, 2013 2:43:46 PM UTC-7, D.P. wrote:
>>>
>>> I'm using solidtable to pull a selection from a database and display 
>>> that selection (with the ability to edit the db entry) to the user.  I 
>>> added an extra column with the code:
>>>
>>> extracolumns = [{'label': A('Edit', _href='#'),
>>>  'content': lambda row, rc: A('Edit', _href=
>>> 'display_database/%s' % row.id)}
>>> ]
>>>
>>> which calls the function using sqlform
>>>
>>> def display_database():
>>> record = db.studentGrades(request.args(**0)) or redirect(URL(
>>> 'back_home'))
>>> form = SQLFORM(db.studentGrades, record)
>>> if form.process().accepted:
>>> response.flash = 'Updated Student Record'
>>> redirect(URL(r=request, f='back_home'))
>>> elif form.errors:
>>> response.flash = 'Form has errors!'
>>> return dict(form=form)
>>>
>>>
>>>
>>> It would be much easier for the user if they could click a "next" button 
>>> to scroll through the selection.  Is there functionality in sqlform or some 
>>> other way to allow users to scroll through only a selection within a 
>>> database?  So instead of returning to the solidtable view, the user could 
>>> just edit the next row in the database selection.
>>>
>>> dp
>>>
>>  -- 
>>  
>>  
>>  
>>
>
>
>
> -- 
> D.P. 
>

-- 





Re: [web2py] Re: cpdb errors

2013-01-09 Thread Simon Ashley
9.1 (fresh install yesterday)

-- 





Re: [web2py] Re: cpdb errors

2013-01-09 Thread Massimo Di Pierro
which postgres version?

On Wednesday, 9 January 2013 16:46:45 UTC-6, Simon Ashley wrote:
>
> Just confirming that csv imports fail with Postgres on Ubuntu 12.10, but 
> both sqlite and mysql import fine. 
>
> Suspect its a postgres issue, and will attempt different adapters/ 
> refactor of the DAL table def to try and identify the cause
> Error message is fairly generic.
>  
>
>
> 
>
>  
>>
>>

-- 





Re: [web2py] Re: cpdb errors

2013-01-09 Thread Simon Ashley
Just confirming that csv imports fail with Postgres on Ubuntu 12.10, but 
both sqlite and mysql import fine. 

Suspect its a postgres issue, and will attempt different adapters/ refactor 
of the DAL table def to try and identify the cause
Error message is fairly generic.
 



 
>
>

-- 





[web2py] Re: raspberry pi

2013-01-09 Thread Paul Gerrard


On Wednesday, 9 January 2013 22:33:18 UTC, Paul Gerrard wrote:
>
>
>
> On Sunday, 23 December 2012 04:49:45 UTC, Paul Gerrard wrote:
>>
>> I've had two RPIs for several months. My first task was to install Web2py 
>> and our app on it (Apache, MySQL and 90 tables etc.) and it worked fine. I 
>> used an 8Gb SD card. It wasn't lightning fast, but as a potential test/demo 
>> environment it worked fine.
>>
>> Paul.
>>
>> On Wednesday, 9 January 2013 22:19:50 UTC, Massimo Di Pierro wrote:
>>
>> This is going on reddit.com immediately!
>> Time for me to buy a raspberrypi.
>>
>> Massimo
>>
>>
>>
>> On Wednesday, 9 January 2013 12:37:45 UTC-6, Peter Etchells wrote:
>>>
>>> web2py for home automation:


>>> http://www.instructables.com/id/Raspberry-Pi-GPIO-home-automation/#intro
>>>
>>

-- 





[web2py] Re: raspberry pi

2013-01-09 Thread Paul Gerrard


On Sunday, 23 December 2012 04:49:45 UTC, Paul Gerrard wrote:
>
> I've had two RPIs for several months. My first task was to install Web2py 
> and our app on it (Apache, MySQL and 90 tables etc.) and it worked fine. I 
> used an 8Gb SD card. It wasn't lightning fast, but as a potential test/demo 
> environment it worked fine.
>
> Paul.
>
> On Wednesday, 9 January 2013 22:19:50 UTC, Massimo Di Pierro wrote:
>
> This is going on reddit.com immediately!
> Time for me to buy a raspberrypi.
>
> Massimo
>
>
>
> On Wednesday, 9 January 2013 12:37:45 UTC-6, Peter Etchells wrote:
>>
>> web2py for home automation:
>>>
>>>
>> http://www.instructables.com/id/Raspberry-Pi-GPIO-home-automation/#intro
>>
>

-- 





[web2py] Re: Syntax allowed in app names.

2013-01-09 Thread Massimo Di Pierro
Can you please open a ticket about this?

On Wednesday, 9 January 2013 14:25:33 UTC-6, rh wrote:
>
> I created some apps named like so: 
> app.1 
> app.2 
>
> via the admin interface and it creates them but those apps don't show up 
> with the other apps in the admin. 
>
> It seems to me that if that syntax for an app name is wrong then the admin 
> interface should not allow that. 
> If the syntax is ok then there is a bug in the admin interface. 
> I am using 2.3.2 stable. 
>
>

-- 





[web2py] Re: raspberry pi

2013-01-09 Thread Massimo Di Pierro
This is going on reddit.com immediately!
Time for me to buy a raspberrypi.

Massimo



On Wednesday, 9 January 2013 12:37:45 UTC-6, Peter Etchells wrote:
>
> web2py for home automation:
>>
>>
> http://www.instructables.com/id/Raspberry-Pi-GPIO-home-automation/#intro
>

-- 





Re: [web2py] Re: new plugin - web2py Form Wizard - PowerFormWizard

2013-01-09 Thread juaneduardo
Bruno to solve 
'PowerFormWizard' object has no attribute 'readonly'


 I added 2 lines to powerForm plugin

In modules/plugin_PowerFormWizard.py
def __init__(self, 
 table, 
 steps, 
 formstyle = 'divs',
 options={},
 _id = 'powerformwizard',
 record = None,
 fields = None,
 ignore_rw = False, 
 record_id=None,
 readonly=None, #maybe another value for default
 **attributes
 ):

if formstyle not in ['divs','ul']:
raise AttributeError("SQLFORM formstyle not accepted")

from gluon import current
response = current.response
self.T = current.T
self.table = table
self.formstyle = formstyle
self.attributes = attributes
self.ignore_rw = ignore_rw
self.record_id = record_id
self.options = options
self._id = _id
self.readonly=readonly

and the problem is gone



El lunes, 23 de julio de 2012 20:46:36 UTC-4, rochacbruno escribió:
>
> fixed link for app:
>
>
> https://github.com/mdipierro/web2py-recipes-source/raw/master/apps/04_advanced_forms/web2py.app.form_wizard.w2p
>

-- 





[web2py] Re: auth.wiki deployment issue

2013-01-09 Thread Alan Etkin
> Just a little bit of a pain.  It is only a one off task, but would a 
Submit All button be appropriate on the Manage Pages page ?

A workaround could be:

# content setup (after changing the app url)
for wiki in db(..).select()
wiki.update_record(html=MARKMIN(wiki.body).xml())

-- 





[web2py] Re: Official site quotes

2013-01-09 Thread Alan Etkin
Ok. Let me think of something. Thanks

-- 





[web2py] Re: auth.wiki deployment issue

2013-01-09 Thread Andrew W
and again:
I edited each page and submitted.   All OK.Just a little bit of a pain. 
 It is only a one off task, but would a Submit All button be appropriate on 
the Manage Pages page ?



On Thursday, January 10, 2013 8:42:34 AM UTC+13, Andrew W wrote:
>
> I'll answer my own questions :) :
> It's because the wiki page saves the body (user entered content) and the 
> generated html separately.  The html has not been regenerated.
>
> How do I get it to regenerate all of the pages after deployment in the new 
> environment ?
>
> Thanks
>
> Andrew W
>
>
> On Thursday, January 10, 2013 8:32:58 AM UTC+13, Andrew W wrote:
>>
>> Another Big Issue that I only just found after stopping my local rocket 
>> server:
>> None of the Page Images are displaying.  They are obviously looking for 
>> the localhost reference, which was looking great when I was also running 
>> locally.
>>
>> Looking at the html I see the following in the menu  (Looks OK)
>> > data-toggle="dropdown">About Us
>>
>> But my wiki images look like:
>> http://127.0.0.1:8000/PerformanceComposites/default/index/6/carbonweave.jpg"; 
>> alt="Carbon Weave" style="float:right">
>>
>> And a link looks like:
>> http://127.0.0.1:8000/PerformanceComposites/default/index/project1";>Current 
>> Projects
>>
>>
>>
>>
>> On Thursday, January 10, 2013 8:19:23 AM UTC+13, Andrew W wrote:
>>>
>>> Hi,
>>> I need some help please.  I've just deployed my first auth.wiki app.   
>>> I'll let you know what it is once it's working properly.
>>>
>>> I've deployed to HostGator using web2py 2.3.2  (and the posts in this 
>>> forum on the subject were very helpful).
>>> Using render='markmin'
>>>
>>> Everything was looking good on my local machine.  But I have two issues:
>>> 1) The problem is that all of my page links point back to 127.0.0.1.  
>>> Something like @products on the menu works fine, but as a link on 
>>> the page it looks for 127.0.0.1.
>>>
>>> and 2) I have @{component:default/contact_details.load} on one page, 
>>> which works fine locally, but I get an invalid request on the deployed app.
>>> I've cleaned the app before deploying, removed any .pyc files, and 
>>> checked that I haven't hardcoded anything.
>>> I did change the app folder name to init on the deployed server (wonder 
>>> if that has anything to do with it).
>>>
>>> Thanks
>>>
>>>

-- 





[web2py] Re: auth.wiki deployment issue

2013-01-09 Thread Andrew W
I'll answer my own questions :) :
It's because the wiki page saves the body (user entered content) and the 
generated html separately.  The html has not been regenerated.

How do I get it to regenerate all of the pages after deployment in the new 
environment ?

Thanks

Andrew W


On Thursday, January 10, 2013 8:32:58 AM UTC+13, Andrew W wrote:
>
> Another Big Issue that I only just found after stopping my local rocket 
> server:
> None of the Page Images are displaying.  They are obviously looking for 
> the localhost reference, which was looking great when I was also running 
> locally.
>
> Looking at the html I see the following in the menu  (Looks OK)
>  data-toggle="dropdown">About Us
>
> But my wiki images look like:
> http://127.0.0.1:8000/PerformanceComposites/default/index/6/carbonweave.jpg"; 
> alt="Carbon Weave" style="float:right">
>
> And a link looks like:
> http://127.0.0.1:8000/PerformanceComposites/default/index/project1";>Current 
> Projects
>
>
>
>
> On Thursday, January 10, 2013 8:19:23 AM UTC+13, Andrew W wrote:
>>
>> Hi,
>> I need some help please.  I've just deployed my first auth.wiki app.   
>> I'll let you know what it is once it's working properly.
>>
>> I've deployed to HostGator using web2py 2.3.2  (and the posts in this 
>> forum on the subject were very helpful).
>> Using render='markmin'
>>
>> Everything was looking good on my local machine.  But I have two issues:
>> 1) The problem is that all of my page links point back to 127.0.0.1.  
>> Something like @products on the menu works fine, but as a link on the 
>> page it looks for 127.0.0.1.
>>
>> and 2) I have @{component:default/contact_details.load} on one page, 
>> which works fine locally, but I get an invalid request on the deployed app.
>> I've cleaned the app before deploying, removed any .pyc files, and 
>> checked that I haven't hardcoded anything.
>> I did change the app folder name to init on the deployed server (wonder 
>> if that has anything to do with it).
>>
>> Thanks
>>
>>

-- 





[web2py] Re: auth.wiki deployment issue

2013-01-09 Thread Andrew W
Another Big Issue that I only just found after stopping my local rocket 
server:
None of the Page Images are displaying.  They are obviously looking for the 
localhost reference, which was looking great when I was also running 
locally.

Looking at the html I see the following in the menu  (Looks OK)
About Us

But my wiki images look like:
http://127.0.0.1:8000/PerformanceComposites/default/index/6/carbonweave.jpg";
 
alt="Carbon Weave" style="float:right">

And a link looks like:
http://127.0.0.1:8000/PerformanceComposites/default/index/project1";>Current
 
Projects




On Thursday, January 10, 2013 8:19:23 AM UTC+13, Andrew W wrote:
>
> Hi,
> I need some help please.  I've just deployed my first auth.wiki app.   
> I'll let you know what it is once it's working properly.
>
> I've deployed to HostGator using web2py 2.3.2  (and the posts in this 
> forum on the subject were very helpful).
> Using render='markmin'
>
> Everything was looking good on my local machine.  But I have two issues:
> 1) The problem is that all of my page links point back to 127.0.0.1.  
> Something like @products on the menu works fine, but as a link on the 
> page it looks for 127.0.0.1.
>
> and 2) I have @{component:default/contact_details.load} on one page, which 
> works fine locally, but I get an invalid request on the deployed app.
> I've cleaned the app before deploying, removed any .pyc files, and checked 
> that I haven't hardcoded anything.
> I did change the app folder name to init on the deployed server (wonder if 
> that has anything to do with it).
>
> Thanks
>
>

-- 





[web2py] Re: About web2py videos and stuff

2013-01-09 Thread Alan Etkin
> El miércoles, 9 de enero de 2013 13:13:51 UTC-3, Massimo Di Pierro 
escribió:+1000 (I am bad at making videos)

Sorry for the repeated information, but: for PyConAr 2012, we've developed 
an OS web2py app for storing and showing video streams (from local files or 
remote streams) that provides slides and subtitle sincronization online. 
Also supports .rst subtitle file inport/export. It needs improvements 
(specially css/layout), but it's fully functional. In fact, "Web 
development should be Easy" was posted there and I'm in the process of 
translating it (just could translate a couple of lines though). Note that 
any registered web user can edit it's own subtitles and it supports 
multiple languages.

It's accessible from here: http://ar.pycon.org/video2py
And the complete source code is at http://code.google.com/p/video2py
For any issue/patch/comment please use the project page.

-- 





[web2py] auth.wiki deployment issue

2013-01-09 Thread Andrew W
Hi,
I need some help please.  I've just deployed my first auth.wiki app.   I'll 
let you know what it is once it's working properly.

I've deployed to HostGator using web2py 2.3.2  (and the posts in this forum 
on the subject were very helpful).
Using render='markmin'

Everything was looking good on my local machine.  But I have two issues:
1) The problem is that all of my page links point back to 127.0.0.1.  
Something like @products on the menu works fine, but as a link on the 
page it looks for 127.0.0.1.

and 2) I have @{component:default/contact_details.load} on one page, which 
works fine locally, but I get an invalid request on the deployed app.
I've cleaned the app before deploying, removed any .pyc files, and checked 
that I haven't hardcoded anything.
I did change the app folder name to init on the deployed server (wonder if 
that has anything to do with it).

Thanks

-- 





[web2py] Re: SQLFORM widget support for wider range of input types

2013-01-09 Thread Alan Etkin
I'll try. Thanks. That's not an easy task though, there are some literary 
skills involved (for posting anything worth the link of course).

-- 





[web2py] Re: raspberry pi

2013-01-09 Thread Peter Etchells
web2py for home automation:
>
>
http://www.instructables.com/id/Raspberry-Pi-GPIO-home-automation/#intro

-- 





[web2py] Re: raspberry pi

2013-01-09 Thread Peter Etchells


On Tuesday, 13 March 2012 23:04:40 UTC+13, Ramos wrote:
>
> it would be nice to be able to install web2py in raspberry pi
>
> http://www.raspberrypi.org/
>

-- 





Re: [web2py] Re: SQLFORM Next Item in Database

2013-01-09 Thread D.P. Clark
I considered that idea, but the selection from the larger database may not
always be consecutive in ID value.  In that scenario, a user may end up
editing an entry that the shouldn't have been looking at in the first place.

Good suggestion though.


On Tue, Jan 8, 2013 at 3:57 PM, Derek  wrote:

> It seems to me that you could add a 'next' button on that page, which
> would take request.args(0)+1 and formulate your HREF that way.
>
>
> On Tuesday, January 8, 2013 2:43:46 PM UTC-7, D.P. wrote:
>>
>> I'm using solidtable to pull a selection from a database and display that
>> selection (with the ability to edit the db entry) to the user.  I added an
>> extra column with the code:
>>
>> extracolumns = [{'label': A('Edit', _href='#'),
>>  'content': lambda row, rc: A('Edit', _href=
>> 'display_database/%s' % row.id)}
>> ]
>>
>> which calls the function using sqlform
>>
>> def display_database():
>> record = db.studentGrades(request.args(**0)) or redirect(URL(
>> 'back_home'))
>> form = SQLFORM(db.studentGrades, record)
>> if form.process().accepted:
>> response.flash = 'Updated Student Record'
>> redirect(URL(r=request, f='back_home'))
>> elif form.errors:
>> response.flash = 'Form has errors!'
>> return dict(form=form)
>>
>>
>>
>> It would be much easier for the user if they could click a "next" button
>> to scroll through the selection.  Is there functionality in sqlform or some
>> other way to allow users to scroll through only a selection within a
>> database?  So instead of returning to the solidtable view, the user could
>> just edit the next row in the database selection.
>>
>> dp
>>
>  --
>
>
>
>



-- 
D.P.

-- 





Re: [web2py] Re: cpdb errors

2013-01-09 Thread Martin Senecal
I don't think so. Once Simon  unquoted his cmd line option values, he was able 
to do a DB copy with the following OS/DB  combinations:

Windows + sqlite
Windows + mysql

But is reporting issues with
Windows + postgres (memory leak?)

His plan is to repeat the same steps but on a linux system, then compare/diff 
output.

I think it is unrelated to the script, but i dont have a windows machine to 
test/debug.

Mart :)

Sent from mart's iPhone

On 2013-01-09, at 8:35 AM, Massimo Di Pierro  wrote:

> Is there still an open issue here?
> 
> On Tuesday, 8 January 2013 04:58:58 UTC-6, Simon Ashley wrote:
>> 
>> That's a negative on cache.py. 
>> It's from a nightly build pulled about 5 days ago.
>> The csv in question is about 150k records. 
>> (have pruned it down to a test of 10 records, and they import OK).
>> Has about 140 fields, quite a few nulls, and have compensated for the 
>> adapter's postgres decimal precision issue.
>> (its the largest table in the app, and others appear to import OK)
>> 
>> Still building a u12.10 environment under vmware to test 
>> (linux skills are rusty but coming back)
> -- 
>  
>  
>  

-- 





[web2py] Re: new plugin - web2py Form Wizard - PowerFormWizard

2013-01-09 Thread Massimo Di Pierro
Is this down? http://labs.blouweb.com/powerformwizard

On Wednesday, 29 June 2011 09:33:10 UTC-5, rochacbruno wrote:
>
> Hi,
>
> I just created a new plugin for stepped form wizards.
>
> I made it last night, so it is not tested very well, I would like your 
> help to test it.
>
> web2py PowerFormWizard Plugin - based on Jquery Stepy
>
> - Steps
> - Customizable titles
> - Server side validation
> - Client side validation (with jquery validate)
> - Custom css
> - JS Callbaks
> - Error images
>
> Take a look: http://labs.blouweb.com/powerformwizard
>
>
> This plugin is the second plugin of blouweb PowerPlugins, I am now 
> starting the third one which I hope to have the first version soon.
>
> http://labs.blouweb.com
>
> Suggestions, testers, issues, contributions etc on bitbucket: 
> https://bitbucket.org/rochacbruno/powerformwizard 
>
> Hope it helps someone!
>
> Thanks.
>
> --
> Bruno Rocha
> [ About me: http://zerp.ly/rochacbruno ]
> [ Aprenda Python: 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] Re: Official site quotes

2013-01-09 Thread Massimo Di Pierro
I cannot edit a quote from twitter. How about you you tweet something about 
web2py and I link it in the main page?

On Thursday, 27 December 2012 06:46:26 UTC-6, Alan Etkin wrote:
>
> I think this should be changed:
>
> - Quotes by tech reviewers/users should take precedence over quotes by 
> framework contributors/developers.
> - "... it's 2011, not 1999 ..." has become outdated.
>
> I know this are small details but this quotes are in the first page of the 
> framework site with a big font.
>

-- 





[web2py] Re: error in mysql ?

2013-01-09 Thread rochacbruno
I found the problem,

The problem is in Category basemodel

https://github.com/rochacbruno/Movuca/blob/master/modules/datamodel/article.py#L172

It has fixtures which runs if category table is empty, it is needed because 
a "default" general category is always needed, category has self references 
because category can be nested (subcategories)


I will try to solve the problem in a better way and commit with changes I 
have made in MOvuca core, now it is much simpler using the new DAL 
lazy_tables.

-- 





[web2py] Re: SQLFORM.factory + Multiple Tables + Upload Field + GAE Blob Problem

2013-01-09 Thread Massimo Di Pierro
Looking into this. Can you confirm the problem is isolated to uploads on 
GAE when using SQLFORM.factory(...) with more than one table in the 
arguments?

On Tuesday, 21 August 2012 13:19:47 UTC-5, JungHyun Kim wrote:
>
>
> I found a work around to solve this problem
>
> I added these 3 lines after form accepted
>
> if request.env.web2py_runtime_gae:
> request.vars.file.file.seek(0)
> form.vars.file_blob = request.vars.file.file.read()
>
>
> Cause file_blob was None, I just set it.
>
> This thread was helpful.
>
> https://groups.google.com/forum/?fromgroups=#!search/%5Bweb2py%5D$20Re:$20Uploading$20Excel$20and$20reading$20from$20it/web2py/3wKcHVPBFI0/IobcR5OGcu8J
>
>
>
> 2012년 8월 21일 화요일 오후 2시 13분 37초 UTC+9, JungHyun Kim 님의 말:
>>
>>
>> I opend the ticket.
>>
>>  Issue 948 
>> :SQLFORM.factory 
>> + Multiple Tables + Upload Field + GAE Blob Problem
>> Thank you Massimo.
>>
>> 2012년 8월 21일 화요일 오후 12시 25분 57초 UTC+9, Massimo Di Pierro 님의 말:
>>>
>>> Please open a ticket about this.
>>>
>>> On Monday, 20 August 2012 11:49:14 UTC-5, JungHyun Kim wrote:

 Hello!

 I have a problem with upload field.

 I tried to upload a file through one form with two tables using 
 SQLFORM.factory.
 It worked OK on web2py rocket server. But with GAE server (both local 
 test server and real GAE server), I can't upload files.
 The problem is blob is None after uploaded.

 I defined two tables.



 db.define_table('mibmessage',
 Field('user',db.auth_user,writable=False,readable=
 False,default=auth.user_id,),
 Field('message','text',notnull=True,
 widget = lambda field, value: SQLFORM.
 widgets.text.widget(field, value, _class='my-string')),
 Field('attached_files','list:reference 
 attached_file', writable=False, default=[], readable=False),
 )

 db.define_table('attached_file',
 Field('file','upload'),
 Field('original_filename', writable=False, notnull=
 False),
 Field('mibmessage',db.mibmessage),
 )



 And in controller, I saved them.

# Make a form
 form =  SQLFORM.factory(db.mibmessage, db.attached_file, table_name
 ='attached_file')
 
 # Save New Message
 if form.process().accepted:
 try:
 # Insert a message
 message_id = db.mibmessage.insert(**db.mibmessage.
 _filter_fields(form.vars))
 form.vars.mibmessage=message_id
 
 if form.vars.file != '':
 form.vars.original_filename = request.vars.file.
 filename
 # Insert an attached file
 image_file_id = db.attached_file.insert(**db.
 attached_file._filter_fields(form.vars))

 # The message has a list of attached files
 db.mibmessage[message_id].update_record(attached_files
 =[image_file_id])
 db.commit()

 except Exception:
 db.rollback()


 After uploaded, both rows are created. But  'file_blob' field of the 
 'attached_file' is None.

 If I upload an file using SQLFORM with single table (attached_file), it 
 is OK.

 Did I use SQLFORM.factory wrong?

 I read this thread ( 
 https://groups.google.com/forum/?fromgroups#!searchin/web2py/SQLFORM.factory$20one$20form$20multiple$20tables$20blob/web2py/O6D1J8h_MNA/lmFbEF1XzWcJ%5B1-25%5D),
  
 but I couldn't understand it. 







-- 





[web2py] Re: parse_as_rest queries

2013-01-09 Thread Massimo Di Pierro
I have implemented what you requested:

patterns = [ ('/dogs[pet]', db.pet.kind=='dog') ]

Can you please check it?

On Monday, 31 December 2012 11:30:34 UTC-6, DenesL wrote:
>
> +1 for an extended syntax instead of routes.
>
> Blog post about http://blog.2partsmagic.com/restful-uri-design/ which 
> discusses some schemes (about halfway down, with the title "Choosing a URI 
> schemes for resource hierarchies" (sic)).
>
> One thing to think about is how to define the creation of new resources 
> via templates, 
> e.g. /person/new
> where "new" would be a reserved word; the template would be POSTed when 
> filled.
>
> About the /dogs issue:
> it may be solved by having the query parameter at the pattern level 
> instead of at the parse_as_rest level:
> patterns = [ ('/dogs[pet]', query=db.pet.kind=='dog') ]
> pros/cons?
>
>
> Denes
>
> On Sunday, December 30, 2012 1:04:13 AM UTC-5, Massimo Di Pierro wrote:
>>
>> It could be possible via routes but it would be nice it the syntax were 
>> to allow it. I stopped developing it because I though instead of 
>> reinventing the wheel with this syntax we may want to support some 
>> standard. Is there any?
>>>
>>>


-- 





[web2py] Re: cpdb errors

2013-01-09 Thread Massimo Di Pierro
Is there still an open issue here?

On Tuesday, 8 January 2013 04:58:58 UTC-6, Simon Ashley wrote:
>
> That's a negative on cache.py. 
> It's from a nightly build pulled about 5 days ago.
> The csv in question is about 150k records. 
> (have pruned it down to a test of 10 records, and they import OK).
> Has about 140 fields, quite a few nulls, and have compensated for the 
> adapter's postgres decimal precision issue.
> (its the largest table in the app, and others appear to import OK)
>
> Still building a u12.10 environment under vmware to test 
> (linux skills are rusty but coming back)
>
>

-- 





[web2py] Re: SQLFORM widget support for wider range of input types

2013-01-09 Thread Massimo Di Pierro
I opened a thread in web2py-developers. I think we should support html5 
types but we cannot break html4.

On Thursday, 3 January 2013 04:56:33 UTC-6, Alan Etkin wrote:
>
> El domingo, 30 de diciembre de 2012 18:18:12 UTC-3, Massimo Di Pierro 
> escribió:
>>
>> Seems like a good idea. What do other think? If the difference is only in 
>> the type, could we simply override the value of type using a class variable 
>> and use the widget method of the base class
>
>
> I belive the former widgets were HTML 4.01 compliant. Wouldn't it be 
> better to give an optional kwarg to activate HTML5 or a subclass that 
> implements the new specification?
>

-- 





[web2py] Re: PosOnlineStore example:, views/default/invioce.html wrongly named. (Fix)

2013-01-09 Thread Massimo Di Pierro
fixed. thanks.

On Monday, 7 January 2013 10:11:45 UTC-6, web...@uit.co.uk wrote:
>
> In the PosOnlineStore example appliance, views/default/invioce.html should 
> be called views/default/invoice.h
> All that's required to fix this is to rename the file to the correct name.
>
> This doesn't make much difference to the appearance of the application: 
> instead of an invoice that looks like:
>
>  Invoice 
>
> Thank you for your order, this is your invoice code
> 5b6d0f64-7a1b-451c-9a82-92ae5d054f0c 
>
> you get 
>  Invoice 5b6d0f64-7a1b-451c-9a82-92ae5d054f0c 
> designrequestresponsesessiondb tablesdb stats
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> but it is confusing if you try to use the app as a base to build on.
>

-- 





Re: [web2py] Ruby on rails Vulnerability

2013-01-09 Thread Javier Quarite
Yes, indeed this is serious. If there are people here that develop with RoR
should upgrade.
Yesterday someone post about this
http://www.insinuator.net/2013/01/rails-yaml/ (It may not be the right
thing to do, but it helped me to understand)

There's a microframework in ruby called Sinatra and the mantainer released
a gem https://github.com/rkh/rack-protection

Maybe it helps someone :)

-- 





Re: [web2py] Appliance Manage Contacts - invalid view (default/company_create.html)

2013-01-09 Thread António Ramos
I deleted the app. The view does not exist!!!

As some of the appliances, this also have bugs and its not good for web2py
to put a link to appliances that have missing code or errors.

It just doesnt help!


2013/1/9 Marco Mansilla 

> can you show the controller?, maybe it a mistake in the default.py
> contoller defining
>
> def company_create():
>
> return dict()
>
> El Wed, 9 Jan 2013 14:53:01 +
> António Ramos  escribió:
>
> > I got this error in Manage Contacts Appliance
> >
> >
> > invalid view (default/company_create.html)
> > when creating company
> >
> >
> > Thank you
> >
>
> --
>
>
>
>

-- 





[web2py] Re: About web2py videos and stuff

2013-01-09 Thread Massimo Di Pierro
+1000 (I am bad at making videos)

On Wednesday, 9 January 2013 08:39:50 UTC-6, Ramos wrote:
>
> Hello
> i noticed that almost all of the video tutorials about web2py come from 
> the master itself, Maximo
> Maximo needs time to make web2py better. and web2py is not a baby anymore!
>
> If web2py is used as a teaching tool and a lot of students use it, would 
> it not be more productive to have the students help creating video 
> tutorials for others to learn? 
> leaving maximo more time to make web2py even more incredible?
>
> Why not a challenge with a simbolic ( or not) price for the best web2py 
> video tutorial?
>
> Also a lot of video tutorials have no subtitles or comments from the 
> author. This is not good!
>
> A lot of bad stuff out there have good videos. 
> Why dont we have them also?
>
> For newbies, videos are very important. 
>
>
>
>
>
>
>

-- 





[web2py] Ruby on rails Vulnerability

2013-01-09 Thread Massimo Di Pierro
Not to pick on the competition but this is very serious

https://news.ycombinator.com/item?id=5028270

This is as web2py where to do pickle.loads(request.vars.whatever) by 
default in every application. Who sane of mind would do it?

Massimo


-- 





Re: [web2py] Appliance Manage Contacts - invalid view (default/company_create.html)

2013-01-09 Thread Marco Mansilla
can you show the controller?, maybe it a mistake in the default.py
contoller defining

def company_create():

return dict()

El Wed, 9 Jan 2013 14:53:01 +
António Ramos  escribió:

> I got this error in Manage Contacts Appliance
> 
> 
> invalid view (default/company_create.html)
> when creating company
> 
> 
> Thank you
> 

-- 





[web2py] Re: (2, 4, 1, 'alpha.2', datetime.datetime(2013, 1, 8, 15, 30, 47)) trunk: formstyle_bootstrap broken

2013-01-09 Thread Adi
Works. Thanks Massimo!

On Wednesday, January 9, 2013 10:37:19 AM UTC-5, Massimo Di Pierro wrote:
>
> I think this is now fixed in trunk. Can you please check?
>
> On Wednesday, 9 January 2013 08:33:35 UTC-6, Adi wrote:
>>
>>
>> Seems that bootstrap broke in latest trunk. All my forms, which use 
>> bootstrap are returning errors... commenting formstyle='bootstrap' makes it 
>> work fine.
>>
>>
>> Traceback (most recent call last):
>>   File "/Users/adnan/web2py24/gluon/restricted.py", line 212, in restricted
>> exec ccode in environment
>>   File 
>> "/Users/adnan/web2py24/applications/dev_thanemobile/controllers/default.py" 
>> ,
>>  line 2004, in 
>>   File "/Users/adnan/web2py24/gluon/globals.py", line 193, in 
>> self._caller = lambda f: f()
>>   File 
>> "/Users/adnan/web2py24/applications/dev_thanemobile/controllers/default.py" 
>> ,
>>  line 1946, in inquire
>> formstyle='bootstrap', )
>>   File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 1580, in factory
>> **attributes)
>>   File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 1200, in __init__
>> table = self.createform(xfields)
>>   File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 1224, in createform
>> table = formstyle(self, xfields)
>>   File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 768, in 
>> formstyle_bootstrap
>> form['_class'] += ' form-horizontal'
>> TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
>>
>>
>>
>>
>> Function argument list 
>>
>> (form=, 
>> fields=[('no_table_email_address__row', , 
>> , ''), ('no_table_ext_order__row', 
>> , , ''), 
>> ('submit_record__row', '', , '')])
>>  Code listing 
>>
>> 763.
>> 764.
>> 765.
>> 766.
>> 767.
>> 768.
>>
>> 769.
>> 770.
>> 771.
>> 772.
>>
>> return table
>>
>>
>> def formstyle_bootstrap(form, fields):
>> ''' bootstrap format form layout '''
>> form['_class'] += ' form-horizontal'
>>
>> parent = FIELDSET()
>> for id, label, controls, help in fields:
>> # wrappers
>> _help = SPAN(help, _class='help-inline')
>>
>>  Variables form 
>>
>

-- 





[web2py] Re: (2, 4, 1, 'alpha.2', datetime.datetime(2013, 1, 8, 15, 30, 47)) trunk: formstyle_bootstrap broken

2013-01-09 Thread Massimo Di Pierro
I think this is now fixed in trunk. Can you please check?

On Wednesday, 9 January 2013 08:33:35 UTC-6, Adi wrote:
>
>
> Seems that bootstrap broke in latest trunk. All my forms, which use 
> bootstrap are returning errors... commenting formstyle='bootstrap' makes it 
> work fine.
>
>
> Traceback (most recent call last):
>   File "/Users/adnan/web2py24/gluon/restricted.py", line 212, in restricted
> exec ccode in environment
>   File 
> "/Users/adnan/web2py24/applications/dev_thanemobile/controllers/default.py" 
> ,
>  line 2004, in 
>   File "/Users/adnan/web2py24/gluon/globals.py", line 193, in 
> self._caller = lambda f: f()
>   File 
> "/Users/adnan/web2py24/applications/dev_thanemobile/controllers/default.py" 
> ,
>  line 1946, in inquire
> formstyle='bootstrap', )
>   File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 1580, in factory
> **attributes)
>   File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 1200, in __init__
> table = self.createform(xfields)
>   File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 1224, in createform
> table = formstyle(self, xfields)
>   File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 768, in 
> formstyle_bootstrap
> form['_class'] += ' form-horizontal'
> TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'
>
>
>
>
> Function argument list 
>
> (form=, 
> fields=[('no_table_email_address__row', , 
> , ''), ('no_table_ext_order__row', 
> , , ''), 
> ('submit_record__row', '', , '')])
>  Code listing 
>
> 763.
> 764.
> 765.
> 766.
> 767.
> 768.
>
> 769.
> 770.
> 771.
> 772.
>
> return table
>
>
> def formstyle_bootstrap(form, fields):
> ''' bootstrap format form layout '''
> form['_class'] += ' form-horizontal'
>
> parent = FIELDSET()
> for id, label, controls, help in fields:
> # wrappers
> _help = SPAN(help, _class='help-inline')
>
>  Variables form 
>

-- 





Re: [web2py] Re: drop table cascade

2013-01-09 Thread Massimo Di Pierro
Did you do db.commit() after the db.table.drop()?

On Tuesday, 8 January 2013 20:14:23 UTC-6, Liang wrote:
>
> No error shown in the interactive shell after executing the command. But 
> the tables in the database are still there. I use Postgresql 9.2.
>
> On Wed, Jan 9, 2013 at 1:35 AM, Massimo Di Pierro 
> 
> > wrote:
>
>> What do you get? An error? What error?
>>
>>
>> On Friday, January 4, 2013 3:18:32 AM UTC-6, Liang wrote:
>>>
>>> drop('cascade') seems not working.
>>>
>>> On Wednesday, 4 February 2009 14:17:14 UTC+8, mdipierro wrote:

 give this a try. In trunk 

 db.table.drop('cascade') 

 On Feb 3, 11:40 pm, Baron  wrote: 
 > thanks Massimo. 
 > 
 > On Feb 4, 3:28 pm, mdipierro  wrote: 
 > 
 > > sorry, for now you have to do it manually 
 > 
 > > db.executesql('DROP TABLE tablename CASCADE;') 
 > 
 > > perhaps I can add an option to drop/truncate. 
 > 
 > > Massimo 
 > 
 > > On Feb 3, 9:01 pm, Baron  wrote: 
 > 
 > > > When I try to drop or truncate a table I get this error: 
 > 
 > > > ProgrammingError: cannot drop table dump because other objects 
 depend 
 > > > on it 
 > > > HINT:  Use DROP ... CASCADE to drop the dependent objects too. 
 > 
 > > > Deleting from the table works fine because the deletions cascade. 
 Is 
 > > > there a way to truncate or drop tables through the DAL that have 
 > > > foreign key dependencies? 
 > 
 > > > Baron
>>>
>>>  -- 
>>  
>>  
>>  
>>
>
>

-- 





Re: [web2py] About web2py videos and stuff

2013-01-09 Thread Bruno Rocha
I create some videos!

(currently I have 308 web2py videos on my VIMEO account)

But, it is all in Portuguese and major part of them are exclusively for my
students.

+1 for a video contest!


Example of my on line web2py classes.

A complete introduction to web development, Python WSGI and web2py + web2py
debugger
- http://vimeo.com/57032236 (Portuguese) 


- Integrating web2py and Paypal API
http://vimeo.com/55493745 (English)
* but listen, my english is terrible, I made this for a client and I guess
nobody can understand what I said.

- websockerts
http://vimeo.com/38972256 (Portuguese)

- PowerTable and WingIDE
- http://vimeo.com/18447603

=


On Wed, Jan 9, 2013 at 12:39 PM, António Ramos  wrote:

> Hello
> i noticed that almost all of the video tutorials about web2py come from
> the master itself, Maximo
> Maximo needs time to make web2py better. and web2py is not a baby anymore!
>
> If web2py is used as a teaching tool and a lot of students use it, would
> it not be more productive to have the students help creating video
> tutorials for others to learn?
> leaving maximo more time to make web2py even more incredible?
>
> Why not a challenge with a simbolic ( or not) price for the best web2py
> video tutorial?
>
> Also a lot of video tutorials have no subtitles or comments from the
> author. This is not good!
>
> A lot of bad stuff out there have good videos.
> Why dont we have them also?
>
> For newbies, videos are very important.
>
>
>
>
>
>
>  --
>
>
>
>

-- 





[web2py] Appliance Manage Contacts - invalid view (default/company_create.html)

2013-01-09 Thread António Ramos
I got this error in Manage Contacts Appliance


invalid view (default/company_create.html)
when creating company


Thank you

-- 





[web2py] About web2py videos and stuff

2013-01-09 Thread António Ramos
Hello
i noticed that almost all of the video tutorials about web2py come from the
master itself, Maximo
Maximo needs time to make web2py better. and web2py is not a baby anymore!

If web2py is used as a teaching tool and a lot of students use it, would it
not be more productive to have the students help creating video tutorials
for others to learn?
leaving maximo more time to make web2py even more incredible?

Why not a challenge with a simbolic ( or not) price for the best web2py
video tutorial?

Also a lot of video tutorials have no subtitles or comments from the
author. This is not good!

A lot of bad stuff out there have good videos.
Why dont we have them also?

For newbies, videos are very important.

-- 





[web2py] (2, 4, 1, 'alpha.2', datetime.datetime(2013, 1, 8, 15, 30, 47)) trunk: formstyle_bootstrap broken

2013-01-09 Thread Adi

Seems that bootstrap broke in latest trunk. All my forms, which use 
bootstrap are returning errors... commenting formstyle='bootstrap' makes it 
work fine.


Traceback (most recent call last):
  File "/Users/adnan/web2py24/gluon/restricted.py", line 212, in restricted
exec ccode in environment
  File 
"/Users/adnan/web2py24/applications/dev_thanemobile/controllers/default.py" 
,
 line 2004, in 
  File "/Users/adnan/web2py24/gluon/globals.py", line 193, in 
self._caller = lambda f: f()
  File 
"/Users/adnan/web2py24/applications/dev_thanemobile/controllers/default.py" 
,
 line 1946, in inquire
formstyle='bootstrap', )
  File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 1580, in factory
**attributes)
  File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 1200, in __init__
table = self.createform(xfields)
  File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 1224, in createform
table = formstyle(self, xfields)
  File "/Users/adnan/web2py24/gluon/sqlhtml.py", line 768, in 
formstyle_bootstrap
form['_class'] += ' form-horizontal'
TypeError: unsupported operand type(s) for +=: 'NoneType' and 'str'




Function argument list 

(form=, 
fields=[('no_table_email_address__row', , 
, ''), ('no_table_ext_order__row', 
, , ''), 
('submit_record__row', '', , '')])
 Code listing 

763.
764.
765.
766.
767.
768.

769.
770.
771.
772.

return table


def formstyle_bootstrap(form, fields):
''' bootstrap format form layout '''
form['_class'] += ' form-horizontal'

parent = FIELDSET()
for id, label, controls, help in fields:
# wrappers
_help = SPAN(help, _class='help-inline')

 Variables form 

-- 





[web2py] Re: Help with multi tenancy

2013-01-09 Thread Fabiano Faver
I got it. And how can I put this to only auth_user and auth_group too?
So that Sub-admins can have a sqlform.grid with the users that he can see 
and add others? but only inside his company

Em quarta-feira, 9 de janeiro de 2013 11h34min48s UTC-2, David Marko 
escreveu:
>
> Here is feature description in docs:
>
>
> http://web2py.com/books/default/chapter/29/06?search=tenancy#Common-fields-and-multi-tenancy
>
>
>
> Dne středa, 9. ledna 2013 13:31:59 UTC+1 Fabiano Faver napsal(a):
>>
>> Its my first time dealing with multi tenancy and I'm still a bit confused 
>> how i could implement it with my scenario.
>>
>> I've built a app and want to allow that each 'company' access only their 
>> data. Each company have their user admin that can register 
>> products,things,etc and other users and their groups inside it company.
>>
>> Will i need to put a request tenant in auth_user like said  in this 
>> topic: https://groups.google.com/d/msg/web2py/izyKtM-nWPU/G6EDqyWYuOQJ   
>> ?
>>
>> I want to separate data by company_id
>>
>> How can i start this?
>>
>

-- 





[web2py] Re: Help with multi tenancy

2013-01-09 Thread David Marko
Here is feature description in docs:

http://web2py.com/books/default/chapter/29/06?search=tenancy#Common-fields-and-multi-tenancy



Dne středa, 9. ledna 2013 13:31:59 UTC+1 Fabiano Faver napsal(a):
>
> Its my first time dealing with multi tenancy and I'm still a bit confused 
> how i could implement it with my scenario.
>
> I've built a app and want to allow that each 'company' access only their 
> data. Each company have their user admin that can register 
> products,things,etc and other users and their groups inside it company.
>
> Will i need to put a request tenant in auth_user like said  in this topic: 
> https://groups.google.com/d/msg/web2py/izyKtM-nWPU/G6EDqyWYuOQJ   ?
>
> I want to separate data by company_id
>
> How can i start this?
>

-- 





[web2py] Help with multi tenancy

2013-01-09 Thread Fabiano Faver
Its my first time dealing with multi tenancy and I'm still a bit confused 
how i could implement it with my scenario.

I've built a app and want to allow that each 'company' access only their 
data. Each company have their user admin that can register 
products,things,etc and other users and their groups inside it company.

Will i need to put a request tenant in auth_user like said  in this 
topic: https://groups.google.com/d/msg/web2py/izyKtM-nWPU/G6EDqyWYuOQJ   ?

I want to separate data by company_id

How can i start this?

-- 





Re: [web2py] Smartgrid orderby field , descending

2013-01-09 Thread Javier Pepe
Use this:

orderby=~db.table.date


On Wed, Jan 9, 2013 at 7:08 AM, António Ramos  wrote:

> hello, how do i order a smartgrid based on a field in descending order?
> for example the auth event table on date descending
>
> thank you
>
> --
>
>
>
>

-- 





Re: [web2py] Re: Resizing a user uploaded image

2013-01-09 Thread Daniele Pestilli
No, just regular web2py webserver on my machine.

Jan 9, 2013 2:36 AM、Bruno Rocha  のメッセージ:

> are you running on Google App Engine?
> -- 
>  
>  
>  

-- 





Re: [web2py] Re: drop table cascade

2013-01-09 Thread Liang Yi Aris
No error shown in the interactive shell after executing the command. But
the tables in the database are still there. I use Postgresql 9.2.

On Wed, Jan 9, 2013 at 1:35 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> What do you get? An error? What error?
>
>
> On Friday, January 4, 2013 3:18:32 AM UTC-6, Liang wrote:
>>
>> drop('cascade') seems not working.
>>
>> On Wednesday, 4 February 2009 14:17:14 UTC+8, mdipierro wrote:
>>>
>>> give this a try. In trunk
>>>
>>> db.table.drop('cascade')
>>>
>>> On Feb 3, 11:40 pm, Baron  wrote:
>>> > thanks Massimo.
>>> >
>>> > On Feb 4, 3:28 pm, mdipierro  wrote:
>>> >
>>> > > sorry, for now you have to do it manually
>>> >
>>> > > db.executesql('DROP TABLE tablename CASCADE;')
>>> >
>>> > > perhaps I can add an option to drop/truncate.
>>> >
>>> > > Massimo
>>> >
>>> > > On Feb 3, 9:01 pm, Baron  wrote:
>>> >
>>> > > > When I try to drop or truncate a table I get this error:
>>> >
>>> > > > ProgrammingError: cannot drop table dump because other objects
>>> depend
>>> > > > on it
>>> > > > HINT:  Use DROP ... CASCADE to drop the dependent objects too.
>>> >
>>> > > > Deleting from the table works fine because the deletions cascade.
>>> Is
>>> > > > there a way to truncate or drop tables through the DAL that have
>>> > > > foreign key dependencies?
>>> >
>>> > > > Baron
>>
>>  --
>
>
>
>

-- 





[web2py] Smartgrid orderby field , descending

2013-01-09 Thread António Ramos
hello, how do i order a smartgrid based on a field in descending order?
for example the auth event table on date descending

thank you

-- 





[web2py] Re: How to track page visits

2013-01-09 Thread David Marko
If this has to be persistent among server restarts, you should store it 
into database ...

Dne středa, 9. ledna 2013 9:38:34 UTC+1 sasogeek napsal(a):
>
> what code will I put in controllers/views to track the number of times 
> users visit a particular page such that anyone anywhere can see how many 
> times that page has been viewed by anyone anywhere?
> Eg. If I view page A 5 times, and you view page A 3 times, and another 
> person views page A 7 times, someone else who visits that page should see 
> something like
> "Viewed 15 times..."
>
> i was reading about session but if my understanding serves me right, that 
> isn't a global variable, that is it's ip specific? and should the user 
> delete their sessions and cookies, it resets? but that aside, what are my 
> options?
>

-- 





[web2py] How to track page visits

2013-01-09 Thread sasogeek
what code will I put in controllers/views to track the number of times 
users visit a particular page such that anyone anywhere can see how many 
times that page has been viewed by anyone anywhere?
Eg. If I view page A 5 times, and you view page A 3 times, and another 
person views page A 7 times, someone else who visits that page should see 
something like
"Viewed 15 times..."

i was reading about session but if my understanding serves me right, that 
isn't a global variable, that is it's ip specific? and should the user 
delete their sessions and cookies, it resets? but that aside, what are my 
options?

--