[web2py] how to get logout() to launch an ajax call

2012-03-26 Thread weheh
I want something like this to work, but it doesn't, obviously. def logout(): auth.logout() response.js = 'alert("goodbye world");' from gluon import HTTP HTTP(202) return dict() I've also tried auth.settings.logout_onlogout = [onlogoutfunction] but that's not working for me ei

[web2py] Re: stuck on trivial problem

2012-03-26 Thread Lewis
Sure enough. So, I am thinking "out loud" here--what would be the advantage of a function (or class) in the controller over a class in a module? 1. Would I be able to get rid of the class and all of its attributes because every variable in the single controller file is visible to all functions?

[web2py] Re: difference between

2012-03-26 Thread weheh
Ouch, ouch, ouch ... that causes things to really disintegrate! I tend to agree with your assessment that there's an order dependence somewhere. But I don't see it, yet. On Mar 27, 11:53 am, Anthony wrote: > Try > > {{include 'scripts.html'}} > {{include 'web2py_ajax.html'}} >

[web2py] @auth.requires(lambda: auth.has_membership(VCARD))

2012-03-26 Thread Annet
I have a hubadmin.py and vcardadmin.py controller. I decorated the functions in both controllers using: @auth.requires(lambda: auth.has_membership(HUB) or auth.has_membership(ADMIN)) @auth.requires(lambda: auth.has_membership(VCARD) or auth.has_membership(ADMIN)) When I am logged in as a user

Re: [web2py] I am trying to make pizza order page with web2py. What's the best way to store toppings info?

2012-03-26 Thread Anthony
> > one another question is about Bruno's answer about storing data in session > using dictionary. > I see that appending works for adding new orders but what if you place an > order that's already placed in session? I know how to compare one word at a > time, but with my knowledge, I don't kn

[web2py] Re: web2py file location

2012-03-26 Thread genesisk
I would think so too but I don't see any! Is there any other possibilities? Is it hidden somewhere? Please help me out Thanks. On Tuesday, March 27, 2012 11:52:47 AM UTC+9, lyn2py wrote: > > It would be /Programming/Python/web2py/

Re: [web2py] I am trying to make pizza order page with web2py. What's the best way to store toppings info?

2012-03-26 Thread Kenny Chung
Thank you. the answer was very clear for me to solve it. one another question is about Bruno's answer about storing data in session using dictionary. I see that appending works for adding new orders but what if you place an order that's already placed in session? I know how to compare one word at

Re: [web2py] I am trying to make pizza order page with web2py. What's the best way to store toppings info?

