[web2py] conditional sum() row table in controller

2013-04-27 Thread 黄祥
hi folks, i want to do conditional sum() row table in controller, but when i try to do, it returns an error : Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. Traceback (most recent call last): File "/host/Download/web2py/gluon/restricted.py", line 211, in restricted ccode = compile2(code, layer)

Re: [web2py] Pypy 2.0 beta2 - is there anyone testing this with web2py?

2013-04-27 Thread Evan Phelps
I also get the error but from a different line in dal.py. Could you send me your patch so that I can see if I'm experiencing the same issue? Or has it already been implemented in the web2py source (I didn't see a reference to it in the bugs list)? running: * Python 2.7.3 (c13457babbfb, Apr 2

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-27 Thread Mariano Reingart
Yes, sure, using jasper reports and java :-) Of course pyfpdf is not the silver bullet, but if users help to improve it with bug reports, test cases & tentative features or even ideas, surely it could be more powerful. That's the way open source works, and maybe we can reach even a simpler and mor

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-27 Thread Arnon Marcus
> even with an ORM your code wouldn't be as neat as you might think. Well, SQLA has this cool feature called "relationships", which basically lets you define bidirectional relationships between ORM classes. After you define it, there are events that will take care of updating the relationsh

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-27 Thread Ovidio Marinho
This all ends with this tool made ​​by lucas davila. https://github.com/simpleservices/app_report-python/wiki/Using-the-AppReport-client-on-Web2py-Apps Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com 83 8826 9088 - Oi

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-27 Thread Arnon Marcus
Niphlod, you keep referring to this "generalization" called "ORMs"... i am not talking about poorly-implemented ORMs - I am sure there are plenty of those... I am referring to SQLA's ORM. Have you watched the video in the last link I posted? I would really appreciate you'r take on what's in it, pl

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-27 Thread Niphlod
I'll not argue that some really extended project got eventually messy (they all do): my point is that even with an ORM your code wouldn't be as neat as you might think. Without you providing an api that you may expect web2py can't figure out your business requirements, and surely you can't expec

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-27 Thread Arnon Marcus
Hi Massimo, I thank you for adressing this thread, and apologize that it became so long and verbose, and that you are tackled with this ORM-stuff "yet again"... I imagine it might feel tedious by now, considering the amount of discussion that has already been done over this issue in the past. H

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-27 Thread Arnon Marcus
> What do you miss, specifically, from the DAL standpoint ? > Well, frankly, as I said - I LOVE THE DAL (!) :) I don't "miss" anything from it, in fact, I prefer it onto SQLA's SQL-Expression layer - as I said. But it's not the issue at hand. It's not what I am missing from the DAL. It's what

Re: [web2py] pyfPDF templates and unicode element values?

2013-04-27 Thread Mariano Reingart
Please, can you attach a minimal script to reproduce this? You should pass unicodes when using utf8, do not pass strings with .encode('utf8') (using utf8 fonts you can avoid the if isinstance(text, unicode): block completely) Yes unicode python support is hard to master, luckily in py3k it is a b

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-27 Thread Mariano Reingart
Did you add the TTF unicode font with add_font? Can you post a complete example (ie a script.py just with the code to test), so I can reproduce it easily. Best regards, Mariano Reingart http://www.sistemasagiles.com.ar http://reingart.blogspot.com On Sat, Apr 27, 2013 at 7:30 AM, Jurgis Pralgau

[web2py] Re: Simple usage of session.myvariable not working properly on production

2013-04-27 Thread Massimo Di Pierro
I cannot reproduce this and, in fact, if this were broke nothing in web2py would work since everything relies on sessions. There are some possibilities: 1) your browser has cookies disabled (so sessions are re-issued at every request) 2) there is a proxy in between that deletes session cookies 3)

[web2py] Simple usage of session.myvariable not working properly on production

2013-04-27 Thread Lisandro
What I need: to set a flag first time user hits the index in the session. My code is really simple: def index(): if not session.myvariable: session.myvariable = True response.flash = 'I just wrote myvariable' else: response.flash = 'myvariable is %s' %session.my

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-27 Thread Massimo Di Pierro
Without addressing all of the issues I would like to make two comments: 1) In the past we have created ORM structure on top of DAL to allow use of Django models and SQLAlchemy models with DAL. The code is here: http://www.web2py.com/AlterEgo/default/show/189 Nobody paid attention. 2) I prefer th

[web2py] Re: ORM (?) : A Revisit, NOT a Rebuttal

2013-04-27 Thread Niphlod
Whoa, that's definitely a lot to digest, but frankly. again with no practical usecases to digest too ^_^... >From the "technical" standpoint I love (being more a sql guy than a python one) to avoid defining a class when what I know that what I want is a table. That's more or less the (well s

[web2py] Re: ATTENTION!

2013-04-27 Thread samuel bonilla
thanks, massimo +1 El viernes, 26 de abril de 2013 23:13:36 UTC-5, Massimo Di Pierro escribió: > > It has occurred to me that some users use the grid for logged in users and > set user_signature=False. > I cannot stress this enough. This is a major security issue. > user_signature=True by de

[web2py] ORM (?) : A Revisit, NOT a Rebuttal

2013-04-27 Thread Arnon Marcus
I am in the process of researching ways to improve the structure of my web2py-app's code, simplifying usage of certain areas, and enabling RPC-like interface for external programs. I use web2py for over 3 years now, and love every aspect of it - especially the DAL (!) However, as the code grew

[web2py] Re: Performance css and js files

2013-04-27 Thread Annet
Thanks for your replies. If it doesn't make any difference, I'll revert to the default behaviour of the scaffolding app. Regards, Annet -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving em

Re: [web2py] Re: Bootstrap typeahead

2013-04-27 Thread Annet
Hi Richard, I'll have a look at your custom type ahead widget. I only use the auto complete and date picker that come with jQueryUI. I'd like to replace the date picker as well, but so far I've not come across an acceptable one. Regards, Annet -- --- You received this message because you a

[web2py] Re: newby authorization question - need example

2013-04-27 Thread Anthony
Add a created_by field to the tables that defaults to auth.user_id. In the grid controller, do something like this: if (request.args(-3) in ['edit', 'delete'] and db[request.args(-2)](request.args(-1)).created_by != auth.user_id): [code to prevent access] Anthony On Saturday, April 27,

[web2py] Re: cpdb.py not working...

2013-04-27 Thread mart
A couple of things: 1) you should try using it in a shell and call it directly (not with web2py.py) : %> python cpdb.py .. 2) there are 4 required parameters -f path to source DB folder -F path to target DB folder. I think you are missing this one.

Re: [web2py] Solved -- Problems with special characters and pyfpdf

2013-04-27 Thread Jurgis Pralgauskis
I see 2 lines were changed, the main - if 'face' in attrs and attrs['face'].lower() in self.font_list: + if 'face' in attrs: but I still get File "/home/jurgis/web2py/applications/apskaitele/controllers/default.py"

Re: [web2py] Re: Not working for versions >2.2.1

2013-04-27 Thread Carlo Bazzo
Thank you Anthony, never spotted that error because as I said until version 2.2.1 it was working anyway, maybe session.clear() did not behave as expected? Carlo Il 26/04/2013 18:41, Anthony ha scritto: At the beginning of the function you clear the session, yet the form's _formkey is stored