[web2py:23812] Re: rev 877 breaks app

2009-06-09 Thread Fran
On Jun 10, 12:16 am, mdipierro wrote: > Uploaded the fix. please give it a try. Bingo - many thanks! F --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email

[web2py:23811] Re: web2py perfomance

2009-06-09 Thread Alexey Nezhdanov
On Wednesday 10 June 2009 09:01:04 Alexey Nezhdanov wrote: > about 10k times faster than yours. Ah... no. I never used timit module before. You get values of the same order. -- Sincerely yours Alexey Nezhdanov --~--~-~--~~~---~--~~ You received this message becau

[web2py:23810] Re: web2py perfomance

2009-06-09 Thread Alexey Nezhdanov
I get these results (best timing): try-variant: 10.24s regex: 9.58s So on my laptop try:except: function loses about 5% to regex - probably it depends on hardware/OS. Still there is a serious reason why to stick with regexp. try: int(x) is not really checking for an int - it checks for a _num

[web2py:23809] Re: new auth functions in trunk (basic, email/gmail, ldap)

2009-06-09 Thread mdipierro
Thanks! On Jun 9, 11:03 pm, "mr.freeze" wrote: > Massimo, you should have a patch in email for active directory ldap > auth.  As noted in my email: > It works but we will also need to change tools.py so that it forces > ldap authentication each time, not just the first (maybe track the > auth me

[web2py:23808] Re: any jython expert

2009-06-09 Thread mdipierro
tomorrow I will make the WAR file. Any tester? I am far from being an expert on this java stuff. Massimo On Jun 9, 11:23 pm, mdipierro wrote: > The current trunk WORKS with Jython including zxJDBC (sqlite *tested* > and postgresql *not tested yet*) > >   download jython-2.5rc3.jar >   downloa

[web2py:23807] Re: any jython expert

2009-06-09 Thread mdipierro
The current trunk WORKS with Jython including zxJDBC (sqlite *tested* and postgresql *not tested yet*) download jython-2.5rc3.jar download qlite-jdbc-3.6.14.2.jar java -jar jython-xxx.jar export CLASSPATH=$CLASSPATH:/Users/mdipierro/jython2.5rc3/sqlite- jdbc-3.6.14.2.jar cd web2py ../

[web2py:23806] Re: Crud.create and Keep values

2009-06-09 Thread mdipierro
Out of ideas. If you send me your app and steps to reproduce the problem I will try it tomorrow. Massimo On Jun 9, 10:46 pm, Rui Gomes wrote: > i don't have nothing define in auth.settings.login_next but i try this > define as "auth.settings.login_next=URL(r=request, f='/')" still the same > pr

[web2py:23805] Re: response.flash upgrade

2009-06-09 Thread Hans Donner
Maybe somebody can make an example page displaying the various pickers out there with some descriptions etc. On Wed, Jun 10, 2009 at 2:27 AM, DenesL wrote: > > OK, but I am not the only one overlooking features ;-) > > There is a new version of www.dynarch.com/projects/calendar/ > with a demo at

[web2py:23804] Re: new auth functions in trunk (basic, email/gmail, ldap)

2009-06-09 Thread mr.freeze
Massimo, you should have a patch in email for active directory ldap auth. As noted in my email: It works but we will also need to change tools.py so that it forces ldap authentication each time, not just the first (maybe track the auth method in the db?). Currently after the account is authentica

[web2py:23803] Re: Crud.create and Keep values

2009-06-09 Thread Rui Gomes
i don't have nothing define in auth.settings.login_next but i try this define as "auth.settings.login_next=URL(r=request, f='/')" still the same problem :S On Wed, Jun 10, 2009 at 3:38 AM, mdipierro wrote: > > What's in your auth.settings.login_next? It is supposed to be a URL > but looks like t

[web2py:23802] Re: Crud.create and Keep values

2009-06-09 Thread mdipierro
What's in your auth.settings.login_next? It is supposed to be a URL but looks like there is a list in there! Massimo On Jun 9, 10:21 pm, Rui Gomes wrote: > I still getting a error, but now is different :S > > Error traceback > > 1. > 2. > 3. > 4. > 5. > 6. > 7. > 8. > 9. > 10. > 11. > 12. > 13

[web2py:23801] Re: Crud.create and Keep values

