[web2py:11371] Re: db field with vs form field width

2008-11-07 Thread billf
I would create a my_application.css file in the static folder of my application containing the styles my app uses, e.g. your 'student_last_name'. If it is not automatically picked up then include the following in your app's layout.html or whatever you are using: I think the following also work

[web2py:11439] Re: db field with vs form field width

2008-11-07 Thread billf
That's another thread isn't it? On Nov 7, 5:42 pm, "Wes James" <[EMAIL PROTECTED]> wrote: > i don't see any size (field width) or maxlength (total chars that can > be type in field) in the html output. > > -wj > > On Thu, Nov 6, 2008 at 9:17 PM, mdipierro <[EMAIL PROTECTED]> wrote: > > > length i

[web2py:11440] Re: form field maxlength

2008-11-07 Thread billf
I believe that you can set the attributes on an but only if you create it specifically as in: INPUT(_type='text',_name='student_last_name',_value='Smith',_size='20',_maxlength='30') ...as all attributes prefixed '_' are used to create html tag attributes. At the moment, I don't believe that yo

[web2py:11469] Re: Web2py added to GitHub.org

2008-11-08 Thread billf
I agree that choice is good but without version numbers in the download filename it could be frustrating having to install and run before you know what version you have got. On Nov 8, 10:10 pm, ceej <[EMAIL PROTECTED]> wrote: > Hi all, > > I've added web2py > onhttp://github.org|http://github.co

[web2py:11471] How to include html in a view?

2008-11-08 Thread billf
I know this is a weak question but I can't seem to get my head around it. I want to code something like the following in a view html file: {{=object.method()}} ...and get some valid html included in the view. Let's say I want a label, a value and a . I expect the method to look something like:

[web2py:11479] Re: How to include html in a view?

2008-11-08 Thread billf
ou are passing a list to the DIV and the list is > serialized. In the second case you are passed the list elements to the > DIV, as should be. > > Massimo > > On Nov 8, 6:51 pm, billf <[EMAIL PROTECTED]> wrote: > > > I know this is a weak question but I can'

[web2py:11507] Re: How to include html in a view?

2008-11-09 Thread billf
etwork-theory.co.uk/docs/pytut/UnpackingArgumentLists.htmlhttp://www.network-theory.co.uk/docs/pytut/Dictionaries.html > > Hope that is helpful. > > Yarko > > On Sat, Nov 8, 2008 at 10:38 PM, Jonathan Benn <[EMAIL PROTECTED]>wrote: > > > > > On Nov 9, 7:19 am, billf

[web2py:11540] Re: IMPORTANT: Bill's patch

2008-11-09 Thread billf
1) tables over something else: it does seem to be a subject of great discussion that people get very energised about. But I guess that if you take out tables then someone else will object :-) Isn't the idea of custom forms that if you want labels you code your own view? 2) labels: personally I

[web2py:11552] Proposal: MVC separation - son of custom views

2008-11-10 Thread billf
Hi All I know that there is a patch related to custom views in the pipeline but this proposal is another step on from that. I am proposing an additional approach that enables those things that (I consider) are view-related to be moved from the model and controller to the view. In addition, it p

[web2py:11557] Re: T2 with Firebird

2008-11-10 Thread billf
I don't think you can. I'd be happy to be proved wrong. There was a thread a while ago about how it would be really nice to be able to map a database column name to an 'internal' name. This was primarily to help with legacy tables that had unfriendly column names. In the context of Firebird/T2

[web2py:11559] Re: T2 with Firebird

2008-11-10 Thread billf
, have the DAL uniformly convert ALL database > field names to the form "foo_" > > Massimo made some argument against that ... I don't remember what it was or > it's strenghth... .but maybe this is enough context to start from if you > want to re-visit this. > &

[web2py:11577] Re: Proposal: MVC separation - son of custom views

2008-11-10 Thread billf
of web2py > as a module. > If you code it, please share it with us. It could be used to build a > better T2. > > Massimo > > On Nov 10, 7:23 am, billf <[EMAIL PROTECTED]> wrote: > > > Hi All > > > I know that there is a patch related to custom views

[web2py:11622] Re: Proposal: MVC separation - son of custom views

2008-11-11 Thread billf
Thank you for your kind comment. I have made a few changes to the "spec" described in a change log at the top of the page. On Nov 11, 8:22 am, seeker <[EMAIL PROTECTED]> wrote: > I just read your article Bill. > > That is a damn fine bit of thinking! > > I hope your ideas can be progressed. > >

