Re: [web2py] Re: Python fourth on the list

2011-02-28 Thread Richard Baron Penman
I often use elance.com, and currently they have 54 projects related to Python, and 1123 related to PHP. On Mon, Feb 28, 2011 at 1:06 PM, blackthorne wrote: > that is programming language popularity > not web programming language popularity > > On Feb 28, 12:28 am, Plumo wrote: > > wow, more po

[web2py] Why SQLTABLE display different things for db. and 'list:reference '?

2011-02-28 Thread surfnet3
I have the following model: db.define_table( 'person', Field('name'), format=lambda r: r.name, ) db.define_table( 'product', Field('name'), Field('buyer', db.person), Field('seller', 'list:reference person'), ) I realize, in the following code: SQLTAB

[web2py] web2py on recent updates feels slow

2011-02-28 Thread rāma
I updated web2py from 1.91XX to 1.92XX felt the speed improved a little which was previously worse. but now facing the same issue. This speed I'm talking about is when editing the app using the admin which also recently started affecting page load while loading the backend (a noticeable lag 1~2 sec

[web2py] web2py hangs with multiple users due to sqllite

2011-02-28 Thread Markus Schmitz
Hi everybody, on my development system I use sqllite, because it allows me to conveniently backup my database, which contains a good amount of configuration data. In principle and as long as I access the web site alone, this works fine. But as soon as two users or I myself access the web site wit

Re: [web2py] Re: great performance of web2py at the startup weekend dublin (Feb 25-27)

2011-02-28 Thread Vasile Ermicioi
Sebastian, another great advantage is that Massimo is always there to help, I never saw such support for any product and as you see he is already here :)

[web2py] Re: web2py Debian packages available for testing

2011-02-28 Thread Michael McGinnis
Impressive! It installed easily, using Ubuntu Software Manager (10.10). It said License: Unknown, Updates: Unknown, with no screenshot. However, I did get an error on the examples app - maybe this is a known issue. ERROR TICKET FOR "EXAMPLES" TICKET ID 127.0.0.1.2011-02-28.21-12-16.61f00a22-ef12

[web2py] Re: how to use cache decorator within modules?

2011-02-28 Thread kenji4569
What about this? (modules/mymodule.py) def main(environment): environment = Storage(environment) cache = environment.cache @cache('xxx', time_expire=1, cache_model=cache.ram) def xxx(): return 'xxx' return Storage(locals()) (in models or controllers) local_import('my

[web2py] Re: great performance of web2py at the startup weekend dublin (Feb 25-27)

2011-02-28 Thread Massimo Di Pierro
P.S. The feedback you provided is great and will help make web2py better. Massimo On Feb 28, 8:18 pm, Massimo Di Pierro wrote: > Answers below: > > > On the other hand, the criticism could not be avoided... the first criticism > > came when a team member tried to connect a new app created with t

[web2py] Re: great performance of web2py at the startup weekend dublin (Feb 25-27)

2011-02-28 Thread Massimo Di Pierro
Answers below: > On the other hand, the criticism could not be avoided... the first criticism > came when a team member tried to connect a new app created with the wizard > to janrain as explained in the book and it didn't work (I've sent an email > about that to the list). wizard edits db.py so

[web2py] Re: web2py Debian packages available for testing

2011-02-28 Thread Massimo Di Pierro
Fantastic Jose! On Feb 28, 2:26 pm, José L. wrote: > Hello, > I've prepared the packages to install web2py in Debian or other Linux Debian > derivatives (as Knoppix, Ubuntu, Linex, etc.) > > The packages are available > at:http://people.debian.org/~jredrejo/web2py/lenny/for old releases with > p

[web2py] Re: how to use cache decorator within modules?

2011-02-28 Thread Massimo Di Pierro
Jonathan and I have a plan to make this easy but it will not be in until 1.93 or 1.94. On Feb 28, 3:12 pm, pbreit wrote: > Yeah, I'm having a hard time figuring out when and how to put stuff in > modules. And what the implications are of putting functions in /models.

[web2py] Re: Unable to Reference Tables with Capitalized Names in Version 1.92.1

