[web2py] Re: Table Name from ROWS object

2012-12-27 Thread Massimo Di Pierro
Apparently only in one example: http://web2py.com/books/default/search/29?search=**dict I can add something about this. On Friday, 28 December 2012 01:24:37 UTC-6, at wrote: > > thank you massimo for this interesting and very useful tip ... it would > save my good amount of time > btw, is this

[web2py] Re: Installing the book as an app?

2012-12-27 Thread Nico Zanferrari
Hello, the right URL is https://github.com/mdipierro/web2py-book.git ;-)) BTW, I've just found that it is imported right on PythonAnywhere, but it gives a ticket. Do you have any clue? Should I open a ticket? Nico 'title' web2py™(2, 3, 2, datetime.datetime(2012, 12, 17, 15, 3, 30), 'stab

[web2py] Re: WWW SQL Designer to DAL converter

2012-12-27 Thread Massimo Di Pierro
Elcio, what is your full name? Do you plan to mantain this? If so, I would include a section in the book about it and link your code. Massimo On Thursday, 27 December 2012 18:28:02 UTC-6, Elcio wrote: > > https://github.com/elcio/visualdal > > Feedback and suggestions, please. > > Elcio > http:

Re: [web2py] Re: enum datatype in table definition

2012-12-27 Thread ajith c t
so using the argument db=DAL(' mysql://.. ' , check_reserved=['all']), it restricts the use of the mysql keywords. But the problem is the database which already available in mysql contains table name such "block", other that the "condition" field. So it impossible for me to change the datab

[web2py] Re: Table Name from ROWS object

2012-12-27 Thread at
thank you massimo for this interesting and very useful tip ... it would save my good amount of time btw, is this syntax available in web2py documentation? On Friday, 28 December 2012 12:05:46 UTC+5, Massimo Di Pierro wrote: > > *db((db[table_name].id == rowid) & (db[table_name][myfld] == "")).up

Re: [web2py] WWW SQL Designer to DAL converter

2012-12-27 Thread Massimo Di Pierro
Here is the file I meant to upload. https://dl.dropbox.com/u/18065445/Tmp/web2py.app.SqlDesigner.w2p On Friday, 28 December 2012 01:12:32 UTC-6, Massimo Di Pierro wrote: > > Didn't we have this already? > > http://gaesql.appspot.com/ > > I am not sure who owns that. I think this is the source: >

Re: [web2py] WWW SQL Designer to DAL converter

2012-12-27 Thread Massimo Di Pierro
Didn't we have this already? http://gaesql.appspot.com/ I am not sure who owns that. I think this is the source: web2py.app.SqlDesigner.w2p but I am not 100% sure. Anyway, probably the one by Elcio is better. It would be nice if it could go both ways (export and import). Massimo On Friday, 28

Re: [web2py] Replaced `auth_user` fields 'first_name' and 'last_name' with 'name'; now getting errors

2012-12-27 Thread Alec Taylor
Thanks, but that also isn't working: ` 'Row' object has no attribute 'first_name'` But I do get a different traceback, i.e., here: web2py\gluon\tools.py", line 1285, in navbar user_identifier = user_identifier % self.user On Fri, Dec 28, 2012 at 5:41 PM, Bruno Rocha wrote: > > For the recor

Re: [web2py] Re: Unable to set is_active=True when record_versioning is enabled

2012-12-27 Thread Mandar Vaze / मंदार वझे
On Fri, Dec 28, 2012 at 12:33 PM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > If we allow setting is_active from False to True we would be able to > re-cycle the record and there would be a record of the recycling (who > deleted it, who restored it, and when). Considering there woul

[web2py] Re: enum datatype in table definition

