[web2py:18773] Re: Would this patch be useful?

2009-03-30 Thread Yarko Tymciurak
On Mon, Mar 30, 2009 at 1:58 AM, notabene wrote: > > Thumbs up. Very good idea! > > We have had the discussion around MVC. And the conclusion were, that > there is no clear-cut border between MVC. No perfect or true division. I think maybe you missed some point of the discussions on division...

[web2py:18776] Re: Would this patch be useful?

2009-03-30 Thread notabene
On 30 Mar., 09:13, Yarko Tymciurak wrote: > On Mon, Mar 30, 2009 at 1:58 AM, notabene wrote: > > > Thumbs up. Very good idea! > > > We have had the discussion around MVC. And the conclusion were, that > > there is no clear-cut border between MVC. No perfect or true division. > > I think maybe yo

[web2py:18778] Re: DAL Insert error

2009-03-30 Thread Michal Jursa
That's not problem of DAL. I just guess some of those inserts failed due to some constraints and that's why the transaction is aborted and rollback should be issued. Michal alias Plysak voltron wrote: > Hi, > > does anyone have an idea what could cause this error? > > current transaction is

[web2py:18775] DAL Insert error

2009-03-30 Thread voltron
Hi, does anyone have an idea what could cause this error? current transaction is aborted, commands ignored until end of transaction block I am trying to make over 2000 inserts at a go, could that be a problem? Thanks --~--~-~--~~~---~--~~ You received this mess

[web2py:18774] Re: pycon 2009

2009-03-30 Thread Jonathan B
On Mar 30, 8:39 am, Yarko Tymciurak wrote: > I personally want to thank Massimo for preparing the slides, and > Wingware.com for providing a 3-O/S WingIDE-Pro liscense (Jon B. was the > winner). Woah, I suppose that's a different Jon B., otherwise I'd probably know about this already! ;) --

[web2py:18777] Re: Possible bug: cron doesn't work when deploy in a directory name with space inside

2009-03-30 Thread AchipA
Can you check if the cron tasks really-really aren't executed as per 1.1 ? Logging can play tricks on you in hardcron mode, as a lot of things happen in separate threads. The easiest way is to do something like open("C:\marker","w") and check if it got created or, if it does not annoy you, winsoun

[web2py:18779] Re: Possible bug: cron doesn't work when deploy in a directory name with space inside

2009-03-30 Thread Iceberg
Try once more, still no cron at all. :-( I describe what I did here, so you can try to reproduce all my test, to see whether it will be any different at your machine. I am now using Windows XP Home Edition (should not matter), Python 2.5.4, web2py source 1.59, ORIGINAL cron.py. I create a brand

[web2py:18780] session variable as parameter in SQL "WHERE" clause

2009-03-30 Thread ctalley
Is it possible to use a session variable as a parameter in a SQL "WHERE" clause? See example below. #assign value to session variable session.mysession = ... #use session variable in web2py DAL query #*this works* rows=db(db.table.column==session.mysession).select(...) #use session variable in

[web2py:18781] Re: DAL Insert error

2009-03-30 Thread mdipierro
Can you say more about the error? or about the insert? On Mar 30, 5:01 am, voltron wrote: > Hi, > > does anyone have an idea what could cause this error? > > current transaction is aborted, commands ignored until end of > transaction block > > I am trying to make over 2000 inserts at a go, coul

[web2py:18782] Re: session variable as parameter in SQL "WHERE" clause

2009-03-30 Thread mdipierro
On Mar 30, 8:51 am, ctalley wrote: > Is it possible to use a session variable as a parameter in a SQL > "WHERE" clause?  See example below. > > #assign value to session variable > session.mysession = ... > > #use session variable in web2py DAL query > #*this works* > rows=db(db.table.column==se

[web2py:18783] request for comments

2009-03-30 Thread mdipierro
Right now if you say: db.table.field.writable=False your field will be hidden to both custom forms and appadmin forms. I think appadmin forms should ignore these constraints and always display all fields. Do you agree? Massimo --~--~-~--~~~---~--~~ You received t

[web2py:18784] Re: request for comments

2009-03-30 Thread johann . scheibelhofer
agree On Mar 30, 4:10 pm, mdipierro wrote: > Right now if you say: > > db.table.field.writable=False > > your field will be hidden to both custom forms and appadmin forms. I > think appadmin forms should ignore these constraints and always > display all fields. Do you agree? > > Massimo --~--~--

[web2py:18785] Re: pycon 2009

2009-03-30 Thread Yarko Tymciurak
:-)John E. from Wingware pulled the name of one of the attendees of the dojo... On Mon, Mar 30, 2009 at 4:36 AM, Jonathan B wrote: > > > > On Mar 30, 8:39 am, Yarko Tymciurak wrote: > > > I personally want to thank Massimo for preparing the slides, and > > Wingware.com for providing a 3-O/S

