Re: [web2py] Re: MariaDB

2012-10-05 Thread vinicius...@gmail.com
That's exactly what its site is spreading to the whole world. If it doesn't work, it would be a worldwide deception. On 10/05/2012 03:05 PM, Massimo Di Pierro wrote: Ias you say it is supposed to work as a drop-in replacement. I never tried but it should work fine with one of the mysql

Re: [web2py] Re: How do you organize your applications to be unit-tested?

2012-10-04 Thread vinicius...@gmail.com
You're right, Richard, but I was asking how you organize your production code, not your test code. What is your strategies to isolate components to achieve a better unit-testing scenario? -- Vinicius Assef On 10/04/2012 12:49 PM, Richard Vézina wrote: I am reading actually about unit

Re: [web2py] args or vars

2012-10-04 Thread vinicius...@gmail.com
If the function you mention is a controller function invoked directly by the user via URL, I'd choose vars because the number of recs is only a configuration to shape your presentation. On 10/04/2012 05:33 PM, Richard wrote: Hello, Let say I want to pass to a function the number of records

[web2py] How do you organize your applications to be unit-tested?

2012-10-03 Thread vinicius...@gmail.com
Hi all. I continue diving into unit-testing and I'd like to know how do you organize your applications to be unit-tested. Thin controllers? DAO classes? How do you decouple things in web2py to make unit-testing easy? -- Vinicius Assef --

Re: [web2py] Classes in markmin

2012-09-03 Thread vinicius...@gmail.com
But is there some tool to generate offline docs, like Sphinx, using themes and linking local pages? That's what I'm looking for. -- Vinicius Assef On 09/03/2012 01:54 AM, Bruno Rocha wrote: There is markmin2pdf and markmin2html on gluon.contrib

Re: [web2py] Search Database field auto complete

2012-09-02 Thread vinicius...@gmail.com
http://web2py.com/books/default/chapter/29/07#Autocomplete-widget On 09/02/2012 11:05 AM, BlueShadow wrote: Hi, I got huge database with a name field... I have to search for individual lines quite often. So I wanted to make a search box for it. If Christmas was today I would love it it would

[web2py] Global formstyle configuration

2012-09-02 Thread vinicius...@gmail.com
I think it would be nice to have some global configs in web2py. One of them is formstyle. It's unpleasant to define formstyle in every FORM definition. This formstyle config could come in db.py like Auth configs. So, once defined my app formstyle, it should be used as default. But in a

Re: [web2py] Re: Global formstyle configuration

2012-09-02 Thread vinicius...@gmail.com
Anthony, another one would be hide_error. These are settings affect app style of visualization and user interaction. So, it makes sense to be defined once and overriden when necessary. -- Vinicius Assef On 09/02/2012 12:34 PM, Anthony wrote: Are there other examples of potential global

Re: [web2py] Re: Global formstyle configuration

2012-09-02 Thread vinicius...@gmail.com
) super(MySQLFORM, self).__init__(*args, **kwargs) On Sun, Sep 2, 2012 at 8:11 PM, vinicius...@gmail.com mailto:vinicius...@gmail.com vinicius...@gmail.com mailto:vinicius...@gmail.com wrote: Anthony, another one would be hide_error. These are settings affect app style of visualization

[web2py] Unit tests

2012-09-02 Thread vinicius...@gmail.com
Hi guys. I'd like to know if this still is the recommended way to write unit tests in Web2py: http://www.web2py.com/AlterEgo/default/show/260 -- Vinicius Assef --

Re: [web2py] Re: Unit tests

2012-09-02 Thread vinicius...@gmail.com
So, could we consider webclient the official way to unittest web2py apps? On 09/03/2012 12:41 AM, Massimo Di Pierro wrote: Now you also have gluon/contrib/webclient.py On Sunday, 2 September 2012 21:57:47 UTC-5, viniciusban wrote: Hi guys. I'd like to know if this still is the

[web2py] Classes in markmin

2012-09-02 Thread vinicius...@gmail.com
I'm in charge to find a good solution to document some projects and I faced markdown, reST and markmin. I found this thread from about 1 year ago: https://groups.google.com/forum/?fromgroups=#!topic/web2py/driLl6I8K64 Comparing reST with markmin, I observed reST creates div to encapsulate