2011-02-28 Thread Massimo Di Pierro
this is a bug. I will fix it tonight. Massimo On Feb 28, 10:23 am, surfnet3 wrote: > The following codes are not working in v1.92.1 but worked in some > previous versions: > > db.define_table( >     'Products', >     Field('name') >     ) > > db.define_table( >     'purchases', >     Field('prod

[web2py] Re: how to apply Web2py's @cache decorator to a function with multiple parameters

2011-02-28 Thread Carl
This works but doubles up on the number of functions needed. But by calling cache.ram directly I'm able to define a lambda function that uses the 'searchText' parameter. can anyone take this one step further? def search_user_contacts_cached(searchText): from applications.init.modules.user impo

[web2py] disable textbox based on criteria

2011-02-28 Thread greenpoise
what are my options to disable a textbox based on a criteria? also, is there such thing as creating a bunch of textboxes based on a criteria with the value going to a database Thanks d

[web2py] how to apply Web2py's @cache decorator to a function with multiple parameters

2011-02-28 Thread Carl
When I add @cache as below in my default.py @cache(request.env.path_info, 60, cache.ram) def search_user_contacts(searchText): from applications.init.modules.user import User user = User(globals()) contacts = user.find_contacts(searchText) return searchText, contacts I get a runti

[web2py] Re: new feature that could be very cool

2011-02-28 Thread Plumo
setting keepvalues=True would maintain that text box content http://web2py.com/book/default/chapter/07#keepvalues

[web2py] Re: IS_DATE_IN_RANGE & IS_NOT_IN_DB

2011-02-28 Thread greenpoise
I sort of found a solution to this problem by adding a payperiod date field on top on the from - to date fields..But now Field('hastafecha', 'date',default=midday,requires=IS_NOT_IN_DB(db,'db.timesheet.hastafecha')) is this validator accurate? it is not validating and I am getting double entries o

[web2py] great performance of web2py at the startup weekend dublin (Feb 25-27)

2011-02-28 Thread Sebastian E. Ovide
Hi All, Last weekend I had participated in the startup weekend Dublin ( http://dublin.startupweekend.org/) as a back end dev. I had shown my team how easy it is to use web2py if compared with Java or PHP. Few persons were not convinced and were proposing to use phpcake... So I gave a quick demo,

[web2py] SQLFORM factory field name problem

2011-02-28 Thread rāma
SQLFORM factory field name with underscore doesn't submit properly in the below case: SQLFORM.factory(Field('fieldname', - Submit OK SQLFORM.factory(Field('select_fieldname', - Submit failed got a None returned I think. just to add: form catches the session as well. Regards, Rama

[web2py] SQLFORM factory field name problem

2011-02-28 Thread rāma
SQLFORM factory field with underscore in them doesn't seem to submit properly for the below case:

[web2py] Re: Quick SQLFORM.factory question

2011-02-28 Thread DenesL
Your ifs are not properly nested but I think you want: if form.accepts(request.vars, session): #code to insert the record here elif form.errors: response.flash = 'Form has errors' And why are you using factory?. If you want to have control over the DB insertion do: form = SQLFORM(db.trav

[web2py] Re: web2py Debian packages available for testing

2011-02-28 Thread Gilson Filho Brazil
Congratulations! Good Job! On 28 fev, 18:22, Martín Mulone wrote: > Tested under Ubuntu 10.10, all seem to work fine. Very good job!. > > 2011/2/28 Tom Atkins > > > > > > > > > > > Excellent work!  Just tested on Ubuntu 10.04 and it works perfectly from my > > initial testing.  Having the menu a

Re: [web2py] Quick SQLFORM.factory question

2011-02-28 Thread contatogilson...@gmail.com
if form.acceps(request.vars,session): (...) else: (...) _ *Gilson Filho* *Web Developer http://gilsondev.com* 2011/2/28 Lennon > I think I must be missing something obvious. > > The form displays correctly and populates with the record/data

[web2py] Re: Insensitive case select ?

2011-02-28 Thread Alexandre Strzelewicz
Thanks, Its good good good, my backend is PostgreSQL and the ILIKE is case insensitive by default ! On Feb 28, 9:11 pm, DenesL wrote: > This depends on the DB backend, for example MSSQL is case insensitive > by default but there are several techniques to make it case > sensitive:http://vyaskn.t

Re: [web2py] web2py Debian packages available for testing

2011-02-28 Thread Martín Mulone
Tested under Ubuntu 10.10, all seem to work fine. Very good job!. 2011/2/28 Tom Atkins > Excellent work! Just tested on Ubuntu 10.04 and it works perfectly from my > initial testing. Having the menu automatically appear in Applications > > Programming is brilliant. > > > On 28 February 2011 20

[web2py] Quick SQLFORM.factory question

2011-02-28 Thread Lennon
I think I must be missing something obvious. The form displays correctly and populates with the record/data that I want it to populate with. But when I hit the submit button, it won't run the code under "if form.accepts". It just reloads the page with the same form and record and no insert has b

[web2py] Re: how to use cache decorator within modules?

2011-02-28 Thread pbreit
Yeah, I'm having a hard time figuring out when and how to put stuff in modules. And what the implications are of putting functions in /models.

Re: [web2py] web2py Debian packages available for testing

2011-02-28 Thread Tom Atkins
Excellent work! Just tested on Ubuntu 10.04 and it works perfectly from my initial testing. Having the menu automatically appear in Applications > Programming is brilliant. On 28 February 2011 20:26, José L. wrote: > Hello, > I've prepared the packages to install web2py in Debian or other Lin

[web2py] Re: Unable to Reference Tables with Capitalized Names in Version 1.92.1

2011-02-28 Thread surfnet3
Those codes were working fine under Version 1.90.6 and 1.86.2. Is there any restriction in SQL/SQLite/web2py regarding to first- letter-capitalization table names? Moreover, the first letter of a field name can't be capitalized neither under the new version. On Feb 28, 3:15 pm, DenesL wrote: >

Re: [web2py] Re: should this be in the scaffolding app?

2011-02-28 Thread Lucas D'Avila
+1 -- Lucas D'Avila http://flavors.me/lucasdavila Sent from my phone Em 28/02/2011 17:26, "Anthony" escreveu: > +1

[web2py] Re: calendar.monthrange formatting

2011-02-28 Thread greenpoise
firstday=datetime.date(anio,mes,sov[0]) did it. On Feb 28, 12:43 pm, greenpoise wrote: > Nevermind, got it. > > thanks anyways > > d > > On Feb 28, 12:34 pm, greenpoise wrote: > > > > > I am trying to use the calendar.monthrange function to return the last > > weekday of the month but my dat

[web2py] Re: calendar.monthrange formatting

2011-02-28 Thread greenpoise
Nevermind, got it. thanks anyways d On Feb 28, 12:34 pm, greenpoise wrote: > I am trying to use the calendar.monthrange function to return the last > weekday of the month but my datefield in my model, wont accept 2 > (february), it needs 02. > > now = datetime.datetime.now() > mes = now.month

[web2py] calendar.monthrange formatting

2011-02-28 Thread greenpoise
I am trying to use the calendar.monthrange function to return the last weekday of the month but my datefield in my model, wont accept 2 (february), it needs 02. now = datetime.datetime.now() mes = now.month anio = now.year sov=calendar.monthrange(anio,mes) how could I format this with a current d

[web2py] web2py Debian packages available for testing

2011-02-28 Thread José L .
Hello, I've prepared the packages to install web2py in Debian or other Linux Debian derivatives (as Knoppix, Ubuntu, Linex, etc.) The packages are available at: http://people.debian.org/~jredrejo/web2py/lenny/ for old releases with python 2.5 as default python version. http://people.debian.org/

[web2py] Re: should this be in the scaffolding app?

2011-02-28 Thread Anthony
+1

[web2py] Re: should this be in the scaffolding app?

2011-02-28 Thread DenesL
The hover coloring of pill buttons is iffy but other than that it looks nice. On Feb 28, 2:43 pm, Massimo Di Pierro wrote: > http://css3buttons.michaelhenriksen.dk/

Re: [web2py] Re: Unable to Reference Tables with Capitalized Names in Version 1.92.1

2011-02-28 Thread Richard Vézina
Sorry I miss read... I thought you were asking if it will works if you use products instead of Products. ;-) Richard On Mon, Feb 28, 2011 at 3:15 PM, DenesL wrote: > > There has been quite a few posts/complaints around this. > Why was this changed? (if it was... I have not checked) > > > On Feb

Re: [web2py] should this be in the scaffolding app?

2011-02-28 Thread contatogilson...@gmail.com
Beautiful! +1 _ *Gilson Filho* *Web Developer http://gilsondev.com* 2011/2/28 Albert Abril > Me too. > +1 > > > On Mon, Feb 28, 2011 at 8:51 PM, Martín Mulone wrote: > >> Yes I like it, >> >> 2011/2/28 Massimo Di Pierro >> >>> http://css3buttons.mic

[web2py] Re: Unable to Reference Tables with Capitalized Names in Version 1.92.1

2011-02-28 Thread DenesL
There has been quite a few posts/complaints around this. Why was this changed? (if it was... I have not checked) On Feb 28, 11:23 am, surfnet3 wrote: > The following codes are not working in v1.92.1 but worked in some > previous versions: > > db.define_table( > 'Products', > Field('name

Re: [web2py] Unable to Reference Tables with Capitalized Names in Version 1.92.1

2011-02-28 Thread Richard Vézina
try! Richard On Mon, Feb 28, 2011 at 11:23 AM, surfnet3 wrote: > The following codes are not working in v1.92.1 but worked in some > previous versions: > > db.define_table( >    'Products', >    Field('name') >    ) > > db.define_table( >    'purchases', >    Field('product_id', db.Products) >  

[web2py] Re: Insensitive case select ?

2011-02-28 Thread DenesL
This depends on the DB backend, for example MSSQL is case insensitive by default but there are several techniques to make it case sensitive: http://vyaskn.tripod.com/case_sensitive_search_in_sql_server.htm On Feb 28, 12:45 pm, Alexandre Strzelewicz wrote: > Can we do an insensitive case query se

Re: [web2py] should this be in the scaffolding app?

2011-02-28 Thread Albert Abril
Me too. +1 On Mon, Feb 28, 2011 at 8:51 PM, Martín Mulone wrote: > Yes I like it, > > 2011/2/28 Massimo Di Pierro > >> http://css3buttons.michaelhenriksen.dk/ > > > > > -- > Pablo Martín Mulone (mar...@tecnodoc.com.ar) > http://www.tecnodoc.com.ar/ > Paraná, Entre Ríos, Argentina (CP 3100). > >

Re: [web2py] should this be in the scaffolding app?

2011-02-28 Thread Martín Mulone
Yes I like it, 2011/2/28 Massimo Di Pierro > http://css3buttons.michaelhenriksen.dk/ -- Pablo Martín Mulone (mar...@tecnodoc.com.ar) http://www.tecnodoc.com.ar/ Paraná, Entre Ríos, Argentina (CP 3100). My blog: http://martin.tecnodoc.com.ar Expert4Solution Profile: http://www.experts4solut

[web2py] should this be in the scaffolding app?

2011-02-28 Thread Massimo Di Pierro
http://css3buttons.michaelhenriksen.dk/

[web2py] Unable to Reference Tables with Capitalized Names in Version 1.92.1

2011-02-28 Thread surfnet3
The following codes are not working in v1.92.1 but worked in some previous versions: db.define_table( 'Products', Field('name') ) db.define_table( 'purchases', Field('product_id', db.Products) ) It would work fine if the table name changed to 'products' instead.

[web2py] new feature that could be very cool

2011-02-28 Thread Richard Vézina
Hello, I thought a nice addition for users that have to do data entry, would have a way to save data in memory. For example, a user does not know the value entry for a field that can not be null, but he grabbed a long comment in a text box. He does not want to have to enter a second time and that

[web2py] Insensitive case select ?

2011-02-28 Thread Alexandre Strzelewicz
Can we do an insensitive case query select with web2py ? Thanks

[web2py] Re: using oembed to embed videos in a web2py blog

2011-02-28 Thread Christopher Steel
plugin_wiki works well with youtube based videos... On Feb 27, 5:54 am, JagChris wrote: > I have been trying to figure out how to do this, but i can't seem to > go anywhere with it. How do i use this to embed videos in a form

[web2py] Re: how to use cache decorator within modules?

2011-02-28 Thread Anthony
This is cool. I think your TimeClock example is essentially the pattern used for the web2py Mail, Auth, and Crud classes. It might be useful to include a section in the book about this pattern (or at least a web2py slice). Anthony On Monday, February 28, 2011 11:14:04 AM UTC-5, Ross Peoples wr

[web2py] Re: how to use cache decorator within modules?

2011-02-28 Thread Ross Peoples
I've always read that if you needed to centralize your logic, that you should use modules instead of trying to do it in a model or trying to wire up one controller to another. I used global settings as an example, as you might need access to these settings in every controller, and duplicating th

[web2py] Re: how to use cache decorator within modules?

2011-02-28 Thread Carl
thanks Ross - very interesting. Is there a pattern that the Web2py framework implements out of the box? is the use of modules encouraged by the design of the framework? On Feb 28, 2:44 pm, Ross Peoples wrote: > I don't know how anyone else handles this, but I have been setting up things > like g

[web2py] Re: how to use cache decorator within modules?

2011-02-28 Thread Ross Peoples
I don't know how anyone else handles this, but I have been setting up things like global settings in modules like this: class GlobalSettings: @staticmethod def get_settings(db, cache: return cache.ram('globalsettings', lambda: GlobalSettings._get_settings_from_db(db), time_expire

[web2py] Re: selection by key

2011-02-28 Thread Massimo Di Pierro
If you do not like a button you can have a link: {{=row.affirm_pkey}} On Feb 28, 1:04 am, darkblue_b wrote: > I see, it makes a button per ID > works for now.. thx!  -Brian

[web2py] how to use cache decorator within modules?

2011-02-28 Thread Carl
I'd like to use cache/memcache within my module files. Example: in db.py when request.env.web2py_runtime_gae I set this: cache.ram = cache.disk = cache.memcache In my module (lineitem.py): #1 class Lineitem(): def __init__(self, db, T=None): self.db = db self.T = T @cac

[web2py] Re: Multiple Column Unique Fields

2011-02-28 Thread Ross Peoples
I know how to do this at the database level, but since web2py controls the table structure, my problem was that web2py doesn't generate the code you mentioned. But thanks.

[web2py] Powertable 'id' -error

2011-02-28 Thread Johann Spies
My controller: def pwrtable(): powerTable.dtfeatures['sScrollY'] = '100%' powerTable.dtfeatures['sScrollX'] = '100%' powerTable.headers = 'fieldname:capitalize' powerTable.showkeycolumn = False powerTable.dtfeatures['bJQueryUI'] = request.vars.get('jqueryui',True) powerTab

[web2py] Re: Redirect & response.flash

2011-02-28 Thread puercoespin
Very useful information. Thanks Jonathan On 25 feb, 17:11, Jonathan Lundell wrote: > On Feb 25, 2011, at 2:02 AM, SergeyPo wrote: > > > > > Hello everyone! > > > I want to do something like: > > > def selector(): > >    try: > >        x = db.headers[request.vars.ID] > >        if x is None: > >

Re: [web2py] Powertables: wrapping text

2011-02-28 Thread Johann Spies
On 25 February 2011 23:43, Bruno Rocha wrote: > table = plugins.powerTable > table.truncate = 255 # the number of chars to truncate > > > Thanks! Regards Johann -- May grace and peace be yours in abundance through the full knowledge of God and of Jesus our Lord! His divine power has given us

Re: [web2py] Re: Don't you think the "appadmin" thing can be better named as "dbadmin"?

2011-02-28 Thread Martín Mulone
Also be carefull with wsgi-apache deployment, with the given script, take a look on the apache configuration looking for /appadmin. 2011/2/28 Anthony > On Sunday, February 27, 2011 9:40:03 PM UTC-5, mart wrote: >> >> well, I have to check... Naturally (and there is always a chance - I'm >> actua