[web2py:18786] Re: request for comments

2009-03-30 Thread Timothy Farrell
+1 johann.scheibelho...@easytouch-edv.com wrote: > agree > > On Mar 30, 4:10 pm, mdipierro wrote: > >> Right now if you say: >> >> db.table.field.writable=False >> >> your field will be hidden to both custom forms and appadmin forms. I >> think appadmin forms should ignore these constraints a

[web2py:18787] Re: Would this patch be useful?

2009-03-30 Thread Yarko Tymciurak
On Mon, Mar 30, 2009 at 5:40 AM, notabene wrote: > > On 30 Mar., 09:13, Yarko Tymciurak wrote: > > On Mon, Mar 30, 2009 at 1:58 AM, notabene wrote: > > > > > Thumbs up. Very good idea! > > > > > We have had the discussion around MVC. And the conclusion were, that > > > there is no clear-cut bor

[web2py:18788] Re: request for comments

2009-03-30 Thread Kacper Krupa
i also agree On Mar 30, 4:23 pm, Timothy Farrell wrote: > +1 > > > > johann.scheibelho...@easytouch-edv.com wrote: > > agree > > > On Mar 30, 4:10 pm, mdipierro wrote: > > >> Right now if you say: > > >> db.table.field.writable=False > > >> your field will be hidden to both custom forms and app

[web2py:18789] Re: Possible bug: cron doesn't work when deploy in a directory name with space inside

2009-03-30 Thread AchipA
Can't reproduce, apart from misplacing (back)slashes, not sure what it can be. :( Just tried under winXP, from 1.59 source + patch above, (even) with python 2.6. After that experiment I renamed the web2py dir to "web py" (note the whitespace) and it worked identically. Note that the we both mistyp

[web2py:18790] Re: request for comments

2009-03-30 Thread Yarko Tymciurak
I agree appadmin should display these fields, BUT I do not thing it should ignore - instead, it should have different behavior: there should be some indicator in appadmin of the permission settings (text, color key, but _something_) On Mon, Mar 30, 2009 at 9:37 AM, Kacper Krupa wrote: > > i als

[web2py:18791] Re: request for comments

2009-03-30 Thread AchipA
+1 On Mar 30, 4:37 pm, Kacper Krupa wrote: > i also agree > > On Mar 30, 4:23 pm, Timothy Farrell wrote: > > > +1 > > > johann.scheibelho...@easytouch-edv.com wrote: > > > agree > > > > On Mar 30, 4:10 pm, mdipierro wrote: > > > >> Right now if you say: > > > >> db.table.field.writable=False >

[web2py:18792] Re: Would this patch be useful?

2009-03-30 Thread mr.freeze
The rationale was having the ability to manipulate the DOM from a controller dynamically based on request variables. For example, say you had three input fields on a form, City, State and Zip. When the user submits the form, each piece of data is validated against it's relationship with the othe

[web2py:18793] template unittests ?

2009-03-30 Thread AchipA
While writing some unittests for my controllers, it occured to me that it would be pretty handy to have a unittest like thing for views. So, the use-case would be to construct a controller response (even manually if it's easier) and then preview the template with the given test data. I'm a bit uns

[web2py:18794] Re: template unittests ?

2009-03-30 Thread mdipierro
we should look into windmill. It really impressed me at PyCon. On Mar 30, 10:39 am, AchipA wrote: > While writing some unittests for my controllers, it occured to me that > it would be pretty handy to have a unittest like thing for views. So, > the use-case would be to construct a controller res

[web2py:18795] Re: Would this patch be useful?

2009-03-30 Thread Yarko Tymciurak
On Mon, Mar 30, 2009 at 10:20 AM, mr.freeze wrote: > > The rationale was having the ability to manipulate the DOM from a > controller dynamically based on request variables. What prevents you from doing this sort of thing in the biew? What makes this better? For example - take flash(): It d

[web2py:18796] Re: template unittests ?

2009-03-30 Thread Timothy Farrell
Yes, it looks more Pythonic than Selenium and slightly more powerful (there is actually a sleep (time wait) command). I can't wait to test it out (but I will have to wait for now). mdipierro wrote: > we should look into windmill. It really impressed me at PyCon. > > On Mar 30, 10:39 am, AchipA

[web2py:18797] Re: Would this patch be useful?

2009-03-30 Thread DenesL
I am siding with Yarko and Massimo on this one. IMHO: 1) It is a valid but unnecessary shortcut, as Massimo said this can be easily done in an alternate slightly longer more explicit way, and explicit is the keyword here, it helps when you are reviewing something you or someone else wrote a while

[web2py:18798] Re: request for comments

2009-03-30 Thread TheDude
Yes! I was disapointed to find out this wasn't the case and had to go back into my db.py models and change it. +1 :) On Mar 30, 11:11 am, AchipA wrote: > +1 > > On Mar 30, 4:37 pm, Kacper Krupa wrote: > > > i also agree > > > On Mar 30, 4:23 pm, Timothy Farrell wrote: > > > > +1 > > > > johann

[web2py:18799] Re: template unittests ?

2009-03-30 Thread mdipierro
In principle it should be possible to develop a testing app (separate from web2py) that reads and performs unittests from web2py apps. It could also create scaffolding tests by looking at existing controllers, forms and redirect by introspection. Massimo On Mar 30, 11:08 am, Timothy Farrell wr

[web2py:18800] Re: template unittests ?

2009-03-30 Thread AchipA
Err, not really talking about the same thing here. Selenium, Squish, Windmill can be considered unittests for *sites*. As cool and useful as that is, first I'd like to have a component that can just test a view. I don't really see how you would make any of the above suites work around the controll

[web2py:18801] Re: Would this patch be useful?

2009-03-30 Thread mr.freeze
I'll defer to group wisdom on this. Thanks for taking a look. On Mar 30, 11:12 am, DenesL wrote: > I am siding with Yarko and Massimo on this one. > IMHO: > > 1) It is a valid but unnecessary shortcut, as Massimo said this can be > easily done in an alternate slightly longer more explicit way,

[web2py:18802] Re: request for comments

2009-03-30 Thread Vidul Petrov
I agree. On Mar 30, 7:28 pm, TheDude wrote: > Yes! I was disapointed to find out this wasn't the case and had to go > back into my db.py models and change it. +1 :) > > On Mar 30, 11:11 am, AchipA wrote: > > > > > +1 > > > On Mar 30, 4:37 pm, Kacper Krupa wrote: > > > > i also agree > > > > On

[web2py:18803] Bug in crud.select?

2009-03-30 Thread Fran
I am trying to use crud.select but am encountering an issue when I customise the list of fields. This code provides a clickable link for the 'id' field, but doesn't have customised headers: table=db.my_table query = table.id > 0 fields = [f for f in table.fields if table[f].readable] rows=db(quer

[web2py:18804] search() in T2, [next and previous page], manual "Submit" required

