Re: [web2py] Re: Is there an alternative to Django's Pinax in the world of Web2py? Options

2011-01-29 Thread Marin Pranjic
attachment On Sat, Jan 29, 2011 at 6:51 AM, Anthony abasta...@gmail.com wrote: Where is it?

Re: [web2py] Re: PDF Reports with Pisa

2011-01-29 Thread Lucas D'Avila
What's your S.O ? I only tested it on ubuntu..., please send the traceback of the error. -- Lucas D'Avila http://flavors.me/lucasdavila Em 29/01/2011 04:21, mart msenecal...@gmail.com escreveu:

[web2py] web2pythonic way

2011-01-29 Thread walter
I have to create several decorators for controllers. They needs only for particular application. Where should I place them? In the modules or in the models or in the site-packages? What way is more web2pythonic?

[web2py] Re: web2pythonic way

2011-01-29 Thread walter
Is there something like PEP for web2py?

Re: [web2py] Re: web2pythonic way

2011-01-29 Thread rochacbruno
The WEP 8 says that it depends on the size of your application. In a small app keep everything in models. A bigger app put it in modules. That is my view. Em 29/01/2011, às 07:15, walter wdv...@gmail.com escreveu: Is there something like PEP for web2py?

[web2py] Re: Bugfix for full CRUD internal read links

2011-01-29 Thread Running Clam
Hi Bernd, Thank you - I think that solves a problem I've been wrestling with. -- Clam

[web2py] Re: URL formation in CRUD

2011-01-29 Thread Running Clam
See: http://groups.google.com/group/web2py/browse_thread/thread/8aab803ada993cd3#

Re: [web2py] query in DAL

2011-01-29 Thread beto (R3)
Hey Vasile: The end select would give an error.. belongs() translates to a: db.logs.item IN ( SELECT db.logs.date, db.logs.item [..] ) ERROR: subquery has too many columns If the tables had id fields this technique could actually work tho... thanks! beto On Sat, Jan 29, 2011 at 4:13 AM,

Re: [web2py] Re: How to do a count distinct with DAL?

2011-01-29 Thread beto (R3)
Postgres too! On Fri, Jan 28, 2011 at 1:41 PM, villas villa...@gmail.com wrote: It seems to work in SQLite and MS-SQL though. Firebird seems OK too.

[web2py] Re: empty list:reference seems like a bug

2011-01-29 Thread LightOfMooN
I add this rolic using database administration - add rolic On 29 янв, 03:07, DenesL denes1...@yahoo.ca wrote: On Jan 28, 4:47 pm, LightOfMooN vladsale...@yandex.ru wrote: Running 1.91.6 too. db.define_table('tag',     Field('name', 'string'), format='%(name)s')

Re: [web2py] Re: web2py and gae : Delete everything in the datastore

2011-01-29 Thread Nathan VanHoudnos
I tried that again this morning, but it only lets me delete 20 at a time. Am I doing something wrong? (I have hundreds of entries to delete.) Cheers, Nathan On Fri, Jan 28, 2011 at 5:35 PM, howesc how...@umich.edu wrote: if i remember correctly the bulk delete was google's christmas present

[web2py] Re: django admin like app/plugin in web2py

2011-01-29 Thread Massimo Di Pierro
Making appadmin available to all users is very dangerous because appadmin allows you to write ANY python in the search string. It is a major vulnerability if you give other users access to it. Instead of db.table.id0 one can type for example [os.unlink[f] for f in os.listdir('./')]. Massimo

[web2py] Re: T-Shirts web2py

2011-01-29 Thread Massimo Di Pierro
I would avoid any reference to other python frameworks because 1) people seem very touchy and, 2) we should go after PHP, ASP, JSP, not Django. On Jan 29, 12:40 am, mart msenecal...@gmail.com wrote: just a thought... wouldn't an app, 'powered by web2py', where we go to buy stuff (like t-shirts)

[web2py] Re: 2 quickies about cache

