[web2py] Form not working....

2010-01-29 Thread Jason Brower
I have this in the end of my controller... orders = SQLFORM(db.numbers) return dict(form=form) And I simply print it with the view... {{=form}} In that view I use ajax pulls that look for new content in orders and print it on that same page. (I need it so that other people on other browsers can

[web2py] Re: Form not working....

2010-01-29 Thread pistacchio
hi jason, by writing orders = SQLFORM(db.numbers) you are assigning to the variable orders the form. in the following line you return form=form, but the latter is a null object. so, either you change the name of the variable like this: form = SQLFORM(db.numbers) return dict(form=form) {{=form}}

[web2py] plug-in webfolder

2010-01-29 Thread selecta
Here is a webfolder plug-in. It is still quite raw. http://jaguar.biologie.hu-berlin.de/~fkrause/web2py.plugin.webfolder.w2p Feel free to use and improve it. It depends on an improved IS_IN_SET validator. To use the plug-in you need to replace the constructor of IS_IN_SET (gluon/validators.py)

[web2py] Re: Translations stopped working in 1.74.8

2010-01-29 Thread ls1
Massimo, in this case it doesn't matter in which language my app is written. I'm talking about 'welcome' and 'admin' applications which comes with web2py. Current behavior is following: If I set only one language in web browser preferences everything goes ok. That means if I set 'es-es' I receive

[web2py] Re: get or insert shortcut

2010-01-29 Thread selecta
nice work Richard, can you create a plug-in with the code in a model module e.g. model/plugin_dalhelper.py this would make it easy for me an others to install use and improve (if there is still a need for it) your code also if you write updates I guess i could just reinstall the plug-in and have

[web2py] Re: screencast requests

2010-01-29 Thread Mengu
massimo, i can happily do this. dear alex, i have never worked with iphone or android so i cannot help with those. i'm sorry. On Jan 29, 12:43 am, mdipierro mdipie...@cs.depaul.edu wrote: Since I just make thishttp://www.web2py.com/library It would be nice to make a screencast that goes over

[web2py] Re: library app

2010-01-29 Thread Mengu
i have downloaded the latest web2py and the source. after i import the app, i got this error: Traceback (most recent call last): File /home/mengu/projects/web2py/gluon/restricted.py, line 184, in restricted exec ccode in environment File

Re: [web2py] Re: Form not working....

2010-01-29 Thread Jason Brower
Ok I think I got it... I needed to check if it was accepted before it would take it... so I added after the form = bla bla if form.accepts(request.vars, session): response.flash=New order added And it works perfectly. Thanks for the help!! BR, Jason Brower On Fri, 2010-01-29 at 01:00 -0800,

[web2py] help to make a complex model

2010-01-29 Thread Leandro - ProfessionalIT
Friends, I have this situation: My customers quote products and all products in the quote has a separated cost. The sum of all cost for all products of a quote is the price of product for this customer. To map this scenario, I have these tables: a) customer: db.define_table('customer',

Re: [web2py] New site in web2py

2010-01-29 Thread Miguel Lopes
There's some problem with the noticia view since the html of the news body is rendering as text. Congratulations on the site. Nice icon set. Is it opensource / free? Miguel -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group,

[web2py] Re: plug-in webfolder

2010-01-29 Thread leone
Using postgres i debug IntegrityError: insert or update on table plugin_webfolder_files violates foreign key constraint plugin_webfolder_files_parent_fkey DETAIL: Key (parent)=(0) is not present in table plugin_webfolder_files. Have you a suggest? On 29 Gen, 10:38, selecta

[web2py] Re: New site in web2py

2010-01-29 Thread Leandro - ProfessionalIT
Hello Miguel, There's some problem with the noticia view since the html of the news body is rendering as text. Thanks, I forget of XML() function in this page. Congratulations on the site. Thank you. Some details I still have to review and another ideas to a second moment, as comment in the

[web2py] new to web2py, simple question about def return dict

2010-01-29 Thread candide2023
hi, I am new here, in python and web2py as well. I was thinking about to get involved in web programming, I started with php (studied about 2 weeks) and then tried django (about 1 day) and now web2py(about 2 weeks) I am going through the manual. Anyways, there is one poing that I didnt get. Why

Re: [web2py] new to web2py, simple question about def return dict

2010-01-29 Thread tyoc 213
Dictionaries are 'dict' data types, that means key=value set of pairs so is easy to know always the name of a var and the value of the var... If I understand correctly this dictionary is exploted to the view... I mean it's key value pairs are populated to the view for access them directly, some

Re: [web2py] Re: wmd

2010-01-29 Thread Johann Spies
Thanks! Johann -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group

[web2py] Decode field in one to many relation

2010-01-29 Thread ceriox
hi all, i don't know how to decode the field in one to many relation when i show rows i want to decode Customer_storage.Object_id whit Storage.Model for shwo to user a table like this: Object Serial number Serial number sostituitoGaranzia Note ACME12323s332

Re: [web2py] New site in web2py

2010-01-29 Thread Jason Brower
I think those are tango icons, they are public domain. On Fri, 2010-01-29 at 12:50 +, Miguel Lopes wrote: There's some problem with the noticia view since the html of the news body is rendering as text. Congratulations on the site. Nice icon set. Is it opensource / free? Miguel

[web2py] Re: new to web2py, simple question about def return dict

2010-01-29 Thread DenesL
Hi candide and welcome aboard, returning a dict from a web2py function means that you want to call a view with the same name to render the output, as opposed to returning a string which will be the final output. In your views you can use the dict keys as variables to display information, for

[web2py] Re: Translations stopped working in 1.74.8

2010-01-29 Thread mdipierro
You did find a major bug. For now it is a fixed in trunk. Please give it a try. You do not need T.force unless your primary language (the one that does not need trsnalation) is not english. In thi case you should do T.current_languages=['pl', 'pl-pl'] T.force(T.http_accept_language) or simply

[web2py] Re: get or insert shortcut

2010-01-29 Thread mdipierro
On Jan 28, 11:06 pm, Richard richar...@gmail.com wrote: thanks that's much neater. does not do what you think it does. can you explain? It worked for my test cases... You were right. It just looked wrong at a quick look. Sorry I would have looked in more detail. record =

[web2py] Re: library app

2010-01-29 Thread mdipierro
You need to upgrade web2py. On Jan 29, 3:59 am, Mengu whalb...@gmail.com wrote: i have downloaded the latest web2py and the source. after i import the app, i got this error: Traceback (most recent call last):   File /home/mengu/projects/web2py/gluon/restricted.py, line 184, in restricted  

[web2py] Re: format zero IS_IN_DB

2010-01-29 Thread DenesL
bump -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group at

[web2py] Re: help to make a complex model

2010-01-29 Thread mdipierro
db.define_table('product cost', Field('quote_products_id', db.quote_products, requires=IS_IN_DB (db, 'quote_products.id', lambda row: row.product.description')), Field('quote_products_id', db.quote_products, requires=IS_IN_DB (db, 'quote_products.id', 'quote_products.product')),

[web2py] Re: format zero IS_IN_DB

2010-01-29 Thread mdipierro
There is no way to please everybody here. some people ask for zero=None, some for zero='', some for zero='Please choose a value'. There is no right or wrong. I think we should leave the default as is ('', we changed it twice already) and you configure it as needed. Massimo On Jan 29, 9:00 am,

[web2py] Re: help to make a complex model

2010-01-29 Thread mdipierro
P.S. Instead of compute=lambda row: double(row['human_cost'])*double(row ['external_cost']) this should work too compute=lambda row: row['human_cost']*row['external_cost'] not sure, but let us know. On Jan 29, 9:03 am, mdipierro mdipie...@cs.depaul.edu wrote: db.define_table('product

[web2py] Re: plug-in webfolder

2010-01-29 Thread selecta
guess this has something to do with how i define the table i would guess this line does not work Field('parent', 'reference plugin_webfolder_files', default=0, requires = IS_IN_DB(db,'plugin_webfolder_files.id','%(name)s')) you can exchange it with Field('parent', 'integer', default=0, requires =

[web2py] Re: format zero IS_IN_DB

2010-01-29 Thread DenesL
I must insist. The point is that IS_IN_DB and IS_IN_SET now show a spurious empty option by default. The keyword here is default. If you want to introduce a 'choose a value option you should do it explicitly and 'at your own risk', the risk being that it creates an option that when selected will

[web2py] Re: plug-in webfolder

2010-01-29 Thread selecta
maybe it is also a mistake to state default=0 try with default=None or without the default value On Jan 29, 4:19 pm, selecta gr...@delarue-berlin.de wrote: guess this has something to do with how i define the table i would guess this line does not work Field('parent', 'reference

[web2py] Re: format zero IS_IN_DB

2010-01-29 Thread mdipierro
Let's hear a few more opinions. I don't just want to say no. The problem is that we had this discussion already and people insisted such option should be there. Massimo On Jan 29, 9:31 am, DenesL denes1...@yahoo.ca wrote: I must insist. The point is that IS_IN_DB and IS_IN_SET now show a

[web2py] Re: plug-in webfolder

2010-01-29 Thread mdipierro
I do not understand: Field('parent', 'integer', default=0, requires = IS_IN_DB (db,'plugin_webfolder_files.id','%(name)s')) Why this is interger and not a reference. Why a default value that would not pass validation? Why not this: Field('parent', 'reference plugin_webfolder_files',

Re: [web2py] Re: format zero IS_IN_DB

2010-01-29 Thread Jonathan Lundell
Yes, the option is important. But the case for a default of None is pretty convincing. On 1/29/10, mdipierro mdipie...@cs.depaul.edu wrote: Let's hear a few more opinions. I don't just want to say no. The problem is that we had this discussion already and people insisted such option should be

Re: [web2py] Re: format zero IS_IN_DB

2010-01-29 Thread Thadeus Burgess
+1 supporting DenesL argument. (but we already know this) note. default. breaks app. we like the feature but it shouldn't break an app no reason to have to specifically DISABLE something that hasn't existed in web2py before ( you know, the empty select or please choose a value breaks my app

[web2py] Re: Decode field in one to many relation

2010-01-29 Thread DenesL
I see two ways: 1) Using a left join rows==db(db.Customer_storage.Customer_id==id_customer).select (db.Customer_storage.ALL,db.Storage.Model,left=db.Storage.on (db.Customer_storage.Object_id==db.Storage.id),orderby=db.Customer_storage.Object_id) so now rows includes a Storage.Model column 2)

[web2py] clean in admin

2010-01-29 Thread Wes James
When I click on clean in admin it takes me to the admin login page w2p 1.74.8 -wes -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to

[web2py] Re: format zero IS_IN_DB

2010-01-29 Thread mdipierro
I think the point is: is it better to generate a validation error message when a choice is not selected or, by default, select always the first choice? Are you sure that the problem is with the presence of a blank option and not with the wrong error associated to it? On Jan 29, 9:55 am, Thadeus

[web2py] Strange ticket

2010-01-29 Thread Thadeus Burgess
Every once in a while I get the following ticket. Its random, any ideas? Traceback (most recent call last): File gluon/main.py, line 396, in wsgibase request.body = copystream_progress(request) ### stores request body File gluon/main.py, line 143, in copystream_progress

[web2py] Re: Strange ticket

2010-01-29 Thread mdipierro
What's you settings? os? web2py? python? server? On Jan 29, 10:56 am, Thadeus Burgess thade...@thadeusb.com wrote: Every once in a while I get the following ticket. Its random, any ideas? Traceback (most recent call last):   File gluon/main.py, line 396, in wsgibase     request.body =

[web2py] Re: Strange ticket

2010-01-29 Thread mdipierro
It his over https with wsgiserver? On Jan 29, 10:56 am, Thadeus Burgess thade...@thadeusb.com wrote: Every once in a while I get the following ticket. Its random, any ideas? Traceback (most recent call last):   File gluon/main.py, line 396, in wsgibase     request.body =

[web2py] routes.py SUCKS

2010-01-29 Thread Tamas
Hello, I would like to tackle the simple task of running web2py on a folder of the website, say http://example.org/w2p/ So that an application will be like http://example.org/w2p/example/default/index Setting up the WSGI handler is easy, however routes.py gives me a hard time. I tried a bunch

Re: [web2py] routes.py SUCKS

2010-01-29 Thread Jonathan Lundell
On Jan 29, 2010, at 9:17 AM, Tamas wrote: I would like to tackle the simple task of running web2py on a folder of the website, say http://example.org/w2p/ So that an application will be like http://example.org/w2p/example/default/index Setting up the WSGI handler is easy, however

Re: [web2py] Re: Strange ticket

2010-01-29 Thread Thadeus Burgess
http ubuntu 8.10 apache2 mod_wsgi python 2.6 The thing is, the ticket is issued when clients visit the website, I cannot reproduce the error, so I have no clue what action causes this. It only happens once in a blue moon (meaning once maybe every 2-5 days). It happens during the day and

Re: [web2py] routes.py SUCKS

2010-01-29 Thread Thadeus Burgess
routes_in ('^/admin(?Pany.*)', '/admin\gany'), ('^/appadmin(?Pany.*)', '/init/appadmin\gany'), ('^/(?Pany.*)', '/init/default/\gany'), routes_out ('/init/appadmin(?Pany.*)', '/appadmin\gany'), ('/init/default(?Pany.*)', '/default\gany'), -Thadeus

[web2py] Re: Strange ticket

2010-01-29 Thread mdipierro
Could it be some kind of port scan causing it? At my office for example they do port cans every week. On Jan 29, 11:26 am, Thadeus Burgess thade...@thadeusb.com wrote: http ubuntu 8.10 apache2 mod_wsgi python 2.6 The thing is, the ticket is issued when clients visit the website, I

[web2py] Re: routes.py SUCKS

2010-01-29 Thread mdipierro
routes_in=[('/w2p/$anything','/$anything')] routes_out=[('/$anything','/w2p/$anything')] On Jan 29, 11:17 am, Tamas tma...@gmail.com wrote: Hello, I would like to tackle the simple task of running web2py on a folder of the website, say http://example.org/w2p/ So that an application will

[web2py] Re: routes.py SUCKS

2010-01-29 Thread Tamas
Thanks, based on your suggestion this works: routes_in=[('/w2p/(?Pa.*)$','/\ga')] routes_out=[('/(?Pa.*)$','/w2p/\ga')] However, I still have the problem of getting an unknown ticket for plain /w2p/ (default apps are not installed), how can I specify which application should it go by default?

[web2py] Re: routes.py SUCKS [or not]

2010-01-29 Thread mdipierro
Because your app is not called 'init' and we assumed it was. This will fix it. routes_in=[('/w2p/?','/youappname'),('/w2p/$anything','/$anything')] routes_out=[('/$anything','/w2p/$anything')] On Jan 29, 11:41 am, Tamas tma...@gmail.com wrote: Thanks, based on your suggestion this works:

[web2py] Re: routes.py SUCKS [or not]

2010-01-29 Thread Tamas
Hi, I tried routes_in=[ ('/w2p/?', '/myapp'), ('/w2p/(?Pa.*)$','/\ga')] but it does not work, I still get the unknown ticket. On Jan 29, 6:46 pm, mdipierro mdipie...@cs.depaul.edu wrote: Because your app is not called 'init' and we assumed it was. This will fix it.

[web2py] Re: routes.py SUCKS [or not]

2010-01-29 Thread mdipierro
what is the URL you see in your browser when you get the error? what is your app name? On Jan 29, 11:50 am, Tamas tma...@gmail.com wrote: Hi, I tried routes_in=[ ('/w2p/?', '/myapp'), ('/w2p/(?Pa.*)$','/\ga')] but it does not work, I still get the unknown ticket. On Jan 29, 6:46 pm,

[web2py] Re: routes.py SUCKS [or not]

2010-01-29 Thread Tamas
The URL is http://example.com/w2p/ the app's name is myapp apparently. On Jan 29, 6:53 pm, mdipierro mdipie...@cs.depaul.edu wrote: what is the URL you see in your browser when you get the error? what is your app name? On Jan 29, 11:50 am, Tamas tma...@gmail.com wrote: Hi, I tried

[web2py] Re: crud newbie question regarding update

2010-01-29 Thread weheh
OK, I see the problem. The .id link created by crud.select points to the default controller. I need it to point to admin. What's the method for informing crud to do that? Obviously, I can do a redirect, but that seems kludgy. Why wouldn't crud.select automatically set the controller to be the same

[web2py] Re: crud newbie question regarding update [ALMOST THERE]

2010-01-29 Thread weheh
On Jan 29, 1:40 pm, weheh richard_gor...@verizon.net wrote: OK, I see the problem. The .id link created by crud.select points to the default controller. I need it to point to admin. What's the method for informing crud to do that? Obviously, I can do a redirect, but that seems kludgy. Why

[web2py] ProgrammingError: there is no unique constraint matching given keys for referenced table scopus_rou

2010-01-29 Thread Johann Spies
The data of the following table will come from 4 other: (db.scopus_rou, db.cab_rou, db.pubmed_rou, db.wos_rou) In each record I want to indicate from which of those the data of that record came. The last four fields are supposed to do that. In each case at least three of them might be empty.

Re: [web2py] clean in admin

2010-01-29 Thread Jason Brower
Yup. It's cleared your login session. :) So no one, including you in logged in. :D BR, Jason On Fri, 2010-01-29 at 09:44 -0700, Wes James wrote: When I click on clean in admin it takes me to the admin login page w2p 1.74.8 -wes -- You received this message because you are

[web2py] Re: routes.py SUCKS [or not]

2010-01-29 Thread mdipierro
This route alone routes_in=[ ('/w2p/', '/myapp/default/index')] should map that url into /myapp/default/index. does it work? On Jan 29, 12:01 pm, Tamas tma...@gmail.com wrote: The URL ishttp://example.com/w2p/the app's name is myapp apparently. On Jan 29, 6:53 pm, mdipierro

[web2py] Re: ProgrammingError: there is no unique constraint matching given keys for referenced table scopus_rou

2010-01-29 Thread mdipierro
can we see the definition of db.scopus_rou? What database engine? On Jan 29, 1:00 pm, Johann Spies johann.sp...@gmail.com wrote: The data of the following table will come from 4 other: (db.scopus_rou, db.cab_rou, db.pubmed_rou, db.wos_rou) In each record I want to indicate from which of those

Re: [web2py] clean in admin

2010-01-29 Thread Wes James
ah - makes sense. thx, -wes On Fri, Jan 29, 2010 at 1:14 PM, Jason Brower encomp...@gmail.com wrote: Yup.  It's cleared your login session. :)  So no one, including you in logged in. :D BR, Jason On Fri, 2010-01-29 at 09:44 -0700, Wes James wrote: When I click on clean in admin it takes

[web2py] Postgres Log Shipping

2010-01-29 Thread Thadeus Burgess
Can anyone suggest a tutorial for log shipping to another database using postgresql ? -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send

[web2py] response.postprocessing

2010-01-29 Thread Thadeus Burgess
Maybe its just me and I need to look harder but I can't find where web2py calls this... at all -Thadeus -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this

Re: [web2py] response.postprocessing

2010-01-29 Thread Jonathan Lundell
On Jan 29, 2010, at 1:16 PM, Thadeus Burgess wrote: Maybe its just me and I need to look harder but I can't find where web2py calls this... at all run_controller_in() (in compileapp.py) -- You received this message because you are subscribed to the Google Groups web2py-users group. To

Re: [web2py] Re: ProgrammingError: there is no unique constraint matching given keys for referenced table scopus_rou

2010-01-29 Thread Johann Spies
On 29 January 2010 22:33, mdipierro mdipie...@cs.depaul.edu wrote: can we see the definition of db.scopus_rou? What database engine? Database Engine: Postgresql. Here is the definition for scopus_rou: db.define_table(scopus_rou, Field(Authors, 'text'),

Re: [web2py] response.postprocessing

2010-01-29 Thread Thadeus Burgess
Thanks. grep fail :) -Thadeus On Fri, Jan 29, 2010 at 3:22 PM, Jonathan Lundell jlund...@pobox.com wrote: On Jan 29, 2010, at 1:16 PM, Thadeus Burgess wrote: Maybe its just me and I need to look harder but I can't find where web2py calls this... at all run_controller_in() (in

Re: [web2py] Re: ProgrammingError: there is no unique constraint matching given keys for referenced table scopus_rou

2010-01-29 Thread Johann Spies
On 29 January 2010 23:24, Johann Spies johann.sp...@gmail.com wrote: On 29 January 2010 22:33, mdipierro mdipie...@cs.depaul.edu wrote: can we see the definition of db.scopus_rou? What database engine? Your question helped me to remember: This was the table I recreated through psql then web2py

Re: [web2py] Postgres Log Shipping

2010-01-29 Thread Johann Spies
On 29 January 2010 22:50, Thadeus Burgess thade...@thadeusb.com wrote: Can anyone suggest a tutorial for log shipping to another database using postgresql ? If you mean by log shipping the method of using logs of sql-transactions to duplicate a database on another server you can search for

Re: [web2py] response.postprocessing

2010-01-29 Thread Thadeus Burgess
Why does this function get a dictionary, when this is the only function in postprocessing def compress_response(xml): print xml # prints {'form': gluon.sqlhtml.SQLFORM object at 0x3f32b50} cpat =

[web2py] Re: crud newbie question regarding update [ALMOST THERE]

2010-01-29 Thread weheh
OK, I see the problem. The .id link created by crud.select points to the default controller. I need it to point to admin. What's the method for informing crud to do that? Obviously, I can do a redirect, but that seems kludgy. Why wouldn't crud.select automatically set the controller to be the same

Re: [web2py] response.postprocessing

2010-01-29 Thread Thadeus Burgess
bah I need to take a break, my eyes play tricks on me. -Thadeus On Fri, Jan 29, 2010 at 3:35 PM, Thadeus Burgess thade...@thadeusb.com wrote: Why does this function get a dictionary, when this is the only function in postprocessing def compress_response(xml):    print xml # prints

[web2py] crud delete_record checkbox

2010-01-29 Thread weheh
How to get the delete_record field to show on a custom form? I tried variants of form.custom.label['delete_record'] and form.custom.widget.delete_record in the case where controller has crud.update(...,deletable=True) -- You received this message because you are subscribed to the Google Groups

[web2py] Re: Stupid translation question

2010-01-29 Thread Christopher Steel
I noticed an inconsistencies though, in particular T.current_languages can hold more than one value so my description was not entirely accurate, not sure if anyone else has a better explaination... In the mean time here is a link to a working multilingual scaffold that people can download and add

[web2py] Re: get or insert shortcut

2010-01-29 Thread Richard
Would these shortcuts belong in the DAL or a plugin? db(logic).count() since you do not need the record. You just need to know if it exists. I also need to know its ID. On Jan 30, 1:57 am, mdipierro mdipie...@cs.depaul.edu wrote: On Jan 28, 11:06 pm, Richard richar...@gmail.com wrote:

[web2py] Re: crud delete_record checkbox

2010-01-29 Thread mdipierro
I think {{=form.custom.deletable}} On Jan 29, 4:07 pm, weheh richard_gor...@verizon.net wrote: How to get the delete_record field to show on a custom form? I tried variants of form.custom.label['delete_record'] and form.custom.widget.delete_record in the case where controller has

Re: [web2py] Postgres Log Shipping

2010-01-29 Thread Thadeus Burgess
Yes google is great. I can find most anything I want with google. I was looking for if anyone knew any good tutorials that might have been missed by google. Thanks though. -Thadeus On Fri, Jan 29, 2010 at 3:36 PM, Johann Spies johann.sp...@gmail.com wrote: On 29 January 2010 22:50,

[web2py] has anybody check the the cron in trunk?

2010-01-29 Thread mdipierro
In particular on windows and the @reboot option? Massimo -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to

[web2py] Using XML templates with AMF

2010-01-29 Thread Dane
Hello, I'm building a web2py backend for a Flex site, and I would like to send some of my data as XML since it's hierarchical in nature and AS3 has great xml manipulation capabilities with e4x. However, I'd like to send this data through an exposed amf function instead of through REST for speed,

[web2py] Re: Using XML templates with AMF

2010-01-29 Thread Dane
Also note I'm running on GAE, in case that makes a difference. On Jan 29, 6:44 pm, Dane dane.schnei...@gmail.com wrote: Hello, I'm building a web2py backend for a Flex site, and I would like to send some of my data as XML since it's hierarchical in nature and AS3 has great xml manipulation

[web2py] Re: Using XML templates with AMF

2010-01-29 Thread mdipierro
Did you look into web2py services? @service.amfrpc3('domain') def somefunction(a,b,c): return a+b+c On Jan 29, 5:44 pm, Dane dane.schnei...@gmail.com wrote: Hello, I'm building a web2py backend for a Flex site, and I would like to send some of my data as XML since it's hierarchical

[web2py] Re: Using XML templates with AMF

2010-01-29 Thread Dane
Yes, I'm using services currently. My question is how do I return xml generated by a template THROUGH a service. Sorry if I'm unclear or out in left field. I'm still a beginner. The idea is something like this: @service.amfrpc3('domain') def somefunction(param): return dict(items =

Re: [web2py] Re: Using XML templates with AMF

2010-01-29 Thread Thadeus Burgess
@service.amfrpc3('domain') def somefunction(param): return response.render(filename='mytemplate.xml', context=dict(items)) -Thadeus On Fri, Jan 29, 2010 at 8:28 PM, Dane dane.schnei...@gmail.com wrote: Yes, I'm using services currently. My question is how do I return xml generated by a

[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread weheh
It works. Thanks. -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options, visit this group

[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread weheh
Massimo, does it have a label? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com. For more options,

[web2py] Re: Using XML templates with AMF

2010-01-29 Thread Dane
Great, nice and simple. Thanks. On Jan 29, 9:52 pm, Thadeus Burgess thade...@thadeusb.com wrote: @service.amfrpc3('domain') def somefunction(param):    return response.render(filename='mytemplate.xml', context=dict(items)) -Thadeus On Fri, Jan 29, 2010 at 8:28 PM, Dane

[web2py] Re: has anybody check the the cron in trunk?

2010-01-29 Thread mr.freeze
No but I'm getting this in the console on Windows 7: WARNING:root:WEB2PY CRON Call returned code 1: 'c:/Python25/python.exe\' is not recognized as an internal or external command, operable program or batch file. On Jan 29, 5:37 pm, mdipierro mdipie...@cs.depaul.edu wrote: In particular on

[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread mdipierro
form = SQLFORM(,delete_label='') or (works for crud too) form.element(_for=form.FIELDKEY_DELETE_RECORD)[0]='delete label' On Jan 29, 10:42 pm, weheh richard_gor...@verizon.net wrote: Massimo, does it have a label? -- You received this message because you are subscribed to the Google

[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread weheh
I'm not sure I understood what you wrote, sorry. My question, really, is what is the name of the key used to access the delete label in form.custom.label[''] ='delete_label' doesn't work. ='deletable' doesn't work, either. -- You received this message because you are subscribed to

[web2py] user profile form

2010-01-29 Thread weheh
I'm building an app where anyone from the general public can join and gain access to some of the site's functionality, while paying members gain access to more functionality. Pretty typical. Since I expect lots more non-paying members than paying members, I don't want to clutter up auth_user with

[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread mr.freeze
I don't think it's in there. You would need to add this at line 676 of sqlhtml.py: self.custom.label['deletable'] = delete_label On Jan 29, 11:58 pm, weheh richard_gor...@verizon.net wrote: I'm not sure I understood what you wrote, sorry. My question, really, is what is the name of the key used

[web2py] Re: has anybody check the the cron in trunk?

2010-01-29 Thread mdipierro
Would this path be right c:/Python25/python.exe or this c:\Python25\python.exe or both? On Jan 29, 11:18 pm, mr.freeze nat...@freezable.com wrote: No but I'm getting this in the console on Windows 7: WARNING:root:WEB2PY CRON Call returned code 1: 'c:/Python25/python.exe\' is not

[web2py] Re: user profile form

2010-01-29 Thread mdipierro
I would extend Auth and redefine the profile method so that it returns a custom form. class MyAuth(Auth): def profile(): pass On Jan 30, 12:08 am, weheh richard_gor...@verizon.net wrote: I'm building an app where anyone from the general public can join and gain access to some of the

[web2py] auth membership

2010-01-29 Thread weheh
What's the most concise syntax to find out if a user belongs to a group called paying_member? From the looks of it, it seems like I'd have to do something like this: group_id=db(db.auth_group.role=='Member').select()[0].id if auth.has_membership(group_id,auth.user.id):

[web2py] Re: user profile form

2010-01-29 Thread weheh
Would I put this class extension in the modules folder? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to

[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread weheh
Yes, I see that. But URGH, do I really want to start leaving footprints in gluon? What happens when there's a new release. Do they get wiped out and then I have to do it over again? Seems like the deletable field label should be a permanent fixture, no? -- You received this message because you

[web2py] Re: auth membership

2010-01-29 Thread mdipierro
auth.has_membership(auth.id_group('Member'),auth.user.id): On Jan 30, 12:41 am, weheh richard_gor...@verizon.net wrote: What's the most concise syntax to find out if a user belongs to a group called paying_member? From the looks of it, it seems like I'd have to do something like this:    

[web2py] Re: user profile form

2010-01-29 Thread mdipierro
yes or in models if not too long On Jan 30, 12:48 am, weheh richard_gor...@verizon.net wrote: Would I put this class extension in the modules folder? -- You received this message because you are subscribed to the Google Groups web2py-users group. To post to this group, send email to

[web2py] Re: crud delete_record checkbox [RESOLVED]

2010-01-29 Thread mdipierro
Why do you want to put this in sqlhtml? In you controller you can do: form.custom.label['deletable'] = 'delete_label' On Jan 30, 12:53 am, weheh richard_gor...@verizon.net wrote: Yes, I see that. But URGH, do I really want to start leaving footprints in gluon? What happens when there's a new