[web2py] Re: Scheduler ignoring period/repeat setting.

2013-01-22 Thread Stormcrow
cron doesn't seem to work on 2.3.2 running as a Windows 7 service. Not sure how to find the problem. --

[web2py] anyserver.py not working properly for gevent

2013-01-22 Thread JimK
Since gluon.main and gluon.fileutils are being imported before gevent's monkey.patch_all() is run, the sessions were getting mixed up. Here's the code I used that verified the issue (found on this forum): def index(): import time from gluon import current print current.request.uuid time.sleep(10

Re: [web2py] Re: Book in epub format?

2013-01-22 Thread Johann Spies
On 22 January 2013 16:42, Massimo Di Pierro wrote: > my process is > > markmin -> html > markmin -> latex -> pdf -> print > > There is a latex -> epub (http://johnmacfarlane.net/pandoc/) > > Pandoc is a great tool, but it's success in converting latex to anything else is limited to a subset lf LaT

[web2py] Re: Querying the DAL by regex

2013-01-22 Thread Massimo Di Pierro
You can do db(db.table.field.regexp('your regex')).select() db(db.table.field.regexp('your regex')).delete() works with sqlite and postgresql only. The regex syntax may be different between the two. On Wednesday, 23 January 2013 00:31:25 UTC-6, Daniel Gonzalez wrote: > > Hi, > > I have this fun

[web2py] Re: Scheduler ignoring period/repeat setting.

2013-01-22 Thread Stormcrow
OK, I'll try try it with my own UUID rather. I don't need my task to run at exactly 5 second intervals, it's a simple task which updates only a few parameters but it needs to happen quite regularly. I think the scheduler works well enough for my purposes here, I don't expect it to be precise.

[web2py] Querying the DAL by regex

2013-01-22 Thread Daniel Gonzalez
Hi, I have this function to delete a user with a certain email address: def delete_user(self, email): my_query = self.db[self.web2py_user_table].email == email my_set = self.db(my_query) my_set.delete() Now I would like to implement a function to delete several user

[web2py] Re: aµzing...

2013-01-22 Thread Massimo Di Pierro
I think the issue here is whether a generic utf8 chars inserted in a form is rendered properly in a web2py table or update form. Web2py consistently encodes everything in utf8 but it is possible that the page encoding is in latin-1 or other. In this case the submitted form would contain a non-ut

[web2py] Re: Sqlform.Factory upload file error!

2013-01-22 Thread Massimo Di Pierro
this is a happening a lot recently. I did not delete it and I do not believe any of the other managers did either. It is not our policy to delete posts unless requested by the author. massimo On Tuesday, 22 January 2013 16:20:34 UTC-6, Derek wrote: > > I believe I posted a reply, but now it sh

[web2py] Re: aµzing...

2013-01-22 Thread Joe Barnhart
I'm not sure what needs solving. Were you expecting the greek mu character to be one byte in UTF-8? It is two bytes. See the link: http://www.fileformat.info/info/unicode/char/3bc/index.htm UTF-8 is actually a variable-byte encoding scheme that can encode any character. It is interoperable

[web2py] Register action using info from POST

2013-01-22 Thread Mark Li
I am currently using web2py's auth to return a registration form. However, I would also like users to be able to register RESTfully, with the email and password information in a POST call. How would I write a register action that mimics auth.register(), except the information is from a POST, no

Re: [web2py] Help Query speed

2013-01-22 Thread FERNANDO VILLARROEL
Ok but how i can solve? --- On Tue, 1/22/13, Bruno Rocha wrote: From: Bruno Rocha Subject: Re: [web2py] Help Query speed To: web2py@googlegroups.com Date: Tuesday, January 22, 2013, 10:10 PM maybe the virtual fields? --       --

Re: [web2py] Help Query speed

2013-01-22 Thread Bruno Rocha
maybe the virtual fields? --

Re: [web2py] Help Query speed

2013-01-22 Thread FERNANDO VILLARROEL
I think found the problem. My problem is with powerTable plugin. If i return rows only the show results is fast, but i try to use powertable the result is slow: powerTable = plugins.powerTable powerTable.datasource = reg powerTable.dtfeatures['bPaginate'] = True powerTable.dtf

Re: [web2py] Re: web2py best practices/patterns

2013-01-22 Thread samuel bonilla
I use Model Less App And it works very good http://www.web2pyslices.com/slice/show/1479/model-less-apps-using-data-models-and-modules-in-web2py 2013/1/22 Bruno Rocha > > On Tue, Jan 22, 2013 at 3:09 PM, Richard Vézina < > ml.richard.vez...@gmail.com> wrote: > >> Does Model Less approach still re

[web2py] Help Query speed

2013-01-22 Thread FERNANDO VILLARROEL
Dear. I have the follow problem. If i run the follows query in PgAdminIII is very fast: select rutas.id,rutas.nombre,ratecltes.rate from ratecltes joinrutas on rutas.id = ratecltes.id_rutas where ratecltes.id_clte=26 order by rutas.nombre But when i run the query on Web2py is very slow

[web2py] Re: Handling unicode keys in jsonrpc calls

2013-01-22 Thread Alan Etkin
> > Recently web2py changed to parse the jsonrpc parameters in > tools.py/Service.serve_jsonrpc. Now I have a frawework in my client Looks like the Service class is trying to unpack a unicode string and pass it as keyword arguments of a stored function, where it should not. I think the behav

[web2py] Re: Web2Py compute fields not working on update

2013-01-22 Thread palomar
sorry, I posted a new threat about it... https://groups.google.com/forum/?fromgroups=#!topic/web2py/8RWkVAYVG1c s. Il giorno martedì 22 gennaio 2013 23:14:17 UTC+1, Massimo Di Pierro ha scritto: > > What web2py version? I cannot reproduce this. > > On Friday, 11 January 2013 14:13:04 UTC-6, palom

[web2py] Re: Sqlform.Factory upload file error!

2013-01-22 Thread Derek
I believe I posted a reply, but now it shows as deleted. I didn't delete it. I was just quoting from the book. You need to specify table= in your sqlform.factory. On Tuesday, January 22, 2013 2:53:57 PM UTC-7, Massimo Di Pierro wrote: > > This is true. The fact is the SQLFORM.factory is not conne

[web2py] Re: Web2Py compute fields not working on update

2013-01-22 Thread Massimo Di Pierro
What web2py version? I cannot reproduce this. On Friday, 11 January 2013 14:13:04 UTC-6, palomar wrote: > > Sorry but I have the same problem; i tried with readable=true and > writable=true and to comment the line in DAL.py, but nothing. > I have this table: > db.define_table('magazzino', >

[web2py] Re: gluon.contenttype.contenttype

2013-01-22 Thread Massimo Di Pierro
No. It is to check for extensions like: '.eps.bz2': 'image/x-bzeps' On Saturday, 12 January 2013 14:44:40 UTC-6, Bob St John wrote: > > def contenttype(filename, default='text/plain'): > """ > Returns the Content-Type string matching extension of the given > filename. > """ > i =

[web2py] Re: aµzing...

2013-01-22 Thread Massimo Di Pierro
Sorry for missing this issue. Are you sure the ecoding of the page is UTF8? Look into the generated HTML. On Thursday, 17 January 2013 12:27:17 UTC-6, Bill Thayer wrote: > > Been searching a while now for the magic decoder ring that solves the > UTF-8 encoding issue. > > If I enter a mu (µ) by t

[web2py] Re: bug in smartgrid groupby

2013-01-22 Thread Massimo Di Pierro
This this been fixed in trunk some time ago. On Friday, 18 January 2013 11:21:20 UTC-6, Mark wrote: > > For web2py 2.2.1. > > When I use groupby in smartgrid, the number of records found usually > displays a wrong number. Often displays "1 records found" even there are > many records in the gri

[web2py] Re: Sqlform.Factory upload file error!

2013-01-22 Thread Massimo Di Pierro
This is true. The fact is the SQLFORM.factory is not connect to a db therefore does not know where the app keeps uploads. On Tuesday, 22 January 2013 12:01:59 UTC-6, Ramos wrote: > > hello > my sqlform.factory below > > trab_id=db.trabalhador.insert(**db.trabalhador._filter_fields(form.vars)) > >

[web2py] Re: is bug? sqlform.factory

2013-01-22 Thread Massimo Di Pierro
The problem is that when you set a length=1 you should get a default IS_LENGHT(1) validator but because you specify the IS_UPPER() validator you override the default. This will do what you ask: Field('name', 'string', length=1, requires=(IS_LENGTH(1),IS_UPPER())) Without the check sqlite may al

Re: [web2py] Re: Help on Unit Tests

2013-01-22 Thread Bruno Rocha
Issues page on google code: https://code.google.com/p/web2py (issues menu) Develpers list: web2py-developers on google group --

[web2py] Re: Sqlform.Factory upload file error!

2013-01-22 Thread Derek
>From the docs... By default SQLFORM.factory generates the form using html "id" attributes generated as if the form was generated from a table called "no_table". To change this dummy table name, use the table_name attribute for the factory: form = SQLFORM.factory(...,table_name='other_dummy_nam

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2013-01-22 Thread Niphlod
maybe I have a fix . Can you please test it ? assuming an example of routes.py like myapp = dict(languages=['en', 'it', 'jp'], default_language='en') this means that navigating to: /myapp/ --> the static files will be referenced as web2py_home/applications/myapp/en/static/whatever.css /myapp/

[web2py] Re: Help on Unit Tests

2013-01-22 Thread Israel Fermin Montilla
Thank you very much for your quick answers. I saw that article you're saying Anthony, that was the way I was writing my tests, and I also tried to write my own test runner using unittest, os and sys and I faced the problem that Bruno points out, web2py runs on his own environment. Are there a

Re: [web2py] Redmine beside web2py with Nginx deployment script

2013-01-22 Thread Alan Etkin
> Will the already-existing script for CentOS work for 6.3 86_64 ? > I think it's based in a 32 bit os, but I suppose it's needs just rewriting the parts that download libraries for that architecture. --

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2013-01-22 Thread paolo.vall...@gmail.com
Hi Niphlod, once I discovered that making a symbolic link for each language in the app directory pointing to the app directory worked well. Namely something like that app_dir/it ---> app_dir . However it would be better to find something cleaner but for that I have to look at nginx but right now I

[web2py] Re: How to disable deleting profile pictures...

2013-01-22 Thread Derek
Add: ondelete = 'NO ACTION' to the field... that will make it not deletable. They may still see the checkbox though. On Tuesday, January 22, 2013 8:08:49 AM UTC-7, sasogeek wrote: > > #model > db.define_table( > auth.settings.table_user_name, > Field('profile_picture', 'upload',)) > > #co

[web2py] Re: HOSTING FOR web2py ?

2013-01-22 Thread GeeksRule
I was using (slicehost --> now rackspace). You get a dedicated slice and it has worked well for me. You get a plain-minimal linux installation and you can do what you want with it. SliceHost had awesome support, but rackspace isn't that bad either. On Friday, 18 January 2013 21:11:43 UTC-5, sam

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2013-01-22 Thread Niphlod
got it. can you post the routes.py you're using ? The problem lies in the fact that routes.py is really flexible and adapting that logic using only rewrite or alias statements in nginx is cumbersome. Standing on one feet (i.e. without tests) I'd say that the regex checking static files

[web2py] "Share" by lockerz doesn't close on an iphone

2013-01-22 Thread GeeksRule
Maybe this is an issue with the lockerz, but has anyone noticed that when you click on a share option in iphone, e.g. facebook etc. it launches a new page. If you close that page and return back to the page you were trying to share, the popup is still there. Also, even when you try to click som

[web2py] Re: can smartgrid use a SET as a table?

2013-01-22 Thread Derek
No. The first argument of SQLFORM.grid can be a table or a query. A SQLFORM.smartgrid looks a lot like a grid, in fact it contains a grid but it is designed to take as input not a query but only one table and to browse said table and selected referencing tables. You can use SQLFORM.grid, but no

[web2py] can smartgrid use a SET as a table?

2013-01-22 Thread Alex Glaros
Here is an example of a SET named "purchased" from the documentation : purchased = \n(db.person.id==db.purchase.buyer_id)&\n (db.product.id==db.purchase.product_id) Can Smartgrid use the SET "purchased" instead of a table, e.g., as in the

[web2py] Sqlform.Factory upload file error!

2013-01-22 Thread António Ramos
hello my sqlform.factory below trab_id=db.trabalhador.insert(**db.trabalhador._filter_fields(form.vars)) is not uploading a file First i got error SQLFORM.factory - RuntimeError: you must specify a Field(...,uploadfolder=...) so i added in my model Field('apt_medica','upload', uploadfolder=os.

Re: [web2py] Re: Twitter bootstrap cannot recreate popover

2013-01-22 Thread Richard Vézina
I think Popover is not working properly with Chromium or even Chrome, I notice that a month or 2 ago. Richard On Tue, Jan 22, 2013 at 12:33 PM, Anthony wrote: > You might try the Bootstrap support forum. > > > On Tuesday, January 22, 2013 12:13:41 PM UTC-5, Ramos wrote: > >> >> I´l try my bes

Re: [web2py] Re: Twitter bootstrap cannot recreate popover

2013-01-22 Thread Anthony
You might try the Bootstrap support forum. On Tuesday, January 22, 2013 12:13:41 PM UTC-5, Ramos wrote: > > > I´l try my best to solve it myself! > > This question was never posted! > > :) > > 2013/1/22 Anthony > > >> What does this have to do with web2py? >> >> >> On Tuesday, January 22, 2013 11

Re: [web2py] Re: web2py best practices/patterns

2013-01-22 Thread Bruno Rocha
On Tue, Jan 22, 2013 at 3:09 PM, Richard Vézina wrote: > Does Model Less approach still relevent with the new lazy table feature?? No need to use this module based approach (unless you want), now with lazy_tables it is better to use the standard ways to avoid extra loads. --

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2013-01-22 Thread paolo.vall...@gmail.com
Hi Massimo, for example, if I visit this traffic.integreen-life.bz.it/default/wiki/about (default is the controller and wiki is the function) it works while traffic.integreen-life.bz.it/it/default/wiki/about the application works very well but the static links do not. Paolo 2013/1/22 Massimo Di

Re: [web2py] Re: Twitter bootstrap cannot recreate popover

2013-01-22 Thread António Ramos
I´l try my best to solve it myself! This question was never posted! :) 2013/1/22 Anthony > What does this have to do with web2py? > > > On Tuesday, January 22, 2013 11:45:43 AM UTC-5, Ramos wrote: >> >> hello >> i´m testing twitter popover efect but i have to press the button the see >> the p

[web2py] Re: sqlform.grid does not delete record

2013-01-22 Thread Niphlod
SQLFORM.grid uses args to determine what to do. you are using request.args(0) in your query without letting know the grid that the args(0) is needed by you and should be left alone . please use SQLFORM.grid( ... args=request.args[:1]) On Tuesday, January 22, 2013 5:25:06 PM UTC+1, Ramo

Re: [web2py] Re: web2py best practices/patterns

2013-01-22 Thread Richard Vézina
Does Model Less approach still relevent with the new lazy table feature?? Richard On Mon, Jan 21, 2013 at 7:15 PM, samuel bonilla wrote: > look, this is for big project : > > Model Less Apps (using data models and modules in web2py) > > > http://www.web2pyslices.com/slice/show/1479/model-less-a

[web2py] Re: Twitter bootstrap cannot recreate popover

2013-01-22 Thread Anthony
What does this have to do with web2py? On Tuesday, January 22, 2013 11:45:43 AM UTC-5, Ramos wrote: > > hello > i´m testing twitter popover efect but i have to press the button the see > the popup, instead of just hovering above the button. > > jQuery(document).ready(function(){ > jQu

[web2py] Re: Re-enable admin interface

2013-01-22 Thread Wonton
Thanks, I will try this. Anyway, is there any way to upload a packed project to the server without admin access? El lunes, 21 de enero de 2013 22:28:41 UTC+1, Niphlod escribió: > > admin works on sessions like any other app. I think your problem will be > easily fixed by just deleting the appli

[web2py] Twitter bootstrap cannot recreate popover

2013-01-22 Thread António Ramos
hello i´m testing twitter popover efect but i have to press the button the see the popup, instead of just hovering above the button. jQuery(document).ready(function(){ jQuery("#example").popover(); ... ... hover for popover Thank you --

[web2py] Re: records as fields in a single form

2013-01-22 Thread Alan Etkin
> > I defined the following tables: > - contrib.spreadsheet plus the data argument (a DAL instance), but I'm not sure it supports joins (see the module help) - Or maybe plugin powertable? --

[web2py] sqlform.grid does not delete record

2013-01-22 Thread António Ramos
hello my sqlform.grid delete button , deletes the document from the grid but if i refresh the page the document comes back again to the grid. mytable = SQLFORM.grid( db.t_docs.f_trab_ref==request.args(0), csv=False, searchable=False,

[web2py] Re: Scheduler ignoring period/repeat setting.

2013-01-22 Thread Niphlod
queue_task does a validate_or_insert, because its meant to be used to queue the tasks if you want to use that you should enforce your own fixed uuid and pass that to queue_task()... validation will fail (because the uuid is declared as unique, and another row with that id sits on the table

Re: [web2py] Redmine beside web2py with Nginx deployment script

2013-01-22 Thread Richard Vézina
On Mon, Jan 21, 2013 at 5:30 PM, Arnon Marcus wrote: > M array over Windows 2008R2 Hyper-V, and it has better support for > CentOS/RHEL then for Ubuntu (something relating to virtualization > acceleration...) > I don't know CentOS, but as long as you know a bit of bash I think it could be easy

Re: [web2py] Form with fields collected from javascript

2013-01-22 Thread Christian Espinoza
Hi Bruno, now my form at the view is: {{=form.custom.begin}} Name: {{=form.custom.widget.name}} {{=form.custom.submit}} {{=form.custom.end}} I'm was testing a lot of times a insert with it, and every first time I'm login to app this form doesn't insert the data and nothing else shows, after t

[web2py] How to disable deleting profile pictures...

2013-01-22 Thread sasogeek
#model db.define_table( auth.settings.table_user_name, Field('profile_picture', 'upload',)) #controller def user(): form=auth() return dict(form=form) #view {{=form}} How do I disable the delete feature? it appears like so on the page... Profile Picture [uploaded image] [file|

[web2py] How to disable deleting profile pictures...

2013-01-22 Thread sasogeek
#model db.define_table( auth.settings.table_user_name, Field('profile_picture', 'upload',)) #controller def user(): form=auth() return dict(form=form) #view {{=form}} How do I disable the delete feature? it appears like so on the page... Profile Picture [uploaded image] [file|

Re: [web2py] Re: Is there a way to use SQLFORMs to generate form that can update multiple records?

2013-01-22 Thread Alan Etkin
> > Is there any guide on how I can make use of this spreadsheet module? How I > create the form and other related guides? > The module docstring has some help and simple examples. See this web2py plugin also: https://bitbucket.org/rochacbruno/powertable --

[web2py] Re: Scheduler ignoring period/repeat setting.

2013-01-22 Thread Stormcrow
Hi again, Thanks for the tips! What I ended up doing is creating a model file containing the following: import datetime if db(db.scheduler_task).isempty(): db.scheduler_task.update_or_insert(db.scheduler_task.task_name=='my_function', application_name='my_app',

[web2py] Re: is bug? sqlform.factory

2013-01-22 Thread www.diazluis.com
thank you all for the answers. if I am using sqlite. field size has always been one (1) character. that the form only allows me to store more. My logic told me that if a user entered eg "AAA" the system only stores "A" --

[web2py] Re: How to redirect within a method that was invoked via Ajax?! Problem with wrong method being called.

2013-01-22 Thread Massimo Di Pierro
You should thank Anthony. He wrote that code. ;-) On Tuesday, 22 January 2013 08:47:53 UTC-6, c0nstin3 wrote: > > Excellent! > > Thanks Massimo, it worked perfectly! > > On Monday, 21 January 2013 19:32:18 UTC, Massimo Di Pierro wrote: >> >> Assuming your ajax callback function is correctly calle

[web2py] Re: 'list:reference', contains, Mysql, instr

2013-01-22 Thread Massimo Di Pierro
I understand the problem. Please open a ticket with a a request for improvement. On Tuesday, 22 January 2013 07:53:58 UTC-6, pablo@uam.es wrote: > > person = db(db.person.name='').select().first() >>> papers = db.paper.authors.contains(person.id).select() >>> >> >> Sorry, I didn't read ca

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2013-01-22 Thread Massimo Di Pierro
can you show an example? On Tuesday, 22 January 2013 07:36:39 UTC-6, Paolo valleri wrote: > > Hi all, I've just discovered that the regex used to retrieve the static > files doesn't work if I use languages abbreviation in urls. > How can we fix this? > > > > 2012/12/28 Richard Vézina > > >> Hello

[web2py] Re: records as fields in a single form

2013-01-22 Thread Massimo Di Pierro
I cannot think of any. On Tuesday, 22 January 2013 06:34:03 UTC-6, Annet wrote: > > I defined the following tables: > > db.define_table('nav', > Field('navbarID','reference navbar',default='',requires=IS_IN_DB(db,' > navbar.id','%(name)s',zero=T('select a value')),notnull=True), > > Fie

[web2py] Re: How to redirect within a method that was invoked via Ajax?! Problem with wrong method being called.

2013-01-22 Thread c0nstin3
Excellent! Thanks Massimo, it worked perfectly! On Monday, 21 January 2013 19:32:18 UTC, Massimo Di Pierro wrote: > > Assuming your ajax callback function is correctly called you just need to > do: > >redirect(location, client_side=True) > > instead of > >redirect(location) > > With cli

Re: [web2py] How I can use tag with Markmin?

2013-01-22 Thread Massimo Di Pierro
This would be safe but t may mess up the output. In principe the "text" inside should be allowed to contain any html including

Re: [web2py] Re: Book in epub format?

2013-01-22 Thread Massimo Di Pierro
my process is markmin -> html markmin -> latex -> pdf -> print There is a latex -> epub (http://johnmacfarlane.net/pandoc/) On Tuesday, 22 January 2013 00:22:11 UTC-6, Johann Spies wrote: > > On 21 January 2013 22:49, Niphlod > wrote: > >> rotfl. always available, but I don't know a single thing

Re: [web2py] Re: Compare row objects inside a for... in loop

2013-01-22 Thread Luciano Laporta Podazza
Hi Anthony!, Yes, a friend of mine just gave me the same solution and I can't believe I didn't thought about that :P. Thanks a lot!!! On Tue, Jan 22, 2013 at 11:10 AM, Anthony wrote: > I suppose you could do something like: > > rows = db(query).select() > for i in range(len(rows)-1): > >

[web2py] Re: Compare row objects inside a for... in loop

2013-01-22 Thread Anthony
I suppose you could do something like: rows = db(query).select() for i in range(len(rows)-1): Anthony On Tuesday, January 22, 2013 8:17:10 AM UTC-5, Luciano Laporta Podazza wrote: > > Hello, > > I've been searching a lot about this but couldn't find anything so sorry > for this basic que

[web2py] Re: 'list:reference', contains, Mysql, instr

2013-01-22 Thread pablo . angulo
> > person = db(db.person.name='').select().first() >> papers = db.paper.authors.contains(person.id).select() >> > > Sorry, I didn't read carefully enough. That's not what I need, I need to perform a join. My real-world query is rather like: db.define_table('person', Field('name', unique

Re: [web2py] Re: Is there a way to use SQLFORMs to generate form that can update multiple records?

2013-01-22 Thread Srinath
Is there any guide on how I can make use of this spreadsheet module? How I create the form and other related guides? On Tue, Jan 22, 2013 at 4:21 PM, Alan Etkin wrote: > As the subject states, is there a way to update multiple records in a >> single form using SQLFORM? >> > > If you don't need

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2013-01-22 Thread paolo.vall...@gmail.com
Hi all, I've just discovered that the regex used to retrieve the static files doesn't work if I use languages abbreviation in urls. How can we fix this? 2012/12/28 Richard Vézina > Hello, > > I publish a new script that allow deployment of Redmine beside web2py. > > Here : > https://groups.goo

[web2py] Compare row objects inside a for... in loop

2013-01-22 Thread Luciano Laporta Podazza
Hello, I've been searching a lot about this but couldn't find anything so sorry for this basic question. How can I compare an actual row object with the next one inside a for...in loop? Thanks in advance! --

[web2py] records as fields in a single form

2013-01-22 Thread Annet
I defined the following tables: db.define_table('nav', Field('navbarID','reference navbar',default='',requires=IS_IN_DB(db,'navbar.id','%(name)s',zero=T('select a value')),notnull=True), Field('name',length=32,default='',requires=[IS_LENGTH(32,error_message=T('length exceeds 32 charac

[web2py] Re: Scheduler ignoring period/repeat setting.

2013-01-22 Thread Niphlod
its more of an architectural problem than a web2py one to be sure that the tasks are there you may have to check for their presence on the scheduler_task table. There is the uuid column that is enforced as unique, so you can use it to query the table safely. Now, the problem is that you gen

Re: [web2py] How I can use tag with Markmin?

2013-01-22 Thread Alan Etkin
How about MARKMIN(text, extra={"pre_with_code": lambda text: "{0}". format(XML(text, sanitize=True))}) --

[web2py] Re: 'truncate' broken in SQLTABLE with 'headers'.

2013-01-22 Thread Mandar Vaze
> On Wednesday, July 20, 2011 5:45:21 AM UTC+5:30, Anthony wrote: >> >> On Tuesday, July 19, 2011 7:48:35 PM UTC-4, Carlos wrote: >>> >>> So 'truncate' is not being respected when using the previous 'headers' >>> format (simple dict of strings). >>> >> >> Oh, I see, you're right -- that shoul

[web2py] Re: Is there a way to use SQLFORMs to generate form that can update multiple records?

2013-01-22 Thread Alan Etkin
> > As the subject states, is there a way to update multiple records in a > single form using SQLFORM? > If you don't need to use specifically SQLFORM, you can try contrib/spreadsheet using the data option (for viewing/updating a db) It's intended to deal with numbers and short text, but it cou

[web2py] Is there a way to use SQLFORMs to generate form that can update multiple records?

2013-01-22 Thread Srinath
Hi all, As the subject states, is there a way to update multiple records in a single form using SQLFORM? Thanks in advance, Srinath --

[web2py] Re: 'truncate' broken in SQLTABLE with 'headers'.

2013-01-22 Thread Mandar Vaze
Just to revive the discussion, if SQLTABLE is passed a headers dict AND truncate value, then truncate isn't honored. e.g mytable = SQLTABLE(somequery, headers={'table.field1': 'Label1', 'table.field2': 'Label2'} truncate=25) On Wednesday, July 20, 2011 5:45:21 A

[web2py] Re: Scheduler ignoring period/repeat setting.

2013-01-22 Thread Stormcrow
Hi Niphlod. Thanks so much for the reply. I suspected I had the* queue_task*method in the wrong place and I did. Is there isn't any neat way of automatically checking that these tasks are in the database and adding them if they're not there? I don't really want to have to access a controller to

[web2py] Re: 'list:reference', contains, Mysql, instr

2013-01-22 Thread pablo . angulo
El lunes, 21 de enero de 2013 22:47:41 UTC+1, Massimo Di Pierro escribió: > > Now I understand the problem. You want to pass an expression where a value > is expected. I do not believe we can support this. INSTR does not solve the > problem because it would not be correct to looks for substring