[web2py] Re: Are there conditions under which labels are not shown in SQLForm ?

2013-01-18 Thread Niphlod
show us the code you're using to override them, and the model of the underlying table On Friday, January 18, 2013 3:54:15 AM UTC+1, GeeksRule wrote: > > I have an SQLForm, and have a dictionary of labels, but they aren't been > overriden : > > {'fname':'First name: ', 'lname':'Last name : ',

[web2py] Re: Problems with auth.login_bare when using postgres

2013-01-18 Thread Niphlod
but as soon as you change the dal uri with the same model the first request will create the database tables. then you can import the data with a csv.. On Friday, January 18, 2013 12:20:29 AM UTC+1, Daniel Gonzalez wrote: > > M, not really: I still need to create the database. Maybe web2

[web2py] Re: How do you change memcache session expiry?

2013-01-18 Thread Paolo valleri
Hi all, I have just tried the solution proposed on the issue but it doen't work. This is a really annoying bug not only because I have to login several times in a day but also because I can lose my edits if I don't save my changes in time (i.e, editing a wiki page). It might be better to remove

Re: [web2py] Re: Strange behavior storing data - web2py 2.3.2 - Mac OS X 10.7.5

2013-01-18 Thread Luciano Laporta Podazza
Hi guys, You were right, first I've removed the try/except so the error tickets appeared. birthday= datetime.strptime(data['birthday'],'%d/%m/%Y' ).strftime('%Y-%m-%d'), <---this is the problem. The issue was involved with dates format(locale), due that facebook users can be

[web2py] Specify my own controller for @auth.requires_login()

2013-01-18 Thread Daniel Gonzalez
Hi, Whenever my login expires, web2py redirects to application/default/user/login?_next=. Since I have a customized login controller, I would like to redirect to it whenever the login expires. Is it possible to "configure" @auth.requires_login() to point to my own controller? Thanks, Daniel -

Re: [web2py] Specify my own controller for @auth.requires_login()

2013-01-18 Thread Bruno Rocha
auth = Auth(db, controller="foo", function="bar") --

[web2py] Need webvtt entry in gluon/contenttype.py

2013-01-18 Thread Magnitus
http://dev.w3.org/html5/webvtt/#text/vtt http://www.w3.org/community/texttracks/2012/08/23/webvtt-support-in-browsers/ I know the format is still pretty bleeding edge, but it seems to be gaining support amongst browser manufacturers. I can see why. It is a very good concept I find. I think supp

[web2py] latex plugin and software for website template

2013-01-18 Thread NeelSheyal
- I am building a Q&A site using web2py and need to create a web page template. What software do you guys recommend ( I am a complete newbie in template designing)? - Does web2py have a Latex editor plugin that I can use in my comment editor? Thanks, Neel Sheyal --

[web2py] how to support video in an app

2013-01-18 Thread sasogeek
at the moment, i can let users upload pictures and use the img tag to allow the image to be displayed on a page, when users upload videos, how do i allow the videos to display and play on the page... and if users submit a youtube link, how do i grab the embed code to display the video on the pag

[web2py] restful api :field behaviour change

2013-01-18 Thread DenesL
Hello all, currently the :field placeholder in a restful pattern will retrieve said field only for the first record from the resulting set. I believe that this should be changed so that it retrieves the field for all records in the set. To illustrate using the latest trunk, this pattern (note

[web2py] Re: SQLFORM.grid with multiple LEFT OUTER JOINs

2013-01-18 Thread DenesL
Hi Jim, from the book: "Multiple left joins can be combined by passing a list or tuple of db.mytable.on(...) to the left attribute." Denes --

[web2py] SQLFORM.grid and the maxtextlength parameter: The parameter doesnt work in my code

2013-01-18 Thread Sverre
I have the controller: def commodities(): tbl = db.commodities fields = [tbl.itemcode,tbl.name,tbl.unit,tbl.supplier,tbl.contact] query = (tbl.id>0) order = [tbl.itemcode] maxlen = {'commodities.itemcode':2,'commodities.name':2,'commodities.unit':2,'commodities.supplier':2,'c

[web2py] Re: Grid with multiple left joins

2013-01-18 Thread Felipe Meirelles
Did anyone saw it? On Monday, January 14, 2013 5:41:36 PM UTC-2, Felipe Meirelles wrote: > > Please desconsider the sorter_icons parameter, its a custom implementation > of mine. > I can post this patch too if you think its relevant. > > Thanks! > > On Monday, January 14, 2013 5:38:53 PM UTC-2, F

[web2py] Re: how to call sqlform from a view

2013-01-18 Thread DenesL
Hi Alex, you can't call the function from the view, you would have to pass it somehow or re-define it there, but the question is why?. Normally you would just write {{=form}} in the view to display the form returned form the function. Regards, Denes --

[web2py] Re: crud+auth question

2013-01-18 Thread DenesL
Hi Babu, do you also have a login function that would set your current user before any of this is run?. Regards, Denes --

Re: [web2py] SQLFORM.grid and the maxtextlength parameter: The parameter doesnt work in my code

2013-01-18 Thread Javier Pepe
Hello maxtextlength is for all fields, you need use maxtextlengths http://web2py.com/book/default/chapter/07#SQLFORM.grid-and-SQLFORM.smartgrid On Fri, Jan 18, 2013 at 9:40 AM, Sverre wrote: > I have the controller: > > def commodities(): > tbl = db.commodities > fields = [tbl.itemcod

[web2py] Problem: SQLFORM.grid and setting a value for a field when a new dataset is created

2013-01-18 Thread Sverre
I have a contact table that includes our employees too. To make a difference I have a cclass field to make the difference. When I want to create an employee the user should not have a choice to set the cclass field, but when he is creating a customer or supplier. So I tried in SQLFORM.grid the

[web2py] Re: SQLFORM.grid with multiple LEFT OUTER JOINs

2013-01-18 Thread Jim S
I tried that, but then I don't get any of my joined fields in the result. Here is what I used for the join. left = [db.feedOrder.on(db.feedLoad.feedLoadId==db.feedOrder.feedLoadId), db.feedOrderLine.on(db.feedOrder.feedOrderId==db.feedOrderLine.feedOrderId)] I get no fields from either feedOrde

[web2py] Re: SQLFORM.grid with multiple LEFT OUTER JOINs

2013-01-18 Thread Jim S
I just saw this post as well: https://groups.google.com/forum/#!topic/web2py/T1TkWEu2cX4 Can we get his fix implemented? -Jim On Friday, January 18, 2013 8:21:35 AM UTC-6, Jim S wrote: > > I tried that, but then I don't get any of my joined fields in the result. > Here is what I used for th

[web2py] Re: how to call sqlform from a view

2013-01-18 Thread Alex Glaros
Thanks Denes, but it seems that "form" doesn't uniquely identify anything, or is the "return dict(form=form)" the part that gives the output a unique name? I mean would other functions in the same controller have syntax to give distinguishing names such as "return dict(form2=form2)", and "re

[web2py] Re: how to call sqlform from a view

2013-01-18 Thread Anthony
In web2py, each request runs only one action from a controller -- from within a view, you do not call other controller actions. If you want to display a form within a given page, you should create and return the form within the action for that page. If you need to re-use the code for the form,

[web2py] Re: how to call sqlform from a view

2013-01-18 Thread Niphlod
a controller can contain multiple function, each one of them can have a return dict(afixedname=avalue) . when you use an url like /app/controller/display_a_form or /app/controller/display_a_form2 you may return the same dict with the same keys for both, the values are the one that will be d

[web2py] Re: how to call sqlform from a view

2013-01-18 Thread Anthony
SQLFORM names the form based on the name of the db table (as well as the type of form -- create or update). If you have multiple forms on the page, their names will not conflict unless they are based on the same db table, and in that case, you can specify your own unique form names via the "for

[web2py] Re: how to call sqlform from a view

2013-01-18 Thread Anthony
Also, it might help if you indicate what you are trying to do. Anthony On Friday, January 18, 2013 9:57:23 AM UTC-5, Anthony wrote: > > SQLFORM names the form based on the name of the db table (as well as the > type of form -- create or update). If you have multiple forms on the page, > their n

[web2py] How to use formargs, createargs, editargs, viewargs?

2013-01-18 Thread Tito Garrido
I have read the book on http://web2py.com/books/default/chapter/29/07#SQLFORM.grid-and-SQLFORM.smartgridbut the explanation about these args are too poor... how to use it? Is there any example? Thanks, Tito -- Linux User #387870 . _/_õ|__| ..º[ .-.___.-._| . . . . .__( o)__( o

[web2py] Re: how to call sqlform from a view

2013-01-18 Thread DenesL
Hi Alex, it is exactly that form, the one returned in the dictionary by the display_form function. There is nothing wrong with other functions returning the same variable unless you use them in the same view. Normally each function has its own view. Denes --

[web2py] SQLFORM.smartgrid dont work

2013-01-18 Thread Sverre
I have the following table def: db.define_table('processes', Field('itemcode',db.commodities,label=T('Item Code'),unique=True, required=True, notnull=True), # Item code of the process result Field('name','string',length=60,label=T('Name'), required=False, notnull=False)

[web2py] Re: SQLFORM.smartgrid dont work

2013-01-18 Thread DenesL
Typo? > > maxlen = {'prosesses.itemcode':5,'processes.name':25} > maxlen = {'processes.itemcode':5,'processes.name':25} --

[web2py] Re: 'DAL' object has no attribute 'auth_wiki' - trunk version

2013-01-18 Thread Alan Etkin
> > Working on trying out the json support but db won't get past this error. Fixed in trunk. Please check it works for you (it did for me) --

[web2py] Re: record versioning: what if tables are manually changed with migrate=False?

2013-01-18 Thread Massimo Di Pierro
You can do: DAL(, migrate_enabled=False) and no table will be migrated ever. On Wednesday, 16 January 2013 23:41:42 UTC-6, Rick Ree wrote: > > Thanks Massimo. > > For this app we use migrate=False for all tables because of issues that > arose in the context of distributed development using

[web2py] Re: Book in epub format?

2013-01-18 Thread Massimo Di Pierro
Can you help us make the epub? On Thursday, 17 January 2013 04:59:59 UTC-6, Johann Spies wrote: > > Is there any chance to get the book in epub-format? > > I think it should be possible using markmin -> xhtml > epub (via calibre)? > > Regards > Johann > > -- > Because experiencing your loyal love

[web2py] Re: View not displaying the pictures

2013-01-18 Thread Massimo Di Pierro
Mind you can simplify this as URL(a='Assignment', c='default', r=request, f='download', args=xxx.Picture)} with URL('download', args=xxx.Picture)} On Thursday, 17 January 2013 07:53:10 UTC-6, Mihir Lade wrote: > > Actually got this to work however the issue now is its iterating thorugh > the

[web2py] Re: auth.wiki doesn't find pages without tags

2013-01-18 Thread Massimo Di Pierro
RIght now wiki search only searches by tag. Perhaps you should also search by title? On Thursday, 17 January 2013 19:19:58 UTC-6, viniciusban wrote: > > I've had a problem today, trying to search auth.wiki pages without > tags, but they aren't found. > > As tags aren't required to save a page,

[web2py] Re: How to use formargs, createargs, editargs, viewargs?

2013-01-18 Thread Niphlod
the same args you'd want to pass to a SQLFORM you can pass them to createargs, formargs, etc etc etc. code on the grid basically does this sqlformargs = dict(formargs) sqlformargs.update(createargs) create_form = SQLFORM( table, ignore_rw=ignore_rw, formstyle=formstyle, _class='we

[web2py] Re: change string format of date picker

2013-01-18 Thread Massimo Di Pierro
You can do db.table.field.requires = IS_DATE(format = '%D-%M-%Y') this can be done globally or in one action only. It will affect forms. You also need to change the format in JS calendar. This is in the code in web2py_ajax.html: