[web2py:22805] Re: Auto_complete widget.

2009-05-27 Thread annet . vermeer
Iceberg, Thanks for the hint. Adding requires=self.requires to the widget solved the problem partially. The problem is now reduced to: when the user clicks the link the update_adress function is called: which displays an update/delete form, in which the plaats field is empty. Kind regard

[web2py:22804] Re: Architecture question: can I use Web2py template engine to generate emails?

2009-05-27 Thread annet . vermeer
Massimo, Thanks for your explanation. Annet. On May 27, 6:28 pm, mdipierro wrote: > It depends on who sends the email. If an action triggered by a web > request does, then the code goes in the action. If you want a > backrgound script to send the emails then you put the code in > script.py a

[web2py:22803] Re: SQLRows: no such row

2009-05-27 Thread annet . vermeer
Denes, Thanks for your explanation. 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 group,

[web2py:22802] Re: Foreign key notnull constraint

2009-05-27 Thread annet . vermeer
Massimo, Vihang is right. In my model I defined the following table: db.define_table('adres', SQLField('bedrijf', db.bedrijf, default='', notnull=True), SQLField('adressoort', length=30, default='Vestigingsadres', notnull=True), SQLField('straat', length=42, default='', notnull=True)

[web2py:22801] Re: Auto_complete widget.

2009-05-27 Thread Iceberg
Perhaps because your customized widget does not contain any "requires" restriction? I assume web2py still need that when doing form.accepts (...) My experience is try to use a subclass of the original widget whenever possible. On May 27, 8:01 pm, annet.verm...@gmail.com wrote: > The auto_complet

[web2py:22800] Re: experimental: decimal and pickable and custom columns

2009-05-27 Thread Iceberg
This is something about your design, not about the web2py. You may, for example, define your "rules" table, and let your app's user (ok, "maybe he is a system administrator") to define new rules. But after all, these rules are logically stored as data inside web2py's db. Then, you may define speci

[web2py:22799] Re: Issue with DAL? (Probably me though)

2009-05-27 Thread JohnMc
Yes, very right about that. On May 27, 11:19 pm, mdipierro wrote: > Technically this is correct because > > Adam > M > McGinnis > > Technically "M" is before "McGinnis". > > You should use (lastname<"N") to include "McGinnis" > > Notice that the selection is done by the database (sqlite) not web

[web2py:22795] Re: Issue with DAL? (Probably me though)

2009-05-27 Thread mdipierro
Technically this is correct because Adam M McGinnis Technically "M" is before "McGinnis". You should use (lastname<"N") to include "McGinnis" Notice that the selection is done by the database (sqlite) not web2py. Massimo On May 27, 10:50 pm, JohnMc wrote: > I have the following: > > Model:

[web2py:22798] Re: Possible bug with Oracle.

2009-05-27 Thread Mariano Mara
2009/5/28 SergeyPo > > My vote for it too, I've reported this problem before. > > Sergey Sorry I missed it: seems I didn't search enough. > > > On May 28, 8:13 am, Mariano Mara wrote: > > G'night everyone. > > > > I'm defining a table like this: > > > > db.define_table("BillHourType", SQLFie

[web2py:22797] Re: Possible bug with Oracle.

2009-05-27 Thread SergeyPo
My vote for it too, I've reported this problem before. Sergey On May 28, 8:13 am, Mariano Mara wrote: > G'night everyone. > > I'm defining a table like this: > > db.define_table("BillHourType", SQLField("hourtype", db.HourType), >                                 SQLField("billtype", db.Billable

[web2py:22796] Re: linuxjournal

2009-05-27 Thread JohnMc
Kudos. Next year, they do a whole article on Web2Py!! On May 27, 7:02 pm, Richard wrote: > "web2py looks very promising"! > > On May 28, 9:33 am, mdipierro wrote: > > >http://www.linuxjournal.com/content/introducing-three-python-web-fram... --~--~-~--~~~---~--~~

[web2py:22794] Possible bug with Oracle.

2009-05-27 Thread Mariano Mara
G'night everyone. I'm defining a table like this: db.define_table("BillHourType", SQLField("hourtype", db.HourType), SQLField("billtype", db.BillableType), SQLField("startdate", type='date', r

[web2py:22793] Issue with DAL? (Probably me though)

2009-05-27 Thread JohnMc
I have the following: Model: dbhlx=SQLDB("sqlite://contacts.db") dbhlx.define_table('contact', dbhlx.Field('firstname'), dbhlx.Field('lastname')) Using the Web2Py command line -- The complete data set -- In [64]: rows = dbhlx((dbhlx.contact.id>0)).select (dbhlx

[web2py:22792] Re: Is there a way to place apps in a separate directory from the "applications" directory?

2009-05-27 Thread Eddie Eyles
I think Christopher and Saber have good points here. Any application should be flexible about where its data is stored. There are many good potential reasons for wanting to separate the respective locations of application and data. The symbolic link solution, while offering just a little flexib

[web2py:22791] Re: Spatial???

2009-05-27 Thread haftish21
gluon/validators.py << Again 10Q! I know, what is removed is the full version of the manual which was @: http://www.scribd.com/word/removal/15508739 but the manual @: http://web2py.com/examples/default/docs seems not complete, I'm using it though. U know, I want 2 dig it all!!! I would still

[web2py:22790] Re: Multiple Form Best Practise

2009-05-27 Thread Yannick
Thanks a lot Dlypka... I tried so many things except that one... IT IS WORKING... Thanks Massimo, please don't waste your precious time looking to my code... Thanks to you guys for your hints... Yannick P. On May 27, 2:02 am, dlypka wrote: > Maybe > value="{{=profileSet["formsetting"].latest.

[web2py:22789] Re: minor tweaks to get CSV and JSON output working

2009-05-27 Thread Dan
> > Then I copied these template files from /applications/welcome/views/ > > but they do not show up in the admin/default/design/app web page for > > my app: > > generic.json > > generic.rss > > generic.xml > > And in fact when I tried to use the web interface to create a new > > view, it insisted

[web2py:22788] Re: linuxjournal

2009-05-27 Thread Richard
"web2py looks very promising"! On May 28, 9:33 am, mdipierro wrote: > http://www.linuxjournal.com/content/introducing-three-python-web-fram... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework"

[web2py:22787] Re: Tutorial Problem

2009-05-27 Thread mdipierro
I think we need a new cookbook. Any volunteer to rewrite it? Massimo On May 27, 5:42 pm, Fran wrote: > On 27 May, 21:31, Ron wrote: > > > Completely new to web2py. Problems just getting through the "cookbook" > > tutorial: > > Page 8 says to create a new db.py. There was already a db.py, and t

[web2py:22786] Re: Architecture question: can I use Web2py template engine to generate emails?

2009-05-27 Thread mdipierro
can you post an example? I am confused. On May 27, 5:15 pm, Carl wrote: > it's got me puzzled too. > > the text I have in my view is used but it's prefixed response.write( > and carriage returns are converted to \r\n > > a dict in my view is displayed in emails as > response.write(absurl) > > C

[web2py:22785] Re: minor tweaks to get CSV and JSON output working

2009-05-27 Thread mdipierro
On May 27, 4:56 pm, Dan wrote: > Hello Massimo and others- > > I just upgraded from version 1.62 to 1.63 and tried to get the CSV and > JSON output to work, and ran into a few small issues that I thought > could be fixed. It works, after a bit of tweaking. > > As suggested, I copied the content

[web2py:22784] Re: Foreign key notnull constraint

2009-05-27 Thread mdipierro
Did you add the NOT NULL later? On May 27, 2:37 pm, vihang wrote: > the particular column created in postgres does not have the NOT NULL > set to true. > > On May 27, 10:10 pm, mdipierro wrote: > > > What do you mean it does not make it nonull? > > > On May 27, 11:55 am, vihang wrote: > > > >

[web2py:22783] linuxjournal

2009-05-27 Thread mdipierro
http://www.linuxjournal.com/content/introducing-three-python-web-frameworks --~--~-~--~~~---~--~~ 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

[web2py:22782] Re: Tutorial Problem

2009-05-27 Thread Fran
On 27 May, 21:31, Ron wrote: > Completely new to web2py. Problems just getting through the "cookbook" > tutorial: > Page 8 says to create a new db.py. There was already a db.py, and this > seemed to create errors. I deleted the old one and created a new one. > Is that correct? Fine :) > After c

[web2py:22781] Re: IS_NOT_IN_DB on GAE

2009-05-27 Thread Carl
thanks M; a cleaner approach that I will adopt had read about commit; thanks for confirming my understanding that I can remove it C mdipierro wrote: > I would go for > > records=self.db(self.db.user.email==email).select() > if not records: > self.db.user.insert(email=email,greet=True) > el

[web2py:22780] Re: Architecture question: can I use Web2py template engine to generate emails?

2009-05-27 Thread Carl
it's got me puzzled too. the text I have in my view is used but it's prefixed response.write( and carriage returns are converted to \r\n a dict in my view is displayed in emails as response.write(absurl) C mdipierro wrote: > ? > > why response.write( ... escape=False) ? > > On May 27, 12:13 pm

[web2py:22779] Re: Is there a way to place apps in a separate directory from the "applications" directory?

2009-05-27 Thread Saber Rastikerdar
hi. i'm thinking of local user applications in ~/.exapp. suppose that main application runs in every user session and can load apps in their home directory. can we dynamically set applications directory? i mean having multiple application directories. sorry i don't want to make things complex. j

[web2py:22778] Tutorial Problem

2009-05-27 Thread Ron
Completely new to web2py. Problems just getting through the "cookbook" tutorial: Page 8 says to create a new db.py. There was already a db.py, and this seemed to create errors. I deleted the old one and created a new one. Is that correct? After creating the new db.py, I entered the tutorial db c

[web2py:22777] minor tweaks to get CSV and JSON output working

2009-05-27 Thread Dan
Hello Massimo and others- I just upgraded from version 1.62 to 1.63 and tried to get the CSV and JSON output to work, and ran into a few small issues that I thought could be fixed. It works, after a bit of tweaking. As suggested, I copied the contents of my app's folder to the new version's tree

[web2py:/] Re: How to customize authorisation

2009-05-27 Thread captainy
Okay, but where do i - rename the login_name as 'username' ? - replace the label with 'login_name' ? it seems that auth.module produces its own html.form and i dont know where i can modify this behaviour. Thanks a lot Paul On 26 Mai, 19:32, mdipierro wrote: > I suggest you rename the login_nam

[web2py:22775] Re: How to customize authorisation

2009-05-27 Thread Fran
On May 27, 9:54 pm, captainy wrote: > Okay, but where do i > - rename  the login_name as 'username' ? Look at tools.py +616 auth.settings.table_user should point to your table containing usernames/passwords. If there is a field called 'username' in this table then that is what is used for login.

[web2py:22774] Re: Spatial???

2009-05-27 Thread Fran
On May 26, 11:42 pm, haftish21 wrote: > I'm not sure if u can access it, take a look @ my first attempt to > build Personal Geo-website (a marked class assignmet) > http://itcnt07/~tsega19167/module10/index.html ** server can't find www.itcnt07.com: NXDOMAIN > On May 27, 12:37 am, haftish21 wr

[web2py:22773] Re: How to customize authorisation

2009-05-27 Thread captainy
Okay, but where do i - rename the login_name as 'username' ? - replace the label with 'login_name' ? it seems that auth.module produces its own html.form and i dont know where i can modify this behaviour. Thanks a lot Paul On 26 Mai, 19:32, mdipierro wrote: > I suggest you rename the login_nam

[web2py:22772] Re: How to customize authorisation

2009-05-27 Thread captainy
Okay, but where do i - rename the login_name as 'username' ? - replace the label with 'login_name' ? it seems that auth.module produces its own html.form and i dont know where i can modify this behaviour. Thanks a lot Paul On 26 Mai, 19:32, mdipierro wrote: > I suggest you rename the login_nam

[web2py:22771] Multiple=True & IS_NULL_OR()

2009-05-27 Thread Fran
When creating a UI to optionally set permissions on certain objects I want to do: db[table].access.requires = IS_NULL_OR(IS_IN_DB(db, 'auth_group.id', 'auth_group.role', multiple=True)) However this breaks the Multi-select widget. Now obviously if one of the tags is 'NULL' then it wouldn't make

[web2py:22770] Re: Decimals again

2009-05-27 Thread Michal Jursa
MYSQL spec: For DECIMAL(M,D), the maximum M is 65 create: CREATE TABLE foo( bar decimal(10,2) ) POSTGRESQL spec: DECIMAL(M,D), exact, no limit create: CREATE TABLE foo( bar decimal(10,2) ) DenesL napsal(a): > Lets document the support for decimal type in the available DBs (my $. > 02): > > p=

[web2py:22769] Re: Foreign key notnull constraint

2009-05-27 Thread vihang
the particular column created in postgres does not have the NOT NULL set to true. On May 27, 10:10 pm, mdipierro wrote: > What do you mean it does not make it nonull? > > On May 27, 11:55 am, vihang wrote: > > > Hi, > > > The following does not make the foreign key field notnull (in > > postgre

[web2py:22768] Re: Decimals again

2009-05-27 Thread DenesL
Lets document the support for decimal type in the available DBs (my $. 02): p=precision, s=scale, [means optional] ---DB -syntax- --limits--- --dft-- MSSQL2005 decimal[(p[,s])] 0<=s<=p<=38 18,0 DB2/400 " 1<=s<=p<=31 5,0 --~--~-~--~~

[web2py:22767] Re: Form elements

2009-05-27 Thread Elcimar L. Santos
Wow, thanks! Atenciosamente, Elcimar Leandro - http://elcimar.blogspot.com Portal Net Fácil - http://www.nfacil.com.br 2009/5/23 Pystar > > You can try this: > * Model.py *** > db.define_table("Foo", > db.Field("foo1", "string", length=32, default=None

[web2py:22766] Re: Architecture question: can I use Web2py template engine to generate emails?

2009-05-27 Thread mdipierro
? why response.write( ... escape=False) ? On May 27, 12:13 pm, Carl wrote: > I've implemented the code but am one step away from a working > solution. > > The variable message contains text "response.write( ... escape=False)" > for each section of text and for each dictionary item I use in my >

[web2py:22765] Re: IS_NOT_IN_DB on GAE

2009-05-27 Thread mdipierro
I would go for records=self.db(self.db.user.email==email).select() if not records: self.db.user.insert(email=email,greet=True) else records[0].update_record(greet=True) commit is implicit on relational database and useless on GAE. On May 27, 11:49 am, Carl wrote: > This guy said so las

[web2py:22764] Re: Problems with the controller for the Soved Exercises

2009-05-27 Thread mdipierro
You have an extra space after % > '% (apellido)s %(nombre)s') should be '%(apellido)s %(nombre)s') On May 27, 10:32 am, Offray Vladimir Luna Cárdenas wrote: > Hi all, > > Sorry for not putting this in the proper thread, but google groups seems > not behave nicely for people without google acco

[web2py:22763] Re: Foreign key notnull constraint

2009-05-27 Thread mdipierro
What do you mean it does not make it nonull? On May 27, 11:55 am, vihang wrote: > Hi, > > The following does not make the foreign key field notnull (in > postgres) > > db.define_table("Purchase_Invoice_Details", >       db.Field("id_Purchase_Invoice", db.Purchase_Invoice, > notnull=True, ondelet

[web2py:22762] Problems with the controller for the Soved Exercises

2009-05-27 Thread Offray Vladimir Luna Cárdenas
Hi all, Sorry for not putting this in the proper thread, but google groups seems not behave nicely for people without google accounts, so I'm not getting your answers in my inbox, despite of the fact that I'm a register user and I can post to the list. I tried the suggestion about using db.ej

[web2py:22761] Re: Architecture question: can I use Web2py template engine to generate emails?

2009-05-27 Thread Carl
I've implemented the code but am one step away from a working solution. The variable message contains text "response.write( ... escape=False)" for each section of text and for each dictionary item I use in my view. any thoughts? C On May 27, 12:16 pm, mdipierro wrote: > You can use the web2py

[web2py:22760] Foreign key notnull constraint

2009-05-27 Thread vihang
Hi, The following does not make the foreign key field notnull (in postgres) db.define_table("Purchase_Invoice_Details", db.Field("id_Purchase_Invoice", db.Purchase_Invoice, notnull=True, ondelete='CASCADE'), db.Field("Part_Number","string")) any help. Thanks Vihang --~--~-~

[web2py:22759] Re: Decimals again

2009-05-27 Thread Kuba Kucharski
'If you really need to store Decimals values, and do some op on them in the database, just do *not* use SQLite' This is a quote from an sqlalchemy group.. We need an exception, an error occuring when trying to use decimal on sqlite or we implement decimal as float in sqlite(sqlalchemy default whe

[web2py:22758] Re: IS_NOT_IN_DB on GAE

2009-05-27 Thread Carl
This guy said so last May: http://tr.im/mzuv :) Sounds like the statement is out of date (if so... can you point me to the most up to date source on this subject?). I've used GAE's Data Viewer where I see that multiple entries exist with the same email address. On my dev version I can use web2py'

[web2py:22757] Re: Architecture question: can I use Web2py template engine to generate emails?

2009-05-27 Thread mdipierro
It depends on who sends the email. If an action triggered by a web request does, then the code goes in the action. If you want a backrgound script to send the emails then you put the code in script.py and run it with web2py.py -S yourapp -M -R /path/to/your/script.py the context is dictionary wi

[web2py:22756] Re: IS_NOT_IN_DB on GAE

2009-05-27 Thread mdipierro
IS_NOT_IN_DB works on GAE, who said it does not? On May 27, 10:57 am, Carl wrote: > As IS_NOT_IN_DB isn't implemented on GAE does anyone know what an > alternative implementation on the App Engine is? > > I'm wanting rows to have unique email addresses. Is there a solution > on GAE or do I chan

[web2py:22755] Re: Decimals again

2009-05-27 Thread mdipierro
it would help if somebody explains to me how sqlalchemy handles it with sqlite and systems that does not support it. On May 27, 9:16 am, Michal Jursa wrote: > +1 !! exactly ;) > > Kuba Kucharski wrote: > > Stay with web2py! I have the same problem. I've decided to wait. > > Decimal is a must. We

[web2py:22754] Re: Architecture question: can I use Web2py template engine to generate emails?

2009-05-27 Thread annet . vermeer
In one of my applications I have an e-mail form, which for a lack of knowledge is sent to my mail box using the following code in the function: mail.send(to=['annet.v...@gmail.com'], subject=form.vars.onderwerp, message=form.vars) In db.py I have got: from gluon.tools import Mail mail=Mail()

[web2py:22753] IS_NOT_IN_DB on GAE

2009-05-27 Thread Carl
As IS_NOT_IN_DB isn't implemented on GAE does anyone know what an alternative implementation on the App Engine is? I'm wanting rows to have unique email addresses. Is there a solution on GAE or do I change the question and consequently, implementation? --~--~-~--~~~--

[web2py:22752] Re: SQLRows: no such row

2009-05-27 Thread DenesL
On May 27, 10:46 am, annet.verm...@gmail.com wrote: > However, this: > > record=db.adres[request.args[0]] > > is not equivalent to: > > record=db(db.adres.id==request.args[0]).select(db.adres.bedrijf) > > Why not? The former gets the whole record (including lambda function update_record). The la

[web2py:22751] Re: Sorting a dropbox

2009-05-27 Thread annet . vermeer
Massimo and Denes, Both solutions work on Mac OS X Leopard Server. Thanks. 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@googlegroup

[web2py:22749] Re: Is there a way to place apps in a separate directory from the "applications" directory?

2009-05-27 Thread Kuba Kucharski
unix thinking;) Let's say we would have solution for this. That means that 'the path' should be placed in a configuration outside 'applications'.. and outside web2py folder(since you need to do upgrades etc..). This means we should also have some standard place for configuration.. /etc..?:) This

[web2py:22750] Re: Is there a way to place apps in a separate directory from the "applications" directory?

2009-05-27 Thread cesmiga
Ok! I've been thinking about some of the things we discussed in this thread and it must remain simple. I'll stick with the sym link idea since anything else is more complex. After all, the reason we love "Web2Py" is because development practice utilizes the KIS (Keep It Simple) method. Thanks f

[web2py:22748] Re: Is there a way to place apps in a separate directory from the "applications" directory?

2009-05-27 Thread cesmiga
Kuba, The reason is to separate Web2Py from developed applications. The same idea is usually done with databases. Separate the data (in this case Web2Py apps) from the application (Web2Py). This should ease with upgrades and other administration/development tasks. Christopher Kuba Kucharski

[web2py:22747] Re: SQLRows: no such row

2009-05-27 Thread annet . vermeer
Massimo, Your suggested code solved the problem, thanks. This: record=db.mytable[myrecord] is equivalent to: db(db.mytable.id==myrecord).select()[0] and in my case: record=db(db.adres.id==record_id).select(db.adres.bedrijf)[0] However, this: record=db.adres[request.args[0]] is not equ

[web2py:22746] Re: Is there a way to place apps in a separate directory from the "applications" directory?

2009-05-27 Thread Kuba Kucharski
What is the purpose? could you explain more? -- Kuba --~--~-~--~~~---~--~~ 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 th

[web2py:22745] Re: Is there a way to place apps in a separate directory from the "applications" directory?

2009-05-27 Thread cesmiga
Virhilo, I was thinking about this approach, but was hoping for a more customizable method via web2py. Is there another way to do this aside from a sym link? Christopher virhilo wrote: > ln -s /opt/web2py_apps /opt/web2py/applications/ > > On 27 Maj, 15:55, cesmiga wrote: > > All: > > > > I've

[web2py:22744] Re: Decimals again

2009-05-27 Thread Michal Jursa
+1 !! exactly ;) Kuba Kucharski wrote: > Stay with web2py! I have the same problem. I've decided to wait. > Decimal is a must. Web2py is not an enterprise framework until we have it ;) > --~--~-~--~~~---~--~~ You received this message because you are subscribed t

[web2py:22743] Re: Decimals again

2009-05-27 Thread Kuba Kucharski
Stay with web2py! I have the same problem. I've decided to wait. Decimal is a must. Web2py is not an enterprise framework until we have it ;) -- Kuba --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Fram

[web2py:22742] Re: jPolite solved (almost) all our problems

2009-05-27 Thread murray3
Jpolite works with javascript code running in modules as I have FCKeditor running in one of the modules. I installed jquery jmaps and I have it referenced in the layout.html and the google script with key for localhost. I also tried this previously just using standard google maps insertion code.

[web2py:22741] Re: Decimals again

2009-05-27 Thread Michal Jursa
Problem is I want to leave some logic also in db (triggers etc) and then i come to trouble if i need to do some calculations in db. STR + STR in db is not the right way to be done in SQL. I can handle these str<->decimal conversions in any program, but i also need fully functional database and

[web2py:22740] Re: Is there a way to place apps in a separate directory from the "applications" directory?

2009-05-27 Thread virhilo
ln -s /opt/web2py_apps /opt/web2py/applications/ On 27 Maj, 15:55, cesmiga wrote: > All: > > I've been looking around and was wondering if there is a way to place > apps in a separate directory from the "applications" directory? > > From: > /opt/web2py/applications > > To: > /opt/web2py_apps > >

[web2py:22739] Is there a way to place apps in a separate directory from the "applications" directory?

2009-05-27 Thread cesmiga
All: I've been looking around and was wondering if there is a way to place apps in a separate directory from the "applications" directory? From: /opt/web2py/applications To: /opt/web2py_apps Thank you, Christopher --~--~-~--~~~---~--~~ You received this message

[web2py:22738] Re: Decimals again

2009-05-27 Thread mdipierro
That is not what I said. I said that it is not possible to implement decimal in a way that behaves the same way with database backend systems that support decimal nativly and those that do not. My suggestion is, for now, use 'string' but convert the values to decimal.Decimal() before using them i

[web2py:22737] Re: Rows disappearing after update

2009-05-27 Thread mdipierro
I do not know. may have to do with different on commit behavior. On May 27, 7:44 am, annet.verm...@gmail.com wrote: > Massimo, > > Thanks, problem solved! But why did it work in SQLite and doesn't it > work in Postrgesql? > > Annet. --~--~-~--~~~---~--~~ You rece

[web2py:22736] Re: Decimals again

2009-05-27 Thread Michal Jursa
I know about trunk solution, but you've recently said you dont like to implement decimals at all. Or may be I miunderstood you..:) You think it is fine to start with trunk version and one day it will become stable? Coz thats the only thing that really holds me back from using web2py in 'real'

[web2py:22735] Re: Rows disappearing after update

2009-05-27 Thread annet . vermeer
Massimo, Thanks, problem solved! But why did it work in SQLite and doesn't it work in Postrgesql? Annet. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send ema

[web2py:22734] Re: Behavior of Enter key in an "ajaxified" input field

2009-05-27 Thread Vincent Borghi
Thanks, the workaround you suggest works! On Wed, May 27, 2009 at 2:19 PM, Horst Herb wrote: > Had the same problem, this worked for me: > >  Search for: http://groups.google.com/group/web2py?hl=en -~--~~~~--~~--~--~---

[web2py:22733] Re: SQLRows: no such row

2009-05-27 Thread mdipierro
This is wrong record_id=request.args[0] record=db(db.adres.id==record_id).select(db.adres.bedrijf)[0] if not record: redirect(URL(r=request,f='crud_address')) elif not record.bedrijf==auth.user.bedrijf: redirect(URL(r=request,f='crud_address')) because the resul

[web2py:22732] SQLRows: no such row

2009-05-27 Thread annet
In this post: http://groups.google.com/group/web2py/browse_thread/thread/8d78f8f9a7f1d553/e72789761c7c43a9#e72789761c7c43a9 I described the following problem: When the user clicks the link in the view: {{=A(T('update/delete'),_href=URL(r=request,f='update_address',args= [record.id]))}}

[web2py:22731] Re: Rows disappearing after update

2009-05-27 Thread mdipierro
I am not sure wehther this is the only issue but you do not accept a crud form, they are already accepted automatically. Try this code def crud_address(): response.functionname= T('CRUD adres') db.adres.bedrijf.writable=False db.adres.bedrijf.default=auth.user.bedrijf form=crud.cr

[web2py:22730] Re: Sorting a dropbox

2009-05-27 Thread mdipierro
I had forgotten about this. Actually should be db.openingstijd.dag.requires=IS_IN_DB(db, db.dag.id, '%(naam) s',orderby=db.dag.id) Denes suggestion works too but not on GAE. Massimo On May 27, 6:27 am, DenesL wrote: > Hi Annet, > > use: > > db.openingstijd.dag.requires=IS_IN_DB(db, db.dag.id

[web2py:22729] Re: Decimals again

2009-05-27 Thread mdipierro
In trunk this is already implemented http://groups.google.com/group/web2py/browse_thread/thread/13d9e9fd7334b679 But it is experimental. If you really want a date for a stable Decimal API in DAL, I can Say July 31 but it may be done sooner. Masssimo On May 27, 6:53 am, Michal Jursa wrote: >

[web2py:22728] Re: Behavior of Enter key in an "ajaxified" input field

2009-05-27 Thread Horst Herb
On Wed, May 27, 2009 at 9:46 PM, Vincent Borghi wrote: > Thanks for the prompt suggestion, but it does not work. > With this code, both Enter key and submit button have the same bad > behavior: they just run a GET of the same current URL ("searchform"), > without passing parameters... > > Other i

[web2py:22727] Re: Rows disappearing after update

2009-05-27 Thread annet . vermeer
Has this problem already been solved? I am developing my application on Mac OS X Leopard in web2py version 1.61.4, and did not experience any difficulties creating, retrieving, updating and deleting records in SQLite. However, when I connect to a Postgresql database creating a record doesn't work

[web2py:22726] Re: Auto_complete widget.

2009-05-27 Thread annet . vermeer
The auto_complete field is working, however, adding the auto_complete functionality introduces a flaw in the update function. In the view I have got: {{=A(T('update/delete'),_href=URL(r=request,f='update_address',args= [record.id]))}} when the user clicks the link the update_adress functio

[web2py:22725] Decimals again

2009-05-27 Thread Michal Jursa
Hi, I know there were a lot of posts about pros and cons of implementing DECIMAL type to DAL, but there is no result. As DECIMALs are really important for me, I'd like to know if it will be included in DAL and if yes, when ( i don't need exact date :) ). I can patch DAL to do it for me on post

[web2py:22724] Re: Behavior of Enter key in an "ajaxified" input field

2009-05-27 Thread Vincent Borghi
On Wed, May 27, 2009 at 1:19 PM, mdipierro wrote: > > Try > > > > > Thanks for the prompt suggestion, but it does not work. With this code, both Enter key and submit button have the same bad behavior: they just run a GET of the same current URL ("searchform"), without passing parameters...

[web2py:22723] Re: Architecture question: can I use Web2py template engine to generate emails?

2009-05-27 Thread Carl
thanks M; knew there's be a concise way to leverage the existing functionality. On May 27, 12:16 pm, mdipierro wrote: > You can use the web2py template language to generate emails. > > from gluon.template import parse_template > from gluon.tool import Mail > > mail=Mail > mail.settings.server='s

[web2py:22722] Re: Auto_complete widget.

2009-05-27 Thread annet . vermeer
Hi Denes, Thanks, problem solved, and solution added to my log. 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

[web2py:22721] Re: Sorting a dropbox

2009-05-27 Thread DenesL
Hi Annet, use: db.openingstijd.dag.requires=IS_IN_DB(db, db.dag.id, '%(naam) s',orderby='id') Denes. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email t

[web2py:22720] Re: Behavior of Enter key in an "ajaxified" input field

2009-05-27 Thread mdipierro
Try On May 27, 4:03 am, Vincent Borghi wrote: > Hello, > > In the following form (essentially taken from web2py examples), > the "Enter" key does not work as expected, I am obliged > to click on the submit button. > > === test1/views/default/searchform.html === > {{extend 'layout.html'}} >

[web2py:22719] Behavior of Enter key in an "ajaxified" input field

2009-05-27 Thread Vincent Borghi
Hello, In the following form (essentially taken from web2py examples), the "Enter" key does not work as expected, I am obliged to click on the submit button. === test1/views/default/searchform.html === {{extend 'layout.html'}} Type something and press the button. === test1/controllers/def

[web2py:22718] Re: Architecture question: can I use Web2py template engine to generate emails?

2009-05-27 Thread mdipierro
You can use the web2py template language to generate emails. from gluon.template import parse_template from gluon.tool import Mail mail=Mail mail.settings.server='smtp.gmail.com: 587' mail.settings.sender='y...@somewhere.com' mail.settings.login=None or 'username:password' path=os.path.join(req

[web2py:22717] Re: Auto_complete widget.

2009-05-27 Thread annet . vermeer
Denes, Thanks, problem solved and solution added to my log. 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 unsub

[web2py:22716] Re: Auto_complete widget.

2009-05-27 Thread annet . vermeer
Horst, As far as I can tell the preceding lines of code are correct. The validator was an IS_IN_DB() validator, which worked. The problem arises when I replace the IS_IN_DB() validator by the auto_complete field. I used the widget before in a form: form=form_factory(SQLField('plaats',requires=IS

[web2py:22715] Re: Sorting a dropbox

2009-05-27 Thread mdipierro
h, the best you can do is db.openingstijd.dag.requires=IS_IN_DB(db, db.dag.id, '%(id)s, %(naam) s') On May 27, 2:06 am, annet wrote: > In db.py I have a validator: > > db.openingstijd.dag.requires=IS_IN_DB(db, db.dag.id, '%(naam)s') > > In the view it displays as a dropbox, which is sorted

[web2py:22714] Re: Auto_complete widget.

2009-05-27 Thread DenesL
Hi Annet, requires and widget are separate attributes of a field: db.adres.plaats.requires=IS_NOT_EMPTY() db.adres.plaats.widget=lambda self,value:INPUT(...) Denes. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

[web2py:22713] Architecture question: can I use Web2py template engine to generate emails?

2009-05-27 Thread Carl
web2py's templating for HTML pages makes managing page structure populated with dynamic content very straightforward and scalable. What approach is recommended to use this power to manage emails/email templates? My application sends out emails populated with a lot of dynamic data and before I co

[web2py:22712] Re: progress bar with javascript

2009-05-27 Thread Richard
I had a look at a few upload progress bars in the past and they used server side queries, which I agree is not ideal. So let me know if you find a pure client side one. http://plugins.jquery.com/project/jquploader http://github.com/drogus/jquery-upload-progress Richard On May 25, 11:02 am, mdi

[web2py:22711] Re: Auto_complete widget.

2009-05-27 Thread Alexey Nezhdanov
On Wednesday 27 May 2009 10:57:41 annet wrote: > To me it is syntactically correct, however, web2py tells me it's not: Surely, that's not web2py who is telling you that you are wrong. And this line is of course syntaxically incorrect: sn...@home3:~/dv/SC$ python Python 2.5.2 (r252:60911, Jul 31 2

[web2py:22710] Re: Auto_complete widget.

2009-05-27 Thread Horst Herb
On Wed, May 27, 2009 at 4:57 PM, annet wrote: > > In db.py I defined an auto complete widget: > > db.adres.plaats.requires=[IS_NOT_EMPTY(),widget=lambda self, > value:INPUT > (_id='place',_name='plaats',_class='ac_input',_type='text')] > > To me it is syntactically correct, however, web2py tells

[web2py:22709] Sorting a dropbox

2009-05-27 Thread annet
In db.py I have a validator: db.openingstijd.dag.requires=IS_IN_DB(db, db.dag.id, '%(naam)s') In the view it displays as a dropbox, which is sorted by naam. Since the days of the week being sorted alphabetically doesn't make sense, I wonder whether it is possible to sort the dropbox by id. Kin