2009-03-30 Thread Hans
Pagination works fine when using t2.itemize(), but neither "[next page]" nor "[previous page]" works when using t2.search(). It seems they only work when you hit the submit button every time after hitting "[next page]" or "[previous page]". Not intuitive enough. Is there a fix or workaround? like

[web2py:18805] Re: Bug in crud.select?

2009-03-30 Thread mdipierro
I will take a look tonight. On Mar 30, 12:21 pm, Fran wrote: > I am trying to use crud.select but am encountering an issue when I > customise the list of fields. > > This code provides a clickable link for the 'id' field, but doesn't > have customised headers: > table=db.my_table > query = table

[web2py:18806] Re: search() in T2, [next and previous page], manual "Submit" required

2009-03-30 Thread mdipierro
Yes it is a bug. It will not be resolved too soon since first we need to merge t2.search with crud.select On Mar 30, 1:03 pm, Hans wrote: > Pagination works fine when using t2.itemize(), but neither "[next > page]" nor "[previous page]" works when using t2.search(). It seems > they only work whe

[web2py:18807] strange dict (first) value

2009-03-30 Thread Joseph Jude
I have this db definition: db.define_table('status', SQLField('name'), SQLField('sort_order', 'integer')) I've inserted sample values like: if len(db().select(db.status.ALL)) == 0: db.status.insert(name='New', sort_order=1)

[web2py:/] Re: search() in T2, [next and previous page], manual "Submit" required

2009-03-30 Thread Hans
Is there a more practicable temporary workaround than changing the development framework? Can a form submit itself or something similar, how ? Hans On Mar 30, 8:14 pm, mdipierro wrote: > Yes it is a bug. It will not be resolved too soon since first we need > to merge t2.search with crud.select

[web2py:18809] Re: strange dict (first) value