2009-06-09 Thread mdipierro
try 1018 On Jun 9, 10:24 pm, Rui Gomes wrote: > I have the last revision in the trunk Version 1.63.5 (2009-06-09 18:11:22) - > Rev 1016 > > I just have this error now in the previous version just return to the index! > > Any idea about this now? > > On Wed, Jun 10, 2009 at 3:21 AM, Rui Gomes wr

[web2py:23800] Re: Custom Display Values

2009-06-09 Thread mdipierro
Allow me simplify it, else I do not understand it: def managetable():         (tablename, id) = (request.args(0), request.args(1)) # can be None     response.view = "%s/%s.html" % (request.controller, tablename)     return thefields(setsubmit(tablename)) # why not return dict(

[web2py:23799] Re: Crud.create and Keep values

2009-06-09 Thread Rui Gomes
I have the last revision in the trunk Version 1.63.5 (2009-06-09 18:11:22) - Rev 1016 I just have this error now in the previous version just return to the index! Any idea about this now? On Wed, Jun 10, 2009 at 3:21 AM, Rui Gomes wrote: > I still getting a error, but now is different :S > > E

[web2py:23798] Re: Crud.create and Keep values

2009-06-09 Thread Rui Gomes
I still getting a error, but now is different :S Error traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. Traceback (most recent call last): File "/home/rui/Public/web2py/gluon/restricted.py", line 107, in restricted exec ccode in environment File "/home/rui/Public/web2py/applicat

[web2py:23797] Re: Error accesing

2009-06-09 Thread mdipierro
I have no idea. Never seen this problem before. I will try debug more tomorrow. Massimo On Jun 9, 9:53 pm, FERNANDO VILLARROEL wrote: > Hi, > > Tha table exist there and the table have a unique auto-increment "id" field > also. > > The schema of table calls is the following > >  id            

[web2py:23796] Re: Crud.create and Keep values

2009-06-09 Thread mdipierro
There is a bug in keepvalues and crud. I fixed it in trunk but that was not causing your problem. This code works for me: @auth.requires_login() def customcreate(): crud.settings.keepvalues = True if not session.create: session.create = [] form = crud.create(db.ttt, onvalidation=r, o

[web2py:23795] Re: Error accesing

2009-06-09 Thread FERNANDO VILLARROEL
Hi, Tha table exist there and the table have a unique auto-increment "id" field also. The schema of table calls is the following id | integer | not null default nextval('calls_id_seq'::regclass) account_id | integer | not null uuid

[web2py:23794] Re: redirect

2009-06-09 Thread mdipierro
could you post an example On Jun 9, 8:07 pm, JohnMc wrote: > Fran, > > I do something very similar in jQuery. Bind a object to an event and > use a anonymous function that calls Windows.Open(). The new window > could call a download function. But I guess at that point its not a > redirect. > > J

[web2py:23793] Re: Crud.create and Keep values

2009-06-09 Thread Rui Gomes
yes i set crud.settings.keepvalues=True, and what happen is when i call the function customcreate, the function don't return the form but a redirection to the index page, but if i try the same application with 1.62 version and work fine :( PS: i double check in different machines On Mon, Jun 8,

[web2py:23792] Re: getHelperById ?

2009-06-09 Thread JohnMc
If form -- $('form').find('#whatever') works as well, though slower On Jun 9, 5:48 pm, mdipierro wrote: > it returns the actual helper, not a copy. > > On Jun 9, 4:41 pm, AchipA wrote: > > > Err... I was under the impression div.element only works on direct > > child nodes and even there

[web2py:23791] Re: redirect

2009-06-09 Thread JohnMc
Fran, I do something very similar in jQuery. Bind a object to an event and use a anonymous function that calls Windows.Open(). The new window could call a download function. But I guess at that point its not a redirect. JohnMc On Jun 9, 1:56 pm, Fran wrote: > On Jun 9, 7:19 pm, mdipierro wrot

[web2py:23790] Re: response.flash upgrade

2009-06-09 Thread JohnMc
Or try to insert a birth date on somebody who is 58 using that simple calendar. On Jun 9, 10:11 am, DenesL wrote: > I feel this is a matter of taste. > The current one looks more cluttered but that is because it offers > more info and options to the user. > Try selecting June 2010 with the jquer

[web2py:23789] Re: response.flash upgrade

2009-06-09 Thread DenesL
OK, but I am not the only one overlooking features ;-) There is a new version of www.dynarch.com/projects/calendar/ with a demo at www.dynarch.com/static/JSCal2/index.html It can even select multiple dates, something the other one can't do. Anyway, I agree with Massimo on minimizing the JS load