2011-01-29 Thread Massimo Di Pierro
I agree. As long as you know what you are doing, and you do, it is fine. On Jan 29, 1:12 am, Magnitus fbunny2...@hotmail.com wrote: web2py uses the query db.log.id==X as the key for the cache (where X will be replaced by the actual value). Clever. Very simple, yet powerful. Thanks for the

[web2py] Re: Bugfix for full CRUD internal read links

2011-01-29 Thread Massimo Di Pierro
fixed in trunk now. On Jan 28, 12:33 pm, Bernd Rothert roth...@googlemail.com wrote: The book's example for full CRUD def data(): return (form=crud()) doesn't set the proper links from .../data/select/table         to .../data/read/table/id they instead go to .../read/table/id This

[web2py] Re: query in DAL

2011-01-29 Thread Massimo Di Pierro
Before we try write is? Can you explain it? There is a condition on stcok that seems a inner join but nothing is selected from the stock table. On Jan 28, 2:16 pm, beto (R3) bet...@gmail.com wrote: Hey guys: Is there a way to do this query in DAL? SELECT     date, count(foo.items) FROM

[web2py] Re: How to do a count distinct with DAL?

2011-01-29 Thread Massimo Di Pierro
OK. Now in trunk: db=DAL() db.define_table('a',Field('b'),Field('c')) db(db.a.b0)._count() SELECT count(*) FROM a WHERE (a.b '0') db(db.a.b0)._count(distinct=db.a.b) SELECT count(DISTINCT a.b) FROM a WHERE (a.b '0') db(db.a.b0)._count(distinct=db.a.b|db.a.c) SELECT count(DISTINCT a.b, a.c)

Re: [web2py] Re: Fwd: web2py basic auth

2011-01-29 Thread Miguel Lopes
gluons/tools.py Txs, Miguel On Sat, Jan 29, 2011 at 12:29 AM, Niphlod niph...@gmail.com wrote: call_or_redirect() is the real addition here you can use both a URL or a function to manage on_failed_authentication and on_failed_authorization ... take a look in gluon/utils.py On Jan 28,

[web2py] Re: create table as select.

2011-01-29 Thread vortex
Because I have a controller that presents data for a table. So to present data which is a join of several tables, I would build a table and then use that same controller. Where can I find more information on how to make more complex queries and presenting data with web2py? On Jan 28, 6:27 pm,

Re: [web2py] Re: query in DAL

2011-01-29 Thread beto (R3)
Hey Massimo: Let me try to explain it: End goal: Display the total amount of non-duplicated items inserted every date. I have the logs table that has many items that are inserted at a given date (item a, b, c, d, etc) . The problem is that the same item might get inserted several times at the

Re: [web2py] Re: query in DAL

2011-01-29 Thread Vasile Ermicioi
why do you need 'stock' table ? WHERE stock.items = foo.items

Re: [web2py] Re: query in DAL

2011-01-29 Thread beto (R3)
Hey Vasile: Cause I have more clauses based on the stock table that I haven't included in the original query. For example: SELECT date, count(items) FROM ( SELECT logs.date, logs.items FROM logs WHERE extract(year from logs.date) = 2010) GROUP BY date, items ) AS

Re: [web2py] Re: web2py and gae : Delete everything in the datastore

2011-01-29 Thread Nathan VanHoudnos
Yes, I am doing something wrong. I needed to navigate to 'Datastore Admin' instead of 'Datastore Viewer'. The admin pages allows you to delete everything quickly. The viewer page only allows you to delete in chunks of 20. From: http://code.google.com/appengine/docs/python/datastore/entities.html

Re: [web2py] Re: Learning materials for newbie

2011-01-29 Thread Miguel Lopes
On Fri, Jan 28, 2011 at 11:01 PM, mikech mp.ch...@gmail.com wrote: I've also found it pretty useful recently to run the web2py app from source in a good ide, in my case WingIDE which I have a 10 day trial on, and step thru the program using the debugger. Eclipse or Aptana with PyDev is also a