2012-12-27 Thread Massimo Di Pierro
ok, change in trunk. On Friday, 28 December 2012 00:46:05 UTC-6, ajith c t wrote: > > Thanks Niphold, I used your code but now it is showing another error, I > have seen this error before also but dont know whats exactly wrong here, > Below is my table definition, > > db.define_table('some_rule'

[web2py] Re: Table Name from ROWS object

2012-12-27 Thread Massimo Di Pierro
*db((db[table_name].id == rowid) & (db[table_name][myfld] == "")).update( [myfld] = myvalue)* * * *should be* * * *db((db[table_name].id == rowid) & (db[table_name][myfld] == "")).update(**{ myfld:myvalue})* * * On Friday, 28 December 2012 00:40:15 UTC-6, at wrote: > > It's working when I give ta

Re: [web2py] Re: Unable to set is_active=True when record_versioning is enabled

2012-12-27 Thread Massimo Di Pierro
If we allow setting is_active from False to True we would be able to re-cycle the record and there would be a record of the recycling (who deleted it, who restored it, and when). If we clone a deleted record we break references to it and it would be hard to track the consequences of the restora

Re: [web2py] Re: enum datatype in table definition

2012-12-27 Thread ajith c t
Does it mean that i need to change the field name from condition to anything else...or the argument check_reserved=['all'] allows to use the reserved keywords. The manual says it checks for the reserved keywords, but didn't understand whether it will block or skip these keywords. And one more

Re: [web2py] WWW SQL Designer to DAL converter

2012-12-27 Thread Bruno Rocha
Great! It would be nice if we automate the whole process, users put the .xml in /models or /private folder and this script can be called automatically if model doesnt exists, or we can put a button in admin "generate models" --> "upload the xml" I will do some tests! On Thu, Dec 27, 2012 at 10:2

Re: [web2py] Re: enum datatype in table definition

2012-12-27 Thread Bruno Rocha
On Fri, Dec 28, 2012 at 4:46 AM, ajith c t wrote: > condition condition is a MySQL reserved keyword, you can't use this as the name of table or field http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html To solve this kinf od problems. db = DAL("mysql", check_reserved=["all"]) --

[web2py] Re: enum datatype in table definition

2012-12-27 Thread ajith c t
Thanks Niphold, I used your code but now it is showing another error, I have seen this error before also but dont know whats exactly wrong here, Below is my table definition, db.define_table('some_rule', Field('rule_id', 'integer', notnull=True), # (`rule_id` smallint(8) unsigned NOT NULL

Re: [web2py] Replaced `auth_user` fields 'first_name' and 'last_name' with 'name'; now getting errors

2012-12-27 Thread Bruno Rocha
For the record: There is a problem on this line https://github.com/web2py/web2py/blob/master/gluon/tools.py#L1415 If you use auth.signature it will raise an error do I propose to change it to: return '%s %s' % (user.get("first_name", "email"), user.get("last_name", "")) or some other check. --

[web2py] Re: Table Name from ROWS object

2012-12-27 Thread at
It's working when I give table_name after getting table object programatically, but when the same syntax is used for column names in update statement it returns syntax error; please consider the following statement: *db((db[table_name].id == rowid) & (db[table_name][myfld] == "")).update( [myfld

Re: [web2py] Replaced `auth_user` fields 'first_name' and 'last_name' with 'name'; now getting errors

2012-12-27 Thread Bruno Rocha
I think your problem is in navbar() navbar function uses a parameter user_identifier which is DEFAULT to %(first_name)s but you can change it. go to your layout.html and replace auth.navbar(mode="dropdown") with auth.navbar(mode="dropdown", *user_identifier="%(name)s"*) --

[web2py] Can the parametric router 301 redirect from www?

2012-12-27 Thread HittingSmoke
Pretty straight forward question. Can I use the parametric routes.py language to 301 redirect from www.domain.com to domain.com for proper search engine crawling? --

Re: [web2py] Replaced `auth_user` fields 'first_name' and 'last_name' with 'name'; now getting errors

2012-12-27 Thread Bruno Rocha
Please provide a full ticket traceback for us to see where exactly it is happening. On Fri, Dec 28, 2012 at 4:21 AM, Alec Taylor wrote: > Replaced auth_user fields 'first_name' and 'last_name' with 'name'; > now I am getting errors. > > My reasoning for using a single 'name' field is to shorten

[web2py] Replaced `auth_user` fields 'first_name' and 'last_name' with 'name'; now getting errors

2012-12-27 Thread Alec Taylor
Replaced auth_user fields 'first_name' and 'last_name' with 'name'; now I am getting errors. My reasoning for using a single 'name' field is to shorten the time it takes for new users to sign up. They are able to add more to their profile after this, but the concept with my website is people will

Re: [web2py] Re: Unable to set is_active=True when record_versioning is enabled

2012-12-27 Thread Mandar Vaze / मंदार वझे
> You should be able to clone a deleted record however. I agree. An ability to "clone" the deleted record would be great. I assume no such feature exists (correct ? I didn't find any) If you are just using your auditing log like a recycle bin, then please > name it as such. > Minor nitpick - Cu

[web2py] Re: Table Name from ROWS object

2012-12-27 Thread at
thanks all for the prompt response & help. regards On Thursday, 27 December 2012 19:41:45 UTC+5, Anthony wrote: > > * > db(db[tname].id == rowid).select() > > *or just: > > db[tname](rowid) > > Anthony > > On Thursday, December 27, 2012 9:35:55 AM UTC-5, at wrote: >> >> >> W

[web2py] Found correct SQL for left joins with is_active; can dal emit this query?

2012-12-27 Thread Cliff Kachinske
Works with Postgres. Not sure about other rdbms. The query should look like this: SELECT parent_table.some_field, child_table.other_field FROM parent_table LEFT JOIN child_table ON child_table.parent_id = parent_table.id AND child_table.is_active = 'T' WHERE parent_table.is_active = 'T'; I am

Re: [web2py] Re: session.flash not working?

2012-12-27 Thread Massimo Di Pierro
Please post an example to reproduce the problem. Could it be a js issue? Do you get chrome errors? Is the flash in the page text? On Thursday, 27 December 2012 17:55:46 UTC-6, VP wrote: > > session.flash does not work properly for me either (latest web2py stable > version). > > when i redirect t

[web2py] Re: Installing the book as an app?

2012-12-27 Thread Tim Richardson
On Friday, 28 December 2012 00:46:05 UTC+11, Massimo Di Pierro wrote: > > You may not have python-git installed. On my mac, I did easy_install gitpython which succeeded. However, loading the book app from the github URL failed with the same message as before. --

Re: [web2py] Deploy nginx + uwsgi

2012-12-27 Thread Bruno Rocha
I see something strange, your 80 port is using IP adress and 443 is using unix socket. Can you access using https:// ?? On Fri, Dec 28, 2012 at 1:43 AM, FERNANDO VILLARROEL wrote: > Dear All. > > I am trying to migrated my web2py applications from apache to nginx + > uwsgi. > > So i did configur

Re: [web2py] Deploy nginx + uwsgi

2012-12-27 Thread FERNANDO VILLARROEL
Dear Bruno. Not i am using only http. maybe I should delete the https config of my nginx file (443). But i need help for i can config the /etc/uwsgi/administrator.xml for deploy the application /home/www-data/web2py/applications/administrator with my domain administartor.mydomain.com Regards. --

[web2py] Deploy nginx + uwsgi

2012-12-27 Thread FERNANDO VILLARROEL
Dear All. I am trying to migrated my web2py applications from apache to nginx + uwsgi. So i did configured a Ubuntu Server, i follow the script : http://code.google.com/p/web2py/source/browse/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh My problem is i can't deploy mi domain: administrator.midoma

Re: [web2py] Re: session.flash not working?

2012-12-27 Thread VP
session.flash does not work properly for me either (latest web2py stable version). when i redirect to the same controller , it works for some controller and doesn't work for other controllers. Have no idea why. --

[web2py] important. help with book 5th ed acknowledgments

2012-12-27 Thread Massimo Di Pierro
I am updating the book acknowledgements. Am I forgetting somebody? Please do not be shy. If you are not there and you should be assume it is an oversight and not intentional. One reasons probably you are not there is that I only know your username but not your full name. Let me know asap. Ada

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

2012-12-27 Thread Massimo Di Pierro
If the labor is divided than I cannot pay because it is too complicated. But if you do all of them then I will be happy to pay you. We can discuss this off-line when you send me the samples. Massimo On Thursday, 27 December 2012 16:03:31 UTC-6, Roberto Perdomo wrote: > > I can help with that. T

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

[web2py] Re: new admin in trunk

2012-12-27 Thread Alan Etkin
Looks nice. Really. I didn't find any issues so far with a basic usage. El lunes, 24 de diciembre de 2012 17:00:29 UTC-3, Massimo Di Pierro escribió: > > As a Christmas present (not from me but from Paolo) there is a new admin > in trunk based on Bootstrap. Please check it out. > If this is ok w

[web2py] Re: delete uploads with SQLFORM.factory

2012-12-27 Thread Paolo
Hi Massimo, thank for the answer, I updated the code but the problem is still there, I made several tests, no one figured out what is wrong. So that I tried to simplify the code as follows: db.define_table('test_img', Field("picture", "upload", uploadfolder=os.path.join(request.fol

[web2py] Re: wiki now partially documented

2012-12-27 Thread Alan Etkin
> > auth.extra_fields["wiki"] > Sorry, auth.settings.extra_fields["wiki_..."], you get the idea :P. --

[web2py] Re: wiki now partially documented

2012-12-27 Thread Alan Etkin
El jueves, 27 de diciembre de 2012 17:40:39 UTC-3, Massimo Di Pierro escribió: > > Could you add a paragraph about resolve? I think you added the feature and > you can explain it better. > I'll send the chapter patch ASAP to add info about resolve=False and auth.extra_fields["wiki"], but I thin

[web2py] book 5th ed. Need help

2012-12-27 Thread 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/mas

[web2py] Re: wiki now partially documented

2012-12-27 Thread Massimo Di Pierro
Could you add a paragraph about resolve? I think you added the feature and you can explain it better. On Thursday, 27 December 2012 12:49:55 UTC-6, Alan Etkin wrote: > > > Also, is auth.wiki("_tag") a new feature? Does it replace the > auth.wiki("slug") argument or they are both supported? > > S

[web2py] Re: delete uploads with SQLFORM.factory

2012-12-27 Thread Massimo Di Pierro
perhaps not the cause of the problem but request.folder+'uploads/pictures' should be os.path.join(request.folder,'uploads','pictures') On Thursday, 27 December 2012 00:30:00 UTC-6, Paolo wrote: > > Hi Massimo, > I've just tried to post and then edit with both SQLFORM.factory having > uploads

[web2py] Re: Encoding works on production but fails in development

2012-12-27 Thread Massimo Di Pierro
Thanks fixed in trunk. On Thursday, 27 December 2012 13:01:11 UTC-6, Felipe Meirelles wrote: > > Hey hey, just solved it, if you can patch: > > dal.py line 4104: > > def connector(driver_args=driver_args): > return rdbms.connect(charset='utf8', **driver_args) > > the credits go

[web2py] Re: wiki now partially documented

2012-12-27 Thread Massimo Di Pierro
Thanks. Will do. On Thursday, 27 December 2012 12:49:55 UTC-6, Alan Etkin wrote: > > > Also, is auth.wiki("_tag") a new feature? Does it replace the > auth.wiki("slug") argument or they are both supported? > > Sorry for posting back, but I found that both auth.wiki(slug) and > auth.wiki(_widget)

[web2py] Re: delete uploads with SQLFORM.factory

2012-12-27 Thread Paolo
Hi, I thought about the option requires, right now I have: requires=[IS_IMAGE(), IS_UPLOAD_FILENAME(extension='jpg|jpeg|png'), IS_IMAGE (extensions=('jpeg', 'png')) I thought that as defined, the field could not be empty, so, I tried to remove any constrain requires=None but then the delete butt

[web2py] Re: Modifying auth.navbar

2012-12-27 Thread Lamps902
Thanks, Anthony. Made the necessary changes. -Lamps On Thursday, December 27, 2012 6:51:01 AM UTC-8, Anthony wrote: > > if not auth.user: > auth.navbar()[3]['_href'] = URL('register') > > auth.navbar() simply returns a SPAN object containing the navbar elements, > so it can be manipulated vi

Re: [web2py] Re: Unable to set is_active=True when record_versioning is enabled

2012-12-27 Thread Derek
Well, if it is in fact an audit log, then you should never be able to undelete, because then your log can't be trusted. You should be able to clone a deleted record however. If you are just using your auditing log like a recycle bin, then please name it as such. I work in the healthcare industr

[web2py] Re: Encoding works on production but fails in development

2012-12-27 Thread Felipe Meirelles
Hey hey, just solved it, if you can patch: dal.py line 4104: def connector(driver_args=driver_args): return rdbms.connect(charset='utf8', **driver_args) the credits goes to this post as in cloud sql documentation is never mentioned this charset parameter to the development d

[web2py] Re: wiki now partially documented

2012-12-27 Thread Alan Etkin
> Also, is auth.wiki("_tag") a new feature? Does it replace the auth.wiki("slug") argument or they are both supported? Sorry for posting back, but I found that both auth.wiki(slug) and auth.wiki(_widget) are supported. Since the arg and kwarg notation is possible, and the former is a bit simple

[web2py] Re: Encoding works on production but fails in development

2012-12-27 Thread Felipe Meirelles
It also fails when rendering the grid, but again, only in development server, wich makes me think its something related to google sdk. Is there some ideia? On Thursday, December 27, 2012 12:51:23 PM UTC-2, Felipe Meirelles wrote: > > I'm using GAE + Google Cloud SQL and when I insert some data to

Re: [web2py] background image not showing

2012-12-27 Thread Bruno Rocha
{{backimage = URL('static','images/logo1.png')}} --

[web2py] background image not showing

2012-12-27 Thread António Ramos
this does not work Hep Thank you --

Re: [web2py] Re: Heroku error: relation "auth_user" already exists

2012-12-27 Thread Alec Taylor
Thanks, deleting the database "addon" there and recreating it with `heroku addons:add heroku-postgresql:dev` did the trick. On Thu, Dec 27, 2012 at 6:11 PM, Massimo Di Pierro wrote: > Don't do drop tables. You should be able to use the heorku interface to drop > the db and make a new one. > > Mas

Re: [web2py] Re: My experience with heroku... also: unable to get database connection

2012-12-27 Thread Alec Taylor
Thanks, that solved it (Well that and my other thread on heroku DB) On Thu, Dec 27, 2012 at 4:40 AM, Massimo Di Pierro wrote: > Did you look at all into: > > https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-heroku.sh > https://github.com/web2py/web2py/blob/master/gluon/contrib/h

[web2py] Re: wiki now partially documented

2012-12-27 Thread Alan Etkin
> El jueves, 27 de diciembre de 2012 12:15:48 UTC-3, Massimo Di Pierro escribió:http://web2py.com/books/default/chapter > /29/03#The-built-in-web2py-wiki

[web2py] wiki now partially documented

2012-12-27 Thread Massimo Di Pierro
http://web2py.com/books/default/chapter/29/03#The-built-in-web2py-wiki --

Re: [web2py] Re: register user agreement. How to?

2012-12-27 Thread Anthony
Try: auth.settings.extra_fields['auth_user'] = [Field('confirm_agreement', 'boolean', default=False, label=A('Accept Agreement', ...), requires=IS_NOT_EMPTY(error_message='You must accept the agreement.'))] Anthony On Thursday, December 27, 2012 9:49:57 AM UTC-5, Ramos wrote: > > Ok, bu

[web2py] Encoding works on production but fails in development

2012-12-27 Thread Felipe Meirelles
I'm using GAE + Google Cloud SQL and when I insert some data to local server with special chars like in "Água" it saves the data, but when i try to retrieve it i get an encoding error from python. In production it is automaticaly encoded to \u00c1gua and saves to DB. Is it some mysql feature tha

[web2py] Re: Modifying auth.navbar

2012-12-27 Thread Anthony
if not auth.user: auth.navbar()[3]['_href'] = URL('register') auth.navbar() simply returns a SPAN object containing the navbar elements, so it can be manipulated via the server-side DOM . Anthony On Thursday, Decemb

Re: [web2py] Re: register user agreement. How to?

2012-12-27 Thread António Ramos
Ok, but if i add required=True does not mean that the check has to be checked! 2012/12/27 Anthony > auth.settings.extra_fields['auth_user'] = [Field('confirm_agreement', > 'boolean', > > default=False, label=A('Accept Agreement', ...))] --

[web2py] Re: Table Name from ROWS object

2012-12-27 Thread Anthony
* db(db[tname].id == rowid).select() *or just: db[tname](rowid) Anthony On Thursday, December 27, 2012 9:35:55 AM UTC-5, at wrote: > > > Wanted to avoid hard-coding table name in the following statement by using > var *tname*, but not successful: any tip pls? > *db(db.tna

[web2py] Re: Table Name from ROWS object

2012-12-27 Thread Massimo Di Pierro
*db(db[tname].id == rowid).select* On Thursday, 27 December 2012 08:35:55 UTC-6, at wrote: > > > Wanted to avoid hard-coding table name in the following statement by using > var *tname*, but not successful: any tip pls? > *db(db.tname.id == rowid).select* > > Thanks > > On T

[web2py] Re: Table Name from ROWS object

2012-12-27 Thread Alan Etkin
> El jueves, 27 de diciembre de 2012 11:35:55 UTC-3, at escribió: > Wanted to avoid hard-coding table name in the following statement by using var *tname*, but not successful: any tip pls? *> db(db.tname.id == rowid).select* You mean you must get the Table object programatically? tname = "" tabl

Re: [web2py] Re: register user agreement. How to?

2012-12-27 Thread Anthony
You could make the label for the field a link that pops up the agreement in a separate window: auth.settings.extra_fields['auth_user'] = [Field('confirm_agreement', 'boolean', default=False, label=A('Accept Agreement', ...))] Anthony On Thursday, December 27, 2012 9:07:01 AM UTC-5, Ramos w

Re: [web2py] Re: register user agreement. How to?

2012-12-27 Thread Massimo Di Pierro
In the user.html page {{if request.args(0)=='register':}} the text of the agreement {{pass}} On Thursday, 27 December 2012 08:07:01 UTC-6, Ramos wrote: > > Yes but how to add the agreement text for the user to read? > > > 2012/12/27 Massimo Di Pierro > > >> >> auth.settings.extra_fields['auth_u

[web2py] Re: Table Name from ROWS object

2012-12-27 Thread at
Wanted to avoid hard-coding table name in the following statement by using var *tname*, but not successful: any tip pls? *db(db.tname.id == rowid).select* Thanks On Thursday, 27 December 2012 19:10:31 UTC+5, at wrote: > > gr8! > *tname,z=my_rows.colnames[0].split('.')* gave the desired table na

[web2py] Re: Get url of uploaded file

2012-12-27 Thread Anthony
Also, see this section: http://web2py.com/books/default/chapter/29/03#An-image-blog Anthony On Thursday, December 27, 2012 9:28:31 AM UTC-5, Paolo Caruccio wrote: > > Following code should work > > {{=URL('download', args=audio.filepath)}} > > Please read > http://web2py.com/books/default/chapt

Re: [web2py] Re: select all fields except field "F1"

2012-12-27 Thread António Ramos
Thank you 2012/12/27 Anthony > or > > fields = [f for f in db.auth_user if f.name != 'first_name'] > > If you just want to prevent that field from appearing in a form or grid, > you can go ahead and include it in the query but set its readable and > writable attributes to False. > > Anthony > >

[web2py] Modifying auth.navbar

2012-12-27 Thread Lamps902
Hi, group. Is there a straightforward way to modify web2py's navbar? I would like to customize the default navbar so that it redirects to a custom 'register' function when that option is selected, keeping all other functionality as it is. Thanks! --

[web2py] Re: select all fields except field "F1"

2012-12-27 Thread Anthony
or fields = [f for f in db.auth_user if f.name != 'first_name'] If you just want to prevent that field from appearing in a form or grid, you can go ahead and include it in the query but set its readable and writable attributes to False. Anthony On Thursday, December 27, 2012 8:40:58 AM UTC-5,

[web2py] Re: Get url of uploaded file

2012-12-27 Thread Paolo Caruccio
Following code should work {{=URL('download', args=audio.filepath)}} Please read http://web2py.com/books/default/chapter/29/04#URL to learn more about URL mapping. Il giorno giovedì 27 dicembre 2012 13:03:07 UTC+1, Eduardo Costa Lopes ha

[web2py] Re: Table Name from ROWS object

2012-12-27 Thread at
gr8! *tname,z=my_rows.colnames[0].split('.')* gave the desired table name thanks very much! best regards On Thursday, 27 December 2012 18:47:07 UTC+5, Massimo Di Pierro wrote: > > Yes and No. You can get rows.colnames and they contain table names . field > name > > On Thursday, 27 December 2012

Re: [web2py] Re: register user agreement. How to?

2012-12-27 Thread António Ramos
Yes but how to add the agreement text for the user to read? 2012/12/27 Massimo Di Pierro > > auth.settings.extra_fields['auth_user']=[Field('confirm_agreement','boolean',default=False)] > > > On Thursday, 27 December 2012 03:32:19 UTC-6, Ramos wrote: >> >> hello, >> what is the best way to add

[web2py] Re: Table Name from ROWS object

2012-12-27 Thread Massimo Di Pierro
Yes and No. You can get rows.colnames and they contain table names . field name On Thursday, 27 December 2012 07:45:52 UTC-6, at wrote: > > > How can we get table name from ROWS object? > > Thanks > --

[web2py] Re: Installing the book as an app?

2012-12-27 Thread Massimo Di Pierro
You may not have python-git installed. Just download the book as a zip from githib and unzip it under applications. On Thursday, 27 December 2012 07:34:01 UTC-6, Tim Richardson wrote: > > With trunk (Version 2.4.1 alpha.2 (2012-12-26 11:54:07) using rocket > server on OS X, I'm trying something

[web2py] Table Name from ROWS object

2012-12-27 Thread at
How can we get table name from ROWS object? Thanks --

[web2py] Re: No handlers could be found for logger "web2py"

2012-12-27 Thread Niphlod
do you have a file named logging.conf in the same folder where web2py.py or web2py.exe is ? Il giorno giovedì 27 dicembre 2012 13:27:44 UTC+1, Ramos ha scritto: > > hello > im testing scheduler and it works but on the console "command line " i > keep getting the message > > > *No handlers could

[web2py] Re: enum datatype in table definition

2012-12-27 Thread Niphlod
Field('condition', requires=IS_IN_SET(['IsEqual','IsNotEqual','IsGreater', 'IsLesser','IsNull','IsNotNull','Likeliness','IsMatch','IsNotMatch','In', 'NotIn','Found','NotFound'])) Il giorno giovedì 27 dicembre 2012 13:30:04 UTC+1, ajith c t ha scritto: > > > > Field('condition', > enum('IsEqual

[web2py] Re: register user agreement. How to?

2012-12-27 Thread Massimo Di Pierro
auth.settings.extra_fields['auth_user']=[Field('confirm_agreement','boolean',default=False)] On Thursday, 27 December 2012 03:32:19 UTC-6, Ramos wrote: > > hello, > what is the best way to add a user agreement checkbox (must be checked!) > when a user registers in an app? > > Thank you > > > Antó

[web2py] Re: select all fields except field "F1"

2012-12-27 Thread Niphlod
all fields are stored into a "special" key named _fields on the table. So, e.g., you could do (not tested) fields = [db.auth_user[f] for f in db.auth_user._fields if f != 'first_name' ] db(db.auth_user.id>0).select(*fields) to select all of them except 'first_name' Il giorno giovedì 27 dice

[web2py] Get url of uploaded file

2012-12-27 Thread Eduardo Costa Lopes
Hi folks, I need to know how can I pass the url of an uploaded file. I'm using jquery media to play mp3 or flv files and the code looks like this: and the player is rendered by: $('a.media').media( { width: 300, height: 20 } ); The script is loaded correctly, but the href value it seems to

Re: [web2py] Re: Edit or delete not committing in sqlform.grid for custom query

2012-12-27 Thread Boris
I think delete is working without problems. I have found the way how to execute delete without the problems. The problem is how to parse delete action. Currently URL for button ends with #null. This is URL I receive when point to Delete button: https:///ssc/admin/admin_devices/5#null but it sh

[web2py] Installing the book as an app?

2012-12-27 Thread Tim Richardson
With trunk (Version 2.4.1 alpha.2 (2012-12-26 11:54:07) using rocket server on OS X, I'm trying something I've never done before: installing an app from a url. The app I want to install is https://github.com/mdipierro/web2py-book I give it the application name 'book'. It fails with Unable to i

[web2py] select all fields except field "F1"

2012-12-27 Thread António Ramos
how can i select all fields from a query except field "F1" using DAL? Thank you António --

[web2py] Official site quotes

2012-12-27 Thread Alan Etkin
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 fon

[web2py] enum datatype in table definition

2012-12-27 Thread ajith c t
Field('condition', enum('IsEqual','IsNotEqual','IsGreater','IsLesser','IsNull','IsNotNull','Likeliness','IsMatch','IsNotMatch','In','NotIn','Found','NotFound'), notnull=True), the above syntax gives me error while defining the table in web2py. how can one specify an enum datatype in web2p

[web2py] No handlers could be found for logger "web2py"

2012-12-27 Thread António Ramos
hello im testing scheduler and it works but on the console "command line " i keep getting the message *No handlers could be found for logger "web2py"* every time the task is run I'm using windows 7 thank you António --

[web2py] Web2py book 4th edition missing "from gluon.scheduler import Scheduler "

2012-12-27 Thread António Ramos
hello i'm reading scheduler sample in book 4th edition chapter 4.18.3 Scheduler (experimental) the line from gluon.scheduler import Scheduler is missing from the example Thank you António --

Re: [web2py] invalid function (appadmin/graph_model)

2012-12-27 Thread Massimiliano
You need to copy welcome/controller/appadmin.py and welcome/view/appadmin.html in your app or create a new app so that you have the new appadmin . Ciao On Thu, Dec 27, 2012 at 11:13 AM, António Ramos wrote: > I have latest web2py with graph model but when i click the button i get > > invalid fu

[web2py] invalid function (appadmin/graph_model)

2012-12-27 Thread António Ramos
I have latest web2py with graph model but when i click the button i get invalid function (appadmin/graph_model) --

[web2py] register user agreement. How to?

2012-12-27 Thread António Ramos
hello, what is the best way to add a user agreement checkbox (must be checked!) when a user registers in an app? Thank you António --