[web2py:11653] Re: Proposal: MVC separation - son of custom views

2008-11-11 Thread billf
> > to be backwards compatible across *all versions* is like saying we > > > don't want do significant improvements and introduce drastically new > > > technologies. Also, the longer 'stretch' of backwards compatibility > > > exists, the harder it will

[web2py:11678] Re: Proposal: MVC separation - son of custom views

2008-11-11 Thread billf
Ugh! If anyone can help me stop that I'd be grateful. I don't get the problem. I copied the meta lines from another page - could there be something in there that some clients don't like? Any help gratefully received. On Nov 11, 6:25 pm, Keith Edmunds <[EMAIL PROTECTED]> wrote: > On Tue, 11 No

[web2py:11682] Re: Proposal: MVC separation - son of custom views

2008-11-11 Thread billf
like this: > > > Well-behaved Systems > > > > > > On Tue, Nov 11, 2008 at 12:13 PM, billf <[EMAIL PROTECTED]> wrote: > > > Ugh!  If anyone can help me stop that I'd be grateful.  I don't get > > the problem.  I copied the meta lines from a

[web2py:11626] Re: Proposal: MVC separation - son of custom views

2008-11-11 Thread billf
gets "Firefox can't find the server > atwww.wellbehavedsystems.co.uk" ? > > On Nov 11, 9:53 am, billf <[EMAIL PROTECTED]> wrote: > > > Thank you for your kind comment. > > > I have made a few changes to the "spec" described in a change lo

[web2py:11686] Re: access issue was: Re: Proposal: MVC separation - son of custom views

2008-11-11 Thread billf
b2py approach to MVC. By that I > mean I don't like labels in the model, labels in the controller > (passed to SQLFORM), an object that binds updating the database with > generating HTML for a form (SQLFORM) and a host of other"little" > things. > > . > . > . &g

[web2py:11688] Re: Proposal: MVC separation - son of custom views

2008-11-11 Thread billf
7:34 pm, Timothy Farrell <[EMAIL PROTECTED]> wrote: > It's amazing how critical that ".co.uk" > is.http://www.wellbehavedsystems.co.uk/web2py/examples/mvc.html > billf wrote:Wes The home page is a do-nothing page. The doc can be found > athttp://www.wellbehavedsys

[web2py:11689] Re: access issue was: Re: Proposal: MVC separation - son of custom views

2008-11-11 Thread billf
"Wes James" <[EMAIL PROTECTED]> wrote: > works fine in my firefox, opera, camino (on mac) and i just tried ie7 > (intravenousExploder) and firefox in windows (vmware fusion) and they > go right to your page too > > -wj > > On Tue, Nov 11, 2008 at 12:42 PM, bil

[web2py:11699] Re: Proposal: MVC separation - son of custom views

2008-11-11 Thread billf
Many thanks. On Nov 11, 10:00 pm, Keith Edmunds <[EMAIL PROTECTED]> wrote: > On Tue, 11 Nov 2008 11:56:12 -0800 (PST), [EMAIL PROTECTED] > said: > > > Can achipa or Keith or > > anyone who gets the problem try storing the source locally (if they > > can access it at all!) and see if they still ge

[web2py:11630] Re: Proposal: MVC separation - son of custom views

2008-11-11 Thread billf
Seeker I think you have a good point but, playing devil's advocate, if you want to establish yourself in an enterprise section of the market it is a disadvantage to give users the ultimatum "if you want X then you have to change Y". Perhaps, an alternative is to deprecate methods and classes so

[web2py:11727] Widgets and styling

2008-11-11 Thread billf
I don't know much about widgets and I have a question. How do I ensure that my widget is styled in line with other, similar components? Or putting it another way, can I ensure that my widget gets class= or id= attributes that are compatible with those given to non-widget components or do I have

[web2py:11736] Re: Widgets and styling

2008-11-12 Thread billf
les for ID and CLASS in forms. If you make your > own widgets simply use the same convention. > > Massimo > > On Nov 12, 12:05 am, billf <[EMAIL PROTECTED]> wrote: > > > I don't know much about widgets and I have a question. > > > How do I ensure that my w

[web2py:11757] Re: Newbie Insert

2008-11-12 Thread billf
SQLTable.insert() just wants a dict so I think it should look like: my_insert(name='Carl',address='av none 1') def my_insert(self,**vsql): db.people.insert(vsql) .. but I'm new to Python and I'm never sure where the asterisks should go :-) On Nov 12, 8:09 pm, Heronim <[EMAIL PROTECTED]> wr