Re: [web2py] Re: Is there an alternative to Django's Pinax in the world of Web2py? Options

2011-01-29 Thread pbreit
Attachments don't seem to come through at the new Google Groups web site.

Re: [web2py] Re: Is there an alternative to Django's Pinax in the world of Web2py? Options

2011-01-29 Thread Jonathan Lundell
On Jan 29, 2011, at 9:48 AM, pbreit wrote: Attachments don't seem to come through at the new Google Groups web site. There are several attachments to messages in the group archive.

Re: [web2py] Re: Is there an alternative to Django's Pinax in the world of Web2py? Options

2011-01-29 Thread Anthony
On Saturday, January 29, 2011 12:48:28 PM UTC-5, pbreit wrote: Attachments don't seem to come through at the new Google Groups web site. Yeah, if you send an attachment to the group via email, it won't show up in the new Google Groups interface (

[web2py] Re: Learning materials for newbie

2011-01-29 Thread Robert
What?!? No web2py tree on the cover!!! :-D -- Robert On 2011-01-28 16:46:25 -0500, Richard Vézina said: Web2py book : http://www.web2py.com/book Richard On Fri, Jan 28, 2011 at 4:38 PM, noob.py noob...@hotmail.com wrote: Hello, I'm totally new to programming, but very motivated to

[web2py] Re: Fwd: web2py basic auth

2011-01-29 Thread Niphlod
sorry, my mistake! On Jan 29, 4:01 pm, Miguel Lopes mig.e.lo...@gmail.com wrote: gluons/tools.py Txs, Miguel On Sat, Jan 29, 2011 at 12:29 AM, Niphlod niph...@gmail.com wrote: call_or_redirect() is the real addition here you can use both a URL or a function to manage

[web2py] Re: Modify calendar.js

2011-01-29 Thread Niphlod
datetime format is tied to datetime representation and that's bind to T() operator this snippet comes from web2py_ajax.html and it's responsible of calendar.js way to display time try {jQuery(input.date).live('focus',function() {Calendar.setup({ inputField:this,

[web2py] Re: T-Shirts web2py

2011-01-29 Thread jeff
How about : Build th web! (AND GET A LIFE) On Jan 26, 3:24 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: How about get it done! or build the web! get the things done seems too long. I would buy some T-shirts. :-) On Jan 26, 2011, at 7:28 AM, Bruno Rocha wrote: I dont like

Re: [web2py] Re: PDF Reports with Pisa

2011-01-29 Thread Ovidio Marinho
Bom, lucas , tudo ate agora foi testado em desenvolvimento , nada ate agora em produção, vou fazer um teste em produçao, precisa instalar pisa na produção, acho que nao vc ja embutiu o pisa no plugin, pelo que vi. 2011/1/29 Lucas D'Avila lucass...@gmail.com What's your S.O ? I only tested it on

[web2py] CSV import broken?

2011-01-29 Thread Emceha
Hi, I have app at GAE and I decided to export all the data and import on my devel machine. So let's say user table line looks like this (there is just one user):

[web2py] Re: django admin like app/plugin in web2py

2011-01-29 Thread mart
i meant to say a copy of admin (controller and view with a different name) is all that it takes to open up admin and make available (which is what I meant as maybe a bug). I'm just mentioning because that's what I did when I wanted to get my hands dirty and take admin apart to see how it works and

[web2py] Re: T-Shirts web2py

2011-01-29 Thread mart
well, except for the part of serving this on a web2py app, I wasn't being serious. Sorry for the confusion. Mart On Jan 29, 9:37 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: I would avoid any reference to other python frameworks because 1) people seem very touchy and, 2) we should

[web2py] Re: web2py and gae : Delete everything in the datastore

2011-01-29 Thread devGS
Great than. From my experience with that future, it takes time to delete in bulk and the process is is splitted into hours in order to save your CPU time. You can track the process through your datastore panels, task queue, etc. That's all I can comment about. Hopping to hear about your

Re: [web2py] Re: T-Shirts web2py

2011-01-29 Thread Albert Abril
Even, I like the concept of gnome love: *GnomeLove is an initiative that aims to help people who want to get started contributing to GNOME.* *This page offers a collection of links to useful resources for aspiring developers, testers, documenters or simply GNOME enthusiasts.*

Re: [web2py] Re: PDF Reports with Pisa

2011-01-29 Thread Lucas D'Avila
Not need to install additional packages, the dependencies of Pisa already comes built in plugin. But if you want you can remove these packages that comes by default and install the dependencies. -- Lucas D'Avila http://flavors.me/lucasdavila Em 29/01/2011 20:07, Ovidio Marinho

[web2py] A simple question about avoiding race condition

2011-01-29 Thread AW
The following two lines of code are often used in the web2py book: 1. db.define_table('person', Field('name', unique=True)) 2. db.person.name.requires = IS_NOT_IN_DB(db, 'person.name') Well, given that line 1 already avoids race condition at the database level, isn't line 2 more or less

[web2py] Re: The first code example of the CRUD Methods section of the online web2py book

2011-01-29 Thread AW
No one has tried that code example? On Jan 18, 1:06 am, AW a2y2w...@gmail.com wrote: Hi, Massimo. Thanks for your reply. My code: In the model: db = DAL('sqlite://storage.sqlite') db.define_table('person', Field('name', requires=IS_NOT_EMPTY())) In the controller: def people():    

[web2py] Bugfix for Checkbox

2011-01-29 Thread Bernd Rothert
There is a small bug in web2py's HTML checkbox helper: from gluon.html import * print INPUT(_type='radio', _value=2, value='2']) input checked=checked type=radio value=2 / print INPUT(_type='checkbox', _value=2, value=['1', '2', '3']) input type=checkbox value=2 / print

[web2py] Bugfix for Checkbox

2011-01-29 Thread Bernd Rothert
There is a small bug in web2py's HTML checkbox helper: from gluon.html import * print INPUT(_type='radio', _value=2, value='2']) input checked=checked type=radio value=2 / print INPUT(_type='checkbox', _value=2, value=['1', '2', '3']) input type=checkbox value=2 / print

[web2py] Re: A simple question about avoiding race condition

2011-01-29 Thread Anthony
On Saturday, January 29, 2011 6:59:39 PM UTC-5, AW wrote: The following two lines of code are often used in the web2py book: 1. db.define_table('person', Field('name', unique=True)) 2. db.person.name.requires = IS_NOT_IN_DB(db, 'person.name') Well, given that line 1 already avoids race

[web2py] Deployment Confusion

2011-01-29 Thread g...@rtplanb.com
I have been happily designing my business website for a while now. Web2Py is very easy to use and has been a brilliant way to learn html, css and a bit of java. I am getting close to wanting to deploy the first version of m site but honestly, after reading the deployment section of the web2py

[web2py] Need assistance to build dynamic queries

2011-01-29 Thread AbortedF
Hi, I have the following model definitions: db.define_table('bl_nationality', Field('nationality', 'string') ) db.define_table('bl_names', Field('surname', 'string'), Field('forename', 'string'), Field('dob', 'date', requires=IS_DATE(format=T(''%Y-%m-%d'))), Field('nationality',

Re: [web2py] Deployment Confusion

2011-01-29 Thread Bruno Rocha
I suggest you webfaction.comhttp://www.webfaction.com/services/hosting?affiliate=rochacbrunothe easiest web2py hosting provider, you can easily setup many applications, manage its version, you have access to shell via ssh, ftp. webfaction has a very nice way to manage your applications separated

[web2py] Forcing SSL on certain requests;

2011-01-29 Thread David J.
Is there a utility available to force requests to SSL? (ex: Login, Register, etc..) I see one option in reCaptcha section; use_ssl=True But I looked in the FORM docs and don't see that as an option;

[web2py] Re: create table as select.

2011-01-29 Thread DenesL
To answer your first question I will illustrate it with an example: #models db.define_table('person', Field('name'), Field('age','integer'), format='%(name)s' ) db.define_table('dog', Field('name'), Field('owner','reference person'), format='%(name)s' ) #controller def

Re: [web2py] Re: The first code example of the CRUD Methods section of the online web2py book

2011-01-29 Thread Richard Vézina
On Tue, Jan 18, 2011 at 1:06 AM, AW a2y2w...@gmail.com wrote: Hi, Massimo. Thanks for your reply. My code: In the model: db = DAL('sqlite://storage.sqlite') db.define_table('person', Field('name', requires=IS_NOT_EMPTY())) In the controller: def people(): form =

Re: [web2py] Re: The first code example of the CRUD Methods section of the online web2py book

2011-01-29 Thread Richard Vézina
On Sat, Jan 29, 2011 at 10:31 PM, Richard Vézina ml.richard.vez...@gmail.com wrote: On Tue, Jan 18, 2011 at 1:06 AM, AW a2y2w...@gmail.com wrote: Hi, Massimo. Thanks for your reply. My code: In the model: db = DAL('sqlite://storage.sqlite') db.define_table('person', Field('name',

[web2py] Re: Bugfix for Checkbox

2011-01-29 Thread Massimo Di Pierro
thanks. In trunk. On Jan 29, 6:28 pm, Bernd Rothert roth...@googlemail.com wrote: There is a small bug in web2py's HTML checkbox helper: from gluon.html import * print INPUT(_type='radio', _value=2, value='2']) input checked=checked type=radio value=2 / print INPUT(_type='checkbox',

[web2py] Re: CSV import broken?

2011-01-29 Thread Massimo Di Pierro
When you import a single table db.tableimport_from_csv_file the Ids get reassigned. If you export/import an entire database with db.export_to_csv_file(...)/db.import_from_csv_file(...) Ids are still re-assigned bit references are fixed. On Jan 29, 4:17 pm, Emceha marcin.chojnow...@gmail.com

[web2py] Re: Need assistance to build dynamic queries

2011-01-29 Thread Massimo Di Pierro
I strongly suggest that you take a look at the jquery callback in the plugin_wiki controller. On Jan 29, 6:45 pm, AbortedF martinb4...@gmail.com wrote: Hi, I have the following model definitions: db.define_table('bl_nationality',   Field('nationality', 'string') )

[web2py] postfix on Ubuntu?

2011-01-29 Thread pbreit
Has anyone had any luck installing and using postfix on Ubuntu or other? I've been trying to follow the Ubuntu instructions without much luck: https://help.ubuntu.com/community/Postfix One question: do I use MECHANISMS=pam or MECHANISMS=shadow in /etc/default/saslauthd ? What do I set these

[web2py] Re: postfix on Ubuntu?

2011-01-29 Thread pbreit
Got it. Set the server to localhost. I think I had also made some changes to 'saslauthd' that might have helped. mail.settings.server = 'l http://web1.myserver.com/ocalhost' mail.settings.sender = 'ro...@myserver.com' mail.settings.login = 'root:mypassword'

[web2py] tip of the day with a challenge

2011-01-29 Thread Massimo Di Pierro
Immagine you have the following (suggested by user Nik): db.define_table('person',Field('name'),format='%(name)s') db.define_table('company', Field('name'),format='%(name)s') db.define_table('member',Field('person',db.Person), Field('company',db.company)) and a new table

Re: [web2py] Forcing SSL on certain requests;

2011-01-29 Thread Philip Kilner
Hi David, On 30/01/2011 01:02, David J. wrote: Is there a utility available to force requests to SSL? (ex: Login, Register, etc..) Are you behind a web server? That may be a better place to manage that than on the web2py side, depending on you needs of course. You can do this with an