2009-03-30 Thread mdipierro
We have had problems with things being sorted in reversed order on GAE before. I looked at the web2py and it is correct. I believe this is a GAE bug. @Robin, can you confirm? Massimo On Mar 30, 1:15 pm, Joseph Jude wrote: > I have this db definition: > > db.define_table('status', >

[web2py:18810] about primary key field

2009-03-30 Thread Jose
Hello Only I want to know about of if has been advanced in the topic to define the primary key field when a "inherited" database is used, instead of using the ID field. It is a latent topic or is a rejected topic? Regards Jose --~--~-~--~~~---~--~~ You received t

[web2py:18811] t2.display(), reference field representation in view

2009-03-30 Thread Hans
t2.update() displays reference fields like defined in requires= It retrieves and displays the values from the referenced table. t2.display() does only display the numeric id value of the referenced table. what code is required to get t2.display show values of selected fields in the referenced ta

[web2py:18812] Re: [web2py:/] Re: search() in T2, [next and previous page], manual "Submit" required

2009-03-30 Thread Wes James
you can peek at the code changes I made in the post for "t3 foto galleria" on http://groups.google.com/group/web2py look at the itemize2 function in t2.py -wj On Mon, Mar 30, 2009 at 12:34 PM, Hans wrote: > > Is there a more practicable temporary workaround than changing the > development fram

[web2py:18813] Re: about primary key field

2009-03-30 Thread mdipierro
The issue has been raised a few times. It is a complex issue so you should expect a solution early. Massimo On Mar 30, 2:20 pm, Jose wrote: > Hello > > Only I want to know about of if has been advanced in the topic to > define the primary key field when a "inherited" database is used, > instead

[web2py:18814] documentation

2009-03-30 Thread mdipierro
I think we need to re-factor the docstrings in web2py using reST and Sphinx. Anybody good at it willing to take charge for this project? I think it should be a priority. For me this is more important than the WIKI since the current docstrings/epydocs are really limited. Massimo --~--~-

[web2py:18815] Re: documentation

2009-03-30 Thread Michael
Massimo, I can't offer up much in form of code/writing/documentation. But if there is any design work needed, please feel free to contact me. It's something i would enjoy doing on the side for sure! thanks, Mike On Mar 30, 5:06 pm, mdipierro wrote: > I think we need to re-factor the docstrin

[web2py:18816] Re: about primary key field

2009-03-30 Thread Yarko Tymciurak
The immediate answer is in your existing database, create a VIEW and map the table(s) you want so that the primary key shows as "id", and then connect to that VIEW with web2py. On Mon, Mar 30, 2009 at 3:48 PM, mdipierro wrote: > > The issue has been raised a few times. It is a complex issue so y

[web2py:18817] Re: documentation

2009-03-30 Thread Yarko Tymciurak
Now that PyCon is (almost) over, I can take this on. - Yarko On Mon, Mar 30, 2009 at 4:06 PM, mdipierro wrote: > > I think we need to re-factor the docstrings in web2py using reST and > Sphinx. > > Anybody good at it willing to take charge for this project? > > I think it should be a priority. F

[web2py:18818] Re: about primary key field

2009-03-30 Thread mdipierro
Not sure this works if the "id" is not an integer. On Mar 30, 5:42 pm, Yarko Tymciurak wrote: > The immediate answer is in your existing database, create a VIEW and map the > table(s) you want so that the primary key shows as "id", and then connect to > that VIEW with web2py. > > On Mon, Mar 30,

[web2py:18819] Re: documentation

2009-03-30 Thread mdipierro
Fantastic Yarko, @Mike. When talking about design, do you refer to CSS? We could very much use that. On Mar 30, 5:49 pm, Yarko Tymciurak wrote: > Now that PyCon is (almost) over, I can take this on. > - Yarko > > On Mon, Mar 30, 2009 at 4:06 PM, mdipierro wrote: > > > I think we need to re-fac

[web2py:18820] Multiple checkbox - preselected syntax

2009-03-30 Thread DJ
I would like someone to help me with the syntax. I want to show pre- selected values in a multiple checkbox form and want to insert this "if condition" in my FORM stmt. resist = ['A', 'B', 'C', 'D'] r = ['B', 'C'] if r == a.name: status="True" # condition to be included #FORM stmt TR("Resistanc

[web2py:18821] Re: request for comments

2009-03-30 Thread mdipierro
in trunk On Mar 30, 11:49 am, Vidul Petrov wrote: > I agree. > > On Mar 30, 7:28 pm, TheDude wrote: > > > Yes! I was disapointed to find out this wasn't the case and had to go > > back into my db.py models and change it. +1 :) > > > On Mar 30, 11:11 am, AchipA wrote: > > > > +1 > > > > On Mar

[web2py:18822] Re: Multiple checkbox - preselected syntax

2009-03-30 Thread mdipierro
Sorry I do not understand what this is supposed to do. Can you explain it in words. Could you also provide sample values for all the variables? On Mar 30, 7:00 pm, DJ wrote: > I would like someone to help me with the syntax. I want to show pre- > selected values in a multiple checkbox form and w

[web2py:18823] Re: documentation

2009-03-30 Thread Douglas Soares de Andrade
Em Segunda-feira 30 Março 2009, às 19:49:03, Yarko Tymciurak escreveu: > Now that PyCon is (almost) over, I can take this on. > - Yarko Hi Yarko, Count me in, how do you want to organize things ? > On Mon, Mar 30, 2009 at 4:06 PM, mdipierro wrote: > > I think we need to re-factor the docstrin

[web2py:18824] Re: request for comments

2009-03-30 Thread Douglas Soares de Andrade
Em Segunda-feira 30 Março 2009, às 12:07:26, Yarko Tymciurak escreveu: > I agree appadmin should display these fields, BUT I do not thing it should > ignore - instead, it should have different behavior: there should be some > indicator in appadmin of the permission settings (text, color key, but

[web2py:18825] web2py dojo

2009-03-30 Thread mdipierro
Here is the source code we used for the web2py Dojo at PyCon. I have no time to add screenshots but, if you decide to try this, could you please send me some screenshots? Even better if you could make a screencast about it. http://mdp.cti.depaul.edu/examples/static/dojo.pdf Massimo --~--~---

[web2py:18826] URL mapping - blocking default URLs

2009-03-30 Thread Joseph Jude
All, I have used routes.py for URL mapping and it is working as expected. However I can type the default URLs (/init/default/index, /init/ default/*) on the browser and it still accepts it. How can these default URLs be blocked? Thank you, Joseph --~--~-~--~~~---~--~

[web2py:18827] Re: Multiple checkbox - preselected syntax

2009-03-30 Thread DenesL
While running some tests around this I noticed that INPUT is not working properly for checkboxes. INPUT(_type="checkbox",_name="value",_value=1,_checked=ON).xml() '' INPUT(_type="checkbox",_name="value",_value=1,_checked=True).xml() '' both results are missing checked='checked' --~--~-~

[web2py:18828] Re: about primary key field

2009-03-30 Thread Jose
On 30 mar, 19:42, Yarko Tymciurak wrote: > The immediate answer is in your existing database, create a VIEW and map the > table(s) you want so that the primary key shows as "id", and then connect to > that VIEW with web2py. It is an alternative about which had thought. I did a few simple tests

[web2py:18829] Re: Multiple checkbox - preselected syntax

2009-03-30 Thread DenesL
Never mind, the correct syntax is with value=True as in: INPUT(_type="checkbox",_name="value",_value=1,value=True).xml() '' --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to th

[web2py:18830] Re: Multiple checkbox - preselected syntax

2009-03-30 Thread DenesL
On Mar 30, 7:00 pm, DJ wrote: > I would like someone to help me with the syntax. I want to show pre- > selected values in a multiple checkbox form and want to insert this > "if condition" in my FORM stmt. > > resist = ['A', 'B', 'C', 'D'] > r = ['B', 'C'] Maybe something like: p=[INPUT(_type="c

[web2py:18831] Re: about primary key field

2009-03-30 Thread DenesL
On Mar 30, 9:11 pm, Jose wrote: > It is an alternative about which had thought. I did a few simple tests > and it works well. > > Thank you very much. > > Regards Jose Jose, do your test tables have integer indexes?. --~--~-~--~~~---~--~~ You received this messag

[web2py:18832] Re: Retrieve JSON message send to Server

2009-03-30 Thread Yannick
Hello mate I'm trying to parse the JSON object inside the callback method from my client side, I got a message saying "No JSON object could be decoded"... Do you please have any idea about what I'm doing wrong in my callback method...Below you can see the sample of the callback method, and format

[web2py:18833] Re: URL mapping - blocking default URLs

2009-03-30 Thread mdipierro
You need to set a rule that maps into an error page. On Mar 30, 8:11 pm, Joseph Jude wrote: > All, > I have used routes.py for URL mapping and it is working as expected. > However I can type the default URLs (/init/default/index, /init/ > default/*) on the browser and it still accepts it. How ca

[web2py:18834] Re: documentation

2009-03-30 Thread Yarko Tymciurak
I've looked at http://sphinx.pocoo.org/ext/doctest.html?highlight=doctest#module-sphinx.ext.doctest and the sphinx sources (to see how they are doing this) And it looks like we should just start a branch (I don't see any way to easily share a branch). Give me a day to think about how I want t

[web2py:18835] Re: request for comments

2009-03-30 Thread Yarko Tymciurak
I looked at your post into trunk, Massimo - expedient... but can we have this be something more... functional before next release? I am thinking like this: istead of: ignore_rw=True appadmin would serve better to have something like this: rw.action= some_function() Ignore could be im

[web2py:18836] Re: about primary key field

2009-03-30 Thread Yarko Tymciurak
On Mon, Mar 30, 2009 at 9:30 PM, DenesL wrote: > > On Mar 30, 9:11 pm, Jose wrote: > > > It is an alternative about which had thought. I did a few simple tests > > and it works well. > > > > Thank you very much. > > > > Regards Jose > > Jose, do your test tables have integer indexes?. Massimo