Re: [web2py] Re: web2py 2.0.5 is out

2012-09-01 Thread vinicius...@gmail.com
Great! \o/ On 09/01/2012 05:18 PM, Richard Vézina wrote: Confirm backward compatibility. I just migrate from 1.99.4 to 2.0.5 Notice, that I change : controllers/appadmin.py static/css/* static/js/* static/images/* views/*generic.* views/web2py_ajax.html With the files form welcome app,

[web2py] Is 2.0.2 or 2.0.3 really a stable version?

2012-08-31 Thread vinicius...@gmail.com
First of all, I'd like to thank you all. You're making a great job, guys. I see web2py becoming more reliable to bigger projects and I'm very pleased with it. You all rock! :-) In spite of this huge effort, isn't it premature to call 2.0.2 or even 2.0.3 stable? I know there were several

Re: [web2py] Is 2.0.2 or 2.0.3 really a stable version?

2012-08-31 Thread vinicius...@gmail.com
, but you cannot blame anyone. On Fri, Aug 31, 2012 at 1:44 PM, vinicius...@gmail.com mailto:vinicius...@gmail.com vinicius...@gmail.com mailto:vinicius...@gmail.com wrote: First of all, I'd like to thank you all. You're making a great job, guys. I see web2py becoming more reliable

Re: [web2py] Customizing Auth

2012-08-31 Thread vinicius...@gmail.com
Your error is here: (invalid syntax (20_auth_db.py, line 36)) On 08/31/2012 02:25 PM, Annet wrote: |(invalid syntax (20_auth_db.py, line 36))| --

Re: [web2py] Is 2.0.2 or 2.0.3 really a stable version?

2012-08-31 Thread vinicius...@gmail.com
+1 Again, note that I'm not against our team. I'm on it, too. I'm not criticizing. I'm suggesting quality improvement. -- Vinicius Assef On 08/31/2012 11:07 AM, Richard Vézina wrote: Hello, I love web2py and normally I just wait a bit when there is new version to make sure I don't spend

Re: [web2py] Re: web2py 2.0 stats

2012-08-29 Thread vinicius...@gmail.com
+1. That's a big weakness in our beloved framework. But, unfortunately, I cannot help with that. I've tried in the past, but it's difficult to follow pitch of new features. -- Vinicius Assef On 08/29/2012 02:32 PM, apps in tables wrote: Examples and Self explanatory documentation will save

Re: [web2py] Best way to insert 200k records?

2012-08-17 Thread vinicius...@gmail.com
Maybe you can face transaction size problems with this volume. Web2py, by default, just commits after a successful transaction. So, try to db.commit() after some transaction completion identification. But I think processing time wouldn't be your problem. -- Vinicius Assef On 08/17/2012

Re: [web2py] Best way to insert 200k records?

2012-08-17 Thread vinicius...@gmail.com
I'd choose bulk_insert, but you should run some benchmarks, too. On 08/17/2012 09:08 AM, Mike Girard wrote: But what method should I use? Is there anything better than bulk_insert? Naturally I would like this to work as fast as possible. Thanks. --

Re: [web2py] Re: How do larger teams develop with Web2py?

2012-08-09 Thread vinicius...@gmail.com
I Agree. Good words. On 08/09/2012 10:48 AM, Massimo Di Pierro wrote: Listen everybody. This thread is hilarious but not very professional. I think most of the people on this thread are hardcore programmers and most of us came to some conclusions: 1) it is not the idea that has value, it is

Re: [web2py] Re: How do larger teams develop with Web2py?

2012-08-09 Thread vinicius...@gmail.com
Luc, I don't see that. Web2py allows your team to work colaboratively. We work this way in our company. By the way, I'd say some characteristics enforce this separation. In Django, for example, you must have your routes planned and templates coded to allow programmers to work. Without them,

[web2py] update_or_insert() inserting id=None

2012-08-08 Thread vinicius...@gmail.com
Hi folks. I'm facing a problem with table.update_or_insert(). I have: my_tab.update_or_insert(my_tab.name==my_name, name=my_name, phone=my_phone) When the search condition is not satisfied (i.e no records found) a new record with id=None is inserted in my_tab. The action is correct, but id

Re: [web2py] update_or_insert() inserting id=None

2012-08-08 Thread vinicius...@gmail.com
an issue on google code! Which web2py version? Richard On Wed, Aug 8, 2012 at 10:10 AM, vinicius...@gmail.com mailto:vinicius...@gmail.com vinicius...@gmail.com mailto:vinicius...@gmail.com wrote: Hi folks. I'm facing a problem with table.update_or_insert(). I have

Re: [web2py] How do larger teams develop with Web2py?

2012-08-08 Thread vinicius...@gmail.com
It's not a Web2py question. It's a team management point. As far as Web2py work with MVC (Django, Rails, etc. as well), all pros and cons apply here, too. It's a matter of your workload approach. Maybe some reading in scrum or other management technique may help you. -- Vinicius Assef On

Re: [web2py] web2py 2.0 almost done

2012-08-07 Thread vinicius...@gmail.com
Is there a changelog? On 08/07/2012 01:33 AM, Massimo Di Pierro wrote: Web2py 2.0 is almost done. Please try the nightly build. Let us know if it breaks anything. massimo -- --

Re: [web2py] updating web2py src on live site and web2py shutdown/restart

2012-08-06 Thread vinicius...@gmail.com
You'll do this in a test environment before, right? ;-) On 08/06/2012 01:37 PM, wdtatenh wrote: I'm about to update the src code on a live site hosted by webfaction. I'm assuming that web2py server must be stopped and restarted. Web2py is running from the original installation script and has

Re: [web2py] Re: Giving a talk promoting web2py over Django

2012-08-02 Thread vinicius...@gmail.com
Massimo, about hot install applications, it's true just if you use default routes, right? Or there's some way to do that using custom routes? -- Vinicius Assef On 08/01/2012 02:23 PM, Massimo Di Pierro wrote: I really have nothing to add but some history. I was a Django programmer

Re: [web2py] Re: Web2py site/app with several deily accesses

2012-08-02 Thread vinicius...@gmail.com
Could you tell us its url? On 08/02/2012 01:27 PM, howesc wrote: my largest project is servicing 2.5 million requests per day. (API calls and website views combined) - google app engine (big table) - modelless - medium use of memcache, slight use of google edge cache On Wednesday,

[web2py] Web2py site/app with several deily accesses

2012-08-01 Thread vinicius...@gmail.com
This question has been asked here from time to time, but always things get up to date. So, do you have some case using web2py to serve several (hundreds of thousands, or millions) page hits a day? What is your app architecture? Model based? Modelless? What database do you use? Tell us

Re: [web2py] Giving a talk promoting web2py over Django

2012-08-01 Thread vinicius...@gmail.com
We2bpy strengths over Django: 1) Automatic migrations. It enforces baby steps design just out-of-the-box. South migrations is a powerful tool, but Django doesn't have it natively yet. 2) Web2py shows a generic template when you don't have one created. Yet, baby steps guaranteed. I see these

Re: [web2py] Re: Visit Plugow on FISL13

2012-07-26 Thread vinicius...@gmail.com
We generate them using a Google API and read them using ZBar. There are different modules in this totem. One of them is the Web2py part. Another is the ZBar thing. They can be all in one machine or distributed among several ones. But I'm not authorized to detail this implementation right now.

Re: [web2py] Re: Complex query with left outer join

2012-07-26 Thread vinicius...@gmail.com
Some suggestions, but I've not tested any of them: 1) Use timedelta(days=int(db.userCard.stage)) to convert your Field to int. 2) Split your query in 2 parts. The 2nd should use find() or exclude(). 3) Use db.executesql() to insert your SQL statement. -- Vinicius Assef On 07/26/2012 12:23

Re: [web2py] Re: Complex query with left outer join

2012-07-26 Thread vinicius...@gmail.com
I think you're right, @Niphlod. I didn't note this. @jw, tell us how you solved it, ok? -- Vinicius Assef On 07/26/2012 12:52 PM, Niphlod wrote: Currently you'd have to code a view in the database (or simply a string condition to pass on) to achieve that. date.today() -

Re: [web2py] Re: Empty Database value is not None, but an empty string

2012-07-25 Thread vinicius...@gmail.com
Sorry, but I cannot figure out why this is happening. Here, my data becomes None if I do this. I'm using SQLite. If you define a fresh new table in your db.py with just one string field, just using default configs, this problem still happens? -- Vinicius Assef On 07/25/2012 12:31 AM, Mark

Re: [web2py] Complex query with left outer join

2012-07-25 Thread vinicius...@gmail.com
timedelta syntax is timedelta(days=1) On 07/25/2012 11:13 AM, jw wrote: Hi, my question is about the following query. I'm planning to program an e-learning software. For this I use three tables to select the cards to learn for today. Table cards contains the question, userCard contains the

Re: [web2py] Re: Complex query with left outer join

2012-07-25 Thread vinicius...@gmail.com
Indeed, pbreit. Did you check if your SQL query is correct? print db._lastsql would help, too. Baby steps, baby. Baby steps. -- Vinicius Assef On 07/25/2012 01:58 PM, pbreit wrote: I don't really understand what you're trying to do but I would recommend trying to simplify. First, you don't

Re: [web2py] BR()

2012-07-25 Thread vinicius...@gmail.com
No, you cannot. On 07/25/2012 02:18 PM, Lucas R. Martins wrote: You also can use {{=BR()*5}} or {{=ANYTHING()*5}} Em Qua 25 Jul 2012 13:51:38 BRT, Toby Shepard escreveu: In my own html generating libraries, I normally allow an integer argument to the BR maker, which is a count of how many

[web2py] Visit Plugow on FISL13

2012-07-25 Thread vinicius...@gmail.com
Plugow is a totem developed by our team, at Agencia X4, using Python and web2py. It integrates several techologies like webcam, qrcode, social networks (twitter and fb) and youtube. We're on FISL 13 [1] (International Free Software Forum, 13th edition) in Brazil. If you understand

Re: [web2py] BR()

2012-07-25 Thread vinicius...@gmail.com
They don't work. Output is escaped. Try it out. -- Vinicius Assef On 07/25/2012 03:40 PM, Anthony wrote: Though you can do: | {{=BR().xml()*5}} | or | {{=str(BR())*5}} | Anthony On Wednesday, July 25, 2012 1:23:37 PM UTC-4, viniciusban wrote: No, you cannot. On 07/25/2012

Re: [web2py] BR()

2012-07-25 Thread vinicius...@gmail.com
You cannot, too. I've tested. The correct way is: {{=XML(str(BR())*5)}} On 07/25/2012 04:09 PM, Derek wrote: Ok, how about {{=(BR()*5).XML()}} On Wednesday, July 25, 2012 11:53:05 AM UTC-7, viniciusban wrote: They don't work. Output is escaped. Try it out. -- Vinicius

Re: [web2py] Re: Visit Plugow on FISL13

2012-07-25 Thread vinicius...@gmail.com
Sure, Massimo. You go to http://labs.agenciax4.com.br/fisl13 , log in with your twitter or fb and get a QRCode. After that, you head to our totem, show your qrcode (what identifies you on it) and record a video. This video is converted and uploaded to our youtube account with your name on it

Re: [web2py] Template security

2012-07-25 Thread vinicius...@gmail.com
It will be as safe as you care about it. But, surely it is not a good practice. Even web2py's views having the power to use full python code, you should separate your app in layers. You should place, as far as it is possible, just presentation logic in views. Exceptions happen. And full

Re: [web2py] Unit Testing Database Best Practices

2012-07-23 Thread vinicius...@gmail.com
+1 On 07/23/2012 11:40 AM, Richard Vézina wrote: I am interesting in what will come out of this thread... But, to me I think your last question on fact that database will have undertermined set of data mean that you maybe not validate your app base on the entries of the database but on a

Re: [web2py] Logic check in View, to check if auth.user.group_id...

2012-07-23 Thread vinicius...@gmail.com
If your doubt is about view syntax, it's just the way you outlined, with a few changes. 1) Change {{T(...)}} by {{=T(...)}} 2) Close the else with {{PASS}} Always remember web2py views can have normal Python code. But don't overuse it, ok? -- Vinicius Assef On 07/23/2012 02:55 PM, Alec

Re: [web2py] Re: Empty Database value is not None, but an empty string

2012-07-23 Thread vinicius...@gmail.com
As far as I know, let notnull=False and required=False for your fields and don't set default property. On 07/23/2012 06:32 PM, Mark Li wrote: Unfortunately the lambda method didn't work, Anthony. Any other ideas for having a None default for empty entries? On a side note, if the 'integer'

Re: [web2py] Re: Empty Database value is not None, but an empty string

2012-07-23 Thread vinicius...@gmail.com
Yes, they are default settings. It's quite strange you get empty strings instead null (None, in Python). How are you inserting data into db? Are you using a SQLFORM or my_table.validate_and_insert() or simply mytable.insert()? Do you get same results (blank values) inserting it from web2py

Re: [web2py] The Mystery of the Hidden View

2012-07-22 Thread vinicius...@gmail.com
Your d.html view must certainly be located in /your_app/views/group/ dir. What do you want exactly to achieve? What is really happening? -- Vinicius Assef On 07/22/2012 02:49 PM, Alec Taylor wrote: My `group` controller located at: /social/controllers/group.py, has a view located at:

Re: [web2py] web2py.com offline

2012-07-20 Thread vinicius...@gmail.com
Bruno, how many pageviews a day? On 07/20/2012 03:40 PM, Bruno Rocha wrote: Well, I think web2py.com http://web2py.com and web2pyslices.com http://web2pyslices.com needs a better hosting solution. On Fri, Jul 20, 2012 at 2:22 PM, Dave davidramsayreinh...@gmail.com

Re: [web2py] Re: Accessing non-returned items in Views

2012-07-18 Thread vinicius...@gmail.com
We know locals() fits well in this situation. But I am working in a system develop returning locals() from all controllers. It's a pain to discover where things are defined and if a change in a controller (ie. killing some unused variables) will or not affect that view. Mainly the bigger

Re: [web2py] Re: Making a field non-editable, but writable using SQLFORM

2012-07-17 Thread vinicius...@gmail.com
Maybe Massimo's ideia can work for you. But don't be afraid to count on custom forms. They give us much more power. On 07/17/2012 12:37 PM, Massimo Di Pierro wrote: Doesn't db.table.field.writable = False db.table.field.default = 'whatever' do what you want? On Thursday, 16 June 2011

Re: [web2py] Web2py using json

2012-07-08 Thread vinicius...@gmail.com
Let's break the scenario in 2 parts. 1) How will you send it to web2py? a) As a query string via HTTP GET encapsulated in only one param b) As several params, using a standard query string c) Via HTTP POST d) Other (tell us): 2) The web2py part is easy because it's Python, anyway. Just use

Re: [web2py] Re: Web2py - internet explorer - admin login fails - http://127.0.0.1:8000/....

2012-07-08 Thread vinicius...@gmail.com
What was the solution? On 07/08/2012 01:38 PM, wdtatenh wrote: OK - now it's working - thanks for the tips. On Sunday, July 8, 2012 9:21:45 AM UTC-4, Massimo Di Pierro wrote: Does it ask you for the admin password? On Sunday, 8 July 2012 07:44:46 UTC-5, wdtatenh wrote:

Re: [web2py] please help us test web2py

2012-07-06 Thread vinicius...@gmail.com
Could you, please, tell us what should be tested? What has changed? By the way, what is salt password? I searched dictionary, but didn't find a good translation. Sorry my poor English. -- Vinicius Assef On 07/06/2012 01:52 AM, Massimo Di Pierro wrote: There are many changes in DAL. If you

Re: [web2py] Re: can CAS provider use a different database to apps?

2012-07-06 Thread vinicius...@gmail.com
Short answer: manually. You cannot connect (join or make a relation) fields among different databases. On 07/06/2012 02:16 PM, Horus wrote: Yes I understand CAS is for central auth, so i have let the cas provider be the app that takes care of login, registration, signup, what have you; as

Re: [web2py] Select with text field

2012-07-06 Thread vinicius...@gmail.com
How much data (in KB ou MB) are loaded into these text fields? Could you show us your model file where you execute this define_table()? (aka db.py) On 07/06/2012 02:04 PM, Marcello Parra wrote: I'm not using executesql... I'm trying just: query = q_processos.select() It seems to load

Re: [web2py] Re: can CAS provider use a different database to apps?

2012-07-06 Thread vinicius...@gmail.com
That's a good question, Horus. :-/ I haven't tried that. Theoretically, db_cas.base_tags field could be referenced because it needs the db object. Let us know about your progress on it. -- Vinicius Assef On 07/06/2012 03:40 PM, Horus wrote: Right viniciusban i agree. i don't want to

Re: [web2py] Customizing Auth to work with legacy db app

2012-07-05 Thread vinicius...@gmail.com
Hi Jerry. You can define a db object to connect just to your auth table on MS SQL. This way, you can customize Auth to your needs. Remember web2py, by default, store passwords crypted (see CRYPT validator). If it's not your scenario, you'll need to override this implementation. A few months

Re: [web2py] conditional models requires check if table already exists for db admin to work

2012-07-03 Thread vinicius...@gmail.com
Use this pattern below everywhere you define a table: if not 'mytable' in db.tables: db.define_table('mytable', ...) I always use it. -- Vinicius Assef On 07/03/2012 07:33 AM, selecta wrote: In my project I use conditional models since I have a lot of tables. However I have a problem

Re: [web2py] DAL : fill with zeroes a specific field before insert / update

2012-07-02 Thread vinicius...@gmail.com
Remember requires property is not used when you just insert(), update() or update_record(). So, in Web2py you don't have anything like a db trigger. You could do it using a custom validator like CLEANUP() and using validate_and_insert() or validate_and_update() in substitution of regular

Re: [web2py] web2pyslices seems to be down

2012-07-01 Thread vinicius...@gmail.com
It's up and running here, in Brazil. On 07/01/2012 08:36 AM, Jose C wrote: Just starting on a project and been trying to access web2pyslices.com occasionally. It's been returning 504 errors since Friday (since I started on this project). Does anyone know if this site is still active or who is

Re: [web2py] Alter SQLFORM.factory generated form to put tag into a table

2012-06-28 Thread vinicius...@gmail.com
Richard, wouldn't be better organizing your form direct in HTML using custom.form tags? On 06/28/2012 01:00 PM, Richard Vézina wrote: Forget the precedent email... I think I found how, it didn't work the first time I try, so I just put everything into string, maybe I had problem with a

[web2py] How to change a form.vars.field value after validation?

2012-06-27 Thread vinicius...@gmail.com
Hi guys. I'm facing a problem I didn't find a pure web2py solution. I have a SQLFORM.factory() with some fields, including one captcha field. Every time the form is showed, the input captcha field must be empty. The form may have error in other fields and the captcha could be filled right,

Re: [web2py] How to change a form.vars.field value after validation?

2012-06-27 Thread vinicius...@gmail.com
Here it is: http://pastebin.com/2zMNYWnX On 06/27/2012 05:20 PM, Richard Vézina wrote: Would you show you SQLFORM.factory code? Richard On Wed, Jun 27, 2012 at 4:14 PM, vinicius...@gmail.com mailto:vinicius...@gmail.com vinicius...@gmail.com mailto:vinicius...@gmail.com wrote: Hi guys

Re: [web2py] How to change a form.vars.field value after validation?

2012-06-27 Thread vinicius...@gmail.com
Yes, I was rendering {{=form.custom.widget.captcha}} in my view. Why is this strange? On 06/27/2012 05:58 PM, pbreit wrote: Wow, that is some strange code. What does your view code look like? How are you rendering the captcha widget?

Re: [web2py] Amazon EC2 discussion

2012-04-30 Thread vinicius...@gmail.com
We use it. We're happy, but the app doesn't have high traffic. As far as I see in real cases, AWS is a great place to host. I'm planning to make a new migration to their platform next month. On 04/30/2012 06:55 AM, lucas wrote: hello one and all, i am curious about using a cloud, like

Re: [web2py] Amazon EC2 discussion

2012-04-30 Thread vinicius...@gmail.com
We deploy using git pull. On 04/30/2012 01:33 PM, Massimo Di Pierro wrote: I have only used it long ago. It was clumsy and slow to deploy. I found there are other web hosts that use EC2 infrastructure but provide better interfaces and management tools. Although I never tried any of them. On