[web2py:11768] Re: Proposal: MVC separation - son of custom views

2008-11-13 Thread billf
seeker Good question. The current "spec" proposes that the Resource approach will sit alongside the existing web2py core and there will be NO backward-compatibility problems. If the developer chooses to use the Resource approach then there are a couple of consequences: 1) The constructs in the

[web2py:11802] Re: pyworks2008 talk slides

2008-11-13 Thread billf
It looks a really nice presentation - congrats. On Nov 13, 3:59 am, mdipierro <[EMAIL PROTECTED]> wrote: > http://mdp.cti.depaul.edu/examples/static/pyworks.pdf --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py

[web2py:11804] Multiple selections - checkboxes and dropdown lists

2008-11-13 Thread billf
Has any one used dropdown lists with multiple selections or multiple checkboxes for the same field/reference? I can envisage setting up multiple references (person A has homes in New York, Chicago and Paris - person has a many-to-many relationship with city). I can also envisage an un-normalized

[web2py:11821] Re: pyworks2008 talk slides

2008-11-14 Thread billf
Massimo How did the presentation go? Did you get much feedback? Bill On Nov 14, 7:47 am, "Yarko T" <[EMAIL PROTECTED]> wrote: > Note - if you log in (or create an account on Google- just use an existing > email address)  you can download in other formats, make a copy, accept > online questions

[web2py:11822] Re: web2py.net?

2008-11-14 Thread billf
A whois on web2py.net just says its registered by ww.name.com. If you ping web2py.net then you get 38.97.225.166 and if you look that up you get Cogent Communications - does that mean anything to anyone? On Nov 14, 2:55 pm, Massimo Di Pierro <[EMAIL PROTECTED]> wrote: > I hope one of us bought i

[web2py:11877] Re: Proposal: MVC separation - son of custom views

2008-11-15 Thread billf
. Supplementary questions: 1) Must the upload link be a controller/function or could it be any url? 2) Would it be useful optionally to specify different a controller/ function/url for each resource fields? On Nov 11, 7:56 pm, billf <[EMAIL PROTECTED]> wrote: > Oops - thanks Timothy :-) &

[web2py:11878] Re: web2py.net?

2008-11-15 Thread billf
I agree with Yarko but note that mysql don't seem to have mysql.net and it doesn't seem to have done them any harm. On Nov 15, 12:28 am, pmate <[EMAIL PROTECTED]> wrote: > Well, my opinion: > i just don't understand why to buy web2py.net,web2py.org, web2py.eu, > etc. Really i don't understand. Fo

[web2py:11884] Re: Proposal: MVC separation - son of custom views

2008-11-15 Thread billf
Voltron I don't think you answered the original question which was basically "if you are going to specify a link in a page then is specifying that link the responsibility of the the model, the controller or the view?" RE your other points: "All URLs should be able to handle files/REST/PUT": at

[web2py:11900] Re: web2py.net?

2008-11-15 Thread billf
Also, I had noticed someone else (not Massimo) had already > > > taken web2py.org. Besides, the idea was also to take web2py further. > > > Also It will be very difficult to keep all the tld for web2py unless > > > we all (web2py aficionado) chip-in. Isn't that what op

[web2py:11925] Re: SQLFORM, visible data in fields but without update form

2008-11-16 Thread billf
Try working through the tutorial in http://mdp.cti.depaul.edu/examples/static/cookbook.pdf It provides code examples that probably cover your needs. On Nov 16, 8:14 pm, Jędrzej Nowak <[EMAIL PROTECTED]> wrote: > So, I would like to create SQLFORM with inserts data to db, but I would > like to s

[web2py:11952] Re: ... and you can run *some* SQLALchemy models in web2py

2008-11-16 Thread billf
Massimo The problem with the above example is that, tho' it works fine first time thru', subsequent executions (for me at least) result in "'users' referenced before assignment" I believe that this is because any variable defined in db.py (e.g. users) is global but is only assigned to if it is

[web2py:11953] Firefox and closing tickets

2008-11-17 Thread billf
Not a major gripe I know but can anyone tell me why closing a Firefox tab including a web2py ticket takes 20-30 seconds while closing a tab containing anything else is almost instant? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[web2py:11954] Re: Web2py & Elixir