[web2py:23787] Re: Login_next

2009-06-09 Thread mdipierro
Please try the version in trunk. No more request.env.referer. Massimo On Jun 9, 11:40 am, mdipierro wrote: > I have an idea that may fix this. I will work on it tonight. > > On Jun 9, 10:05 am, annet wrote: > > > Massimo, > > > > Right now there are two possibilities: > > > > - if web2py redir

[web2py:23788] Re: Custom Display Values

2009-06-09 Thread Gary
Massimo, This is kind of complicated. It's part of a generalized application that uses a database to to define which tables can be accessed through CRUD. The database contains the table name, some search criteria and decorators. The controllers look more like web2py source than a "normal" cont

[web2py:23782] Re: Custom Display Values

2009-06-09 Thread mdipierro
Gary, I need more explanation. One example or screenshot would help. Massimo On Jun 9, 4:31 pm, Gary wrote: > Hans, > > The model is kind of long, but SQLFORM (I don't know how to only show > fields using SQLFORMS), as well as the Custom Update CRUD, works > fine.  It's only the Read CRUD that

[web2py:23783] Re: getHelperById ?

2009-06-09 Thread mdipierro
it returns the actual helper, not a copy. On Jun 9, 4:41 pm, AchipA wrote: > Err... I was under the impression div.element only works on direct > child nodes and even there it returns just a copy on the helper (not > the reference to the actual one). Been quite a while since I looked in > html.p

[web2py:23786] Re: rev 877 breaks app

2009-06-09 Thread mdipierro
Uploaded the fix. please give it a try. On Jun 9, 1:25 pm, mdipierro wrote: > in update_fields and table[field].update > > should be > > in update_fields and table[fieldname].update > > will fix it tonight. > > On Jun 9, 1:02 pm, Fran wrote: > > > On Jun 9, 6:27 pm, Fran wrote: > > > > On Jun

[web2py:23785] Re: redirect

2009-06-09 Thread Jose
On 9 jun, 15:19, mdipierro wrote: > I am not familiar with the function > > reportes.impresion_tramite(...) > > what does it return? If your intention is to return the PDF to the > user (http 200 ok) you cannot redirect (http 303 redirect). The two > statements are not compatible. > Yes, it gen

[web2py:23784] Re: Error accesing

2009-06-09 Thread mdipierro
That just means the table "calls" does not exist. It is not a web2py errors. It is an error from the db driver. Are you sure the table is there? Does the table have a unique auto-increment "id" field? Massimo On Jun 9, 5:16 pm, visuallinux wrote: > I am new on web2py and i trying accesing a da

[web2py:23779] Re: Custom Display Values

2009-06-09 Thread Gary
Hans, The model is kind of long, but SQLFORM (I don't know how to only show fields using SQLFORMS), as well as the Custom Update CRUD, works fine. It's only the Read CRUD that is giving me a problem. In other words, the input tag works fine but the field display is showing the 'id' value rather

[web2py:23781] Error accesing

2009-06-09 Thread visuallinux
I am new on web2py and i trying accesing a database existing: In my db.py i have: db=SQLDB('postgres://foo:f...@192.168.0.1:5432/registros') db.define_table('calls', SQLField('account_id','integer'), SQLField('uuid','string'), SQLField('caller_id_number','string'), SQLField('des

[web2py:23780] Re: getHelperById ?

2009-06-09 Thread AchipA
Err... I was under the impression div.element only works on direct child nodes and even there it returns just a copy on the helper (not the reference to the actual one). Been quite a while since I looked in html.py, so I might be wrong, though... On Jun 9, 10:33 pm, mdipierro wrote: > It is ther

[web2py:23778] Re: web2py perfomance

2009-06-09 Thread Philip Kilner
Hi Guys, Joe Barnhart wrote: > Got it. Please do not call it "is_integer". Names are important. > Having a name that implies one thing but does another is a big no-no. > > How about "is_id"? -- PhilK --~--~-~--~~~---~--~~ You received this message because

[web2py:23777] Re: web2py perfomance

2009-06-09 Thread Joe Barnhart
Got it. Please do not call it "is_integer". Names are important. Having a name that implies one thing but does another is a big no-no. On Jun 9, 1:28 pm, mdipierro wrote: > We are not checking for arbitrary integers, only "valid" record ids > and they cannot be negative. --~--~-~--~-

[web2py:23774] Re: web2py perfomance

2009-06-09 Thread mdipierro
We are not checking for arbitrary integers, only "valid" record ids and they cannot be negative. On Jun 9, 2:43 pm, AchipA wrote: > Regardless of speed, if you *really* want to check for integers, > you'll need a far more complex regex (how do you handle sign ? int > size ?). int() does all that

[web2py:23776] Re: getHelperById ?

2009-06-09 Thread mdipierro
It is there already: form.element(_id='something')['_class']='red' On Jun 9, 2:58 pm, AchipA wrote: > Another idea while I wait for some of my computations to finish. > Javascript can access HTML elements in different ways. With web2py > helpers, this can get a bit cumbersome. How about a gener

[web2py:23775] Re: Question on database definition

2009-06-09 Thread mdipierro
Hi Francois. db.define_table('accountfromchart', SQLField('number', length=10), SQLField('description', length=155), SQLField('parentaccount', "reference accountfromchart") ) db.accountfromchart.parentaccount.requires=IS_IN_DB (db,'

[web2py:23773] Re: html.py failed doctest

2009-06-09 Thread mdipierro
no but you can send me a patch to do it. ;-) On Jun 9, 2:05 pm, Hans Donner wrote: > anyway to run all the doctests in one go? > > On Tue, Jun 9, 2009 at 8:59 PM, Hans Donner wrote: > > yep, just did a trunk upgrade > > > 2009/6/9 mdipierro : > > >> BTW,... I am sure I fixed that a few days ago.

[web2py:23772] Re: Subset of records in SQLFORM dropbox

2009-06-09 Thread Gutch
Thanks, that was exactly what I needed! On Jun 9, 12:54 pm, mdipierro wrote: > I do not fully understand. You want a create incident form but that > does not have a school field. > I guess what you want is display only students for the same school as > the logged in staff. In this case you can d

[web2py:23769] Re: table/sqltable helper post-production

2009-06-09 Thread Hans Donner
3) provide a patch, so it might end up in SQLTABLE ? On Tue, Jun 9, 2009 at 6:57 PM, mdipierro wrote: > > There is no may to make a SQLTABLE taht fits everybody's taste and > needs. I think you should > > 1) define your own SQLTABLE2, or > 2) loop over rows explicitly > > Massimo > > On Jun 9, 11

[web2py:23768] Question on database definition

2009-06-09 Thread Francois (Jersey)
I am creating a simple model to represent a chart of accounts: For example, we have 0. top account 1. Account 1 1.1 account 1.1 1.11 1.12 1.13 1.2 (...) 2. 2.1 2.2 2.21 2.22 The model is as below : db.define_table('accountfrom

[web2py:23771] getHelperById ?

2009-06-09 Thread AchipA
Another idea while I wait for some of my computations to finish. Javascript can access HTML elements in different ways. With web2py helpers, this can get a bit cumbersome. How about a generic getHelperById method for the base helper class so it goes through it's components and fetches the helper w

[web2py:23766] Re: web2py perfomance

2009-06-09 Thread AchipA
Regardless of speed, if you *really* want to check for integers, you'll need a far more complex regex (how do you handle sign ? int size ?). int() does all that for you without too much effort. But, for the record, to satisfy my own curiosity, too - one quickie profiling coming up (python 2.5.2,

[web2py:23770] Re: table/sqltable helper post-production

2009-06-09 Thread AchipA
I understand that, but I though if we already do nearly the same thing for the header row, why not do it for the data rows, too ? On Jun 9, 6:57 pm, mdipierro wrote: > There is no may to make a SQLTABLE taht fits everybody's taste and > needs. I think you should > > 1) define your own SQLTABLE2,

[web2py:23767] Re: Custom Display Values

2009-06-09 Thread Hans Donner
Gary, how dows your model look like? And how does it show when you are just using SQLFORM? On Tue, Jun 9, 2009 at 9:40 PM, Gary wrote: > > Thank you Fran and Massimo for the info. > > I downloaded the trunk using: > > bzr branch lp:~mdipierro/web2py/devel web2py-devel > > and installed the applic

[web2py:23764] Re: web2py perfomance

2009-06-09 Thread Hans Donner
Alexey, custom.widget is already in trunk On Tue, Jun 9, 2009 at 2:14 PM, Alexey Nezhdanov wrote: > Finally, I started migration (before I was just slapping sql.py, checked out > of the trunk over my ancient 1.61.4 install). > Migration is not easy, I've been bending source for my needs so now I

[web2py:23765] Re: Custom Display Values

2009-06-09 Thread Gary
Thank you Fran and Massimo for the info. I downloaded the trunk using: bzr branch lp:~mdipierro/web2py/devel web2py-devel and installed the application. The error message went away, but {{=form.custom.widget.town_id}} still displayed '1' vs. the 'lookup' value. It also didn't display a checkb

[web2py:23763] Re: html.py failed doctest

2009-06-09 Thread Hans Donner
anyway to run all the doctests in one go? On Tue, Jun 9, 2009 at 8:59 PM, Hans Donner wrote: > yep, just did a trunk upgrade > > 2009/6/9 mdipierro : >> >> BTW,... I am sure I fixed that a few days ago. Can you double check >> you upgraded the tests? >> >> On Jun 9, 1:23 pm, Hans Donner wrote:

[web2py:23762] Re: global logging to file

2009-06-09 Thread Iceberg
Mmm, even after this log.py goes into models/log.py, I think the line: logging=cache.ram(...) should be replaced by: import logging # logging=cache.ram(...) # Uncomment me if you need app-logging Because: 1. My log.py will cause the an incremental system.log which will eventually cram up yo

[web2py:23761] Re: html.py failed doctest

2009-06-09 Thread Hans Donner
yep, just did a trunk upgrade 2009/6/9 mdipierro : > > BTW,... I am sure I fixed that a few days ago. Can you double check > you upgraded the tests? > > On Jun 9, 1:23 pm, Hans Donner wrote: >> Got: >> >> ** >> File "html.py", l

[web2py:23760] Re: redirect

2009-06-09 Thread Fran
On Jun 9, 7:19 pm, mdipierro wrote: > If your intention is to return the PDF to the > user (http 200 ok) you cannot redirect (http 303 redirect). The two > statements are not compatible. Whilst at first sight I'd say that's true, what could be done is to return the PDF in another Window/Tab (A t

[web2py:23759] Re: global logging to file

2009-06-09 Thread Iceberg
I am glad you like it. So every new app will have a models/log.py soon? BTW, I personally prefer this formatter, hope you do: "%(asctime)s %(levelname)s %(funcName)s():%(lineno)d %(message)s" On Jun10, 2:22am, mdipierro wrote: > I think you nailed it! I would change the file name so that it r

[web2py:23758] Re: html.py failed doctest

2009-06-09 Thread mdipierro
BTW,... I am sure I fixed that a few days ago. Can you double check you upgraded the tests? On Jun 9, 1:23 pm, Hans Donner wrote: > Got: > > ** > File "html.py", line 841, in __main__.FORM > Failed example: > form.xml() > Ex

[web2py:23757] Re: html.py failed doctest

2009-06-09 Thread mdipierro
hmm. yes the expected is wrong. Massimo On Jun 9, 1:23 pm, Hans Donner wrote: > Got: > > ** > File "html.py", line 841, in __main__.FORM > Failed example: > form.xml() > Expected: > ' method="post">' > Got: > ' meth

[web2py:23756] Re: rev 877 breaks app

2009-06-09 Thread mdipierro
in update_fields and table[field].update should be in update_fields and table[fieldname].update will fix it tonight. On Jun 9, 1:02 pm, Fran wrote: > On Jun 9, 6:27 pm, Fran wrote: > > > On Jun 9, 3:13 pm, mdipierro wrote: > > > Uploading another version to trunk. Please give it another try

[web2py:23755] Re: Custom Display Values

2009-06-09 Thread mdipierro
By trunk we mean "not officially released yet" and "not guaranteed to work". Massimo On Jun 9, 12:41 pm, Gary wrote: > I tried {{=form.custom.widget.town_id}} in 1.63.5 and got an error > "AttributeError: 'NoneType' object has no attribute 'town_id'". > Using {{=form.custom.inpval.town_id}} ret

[web2py:23754] html.py failed doctest

2009-06-09 Thread Hans Donner
Got: ** File "html.py", line 841, in __main__.FORM Failed example: form.xml() Expected: '' Got: '' ** 1 items had failures: 1 of 2 in __main__.F

[web2py:23753] Re: Should we be tracking bugs and enhancement requests at Launchpad?

2009-06-09 Thread mdipierro
No problem at all. this is an important issue and if we are not doing it right, I want to know. On Jun 9, 12:19 pm, cesmiga wrote: > Massimo, > > Thank you for the update. My apologies since this was discussed > earlier. > > Christopher > > mdipierro wrote: > > Yes and no. > > > We are moving t

[web2py:23752] Re: global logging to file

2009-06-09 Thread mdipierro
I think you nailed it! I would change the file name so that it resides inside the applicaitons folder: handler=logging.FileHandler(os.path.join(request.folder,"system.log")) we could also add a line in the admin to peek the log (like with sql.log). On Jun 9, 12:18 pm, Iceberg wrote: > request.

[web2py:23751] Re: redirect

2009-06-09 Thread mdipierro
I am not familiar with the function reportes.impresion_tramite(...) what does it return? If your intention is to return the PDF to the user (http 200 ok) you cannot redirect (http 303 redirect). The two statements are not compatible. Massimo On Jun 9, 12:11 pm, Jose wrote: > Hello > > At th

[web2py:23750] Re: web2py perfomance

2009-06-09 Thread Iceberg
I don't know but you'd better do some profiling if you really want to find out. IMHO, try...except might be fast, but wrapping it inside a user-defined function could be another story, because defining a function is expensive in python, so we shall call native function (implemented by C) whenever

[web2py:23749] Re: rev 877 breaks app

2009-06-09 Thread Fran
On Jun 9, 6:27 pm, Fran wrote: > On Jun 9, 3:13 pm, mdipierro wrote: > > Uploading another version to trunk. Please give it another try > r896 works fine - many thanks :) Solves that issue but seems to break updates: This is a ticket from Tools' register() (but it also happens on other DB upda

[web2py:23748] Re: Custom Display Values

2009-06-09 Thread Fran
On Jun 9, 6:41 pm, Gary wrote: > For clarification, does 'new trunk' mean something other than the > current release? It means the live code downloaded via Bzr: https://code.launchpad.net/~mdipierro/web2py/devel So more current than the latest release. F --~--~-~--~~~--

[web2py:23747] Re: Custom Display Values

2009-06-09 Thread Gary
I tried {{=form.custom.widget.town_id}} in 1.63.5 and got an error "AttributeError: 'NoneType' object has no attribute 'town_id'". Using {{=form.custom.inpval.town_id}} returns a '1', the value of the id in the 'Location' file pointing to the 'Town' file. For clarification, does 'new trunk' mean

[web2py:23746] Re: rev 877 breaks app

2009-06-09 Thread Fran
On Jun 9, 3:13 pm, mdipierro wrote: > Uploading another version to trunk. Please give it another try r896 works fine - many thanks :) F --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group.

[web2py:23745] Re: check out my newly built web2py app if you want

2009-06-09 Thread mikech
It seems I created two new decks without hitting the submit button by just navigating away from the page. Also would be nice to be able to delete them. Mike On Jun 9, 9:12 am, Iceberg wrote: > I promise Matt is surely right about the font issue. :-) > > And one more defect, trying to not compl

[web2py:23744] Re: Should we be tracking bugs and enhancement requests at Launchpad?

2009-06-09 Thread cesmiga
Massimo, Thank you for the update. My apologies since this was discussed earlier. Christopher mdipierro wrote: > Yes and no. > > We are moving to mercurial very very soon and move away from launchpad > so I would prefer we use google code for bug tracking. > It is also faster for me to acces

[web2py:23743] Re: global logging to file

2009-06-09 Thread Iceberg
request.log(message) would be nice, but all the advantages of standard logging are too good to let go. So I came up with this little trick. Add following codes inside model/log.py: def _init_log(): import logging logger=logging.getLogger(request.application) logger.setLevel(logging

[web2py:23742] redirect

2009-06-09 Thread Jose
Hello At the end of the load of information on the part of the user there is a link to the following function: def terminar(): if session.documento is None: redirect(URL(r=request, c='default', f='index')) ... if solicitud[0].id > 0: response.headers['Content-Type']=

[web2py:23741] Re: table/sqltable helper post-production

2009-06-09 Thread mdipierro
There is no may to make a SQLTABLE taht fits everybody's taste and needs. I think you should 1) define your own SQLTABLE2, or 2) loop over rows explicitly Massimo On Jun 9, 11:50 am, AchipA wrote: > Just been through some TABLE() and SQLTABLE() work and could not find > a way (I was satisfied

[web2py:23740] Re: Subset of records in SQLFORM dropbox

2009-06-09 Thread mdipierro
I do not fully understand. You want a create incident form but that does not have a school field. I guess what you want is display only students for the same school as the logged in staff. In this case you can do school_id=db.staff[userid()].school if userdi() else None db.incident.student.requir

[web2py:23739] table/sqltable helper post-production

2009-06-09 Thread AchipA
Just been through some TABLE() and SQLTABLE() work and could not find a way (I was satisfied with) to change output results of particular columns. For example, I have an sql column that is a color code and I'd like to put in a css element with that color. The hard way is obviously foregoing the {{

[web2py:23738] Re: web2py perfomance

2009-06-09 Thread mdipierro
good point. Anyway, the function is no longer called as often as Alexey originally pointed out, so it would make a negligible difference. I will change it though. Massimo On Jun 9, 11:24 am, AchipA wrote: > Any particular reason not doing is_integer via a 'try: int(i) except: > return False' s

[web2py:23737] Re: Should we be tracking bugs and enhancement requests at Launchpad?

2009-06-09 Thread mdipierro
Yes and no. We are moving to mercurial very very soon and move away from launchpad so I would prefer we use google code for bug tracking. It is also faster for me to access. Anyway, I never said that we should use bug tracking. I only asked to first email the list to make sure you indeed found a

[web2py:23736] Re: Texteditor

2009-06-09 Thread pk
oh thanks, it`s a cool tool. peter On 9 Jun., 18:16, annet wrote: > I am using NicEdit: > > http://nicedit.com/ > > Annet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to th

[web2py:23735] Re: Should we be tracking bugs and enhancement requests at Launchpad?

2009-06-09 Thread Yarko Tymciurak
just a reminder - there was a plan afoot to move from launchpad to mercurial hosting (likely on google code)... On Tue, Jun 9, 2009 at 11:16 AM, Jason Brower wrote: > > Sadly, I agree, but 1 month ago, the choice was made to stick to what we > have now. I REALLY want that to happen. > Regards,

[web2py:23734] Subset of records in SQLFORM dropbox

2009-06-09 Thread Gutch
Hello, Sorry if this question is a repeat, but I'm new here and couldn't find anything on point in the archive. I'm trying to create a form for data insertion, which will include a dropbox representing a foreign key. Trouble is, the foreign table has another key representing the row's 'school',

[web2py:23733] Re: Texteditor

2009-06-09 Thread mdipierro
Using nicedit you can change the textareas for the field you need into wysiwyg fields. To then display the field properly you much prevent escaping with {{=XML(fieldvalue)}} On Jun 9, 11:16 am, annet wrote: > I am using NicEdit: > > http://nicedit.com/ > > Annet. --~--~-~--~~---

[web2py:23732] Re: Login_next

2009-06-09 Thread mdipierro
I have an idea that may fix this. I will work on it tonight. On Jun 9, 10:05 am, annet wrote: > Massimo, > > > Right now there are two possibilities: > > > - if web2py redirects you to login, after login, login redirects you > > to the referencing page > > - if you go to the login page without r

[web2py:23731] Re: Custom Display Values

2009-06-09 Thread mdipierro
with the new trunk you can do {{=form.custom.widget.fieldname}} On Jun 9, 11:06 am, Gary wrote: > I'm using crud to interact with a custom view. > form.custom.inpval.fieldname and form.custom.dspval.fieldname display > the proper value for most field types, but not files, select boxes and > che

[web2py:23730] Re: web2py perfomance

2009-06-09 Thread AchipA
Any particular reason not doing is_integer via a 'try: int(i) except: return False' statement ? It should be faster than regexes. On Jun 7, 1:49 pm, Iceberg wrote: > On Jun7, 6:35pm, Alexey Nezhdanov wrote: > > > > > > 2) is_integer is a fast call, but with 1.1k (!) calls ... > > > Replaced it

[web2py:23729] Re: Should we be tracking bugs and enhancement requests at Launchpad?

2009-06-09 Thread Jason Brower
Sadly, I agree, but 1 month ago, the choice was made to stick to what we have now. I REALLY want that to happen. Regards, Jason Brower On Tue, 2009-06-09 at 08:56 -0700, cesmiga wrote: > All: > > I'm not sure if this has been discussed in the past and would like to > hear more if we should be

[web2py:23728] Re: Texteditor

2009-06-09 Thread annet
I am using NicEdit: http://nicedit.com/ Annet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this gro

[web2py:23727] Re: Problem in 1.63.5

2009-06-09 Thread pk
Hi Annet, it seems to be the same problem. Peter On 9 Jun., 18:09, annet wrote: > Peter, > > Aren't you facing the same problem as I am: > > http://groups.google.com/group/web2py/browse_thread/thread/d5083ed08c... > > Annet. --~--~-~--~~~---~--~~ You received th

[web2py:23726] Re: check out my newly built web2py app if you want

2009-06-09 Thread Iceberg
I promise Matt is surely right about the font issue. :-) And one more defect, trying to not completing necessary field results in a "function error_message at 0x8c1c41c" appearing at the usual response.flash area. Everything else seems ok. I like your two level menu especially. Hope to see your

[web2py:23725] Re: Problem in 1.63.5

2009-06-09 Thread annet
Peter, Aren't you facing the same problem as I am: http://groups.google.com/group/web2py/browse_thread/thread/d5083ed08c685e34 Annet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" grou

[web2py:23724] Re: response.flash upgrade

2009-06-09 Thread mr.freeze
There are many more options in the jQueryUI calendar. For this you could use: $('.selector').datepicker({ changeYear: true }); On Jun 9, 10:11 am, DenesL wrote: > I feel this is a matter of taste. > The current one looks more cluttered but that is because it offers > more info and options to t

[web2py:23723] Custom Display Values

2009-06-09 Thread Gary
I'm using crud to interact with a custom view. form.custom.inpval.fieldname and form.custom.dspval.fieldname display the proper value for most field types, but not files, select boxes and checkboxes. The download easily fixes the file display, but I've been unable to find a similar solution to di

[web2py:23722] Re: response.flash upgrade

2009-06-09 Thread annet
Denes, Indeed, it is a matter of taste. But cognitive ergonomically the current calendar is a disaster. The arrows to increase the months and years are next to today, my test user did not see the month change when he clicked the arrow nor did he see the year change when he clicked the double arr

[web2py:23721] Re: Problem in 1.63.5

2009-06-09 Thread pk
i load the version: Current Version 1.63.5 (2009-06-03 23:35:00) for osx. and i use the auth-object. on my index page i`ve a form to login, register a user. when the login is correct i receive the follow link: http://localhost:8000/admin/default/site but i will receive: http://localhost:8000/2bu

[web2py:23720] Should we be tracking bugs and enhancement requests at Launchpad?

2009-06-09 Thread cesmiga
All: I'm not sure if this has been discussed in the past and would like to hear more if we should be tracking bugs and enhancement requests at Launchpad? https://launchpad.net/web2py Wouldn't it make code management and processes more manageable and more folks could aid with QA. Thank you,

[web2py:23719] Re: Auth

2009-06-09 Thread mdipierro
The best way is to customize the auth_user table as shown in the slides, insdead of subclassing it. Else it is much more complex than just setting auth.settings.table_user, since references from other built-in tables will break Massimo On Jun 9, 10:42 am, Trollkarlen wrote: > Fran wrote: > > On

[web2py:23718] Re: Problem in 1.63.5

2009-06-09 Thread mdipierro
Can you explain better? Is this is a prblem with the stable or the tunk version? On Jun 9, 10:17 am, pk wrote: > Hi Massimo, > > I´ve problems when i login in the new version, i get the default page > of web2py not my requested page. In 1.62 i haven`t got this problem. > > Here my code: > @auth.

[web2py:23717] Re: Auth

2009-06-09 Thread Trollkarlen
Fran wrote: > On Jun 9, 11:42 am, Robert Marklund wrote: > > Cant auth be changed somhow to it will be easier to extend like this: > > db.define_table('auth_user2', > >                 db.auth_user, > >                 SQLField('nickname'), > >                 SQLField('image','upload')) > > Th

[web2py:23716] Re: problem with selfreference left outer join

2009-06-09 Thread DenesL
Created a new repository and exported from svn again. Now it works (!?) Strange, old gluon repository has all green svn check marks. Oh well, main thing is it works. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "w

[web2py:23715] Texteditor

2009-06-09 Thread pk
Hi, is there a possibilty to use a texteditor in the html-page (bold-font, newline ...) for the user and after submit it will save it in the table. i need it for an cms for example. thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed

[web2py:23714] Re: problem with selfreference left outer join

2009-06-09 Thread DenesL
This is very easy to reproduce. Could someone else test and confirm either way?. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googl

[web2py:23713] Problem in 1.63.5

2009-06-09 Thread pk
Hi Massimo, I´ve problems when i login in the new version, i get the default page of web2py not my requested page. In 1.62 i haven`t got this problem. Here my code: @auth.requires_login() def index(): redirect(URL(r=request,c='menu',f='index')) ## # #

  1   2   >