2012-03-26 Thread Anthony
> > var data = $('.info input[type=\'text\', ) > alert(data) // it shows pid=8&topping=1&topping=3&... on and on > I have a problem on this line > How can I send the serialized values by using ajax to the python method? > This is what I wrote > / > ajax('{{=URL('tester',vars=dict(data=dat

[web2py] Re: web2py 1.99.7 is OUT

2012-03-26 Thread Anthony
Can you describe the problem? Is the below view the index.load view? What is in plugin_app/layout.html? Should that be extended rather than included? Anthony On Monday, March 26, 2012 11:23:34 PM UTC-4, IVINH wrote: > > > > I have two views similar but different extension (index.html & index.loa

[web2py] Re: difference between

2012-03-26 Thread Anthony
Try {{include 'scripts.html'}} {{include 'web2py_ajax.html'}} You have to add files to response.files before including web2py_ajax.html because that view calls response.include_files(), which generates the and elements for whatever files are in response.files. Adding items to response.

[web2py] Re: How to Save Query in Session

2012-03-26 Thread Limedrop
Huh? I'm sorry but I don't understand. On Mar 27, 4:28 pm, Massimo Di Pierro wrote: > you cannot. > > > > > > > > On Monday, 26 March 2012 21:09:49 UTC-5, Limedrop wrote: > > > Just in case any of you want to do this...I've written a routine that > > enables you to save a Query/Expression object

[web2py] Re: difference between

2012-03-26 Thread weheh
havoc ... in that it doesn't work any more. I'm using the latest version of web2py_ajax.html. The response.files.append() statements are part of an include file that's in the main layout.html head section. Here's part of it {{=response.title}} {{include

[web2py] new feature in trunk, for teachers mostly

2012-03-26 Thread Massimo Di Pierro
edit applications/admin/models/0.py and set MULTI_USER_MODE = True then register and login in the admin. The first user to login is the "teacher". You will see two new buttons "manage students" and "bulk register". You can use the bulk register page to give accounts to all your students. They c

[web2py] Re: How to Save Query in Session

2012-03-26 Thread Massimo Di Pierro
you cannot. On Monday, 26 March 2012 21:09:49 UTC-5, Limedrop wrote: > > Just in case any of you want to do this...I've written a routine that > enables you to save a Query/Expression object in the session. > > I have a controller that uses a form to build a relatively complex > query and I wan

[web2py] Re: Broken application after upgrade.

2012-03-26 Thread Massimo Di Pierro
If this for a specific application? A specific action? On Monday, 26 March 2012 21:00:33 UTC-5, web-dev-m wrote: > > I am having a strange problem. I just upgraded from 1.99.2 to 1.99.7 > (manually by running update-web2py.sh from /scripts as the link was > not working in the application). >

[web2py] Re: web2py 1.99.7 is OUT

2012-03-26 Thread IVINH
I have two views similar but different extension (index.html & index.load). Both work well with the 1.99.4, but index.load was not for 1.99.7? My view: {{include 'plugin_app/layout.html'}} {{=content}} Vào 05:29:43 UTC+7 Thứ hai, ngày 05 tháng ba năm 2012, Massimo Di Pierro

[web2py] Re: web2py file location

2012-03-26 Thread lyn2py
It would be /Programming/Python/web2py/

[web2py] Re: How to hide all fields of SQLFORM with submit button only?

2012-03-26 Thread web2py_lover
It is OK, I use raw sql to do this thing. id = db.to_be_lawyer.update_or_insert(db.to_be_lawyer.user_id==form.record.id, user_id=form.record.id, created_time=datetime.datetime.today()) response.flash = '已经申请,请等待通知!' On 3月27日, 上午9时50分, web2py_lover wrote: > not work > > I write as > >

[web2py] Re: stuck on trivial problem

2012-03-26 Thread pbreit
If the functions are in the same controller file, any functions in that file are available (I believe they must take at least one parameter to distinguish them from controllers that respond to page requests).

[web2py] Re: difference between

2012-03-26 Thread pbreit
Should be pretty much the same. But note that the response.files approach relies on some code in web2py_ajax.html. What do you mean "causes havoc"? What actually happens? Can you view your source and see if the files are being referenced as you expect? We might need to see more of the relevant

[web2py] difference between

2012-03-26 Thread weheh
Why is there a difference between and response.files.append(URL(...same path to same .js))? I have some old, old code that uses

[web2py] How to Save Query in Session

2012-03-26 Thread Limedrop
Just in case any of you want to do this...I've written a routine that enables you to save a Query/Expression object in the session. I have a controller that uses a form to build a relatively complex query and I want other controllers to use that query to generate reports and graphs. I initially e

[web2py] Using single instance of LibreOffice to convert documents - is this safe?

2012-03-26 Thread Cliff
I'm working on a form creation project. Because formatting is critical and the users are accustomed to office suites, I am having them use Libreoffice to create their form templates. Also, LibreOffice has a Python interface which is quite easy to use. Right now I'm using a single instance of Lib

[web2py] Re: web2py file location

2012-03-26 Thread genesisk
Alan, Thank you for your reply. I am using Mac OS Lion. I have a folder /Programming/Python/web2py/web2py.app And then, I execute by open web2py So basically my question is what would be ** on my system? Please help me out one more time. Thank you. g

[web2py] Broken application after upgrade.

2012-03-26 Thread web-dev-m
I am having a strange problem. I just upgraded from 1.99.2 to 1.99.7 (manually by running update-web2py.sh from /scripts as the link was not working in the application). I can see my application and all the files are there, but when I try to get into any of the files it doesn't load. It just han

Re: [web2py] I am trying to make pizza order page with web2py. What's the best way to store toppings info?

2012-03-26 Thread Kenny Chung
thank you Bruno. I have one more question about query.( I think I was happened to see your github code as well) I have a form in HTML and I read all the form values by serializing it code var data = $('.info input[type=\'text\', ) alert(data) // it shows pid=8&topping=1&topping=3&... on and on

[web2py] Re: How to hide all fields of SQLFORM with submit button only?

2012-03-26 Thread web2py_lover
not work I write as db.to_be_lawyer.user_id.default = auth.user.id; db.to_be_lawyer.created_time.default = datetime.datetime.today() db.to_be_lawyer.user_id.readable = False db.to_be_lawyer.created_time.readable = False form_to_be_lawyer= SQLFORM(db.to_be_l

[web2py] Re: stuck on trivial problem

2012-03-26 Thread Lewis
Fair enough point about modules but... I have 3 controllers that pretty much displayed the same data. The differences are in initial filter status, whether edit controls are displayed, and privileges for different user groups. As I worked, I was making the same changes 3 times to the shared code

[web2py] Re: Bug? The DAL gives different SQL when query is provided as string.

2012-03-26 Thread Limedrop
Hi Niphlod, Thanks for your reply. I'm running 1.99.7 and here's the model: db.define_table('webpage', Field('title'), Field('body', 'text')) db.define_table('comment', Field('page_id', db.webpage), Field('body', 'text')) The issue is when you have an implicit inner join, but w

[web2py] DAL Challenge

2012-03-26 Thread Udi Milo
Hi guys, I have an entity called article. I want to build the ability to comment on each article. comment at least need (created_on, user_id, article_id, text) I'm running on GAE. On my index page I'm showing 30-60 articles and I want each article to have its comments showing. how would you do

[web2py] Problem with GAE and Cloud SQL

2012-03-26 Thread Matt
Hi there, I'm trying to install a web2py application on GAE using Cloud SQL. When I try and submit a form that contains an upload field I get the following exception: dal.py", line 6124, in store os.makedirs(path) AttributeError: 'module' object has no attribute 'makedirs' I'm currently runnin

Re: [web2py] Re: 10.24$ reward for a recipe logging a user

2012-03-26 Thread bussiere adrien
It work Thanks Just mail me in private where to give Bussiere Le lundi 26 mars 2012 20:23:06 UTC+2, selecta a écrit : > > if it works please donate to the web2py project > > >

[web2py] [OT] Re: Spatial / GIS support in DAL

2012-03-26 Thread Tim Michelsen
Am 20.03.2012 01:24, schrieb DenesL: Spatial / GIS support (in latest trunk) = Sponsored by AidIQ for use by Sahana Eden Very cool. Great news. Has the Sahana Eden team also implemented a solution to the proxy issue with the JS mapping frameworks such as openlayers? begin

[web2py] Re: _title tag for looped OPTION attribute

2012-03-26 Thread villas
Glad to help! Tip: start your project in the commandline: >>python web2py.py -S yourprojectname -N -M then play around to test your code snippets. On Monday, 26 March 2012 19:10:49 UTC+1, web-dev-m wrote: > > This is embarassing. Thank you. I swear, I tried and tried. > > On Mar 26, 10:25

[web2py] Re: Smarttable & SQLFORM.grid

2012-03-26 Thread greenpoise
What I was looking for was a type-ahead function using SQLFORM.smartgrid instead of typing a word and pressing search. On Thursday, 22 March 2012 16:15:23 UTC-7, Alan Etkin wrote: > > I think you mean SQLFORM.smartgrid. > > Book's 7.8 section (the features are explained there): > > "...

Re: [web2py] I am trying to make pizza order page with web2py. What's the best way to store toppings info?

2012-03-26 Thread Bruno Rocha
a list of dictionaries. session.order = [] pizza = {"id": 1234, "quantity": 2, "toppings": ["tomatoes", "pepper", "zuchini"]} session.order.append(dict(pizza)) On Mon, Mar 26, 2012 at 4:02 PM, Kenny wrote: > I am just trying to make pizza order page with web2py. > I usually store quantity of

[web2py] I am trying to make pizza order page with web2py. What's the best way to store toppings info?

2012-03-26 Thread Kenny
I am just trying to make pizza order page with web2py. I usually store quantity of pizza and id number in session. But how can I store pizza topping info that user ordered in session? I am not too familiar with python, so I don't know what would be the best way to store it. So session will have

Re: [web2py] Re: 10.24$ reward for a recipe logging a user

2012-03-26 Thread selecta
if it works please donate to the web2py project

[web2py] Re: How to best contribute?

2012-03-26 Thread Massimo Di Pierro
Thanks Simon, mostly people work on what interest them and usually patches are accepted if: the syntax is general and not constraining, add functionality of makes the code smaller, does not slow down existing code and does not break backward compatibility. I will open the book for editing this

[web2py] Re: DAL and schema

2012-03-26 Thread adesst
@Johann, i don't know if you would copy paste the diff i've made into PgAdapter, and do some tests and post the results. Pg and Oracle schema works in the same way. I currently focusing to dev the MyDAL to support all the joins of Oracle and doing some tests on reference (many/one-to-many) On Mar

[web2py] Re: _title tag for looped OPTION attribute

2012-03-26 Thread web-dev-m
This is embarassing. Thank you. I swear, I tried and tried. On Mar 26, 10:25 am, villas wrote: > Do this: > > files=db(myquery).select() > files_as_list=[] > for x in files: >     files_as_list.append(OPTION(x.resource_title[0:50], _value=x.id, > _title=x.resource_title, )) > > > > > > > > On S

[web2py] Re: Is it a way to query data from GAE and then save to the upload feild as a sqlite databasefile file

2012-03-26 Thread Wikus van de Merwe
Make a simple model for storing files: db.define_table("files", db.Field("name"), db.Field("content", "text")) Then use a function similar to the one below to download the file: def download(): file = db.files(request.args[0]) if not file: raise HTTP(404, "File not found.")

[web2py] Re: How to best contribute?

2012-03-26 Thread Ross Peoples
Most of my contributions come from code written while working on a project. While working on a project, I will find a bug or notice something that could be much better, then I correct it and send Massimo a patch. The mobile detection feature currently in web2py started as some code that I wrote

[web2py] Re: 'tuple' object has no attribute 'items'

2012-03-26 Thread Wikus van de Merwe
What do you mean by "I've made skills and items unnecessary"? What about these references? Field('Skills','list:reference SkillUser',default=None) Field('Items','list:reference Item',default=None) And at which point in your code the error occurs? Why you didn't include full error message? >From

[web2py] How to best contribute?

2012-03-26 Thread Simon Bushell
Hi all, So I am a Web2Py convert, and am now using it for pretty much all of my Pythonic WebDev projects. As well as being an excellent framework, I am equally impressed with the passion and friendliness of the Web2Py community and I was wondering what I can I do to help contribute to it. *

Re: [web2py] Highest table record

2012-03-26 Thread Anthony
Or if there might be multiple records tied for max hits: max_select = db(db.videos)._select(db.videos.hits.max()) records = db(db.videos.hits.belongs(max_select)).select() Anthony On Monday, March 26, 2012 12:20:31 PM UTC-4, rochacbruno wrote: > > record = db(db.videos).select(orderby=~db.videos

Re: [web2py] Highest table record

2012-03-26 Thread Bruno Rocha
record = db(db.videos).select(orderby=~db.videos.hits).first() On Mon, Mar 26, 2012 at 1:11 PM, Hassan Alnatour wrote: > Dear ALL , > > I have a Table like this : > > db.define_table('Videos', > Field('Title'), > Field('File','upload'), > Field('Hits','integer')) > > > how can i get the record

[web2py] Re: How to unzip an uploaded file before saving to uploads directory?

2012-03-26 Thread Cliff
Bingo. Thanks Anthony. On Mar 26, 11:58 am, Anthony wrote: > Try > > ZipFile(request.vars.body.file, 'r') > > Anthony > > > > > > > > On Monday, March 26, 2012 10:18:40 AM UTC-4, Cliff wrote: > > > I have an upload field called 'body.'  It is meant to contain zipped > > archives. > > > I want to

[web2py] Highest table record

2012-03-26 Thread Hassan Alnatour
Dear ALL , I have a Table like this : db.define_table('Videos', Field('Title'), Field('File','upload'), Field('Hits','integer')) how can i get the record with the highest Hits ?

[web2py] Re: How to unzip an uploaded file before saving to uploads directory?

2012-03-26 Thread Anthony
Try ZipFile(request.vars.body.file, 'r') Anthony On Monday, March 26, 2012 10:18:40 AM UTC-4, Cliff wrote: > > I have an upload field called 'body.' It is meant to contain zipped > archives. > > I want to extract and parse one file from the archive. Right now I am > using ZipFile which shou

[web2py] Re: How to unzip an uploaded file before saving to uploads directory?

2012-03-26 Thread Alan Etkin
Looks like your're retrieving the payload from the form field. I'd try using the value recorded in the database instead, something like: myfile = open(db.mytable[n].body) I'm affraid I don't recall exactly how the upload mechanism works, but there is a lot of info in the online manual about it.

[web2py] Re: _title tag for looped OPTION attribute

2012-03-26 Thread villas
Do this: files=db(myquery).select() files_as_list=[] for x in files: files_as_list.append(OPTION(x.resource_title[0:50], _value=x.id, _title=x.resource_title, )) On Sunday, 25 March 2012 21:25:33 UTC+1, web-dev-m wrote: > > I may not be following some sort of convention, but I'm trying t

[web2py] Fwd: [EuroPython 2012] Community voting is now open

2012-03-26 Thread Massimo Di Pierro
Begin forwarded message: > From: Lorenzo Mancini > Date: March 26, 2012 3:01:38 AM CDT > To: spea...@pycon.it > Subject: [EuroPython 2012] Community voting is now open > > Hello everybody, > > this is Lorenzo Mancini from the EuroPython 2012 organization. You > are receiving this e-mail beca

[web2py] Rocket errors on importing python library

2012-03-26 Thread Rohan
Web2py Version 1.99.7 (2012-03-04 22:12:08) stable Python 2.7.2+ I am trying to load external library from python ( http://pypi.python.org/pypi/readability-lxml/0.2.3) import urllib2 import readability page = urllib2.urlopen(url) html = page.read() page is fetched

Re: [web2py] Re: Cookbook Chapter 2 - Reddit clone Ajax problem

2012-03-26 Thread Omi Chiba
OK it worked ! The indent for last three line was wrong on book and it was fixed on the downloaded code. On Friday, March 23, 2012 6:18:36 PM UTC-5, Omi Chiba wrote: > > Alan, > > Thanks. Good idea. I will try the support files. > > > Sent from my Verizon Wireless BlackBerry > > -Origin

[web2py] How to unzip an uploaded file before saving to uploads directory?

2012-03-26 Thread Cliff
I have an upload field called 'body.' It is meant to contain zipped archives. I want to extract and parse one file from the archive. Right now I am using ZipFile which should be able to work with a file-like object, according to the Python docs. This does not work: This also does not work: fro

[web2py] Re: Indentation Error in web2py web file editor

2012-03-26 Thread Massimo Di Pierro
Wich web2py version? Is this the old editarea or the new editor in trunk? On Monday, 26 March 2012 02:44:19 UTC-5, gubbanoa wrote: > > Sorry if this has been posted earlier; I could not find it immediately > in the group. I think the web2py web editor sometimes messes up the > code indentation.

[web2py] Re: web2py integration with python applications

2012-03-26 Thread Wikus van de Merwe
So you want a web server on a local machine with a TCP backend to control the remote device. You also want some API to be able to access the server problematically. If this is correct, you will need: - a web2py application with functions decorated as services http://web2py.com/books/default/cha

[web2py] Re: Documentation suggestion

2012-03-26 Thread weheh
villas, you're right! I had forgotten the conclusion of our previous discussion ... I'll try not to be so "lazy" next time, but truth be told, my plate spilleth over. Anyway, the epydocs need lots of work and the formatting leaves something to be desired. But I believe the self-documenting nature o

Re: [web2py] Re: DAL or SQL?

2012-03-26 Thread Niphlod
problem is doing it within the db ^_^ Actually your answer is correct, and I need to rectify my example period_to_update = db(db.periods.id==1).select().​first() start_time = period_to_update.start_time elapsed = request.now - start_time period_to_update.update_​record(end_time=request.now,

Re: [web2py] Re: 10.24$ reward for a recipe logging a user

2012-03-26 Thread bussiere bussiere
i will try (i'am at work) and if it works (i hope it will) please give me your paypal and drink something for me. Regards Bussiere "Les nouvelles technologies offrent pleins de nouvelles possibilités, pleins de possibilités d'erreurs surtout en fait." insurance.aes256 : http://goo.gl/gHyAY --

[web2py] Re: How to hide all fields of SQLFORM with submit button only?

2012-03-26 Thread Alan Etkin
I think that the problem when doing fields=[] is that it tells web2py to build a field-less form which has no meaning so far. gluon API says: "...a list of fields that should be placed in the form...". Instead, it's probably best to just use the db.table.field.readable attribute On 26 mar, 07:46,

Re: [web2py] Re: DAL or SQL?

2012-03-26 Thread tsvim
Not sure if this is relevant, but you can do the following with datetime. >>> import datetime >>> a = datetime.datetime(2007, 12, 6, 16, 29, 43, 79043) >>> b = datetime.datetime(2011, 10, 3, 12, 0, 0, 0) >>> c = b-a >>> c datetime.timedelta(1396, 70216, 920957) >>> (c.microseconds + (c.seconds +

[web2py] Re: Bug? The DAL gives different SQL when query is provided as string.

2012-03-26 Thread Niphlod
damn mobile phone screen I got it, seems a simple join, and for my simple model works without a hitch. can you please post your model and tell what web2py version are you running ? Il giorno lunedì 26 marzo 2012 01:58:31 UTC+2, Limedrop ha scritto: > > The difference is in the FROM clause.

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

2012-03-26 Thread Sanjeet Kumar
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 Delete' else: for row in ids: db(db.au

[web2py] Re: web2py file location

2012-03-26 Thread Alan Etkin
On the file locations, first you must know where did you install web2py in your system (although even it can be retrieved with web2py trough the execution environment variables) Any working app will be located at /applications/ All application specific files reside inside that folder, including co

[web2py] Re: How to hide all fields of SQLFORM with submit button only?

2012-03-26 Thread Sanjeet Kumar
first write the following code and than use the SQLFORM it will hide your name field db.to_be_lawyer.name.readable = False On Mar 26, 3:31 pm, web2py_lover wrote: > How to hide all fields of SQLFORM with submit button only? > > all fields of  db.to_be_lawyer are  'name' and 'age'. > > I try >  

[web2py] Re: compiling web2py app

2012-03-26 Thread Alan Etkin
Could you post the errors you get when compiling? Perhaps you can use the installer administrative interface facility (w2p files) for remote app deployment. On 26 mar, 00:17, netcode wrote: > Hello all! > i am from a windows environment and i expect things to be easy. well, i > moved to ubuntu o

[web2py] Re: How to hide all fields of SQLFORM with submit button only?

2012-03-26 Thread Alan Etkin
Is the buttons parameter documented somewhere?, I don't recall having seen it. Fields that have a readable attribute set to False cannot be seen: db.to_be_lawyer.name.readable = False ... The fields parameter of SQLFORM defaults to all, but passing an empty sequence should prevent all fields to

[web2py] compiling web2py app

2012-03-26 Thread netcode
Hello all! i am from a windows environment and i expect things to be easy. well, i moved to ubuntu of recent where i develop using python and web2py. I am currently trying to raise a blog using the InstantPress CMS. I am done with customizing its contents but i get errors when trying to compile

[web2py] web2py file location

2012-03-26 Thread genesisk
Hello, I just started learning web2py last weekend. I am amazed at the simplicity of this framework. It's really beautiful. I have binary installed on my Mac OS Lion. It's really embarrassing but can I ask where I can find all the files on local folder? For example, say, I create a new applicati

[web2py] How to hide all fields of SQLFORM with submit button only?

2012-03-26 Thread web2py_lover
How to hide all fields of SQLFORM with submit button only? all fields of db.to_be_lawyer are 'name' and 'age'. I try db.to_be_lawyer.name.default = 'default name' db.to_be_lawyer.age.default = '28' form_to_be_lawyer= SQLFORM(db.to_be_lawyer, fields=[], buttons = [INPUT(

[web2py] Re: 10.24$ reward for a recipe logging a user

2012-03-26 Thread selecta
password="toto" my_crypt = CRYPT(key=auth.settings.hmac_key) crypt_pass = my_crypt(password)[0] user = db.auth_user.insert(Surnom="Surnom",email="email5@toto",username="titi",password=crypt_pass,) from gluon.storage import Storage session.auth = Storage(user=user,expiration=auth

[web2py] Re: 10.24$ reward for a recipe logging a user

2012-03-26 Thread selecta
did you see this slice http://www.web2pyslices.com/slice/show/1443/auto-login-when-you-come-from-localhost it logs you in when you come from localhost, just exchange the if an there you go :D On Monday, March 26, 2012 2:11:29 AM UTC+2, bussiere adrien wrote: > > it's more a logical problem than y

[web2py] Re: Documentation suggestion

2012-03-26 Thread villas
I think we all agreed that a concise reference is important. However, I thought previous discussions had led to the conclusion that we should concentrate on writing better docstrings. See existing epydoc: http://www.web2py.com/examples/static/epydoc/index.html On Monday, 26 March 2012 01:22:1

[web2py] Indentation Error in web2py web file editor

2012-03-26 Thread gubbanoa
Sorry if this has been posted earlier; I could not find it immediately in the group. I think the web2py web editor sometimes messes up the code indentation. Has anyone else seen this? Open a bugfree default.py file (which has been generated elsewhere and is working fine) in the web2py web editor f

Re: [web2py] Re: Documentation suggestion

2012-03-26 Thread Johann Spies
I would also like a reference manual which documents everything systematically with usage examples - something like the reference manuals of Turbo Pascal years ago or that of Python although it sometimes take me longer to find what I am looking for in the Python manual than it would have taken me

Re: [web2py] Unsupported query SQLFORM.grid

2012-03-26 Thread Johann Spies
I recently ran into the same problem also using a left join. I wish it was possible to use SQLFORM.grid with the result of db.executesql(query). Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

Re: [web2py] Re: DAL and schema

2012-03-26 Thread Johann Spies
I would really appreciate it if we can have that in DAL. I am a Postgresql user. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3)

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

2012-03-26 Thread Sebastien Stormacq
Thanks ! On Saturday, March 24, 2012 5:26:52 AM UTC+1, Javier wrote: > > sabsto > > You can use selectable, for example: > > selectable = lambda ids: delete(ids) > form=SQLFORM.grid(query,​selectable=selectable) > > def delete(ids): > to_delete=db(db.tabla.id.​belongs(ids)) > to_delete.del