2008-11-17 Thread billf
Massimo The problem with the above example is that, tho' it works fine first time thru', subsequent executions (for me at least) result in "'users' referenced before assignment" Once the tables have been created, I believe the controller code must reference them as "db.users.insert..." and db.d

[web2py:11956] Re: IS_IN_SET() usage

2008-11-17 Thread billf
IS_IN_DB(db().select(db.activitytypes.ALL),'activitytypes.code') IS_IN_DB also creates a dropdown list On Nov 17, 8:20 am, "marco prosperi" <[EMAIL PROTECTED]> wrote: > hello everybody, I would like to do something similar to > > db.activity.activitytype.requires=[IS_NOT_EMPTY(),IS_IN_SET([ x fo

[web2py:11961] Re: SQLFORM, visible data in fields but without update form

2008-11-17 Thread billf
html, relations > etc... ) > Now i would like to create new page based on this template, without > selecting many values again ( checkboxes etc ). > > If I generate SQLFORM() with "values" from database, it generates > update form, without values from database it genera

[web2py:12023] Re: web2py foundation

2008-11-17 Thread billf
tbh I have been sitting on my hands for a while but a few other posts have touched on some of the real difficulties so I hope I will not been seen as the only negative/questioning voice. I start from the point that I think the aims are wonderful. But... To begin with, most of the aims of sharing

[web2py:12024] Re: Strange SQLDB Problem.

2008-11-17 Thread billf
According to http://www.petefreitag.com/tools/sql_reserved_words_checker/?word=release "release" is a reserved word in DB2, MySQL 5.0 and PostgreSQL 8. On Nov 17, 9:24 pm, mdipierro <[EMAIL PROTECTED]> wrote: > maybe release is a SQL reserved keyword. > > Massimo > > On Nov 17, 3:19 pm, "Phyo A

[web2py:12057] Re: itemize temporary data

2008-11-18 Thread billf
I don't think you can - as you say itemize takes tables and an optional query. I think you will have to create your own "itemize" that works off your results. Looking at T2.itemize, it should not be difficult. Would it be nice if one could create a database and table in ram cache (disk cache wou

[web2py:12062] Re: itemize temporary data

2008-11-18 Thread billf
ase in ram than this is possible. I will > take a look. > > Massimo > > On Nov 18, 7:33 am, billf <[EMAIL PROTECTED]> wrote: > > > > > I don't think you can - as you say itemize takes tables and an > > optional query.  I think you will have to cr

[web2py:12076] Re: itemize temporary data

2008-11-18 Thread billf
is having trouble. > > I think we need to revisit the fundamental issue  here... In a separate > thread.  In preparation please review my note last night re: MVC ==> data / > logic  / presentation. > > Regards, > Yarko   > > > > -Original Message- > From:

[web2py:12078] Re: where to put view logic

2008-11-18 Thread billf
Yarko Basically I agree with everything you say. There are always going to be some grey areas but that's life. For example, I could argue that hiding changes to the model could be handled by the model (as opposed to the controller as you suggest) by exposing a "legacy" view. (I'm talking genera

[web2py:12102] Re: where to put view logic

2008-11-18 Thread billf
Responses below On Nov 18, 6:04 pm, yarko <[EMAIL PROTECTED]> wrote: > On Nov 18, 10:41 am, billf <[EMAIL PROTECTED]> wrote: > > > Yarko > > > Basically I agree with everything you say.  There are always going to > > be some grey areas but that's

[web2py:12107] Re: where to put view logic

2008-11-18 Thread billf
time :-) - Hide quoted text - On Nov 18, 8:26 pm, "Yarko Tymciurak" <[EMAIL PROTECTED]> wrote: > On Tue, Nov 18, 2008 at 2:03 PM, billf <[EMAIL PROTECTED]> wrote: > > I'm not saying that the (presentation) view knows anything about the > > model just that the c

[web2py:12141] Re: itemize temporary data

2008-11-18 Thread billf
thout a database? > > Otherwise I'll do as you suggest, Bill, and make my own itemize. > Baron > > On Nov 19, 12:33 am, billf <[EMAIL PROTECTED]> wrote: > > > > > I don't think you can - as you say itemize takes tables and an > > optional query.  

[web2py:12147] Re: itemize temporary data

2008-11-19 Thread billf
e > > refererring to your temporary data(?) > > No, to the table input to itemize. This input is a python object. So > can this object be instantiated directly without going through a > database? > > On Nov 19, 5:36 pm, billf <[EMAIL PROTECTED]> wrote: > > >

[web2py:12276] Re: odd save behavior with check box

2008-11-21 Thread billf
If the following explanation is correct it is a big coincidence because I have just been looking at this behaviour. When a form is submitted, if there is no parameter for a field then one of 2 things happen (simplified): If it is NOT a checkable form control (checkable=check box or radio button)

[web2py:12277] Proposed patch for check box behaviour

2008-11-21 Thread billf
The following is a proposed patch to sqlhtml.py so that record fields of type 'boolean' are added as hidden form fields if they are not already included in the form. In this way, the status of a checked/ true field is maintained even if the field is not included in the form as a checkbox. In the

[web2py:12278] Re: odd save behavior with check box

2008-11-21 Thread billf
that whatever the status of the normal checkbox either name=on or name=off will be returned. Any thoughts gratefully received. On Nov 21, 8:13 am, billf <[EMAIL PROTECTED]> wrote: > If the following explanation is correct it is a big coincidence > because I have just been looking

[web2py:12284] Re: odd save behavior with check box

2008-11-21 Thread billf
a parameter hidden=dict(key='value') > > Massimo > > On Nov 21, 6:32 am, billf <[EMAIL PROTECTED]> wrote: > > > I am investigating a possible solution to the above problem that would > > return fieldname=OFF if a displayed checkbox is unchecked. > &g

[web2py:12291] Re: odd save behavior with check box

2008-11-21 Thread billf
g? > I think this is the correct behavior > > Massimo > > On Nov 21, 8:49 am, billf <[EMAIL PROTECTED]> wrote: > > > Massimo > > > In what way are you suggesting "SQLFORM and and FORM take a parameter > > hidden=dict(key='value')" would b

[web2py:12344] Re: itemize temporary data

2008-11-21 Thread billf
> > > On Nov 20, 3:06 pm, Baron <[EMAIL PROTECTED]> wrote: > > > > > > > The easiest way to construct an SQLTable is to use define_table (as > > in a model like db.py). > > > > > > You say 'easiest' - is there an alternative way to

[web2py:12346] Re: demo of checkbox issue

2008-11-21 Thread billf
I have been going back to basics and running my own test - just web2py - and I agree that it does all seem to work ok (correct data on db and correct data in form) with one exception (see next para). I think I overlooked the fact that, for standard form processing, update() only updates the field

[web2py:12359] Re: demo of checkbox issue

2008-11-22 Thread billf
s/wrong results? On Nov 22, 1:23 am, mdipierro <[EMAIL PROTECTED]> wrote: > That is because a form is reset to default upon accept, unless you > accept with keepvalues=True. > > Massimo > > On Nov 21, 5:41 pm, billf <[EMAIL PROTECTED]> wrote: > > > I have been

[web2py:12432] Re: Updating unique fields -a discussion

2008-11-24 Thread billf
I guess that in "Actually this does not happen with SQLFORM since it is smart enough to figure out that the current record should be included when enforcing IS_NOT_IN_DB(...). ", 'included' should read 'excluded'. On Nov 24, 5:56 am, mdipierro <[EMAIL PROTECTED]> wrote: > Actually this does not h

[web2py:12608] Checkbox processing

2008-11-28 Thread billf
Harking back to an ancient thread, I think I have finally tracked down what I think is a grey area in checkbox processing. The "book" says: (When a form is accepted) "If the keepvalues is set to True the form is pre-populated with the previously inserted values." It doesn't say, specifically wha

[web2py:12619] Re: Checkbox processing

2008-11-28 Thread billf
IL PROTECTED]> wrote: > Bill, > > shouldn't 'ON' in slqhtml.py also be 'on'? > > On Nov 28, 10:05 am, billf <[EMAIL PROTECTED]> wrote: > > > Harking back to an ancient thread, I think I have finally tracked down > > what I think is

[web2py:12689] Re: focus on a specific text input

2008-11-30 Thread billf
The following works for me (assuming the first form in the page). document.forms[0].address.focus() On Dec 1, 12:22 am, mdipierro <[EMAIL PROTECTED]> wrote: > There is a jquery statement in web2py_ajax.html that conflicts with > it. That jquery statement should be removed. I do it asap. > >

[web2py:12690] Re: focus on a specific text input

2008-11-30 Thread billf
The following works for me - assumes address is in the first form: On Nov 30, 11:48 pm, pmate <[EMAIL PROTECTED]> wrote: > hi, > this is my code in the view: > > {{extend 'layout.html'}} > Page Title > {{=form}} > > >