[web2py] SOAP XML Return Objects

2012-09-10 Thread devrunner
I wanted to return a xml similar to this : Trade TradeNo/TradeNo Volume/Volume Description/Description etc... Trade using a SOAP WebService. The example i'm seeing is just for primitive datatypes, I wanted to have a user defined object. Is this possible? Thanks. --

[web2py] Re: [OT] Ubuntu 12.10 will no longer ship with Python 2

2012-09-10 Thread Rakesh Singh
Arch Linux has switched to Python 3 as default for some time now and it's not much of a problem. It all depends on how the Ubuntu packagers manage the change. I expect things like wicd to break when Arch made the change, but everything worked smoothly. For my scripts, I just make sure my python

[web2py] Submitting a form with a link

2012-09-10 Thread Daniel Gonzalez
Hi, I am preparing a customized log-in form. I want to add a link to recover the password, which is implemented with the A(..) element. In the controller function where I want to send an email, I need to access the email given by the user. I do that with request.vars.email. The problem is that,

[web2py] Re: Submitting a form with a link

2012-09-10 Thread Daniel Gonzalez
I have found the following method: A(T('Forgot your password?'), _href='#', _onclick=document['%s'].submit() % (SIGNIN_FORM_ID) The problem is that I can not specify another href (I *must* put '#', otherwise it does not work). And, since the form is submitted to the same function as if the

[web2py] extact migration files from an existing db

2012-09-10 Thread guruyaya
I'm working with postgres, and I play a lot with the databases. Problem is, I get into lots of situations when I cannot use fake migration, because the DB is not in the right state yet, but I cannot use real migration, as the db files are not set right. What I readlly want, is a way to make

[web2py] Re: dropbox python api

2012-09-10 Thread peter
Joseph your code for dropbox is no longer there. Is there any chance of you putting it up again? Thanks Peter On Thursday, 5 January 2012 17:28:41 UTC, Joseph Jude wrote: If anyone is interested, you can look into the code for dropbox connection here: http://goo.gl/QYT2y This is my

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-10 Thread Marek Mollin
Apparently, I have to domains there is no way for me to access admin. I get gateway timeouts. W dniu poniedziałek, 10 września 2012 01:27:02 UTC+2 użytkownik Marek Mollin napisał: So if I skip the admin.app.com line domain I will get: test.app.com/admin app.com/admin all working fine? W

[web2py] web2py login in main view

2012-09-10 Thread Yebach
Hello I would like to have login (username, password) fields in my main view and not to be redirected to new page for login. But if you need to register then to be redirected to new page any suggestions? Thank you --

[web2py] LOAD Ajax

2012-09-10 Thread Hassan Alnatour
Dear ALL , i am having problems when i use the LOAD() in the page.load if i add any CSS with images like background:url(); and when i use the function URL('page') the url is rendered as /project/controller/page.load , what can i do to fix this problem ? Best Regards, --

Re: [web2py] LOAD Ajax

2012-09-10 Thread tomasz bandura
try LOAD() with extension=False 2012/9/10 Hassan Alnatour halna...@gardeniatelco.com Dear ALL , i am having problems when i use the LOAD() in the page.load if i add any CSS with images like background:url(); and when i use the function URL('page') the url is rendered as

[web2py] web2py DAL one-to-one relation

2012-09-10 Thread martzi
Hi, I wonder if there a way to enforce a one to one relationship with Cascade via web2py DAL API. ??? --

[web2py] You don't have permission to access /admin/default/index on this server.

2012-09-10 Thread Vladimir
Hello! I'd like to try web2py, but I can not open administrative pages. I'm getting this error: Forbidden You don't have permission to access /admin/default/index on this server. -- Apache/2.2.16 (Debian) Server at localhost Port 80 My operating system is Debian 6.04

[web2py] Lazy Tables and Cached Results on GAE

2012-09-10 Thread Felipe Meirelles
Anyone tested the new 2.0.2 changes on GAE? Should this work fine? Can someone tell me how the internals work for this two features and how to use it? Thanks. --

Re: [web2py] You don't have permission to access /admin/default/index on this server.

2012-09-10 Thread Marin Pranjić
You have to use *https://* Marin On Mon, Sep 10, 2012 at 11:17 AM, Vladimir wrote: Hello! I'd like to try web2py, but I can not open administrative pages. I'm getting this error: Forbidden You don't have permission to access /admin/default/index on this server.

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-10 Thread Marek Mollin
To rephrase: I need a sample routes.py with router between two domains (subdomains) getting two seperate applications with admin access enabled. I urgently need help, thanks. W dniu poniedziałek, 10 września 2012 11:17:57 UTC+2 użytkownik Marek Mollin napisał: Apparently, I have two domains

Re: [web2py] Re: help test codemirrorw

2012-09-10 Thread Nico Zanferrari
I confirm that it resolves all the problems with IE 8. And it still works fine with current Chrome and Firefox on Windows 7. +1 for making codemirror the default admin editor! --

[web2py] Re: dropbox python api

2012-09-10 Thread peter
Massimo I am testing this def test_dropbox(): from dropbox_account import DropboxAccount dropbox=DropboxAccount(request,key=XXX,secret=XXX) dropbox.login_form() return dict() I tried the above I get TRACEBACK 1. 2. 3. 4. 5. 6. 7. 8. 9. Traceback (most recent call

[web2py] Re: Getting auth.wiki pages to display without login

2012-09-10 Thread Massimo Di Pierro
There was a bug. Fixed now. Please check it. On Sunday, 9 September 2012 22:50:13 UTC-5, Andrew W wrote: It still doesn't worked for me (when not logged in). I have not set manage_permissions, which I note is False as a default. I always get the login screen when I paste in a url for one of

[web2py] Re: dropbox python api

2012-09-10 Thread Massimo Di Pierro
Please open a ticket on googlecode. On Monday, 10 September 2012 07:31:04 UTC-5, peter wrote: Massimo I am testing this def test_dropbox(): from dropbox_account import DropboxAccount dropbox=DropboxAccount(request,key=XXX,secret=XXX) dropbox.login_form() return

[web2py] Re: web2py DAL one-to-one relation

2012-09-10 Thread Massimo Di Pierro
Field('','reference other_table',ondelete='CASCADE') this is actually the default. Is this what you are asking? On Monday, 10 September 2012 05:45:28 UTC-5, martzi wrote: Hi, I wonder if there a way to enforce a one to one relationship with Cascade via web2py DAL API. ??? --

[web2py] Re: Lazy Tables and Cached Results on GAE

2012-09-10 Thread Massimo Di Pierro
2.0.8 is known to work fine on GAE. On Monday, 10 September 2012 07:05:11 UTC-5, Felipe Meirelles wrote: Anyone tested the new 2.0.2 changes on GAE? Should this work fine? Can someone tell me how the internals work for this two features and how to use it? Thanks. --

[web2py] Re: You don't have permission to access /admin/default/index on this server.

2012-09-10 Thread Massimo Di Pierro
For security reasons you cannot access admin remotely using port 80. You either setup https, or a ssh tunnel, or access it from localhost. On Monday, 10 September 2012 04:17:20 UTC-5, Vladimir wrote: Hello! I'd like to try web2py, but I can not open administrative pages. I'm getting this

[web2py] Re: Lazy Tables and Cached Results on GAE

2012-09-10 Thread Felipe Meirelles
Only one more question, can I enforce the cache to invalidate (as when I know the record has changed) or update the select cache manulay? On Monday, September 10, 2012 9:44:18 AM UTC-3, Massimo Di Pierro wrote: 2.0.8 is known to work fine on GAE. On Monday, 10 September 2012 07:05:11 UTC-5,

[web2py] Re: Lazy Tables and Cached Results on GAE

2012-09-10 Thread Massimo Di Pierro
If you use cache.ram or cache.disk you can do cache.ram.clear() cache.disk.clear() this will clear all ram. You can also pass a regex to clear to clear only some keys. On Monday, 10 September 2012 07:49:27 UTC-5, Felipe Meirelles wrote: Only one more question, can I enforce the cache to

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-10 Thread Jonathan Lundell
On 10 Sep 2012, at 2:17 AM, Marek Mollin rog...@gmail.com wrote: Apparently, I have to domains there is no way for me to access admin. I get gateway timeouts. I'll take a look at the code later today. W dniu poniedziałek, 10 września 2012 01:27:02 UTC+2 użytkownik Marek Mollin napisał:

Re: [web2py] Re: Lazy Tables and Cached Results on GAE

2012-09-10 Thread Felipe Meirelles
But it will invalidate all the cache data. I want to invalidate just one row cache, is this possible? On Mon, Sep 10, 2012 at 10:14 AM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: If you use cache.ram or cache.disk you can do cache.ram.clear() cache.disk.clear() this will clear

[web2py] Re: SQLForm.grid : is it possible to delete multiple rows at once ?

2012-09-10 Thread Mandar Vaze
On Monday, March 26, 2012 4:38:57 PM UTC+5:30, Sanjeet Kumar wrote: can use the following :- form=SQLFORM.grid(db.auth_user, create=False, selectable = lambda ids: del_emp(ids)) def del_emp(ids): if not ids: response.flash='Please Select the Check-box to

[web2py] Re: help test codemirrorw

2012-09-10 Thread LightDot
In regards to which editors to drop from the future releases, how about this: - next web2py release ships with all 4 included, CodeMirror is the default - everybody will try it, so any hidden bugs or incompatibilities should show quickly - after a while (before the next web2py release),

[web2py] [ANN] Started development on web2admin

2012-09-10 Thread rif
I started the development of a new django-like admin interface. You can find it here: https://github.com/rif/web2admin It is very basic but still usable because it uses SQLFORM.smartgrid. I am announcing it early because I need your feedback and feature requests so that I can find out if grid

Re: [web2py] [ANN] Started development on web2admin

2012-09-10 Thread Marin Pranjić
Github is having some database problem right now. But thanks for sharing this - I will try it later. On Mon, Sep 10, 2012 at 3:49 PM, rif feric...@gmail.com wrote: I started the development of a new django-like admin interface. You can find it here: https://github.com/rif/web2admin It is

[web2py] Re: web2py login in main view

2012-09-10 Thread Marek Mollin
yes def index(): form = auth.login(next=URL(request.env.http_referer)) return (form=form) // view default/index.html {{=form}} or read on custom forms and apply it W dniu poniedziałek, 10 września 2012 12:41:05 UTC+2 użytkownik Yebach napisał: Hello I would like to have

[web2py] Re: Sorting ajax return

2012-09-10 Thread Marek Mollin
bear in mind if you have belongs in query(rdbms optimizes ids when using belongs), you might have to sort manualy via python builtin sorted (which can sort all iterables) W dniu niedziela, 9 września 2012 17:55:26 UTC+2 użytkownik Anthony napisał: Do you have to use .as_dict()? Instead, you

[web2py] Re: help test codemirrorw

2012-09-10 Thread Andrew
The vi keybindings are pretty limited. For example you can go to end of file with shift-g but you can't specify a line to go to. yy works in the codemirror example but not in web2py so I'm guessing that just needs some tweaking. delete line and paste seems to work ok. cw seems to work fine.

Re: [web2py] Re: DB Migration (sqlite-pgsql) Problems with 1.99.7 - 2.0.6 - 2.0.7 Versions

2012-09-10 Thread Marin Pranjić
Update: It started working as soon as I installed psycopg2. This is pg8000 issue. I am using psql 8.4.11 --

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-10 Thread Marek Mollin
So i have cut down the router to bare minimum, just to check this admin issue. I now have: routers = dict( BASE = dict( domains = { 'myapp.com' : 'myapp1', 'test.myapp.com' : 'myapp2', } ), ) logging = 'debug' after tailing the uwsgi_log i get: in case of

Re: [web2py] Re: Lazy Tables and Cached Results on GAE

2012-09-10 Thread Massimo Di Pierro
You cannot invalidate a single row if you are caching the all set of rows. Mind that if you do rows.update_records(...) and rows is cached, it should update the cached row as well. On Monday, 10 September 2012 08:16:07 UTC-5, Felipe Meirelles wrote: But it will invalidate all the cache data.

[web2py] Re: help test codemirrorw

2012-09-10 Thread Massimo Di Pierro
I have integrated codemirror with zencoding. I have removed amy, editarea and ace from trunk but I will ship them separately as a zip. Reports so far indicates codemirror is much more portable than anything else. Keep testing ;-) massimo On Monday, 10 September 2012 10:23:44 UTC-5, Andrew

Re: [web2py] Relocated admin using router, problem with appadmin

2012-09-10 Thread Jonathan Lundell
On 10 Sep 2012, at 9:02 AM, Marek Mollin rog...@gmail.com wrote: So i have cut down the router to bare minimum, just to check this admin issue. I now have: routers = dict( BASE = dict( domains = { 'myapp.com' : 'myapp1', 'test.myapp.com' : 'myapp2', }

Re: [web2py] Re: Lazy Tables and Cached Results on GAE

2012-09-10 Thread Felipe Meirelles
Oh, thats nice, all just works the way I use to work with GAE cache. Great work Massimo, hope I can start to contribute soon. Thank you. On Mon, Sep 10, 2012 at 1:08 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: You cannot invalidate a single row if you are caching the all set of

[web2py] SQLFORM formstyle argument changes

2012-09-10 Thread Jim Karsten
The *SQLFORM formstyle* argument can change from a string to a function. For example: sqlform = SQLFORM(db.mytable, formstyle='table3cols') Now (sqlform.formstyle == 'table3cols') returns *False*. *sqlform.formstyle*is now a function named *formstyle_table3cols*. I haven't had any problems

[web2py] Help with python module import error

2012-09-10 Thread monotasker
I'm having trouble on Webfaction with web2py not finding the pytz module, even though it is found fine in my local environment. I've already installed the module using easy_install at myname/lib/python2.7 (as per Webfaction instructions), and I've confirmed that I can import it from the

Re: [web2py] Help with python module import error

2012-09-10 Thread Bruno Rocha
if the package is in your Python wen2py have to see this.. you can try inside web2py code (i.e models) import sys sys.path.append(/path/to/installed/package) Have you restarted web2py since you installed the module? On Mon, Sep 10, 2012 at 4:52 PM, monotasker scotti...@gmail.com wrote: I'm

Re: [web2py] Help with python module import error

2012-09-10 Thread monotasker
Hi Bruno, No, I haven't restarted. Somehow I thought that hitting reload routes would accomplish the same thing, but now that I think about it that wouldn't make sense. So now my really dumb question. Is restarting web2py on the server (Linux) just a matter of doing this? $killall web2py

Re: [web2py] Help with python module import error

2012-09-10 Thread Bruno Rocha
If you are running on webfaction, maybe it is under apache and mod_wsgi, so you need to restart Apache to reload the mod_wsgi. $service apache2 restart or $/etc/init.d/apache2 restart (but you need to check if it is running apache, nginx or other) --

[web2py] Re: SQLFORM formstyle argument changes

2012-09-10 Thread Anthony
I'm not sure it makes much difference, but I just submitted a patch to change that. Anthony On Monday, September 10, 2012 1:45:27 PM UTC-4, Jim Karsten wrote: The *SQLFORM formstyle* argument can change from a string to a function. For example: sqlform = SQLFORM(db.mytable,

Re: [web2py] Help with python module import error

2012-09-10 Thread monotasker
Aha! That did it. For the record, on Webfaction an application server is restarted with $HOME/webapps/app_name/apache2/bin/restart Thanks for pointing me in the right direction. I'm obviously going to have to learn a lot more about the server end of things :) But I really appreciate the help.

[web2py] Numerical List of Entries

2012-09-10 Thread AE
Hello I was wondering if anyone can tell me how I can create a numerical list of pages to use with my pagination I have a db query that selects alphabetically based on the title and would like to create a numerical index of the pages to link to. Currently I am using web2py_utils for pagination

[web2py] Re: dropbox python api

2012-09-10 Thread peter
Problem sorted by Massimo in under 12 hours. Amazing responsiveness Peter --

[web2py] Re: Sublime Text 2 Setup

2012-09-10 Thread luckysmack
seems to work well. thanks. On Sunday, September 9, 2012 9:53:50 PM UTC-7, luckysmack wrote: I have seen a few people on here mention they used sublime text. So i was curious as if anyone was willing to share anything special they did to setup ST to work with web2py for things like

Re: [web2py] Numerical List of Entries

2012-09-10 Thread Massimiliano
Maybe this could be useful http://goo.gl/g61nt On Mon, Sep 10, 2012 at 6:55 PM, AE hiweb...@gmail.com wrote: Hello I was wondering if anyone can tell me how I can create a numerical list of pages to use with my pagination I have a db query that selects alphabetically based on the title and

[web2py] Trying to reproduce Ex. in manual, sec. 6.21.1 (inner joins)

2012-09-10 Thread MichaelF
I have a db structure similar to the person/dog tables in section 6.21 One to many relation. I try the inner join (second form, from the book): 1 rows = db(db.person).select(join=db.dog.on(db.person.id==db.dog.owner)) 2 for row in rows: 3 print row.person.name, 'has', row.dog.name 4 Alex has

Re: [web2py] Re: Lazy Tables and Cached Results on GAE

2012-09-10 Thread Massimo Di Pierro
Actually I was wrong. If you update a record it does not update the cached ones. On Monday, September 10, 2012 11:29:02 AM UTC-5, Felipe Meirelles wrote: Oh, thats nice, all just works the way I use to work with GAE cache. Great work Massimo, hope I can start to contribute soon. Thank you.

[web2py] Re: Trying to reproduce Ex. in manual, sec. 6.21.1 (inner joins)

2012-09-10 Thread Massimo Di Pierro
There is a mistake in the book. It should have been: rows = db(db.person).select(db.person.ALL, db.dog.ALL, join=db.dog.on( db.person.id==db.dog.owner)) or rows = db(db.person).select(db.person.ALL, db.dog.ALL, left=db.dog.on( db.person.id==db.dog.owner)) Perhaps is should default to select

[web2py] Re: Just knew about Server-Sent Events and want to share it with you

2012-09-10 Thread smoggy
Hey thanks ! That's something nice to have around, i prefer to hack+grow on some example than start from zero. Anyway i guess that some two-way json-rpc could be implemented on top of SSE to make realtime streaming apps a breeze. As opposed to the complication of deployment that are

[web2py] Best Method to implement a like button

2012-09-10 Thread Mark Li
I have 3 datatables as follows: db.define_table('songs', Field('songname'), format='%(songname)s') db.define_table('likes', Field('username', 'reference auth_user'), Field('songname', 'reference songs')) with the 3rd table being db.auth_user I would like to implement a like

[web2py] Re: Deploying as RPM

2012-09-10 Thread thinkwell
For an update here. I was able to go with two very simple spec files since I use puppet for the cron jobs, apache config files, etc and I simply made two RPMs, one of stock web2py and one of my application with my app listing web2py as a dependency. What you're discussing, LightDot, sounds

[web2py] Re: SOAP XML Return Objects

2012-09-10 Thread howesc
you can make a view that formats the output however you likeso when your controller method is called it returns a dict that is then rendered by your custom view. does that make sense? does that help you? cfh On Monday, September 10, 2012 12:31:46 AM UTC-7, devrunner wrote: I wanted to

[web2py] Re: Trying to reproduce Ex. in manual, sec. 6.21.1 (inner joins)

2012-09-10 Thread Massimo Di Pierro
Anyway, I changed the code in trunk so that the example in the book works as described. On Monday, 10 September 2012 17:27:01 UTC-5, Massimo Di Pierro wrote: There is a mistake in the book. It should have been: rows = db(db.person).select(db.person.ALL, db.dog.ALL, join=db.dog.on(

[web2py] Re: SOAP XML Return Objects

2012-09-10 Thread devrunner
Hi cfh. thanks. I'm fairly new to web2py and python, can you provide a sample code for me to start with. I really appreciate your reply. On Tuesday, September 11, 2012 7:17:09 AM UTC+8, howesc wrote: you can make a view that formats the output however you likeso when your controller

[web2py] Re: SOAP XML Return Objects

2012-09-10 Thread howesc
in the controllers directory, create a file say 'mysoapservice.py'. include something like: def soapfunction(): retval = {} retval['tradeNo'] = 27 retval['volume'] = 10 retval['descr'] = 'this is a test' #add stuff to the dict here return retval then make sure in the views directory you

[web2py] Re: SOAP XML Return Objects

2012-09-10 Thread devrunner
Thanks! This helps a lot. On Tuesday, September 11, 2012 9:35:55 AM UTC+8, howesc wrote: in the controllers directory, create a file say 'mysoapservice.py'. include something like: def soapfunction(): retval = {} retval['tradeNo'] = 27 retval['volume'] = 10 retval['descr'] = 'this

Re: [web2py] Re: Sorting ajax return

2012-09-10 Thread Kevin Miller
Thanks for the replies guys. select().as_list() did the job for me. Luckily I don't have belongs in the query. On Mon, Sep 10, 2012 at 10:01 AM, Marek Mollin rog...@gmail.com wrote: bear in mind if you have belongs in query(rdbms optimizes ids when using belongs), you might have to sort

[web2py] Trying to cook up a new web2py widget and it is going sour BIG TIME ... !!!!!^%%$#????

2012-09-10 Thread Don_X
Hello web2py users ... I am going out of my mind with this ! I am trying to cook up a widget ... ( or a plugin ) inspired from the SELECT_OR_ADD_OPTION widget ! but it uses radio buttons instead of a dropdown select menu, it is about selecting a profile picture among a number of pics shown