[web2py] Re: how about autoimport?

2010-12-29 Thread mart
sorry... sticky fingers in a nut shell... tasks are submitted to the DB. the tasks are controlled by a module (or a package). the build automation, looks for the submitted task to be done. once it figures out what is the unnamed module, it imports it, then passes it to some other function to

[web2py] Re: Running PHP on top of Web2Py

2010-12-29 Thread mdipierro
All you need is this this (except for windows) in a model (php.py?): from subprocess import Popen, PIPE import sys, os, threading def runphp(source): PHP_BIN = '/usr/bin/php' PHP_ARGS = ['-q'] PHP_IN_SHELL = True php = Popen([PHP_BIN,] + PHP_ARGS, shell=PHP_IN_S

[web2py] Re: how about autoimport?

2010-12-29 Thread mart
hum yeah, looks kind of crappy... looked better before submitting. I'll try again: class init(): def __init__(self): ... some unrelated stuff here * earlier, a bunch of tasks have been defined. * the tasks are defined in a module (we may or may not know the module)

[web2py] Re: how about autoimport?

2010-12-29 Thread mdipierro
what does the attached code do? the indentation is all messed up? On Dec 30, 12:16 am, mart wrote: > Really, I'm not trying to be funny... but where are the missing > modules? are they on the machine somewhere? or do they need to be > fetched from the net somewhere? > > This does seem like a grea

[web2py] Re: how about autoimport?

2010-12-29 Thread mart
Really, I'm not trying to be funny... but where are the missing modules? are they on the machine somewhere? or do they need to be fetched from the net somewhere? This does seem like a great idea! Do we mean to load "unknown" modules or install missing software? or both? this is what I do for "unkn

[web2py] Running PHP on top of Web2Py

2010-12-29 Thread John-Kim Murphy
I have been thinking about how to run PHP on top of Web2Py. I'm interested in doing this because I want to augment an existing PHP app via Web2Py (For example, use the T() internationalization object; use Web2Py's auth access control). Also it will be easier to port a PHP application to Web2Py o

[web2py] Re: how about autoimport?

2010-12-29 Thread Maurice Ling
I really think this will be good, especially if it can be installed in web2py/site-packages folder. Will this mean that we may end up with web2py being a platform for developing Windows applications since it can by-pass the "need" to install Python on Windows? ML On Dec 30, 12:47 pm, mdipierro

Re: [web2py] Job: Web2py expert wanted

2010-12-29 Thread Jason (spot) Brower
Why don't these guys use Experts4solutions :/ BR, Jason Brower On Thu, Dec 30, 2010 at 6:03 AM, Bruno Rocha wrote: > > http://www.odesk.com/jobs/Web2py-expert-wanted_~~62681a3a83753830?source=rss > > -- > > Bruno R

[web2py] Re: Database administrator not showing records

2010-12-29 Thread Maurice Ling
Thanks Massimo However, I am not able to install the 3rd party packages into web2py/ site-packages - it goes into my Python directory. On Dec 30, 12:13 pm, mdipierro wrote: > Thank you. This fixes your problem: > > cp applications/welcome/views/appadmin.html applications/testcynote/ > views/ > c

[web2py] Re: problem with 'NEW APPLICATION WIZARD'

2010-12-29 Thread mdipierro
I do not know what to say... I have the same os and not problem. Check permissions. If you have the app folder, delete it. On Dec 29, 10:37 pm, kuokon wrote: > os:  osx snow leopard > > Darwin Kernel Version 10.5.0: Fri Nov  5 23:20:39 PDT 2010; > root:xnu-1504.9.17~1/RELEASE_I386 i386 > > On De

[web2py] how about autoimport?

2010-12-29 Thread mdipierro
How about some code that is you try o timport a module that is not installed, trys to ez_install it? import sys, imp from ez_setup import use_setuptools use_setuptools() from setuptools.command.easy_install import main class SmartImporter(object): tried_modules=set() domain_modules = set

[web2py] Re: problem with 'NEW APPLICATION WIZARD'

2010-12-29 Thread kuokon
os: osx snow leopard Darwin Kernel Version 10.5.0: Fri Nov 5 23:20:39 PDT 2010; root:xnu-1504.9.17~1/RELEASE_I386 i386 On Dec 30, 12:15 pm, mdipierro wrote: > strange. what os? > > On Dec 29, 10:05 pm, kuokon wrote: > > > > > > > > > that's probably not the reason, since I don't have an

[web2py] Re: Web2Py Foundation?

2010-12-29 Thread Christopher Steel
They will figure it out, they can always check out Wikipedia for instruction: http://en.wikipedia.org/wiki/Benevolent_Dictator_For_Life :) On Dec 29, 12:04 pm, mdipierro wrote: > I will amend my will to release the book under an open source license. > > You guys really think my "heirs" even kno

[web2py] Re: problem with 'NEW APPLICATION WIZARD'

2010-12-29 Thread mdipierro
strange. what os? On Dec 29, 10:05 pm, kuokon wrote: > that's probably not the reason, since I don't have an app called > 'myapp' in my 'web2py/applications/' directory. > and I've just tried to create another app called 'test', and it get > the exact same error. > > On Dec 30, 11:48 am, mdipierr

[web2py] Re: Database administrator not showing records

2010-12-29 Thread mdipierro
Thank you. This fixes your problem: cp applications/welcome/views/appadmin.html applications/testcynote/ views/ cp applications/welcome/controllers/appadmin.py applications/ testcynote/controllers/ There was a bug fix in appadmin (do not recall) that caused this issue. BTW... this is some neat s

[web2py] Re: problem with 'NEW APPLICATION WIZARD'

2010-12-29 Thread kuokon
that's probably not the reason, since I don't have an app called 'myapp' in my 'web2py/applications/' directory. and I've just tried to create another app called 'test', and it get the exact same error. On Dec 30, 11:48 am, mdipierro wrote: > This should be caught. The problem is that you crea

[web2py] Job: Web2py expert wanted

2010-12-29 Thread Bruno Rocha
http://www.odesk.com/jobs/Web2py-expert-wanted_~~62681a3a83753830?source=rss -- Bruno Rocha http://about.me/rochacbruno/bio

[web2py] Re: Database administrator not showing records

2010-12-29 Thread Maurice Ling
Hi Massimo Just sent to you. ML On Dec 30, 9:33 am, mdipierro wrote: > No idea. Can you send me (confidetially) your app and your db (if it > is sqlite)? > > On Dec 29, 7:30 pm, Maurice Ling wrote: > > > Sorry. Still worked on 1.83.2. > > > On Dec 30, 9:29 am, Maurice Ling wrote: > > > > It w

Re: [web2py] Re: Powertable remarks

2010-12-29 Thread Bruno Rocha
Here is a complete list of working powerTable options: https://bitbucket.org/rochacbruno/powertable/src/e80ed190dea5/controllers/default.py#cl-52

[web2py] Re: problem with 'NEW APPLICATION WIZARD'

2010-12-29 Thread mdipierro
This should be caught. The problem is that you creating an app with the same name of an existing app that was not created by the wizard. On Dec 29, 9:33 pm, kuokon wrote: > Hi, > > I've just downloaded the web2py 1.91.5, run the 'NEW APPLICATION > WIZARD' > and get the following error. > > ==

[web2py] problem with 'NEW APPLICATION WIZARD'

2010-12-29 Thread kuokon
Hi, I've just downloaded the web2py 1.91.5, run the 'NEW APPLICATION WIZARD' and get the following error. === web2py™ Version 1.91.5 (2010-12-28 22:12:09) Python Python 2.6.1: /usr/bin/python TRACEBACK 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Traceback (most

Re: [web2py] Re: Powertable remarks

2010-12-29 Thread Bruno Rocha
2010/12/30 tomt > Hi, > > The 'full_numbers' option worked exactly as I had hoped. Next, I > downloaded the code from bitbucket, and tried the column search > function and I'm happy to say it works very well. > > Thanks, - Tom I am fixing some minor bugs and including aethetical improvements t

[web2py] Re: Powertable remarks

2010-12-29 Thread tomt
Hi, The 'full_numbers' option worked exactly as I had hoped. Next, I downloaded the code from bitbucket, and tried the column search function and I'm happy to say it works very well. Thanks, - Tom On Dec 29, 5:50 am, rochacbruno wrote: > Hi, > > Thank you for testing, it is more updated in bit

[web2py] Re: Database administrator not showing records

2010-12-29 Thread mdipierro
No idea. Can you send me (confidetially) your app and your db (if it is sqlite)? On Dec 29, 7:30 pm, Maurice Ling wrote: > Sorry. Still worked on 1.83.2. > > On Dec 30, 9:29 am, Maurice Ling wrote: > > > It was working on 1.82.1 on the same data. > > > On Dec 30, 9:10 am, mdipierro wrote: > > >

[web2py] Re: Database administrator not showing records

2010-12-29 Thread Maurice Ling
Sorry. Still worked on 1.83.2. On Dec 30, 9:29 am, Maurice Ling wrote: > It was working on 1.82.1 on the same data. > > On Dec 30, 9:10 am, mdipierro wrote: > > > What version did you upgrade from? Did it work before with the same > > data? > > > On Dec 29, 7:00 pm, Maurice Ling wrote: > > > >

[web2py] Re: Database administrator not showing records

2010-12-29 Thread Maurice Ling
It was working on 1.82.1 on the same data. On Dec 30, 9:10 am, mdipierro wrote: > What version did you upgrade from? Did it work before with the same > data? > > On Dec 29, 7:00 pm, Maurice Ling wrote: > > > Hi > > > I've upgraded to version 1.91.5 and noticed an issue with the database > > admi

Re: [web2py] What's the best way to insert raw html ?

2010-12-29 Thread Stef Mientki
> An alternative to Text.replace would be to do a global regex substitution, > where the replacement pattern is a function that calls URL('static', > 'images/%s' % matchobj.group(0)). See the re.sub section of > http://docs.python.org/library/re.html for details. regex are too difficult for me

[web2py] Re: CASE statements in DAL?

2010-12-29 Thread mdipierro
It is definitively possible. It just that I cannot test it right now. Try: db(query).select(Expression("CASE WHEN 1=1 THEN 0 ELSE 1 END",None)); else you can use db.executesql("... any raw sql ...") the latter is the safe way. Always works. On Dec 29, 6:55 pm, Harkirat wrote: > Thanks for the

[web2py] Re: CASE statements in DAL?

2010-12-29 Thread Harkirat
Thanks for the suggestion Massimo! I haven't been able to get it to work though. That syntax returns an error "TypeError: __init__() takes at least 3 arguments (2 given)" Tried looking at the Expression class defined in DAL.py for what arguments it needs but haven't been able to figure this out. An

[web2py] Re: Database administrator not showing records

2010-12-29 Thread mdipierro
What version did you upgrade from? Did it work before with the same data? On Dec 29, 7:00 pm, Maurice Ling wrote: > Hi > > I've upgraded to version 1.91.5 and noticed an issue with the database > administrator. > > I was in the admin application of my application (http://localhost: > 8000/admin/

[web2py] Re: The stability of web2py releases

2010-12-29 Thread Leo
Hi Folks, I just read the entire thread... uff. I am a member of the Technical Leaderhip Council at Coin-OR (www.coin- or.org). We went through these arguments a while back improductively several times until we made it a priority to resolve them. We are sure glad we did. We have over 50 projects

[web2py] Database administrator not showing records

2010-12-29 Thread Maurice Ling
Hi I've upgraded to version 1.91.5 and noticed an issue with the database administrator. I was in the admin application of my application (http://localhost: 8000/admin/default/design/init) and clicked on "database administration", then click on any one of my populated databases. By right, it shou

Re: [web2py] Re: Problems in web2py 1.83.2

2010-12-29 Thread Jonathan Lundell
On Dec 29, 2010, at 4:32 PM, Branko Vukelić wrote: > > Btw, in case you're new to these things, the main point of URL helpers > (called URL generators in some frameworks) is to generate the URL > based on the information about the internal structure of the > application. This is done to avoid hard

Re: [web2py] What's the best way to insert raw html ?

2010-12-29 Thread Jonathan Lundell
On Dec 29, 2010, at 3:10 PM, Stef Mientki wrote: > > Now I encounter 2 problems: > 1. the raw html contains tags, like: > >toch iets over stromen, een plaatje />   > > I "remove" them with the helper function TAG. > Although it seems to work, I'm not convinced that this is the right meth

Re: [web2py] Re: Problems in web2py 1.83.2

2010-12-29 Thread Branko Vukelić
Btw, in case you're new to these things, the main point of URL helpers (called URL generators in some frameworks) is to generate the URL based on the information about the internal structure of the application. This is done to avoid hard-coding the paths. If you merely use the URL helper function t

[web2py] Re: Problems in web2py 1.83.2

2010-12-29 Thread Maurice Ling
Thanks everyone. It worked. On Dec 29, 6:45 pm, mdipierro wrote: > or > > URL('account', 'log_in') > > On Dec 29, 3:14 am, Kenneth Lundström > wrote: > > > If I remember correctly there was something about this on the list. > > > I think you use the URL the wrong way and until version 1.83.2 th

[web2py] Re: export_to_csv_file and colnames

2010-12-29 Thread mdipierro
in trunk. Sorry I had missed the thread On Dec 29, 3:49 pm, howesc wrote: > ping.  in trunk it's now at line 4774. > > if there is a reason not to make the change please let me know so i can fix > my code.  (but i assume this just has not made it to the priority list yet, > which is just fine, it

Re: [web2py] component .load

2010-12-29 Thread Jonathan Lundell
On Dec 29, 2010, at 3:25 PM, mattynoce wrote: > > hi all. i have a component i'm plugging into the middle of a page, but > i want that component to act seamlessly with the rest of the page. i > do NOT want the component to do what components usually do and act > independently. i need to include va

[web2py] Re: Not open source yet... but

2010-12-29 Thread mdipierro
version 0.2: http://www.vimeo.com/18282084 On Dec 28, 12:55 am, mdipierro wrote: > http://vimeo.com/18232653

Re: [web2py] Re: Web2Py Foundation?

2010-12-29 Thread Branko Vukelić
2010/12/30 mdipierro : > It is more that people in US are obsessed with lawsuits. ;-) Lawsuits and death. Very nice. :) -- Branko Vukelic stu...@brankovukelic.com http://www.brankovukelic.com/

[web2py] Re: Web2Py Foundation?

2010-12-29 Thread mdipierro
It is more that people in US are obsessed with lawsuits. ;-) On Dec 29, 4:30 pm, Branko Vukelić wrote: > On Wed, Dec 29, 2010 at 7:08 PM, Bruno Rocha wrote: > > > This thread can be historical like that > > one: http://www.python.org/search/hypermail/python-1994q2/1040.html which > > was the s

[web2py] component .load

2010-12-29 Thread mattynoce
hi all. i have a component i'm plugging into the middle of a page, but i want that component to act seamlessly with the rest of the page. i do NOT want the component to do what components usually do and act independently. i need to include variable files, and components are the only way i can find

[web2py] What's the best way to insert raw html ?

2010-12-29 Thread Stef Mientki
hello, I'v raw html derived with BeautifulSoup from another webpage, which I want insert in the contents of the web. The images in the orginal webpage are located in the same directory as the html page. The orginal webpage is moved to a database, and the images are placed into the web2py applicat

Re: [web2py] Re: Web2Py Foundation?

2010-12-29 Thread Branko Vukelić
On Wed, Dec 29, 2010 at 7:08 PM, Bruno Rocha wrote: > > This thread can be historical like that > one: http://www.python.org/search/hypermail/python-1994q2/1040.html which > was the start of PSF Why are Westerners so obsessed with death? That's quite amazing. -- Branko Vukelic stu...@brankovu

[web2py] Re: experts4solution: please update your profile

2010-12-29 Thread DenesL
Can you please hide the email from bots.

Re: [web2py] Re: I don't understand this error, anyone to help ?

2010-12-29 Thread Stef Mientki
thanks very much guys, but probably you missed the solution I posted about an hour ago: strings are of type cheers Stef On 29-12-2010 22:51, Jonathan Lundell wrote: > On Dec 29, 2010, at 1:35 PM, mdipierro wrote: >> Probably it is counting >> >> data.encode('utf8', 'xmlcharrefreplace') >> >> d

Re: [web2py] Re: I don't understand this error, anyone to help ?

2010-12-29 Thread Jonathan Lundell
On Dec 29, 2010, at 1:35 PM, mdipierro wrote: > > Probably it is counting > > data.encode('utf8', 'xmlcharrefreplace') > > data as self and 'utf8' as second argument. yet it is strange because > this is valid syntax. That occurred to me, too, but that's not what's happening. See my test sequenc

Re: [web2py] export_to_csv_file and colnames

2010-12-29 Thread howesc
ping. in trunk it's now at line 4774. if there is a reason not to make the change please let me know so i can fix my code. (but i assume this just has not made it to the priority list yet, which is just fine, it is the holiday season and all!) thanks, christian

Re: [web2py] Re: Renaming fields of auth tables

2010-12-29 Thread Marin Pranjic
You can "ignore" current first_name or last_name (or both) fields, and add other fields, as you like. Add custom fields, and for current (first_name, last_name) set readable = False and writable = False and just don't use them. More about customizing: http://www.web2py.com/book/default/chapter/08

[web2py] Re: I don't understand this error, anyone to help ?

2010-12-29 Thread mdipierro
Probably it is counting data.encode('utf8', 'xmlcharrefreplace') data as self and 'utf8' as second argument. yet it is strange because this is valid syntax. On Dec 29, 3:08 pm, Jonathan Lundell wrote: > On Dec 29, 2010, at 12:37 PM, Arun K.Rajeevan wrote: > > > > > great as far as 25 page pdf

Re: [web2py] Re: I don't understand this error, anyone to help ?

2010-12-29 Thread Jonathan Lundell
On Dec 29, 2010, at 12:37 PM, Arun K.Rajeevan wrote: > great as far as 25 page pdf is in consideration. next time a simple text file > is good enough. > how the page get rendered? using generic.html or is it have a custom view > file? > And what's the controller returns? > > btw which version of

[web2py] Re: Auto reload of file

2010-12-29 Thread ron_m
If you put code in a file under the modules directory then it will require a restart unless you set the reload parameter to True In model or controller mod_name = local_import('module_file', True) will force a reload every time so restart not needed. Otherwise nothing gets retained between requ

Re: [web2py] Re: I don't understand this error, anyone to help ?

2010-12-29 Thread Arun K.Rajeevan
problem seems to be with encoding data. Can you show us relevant code that defines and initialize Books!

Re: [web2py] Re: I don't understand this error, anyone to help ?

2010-12-29 Thread Stef Mientki
On 29-12-2010 21:37, Arun K.Rajeevan wrote: > great as far as 25 page pdf is in consideration. next time a simple text file > is good enough. sorry about the large file, but I thought to give as much information as possible > how the page get rendered? Mozilla printing to pdf > using generic.html

Re: [web2py] Re: I don't understand this error, anyone to help ?

2010-12-29 Thread Arun K.Rajeevan
great as far as 25 page pdf is in consideration. next time a simple text file is good enough. how the page get rendered? using generic.html or is it have a custom view file? And what's the controller returns? btw which version of web2py you are using? --

[web2py] Re: Renaming fields of auth tables

2010-12-29 Thread Lisandro
Thanks for the quickly answer. Though, I really need to rename the field, this is for keep backward compatibility and standards with an existing system. On 29 dic, 11:03, Marin Pranjic wrote: > Hi, > you can use *label* like described > here:http://www.mail-archive.com/web2py@googlegroups.com/m

Re: [web2py] FORM Generation Code.

2010-12-29 Thread Bruno Rocha
2010/12/29 David J. > Bruno; > > That just changes the value; but the problem is the form code adds an extra > ":" to the end of the name. > > so if you do as you suggested. db.auth_user.first_name.label='FName' > > It outputs "FName:" not "FName" without the trailing colon ":" > The colon is

Re: [web2py] FORM Generation Code.

2010-12-29 Thread David J.
Also if you look carefully this out put code is not consistent. If you look at the "verify password" field it is not using class="w2p_fl|fw|fc" Its just wrapped in a label. Snippet from Register form. for="auth_user_password" id="auth_user_password__label">Password: id="auth_user_password"

Re: [web2py] FORM Generation Code.

2010-12-29 Thread David J.
Bruno; That just changes the value; but the problem is the form code adds an extra ":" to the end of the name. so if you do as you suggested. db.auth_user.first_name.label='FName' It outputs "FName:" not "FName" without the trailing colon ":" Thanks. On 12/29/10 2:02 PM, Bruno Rocha wrote

[web2py] Re: Web2Py Foundation?

2010-12-29 Thread Luther Goh Lu Feng
Maybe they think you are watching youtube videos :p On Dec 30, 1:04 am, mdipierro wrote: > I will amend my will to release the book under an open source license. > > You guys really think my "heirs" even know what I do in front of the > computer all day? > > Massimo > > On Dec 29, 10:26 am, Antho

Re: [web2py] FORM Generation Code.

2010-12-29 Thread Bruno Rocha
you can set labels to auth_user table db.auth_user.first_name.label = 'F Name' db.auth_user.last_name.label = 'WHATEVER' If you mean extra link in login/register form, simply edit /views/default/user.html 2010/12/29 David J. > Where is the code that Generates the FORMs? > > What is the best

Re: [web2py] Re: The stability of web2py releases

2010-12-29 Thread appydev
I totally agree with Jonathan Lundell, I think the changes he proposes, would provide stability web2py, and I'm sure will appeal to users (both new and existing). My humble opinion is that the way they attack the bugs, is one of the weaknesses ofweb2py, I think it is messy and I'm sure many have

[web2py] FORM Generation Code.

2010-12-29 Thread David J.
Where is the code that Generates the FORMs? What is the best way to modify this; Currently when it outputs the key name It puts a colon; ex. "First Name:" instaead of just "First Name" I simply want to remove that from the form. Also on the links of the welcome app; That generate the "[ login

[web2py] Re: CASE statements in DAL?

2010-12-29 Thread mikech
Cool On Dec 29, 8:56 am, mdipierro wrote: > You should be able to doL > > from gluon.dal import Expression > > db(query).select(Expression("CASE WHEN 1=1 THEN 0 ELSE 1 END")); > > Nut I never tried. > > On Dec 29, 8:37 am, Harkirat wrote: > > > > > Hi All ! > >           I am new to web2py and m

Re: [web2py] Python job oportunity

2010-12-29 Thread Bruno Rocha
Em 29 de dezembro de 2010 16:27, António Ramos escreveu: > the output is the same as i have with my code > Strange. for me it worked very well. >>> xor(job_opportunity,k) 'Internship at i2Mobile, in Oeiras. We want creative young developers for our very small team. We use Python, Django, Mysq

Re: [web2py] Python job oportunity

2010-12-29 Thread António Ramos
the output is the same as i have with my code >>> xor(job_opportunity,k) '5\x0bG\x7fevae+_Cy+l;A4\x1dKan))e5_mhbwh\x7fu_uh+rhb/_A\x7fnd}e-\x1a\x02tdpgk{\x1bG{nif|>\rQ-mj{,4\nP-}`{u{\x0cOlgi)x>\x1eO#+Rl,.\x0cG-[|}d4\x11\x0e-Oohb<\x10\x0e-F|z}7S\x02N())_\n3\x02^nw\x7fi)S\x02G9HL {\x16m^\'%Hb?\rMdo))

Re: [web2py] Python job oportunity

2010-12-29 Thread Bruno Rocha
Ops, I forgot to mention: from itertools import izip,cycle 2010/12/29 Bruno Rocha > >>> def xor(data,key): > ... return ''.join(chr(ord(x) ^ ord(y)) for (x,y) in izip(data, > cycle(key))) > ... > >>> k = 'i2Mobile' > >>> job_opportunity = > ' ' ' \\9\n\x10\x07\x1f\r\x00Bm\x0e\x16I\x05W$]/\x

Re: [web2py] Python job oportunity

2010-12-29 Thread Bruno Rocha
>>> def xor(data,key): ... return ''.join(chr(ord(x) ^ ord(y)) for (x,y) in izip(data, cycle(key))) ... >>> k = 'i2Mobile' >>> job_opportunity = ' ' ' \\9\n\x10\x07\x1f\r\x00Bm\x0e\x16I\x05W$]/\x06\x0e\...@e\x00\\m \x07\x00\x1e\x04\x1a\x1cm8\x07I\x1b\x04\x07Fm\x0c\x10\x0c\r\x11\x00D(O\x1b\x06\x

Re: [web2py] Python job oportunity

2010-12-29 Thread António Ramos
i just xored every char in the password with the char in the array but got another array full of garbage. can you point any direction toward the sunshine? Thanks 2010/12/29 Bruno Rocha > NIce! > > But it is internship, django related and so far away from me or my Pythonic > friends. > > So eas

[web2py] Re: customize json output

2010-12-29 Thread mdipierro
it works great for me. On Dec 29, 11:41 am, Branko Vukelić wrote: > I think the dictionaries should work the same, though. Never tried, > but they are the same string form as JSON objects. > > > > On Wed, Dec 29, 2010 at 6:05 PM, mdipierro wrote: > > I found that for list and dict > > > repr(L)

Re: [web2py] Re: Web2Py Foundation?

2010-12-29 Thread Bruno Rocha
This thread can be historical like that one: http://www.python.org/search/hypermail/python-1994q2/1040.html which was the start of PSF

[web2py] Re: Web2Py Foundation?

2010-12-29 Thread mikech
Perhaps try the Software Conservance again? I see that they recently accepted PyPy and Git On Dec 28, 9:28 am, mdipierro wrote: > A foundation is a corporation and, believe it or not, in US a > corporation is a person: > >  http://www.professorbainbridge.com/professorbainbridgecom/2010/01/the...

Re: [web2py] RunimeError: No table selected

2010-12-29 Thread Bruno Rocha
Just to update this thread, I guess this is fixed in trunk: http://code.google.com/p/web2py/source/detail?r=729dfb5d92789c2accad605b543be7775def6cdc 2010/12/28 Emceha > Hi I have such controller in default.py > > def index(): >dzialy = db().select(db.dzialy.ALL,orderby=db.dzialy.kolejnosc) >

[web2py] Re: unique constraint of multiple columns (at database level)

2010-12-29 Thread villas
Hi Bruno, Work was done (I believe by Denes) to introduce non-standard primary keys. However, that was really for legacy DBs that could not be migrated to the web2py conventions. In any case, it was only available for certain DBs and I'm not sure the work has been migrated and tested properly in t

Re: [web2py] Re: Web2Py Foundation?

2010-12-29 Thread Branko Vukelić
On Wed, Dec 29, 2010 at 6:04 PM, mdipierro wrote: > I will amend my will to release the book under an open source license. > > You guys really think my "heirs" even know what I do in front of the > computer all day? I dunno, but could you ask them if they'd sue people who would dare continue the

Re: [web2py] Python job oportunity

2010-12-29 Thread Bruno Rocha
NIce! But it is internship, django related and so far away from me or my Pythonic friends. So easy to decrypt the message. Em 29 de dezembro de 2010 15:25, António Ramos escreveu: > Beats me > > > https://docs.google.com/document/d/1LzT4fCd135lzgWiXGut6k4WoC9t7eV-6RSnUexNxezM/edit?hl=en_GB#

Re: [web2py] Re: customize json output

2010-12-29 Thread Branko Vukelić
I think the dictionaries should work the same, though. Never tried, but they are the same string form as JSON objects. On Wed, Dec 29, 2010 at 6:05 PM, mdipierro wrote: > I found that for list and dict > > repr(L) > > works as good as > > gluon.contrib.simplejson.dumps(L) > > and it is much faste

[web2py] Python job oportunity

2010-12-29 Thread António Ramos
Beats me https://docs.google.com/document/d/1LzT4fCd135lzgWiXGut6k4WoC9t7eV-6RSnUexNxezM/edit?hl=en_GB#

Re: [web2py] Auto reload of file

2010-12-29 Thread Bruno Rocha
Are you using @cache() in functions? is your app compiled? 2010/12/29 Tomek > Hey > > I have simple problem: > > I work with eclips and web2py, every time when i done some change i > need to restart web2py server to see effect of my work, is there any > workaround for this. ??? > > -- Brun

Re: [web2py] Re: unique constraint of multiple columns (at database level)

2010-12-29 Thread Bruno Rocha
Maybe not the best way, but just for testing, I tried this: db.define_table('person', Field('unikey','id',compute=lambda r: r.fname+r.lname), Field('fname'), field('lname') ) got an error because the 'id' needs to be int File "/ho

[web2py] Interesting thoughts on URL design

2010-12-29 Thread ma...@rockiger.com
Here are some thoughts on URL design you might be interested in: http://warpspire.com/posts/url-design/ Marco

[web2py] Re: customize json output

2010-12-29 Thread mdipierro
I found that for list and dict repr(L) works as good as gluon.contrib.simplejson.dumps(L) and it is much faster. What am I missing? On Dec 29, 10:26 am, DenesL wrote: > def jsonlist(): >   import gluon.contrib.simplejson >   L = [ { 'label': "Foo", 'data': [ [10, 1], [17, -14], [30, 5] ] }, >

[web2py] Re: Web2Py Foundation?

2010-12-29 Thread mdipierro
I will amend my will to release the book under an open source license. You guys really think my "heirs" even know what I do in front of the computer all day? Massimo On Dec 29, 10:26 am, Anthony wrote: > Also, what about the book? Would the community have to start from scratch on > new document

[web2py] Re: Web2Py Foundation?

2010-12-29 Thread mdipierro
Right. I will make sure in my will web2py trademark is released on my death. On Dec 29, 2:41 am, Graham Dumpleton wrote: > On Wednesday, December 29, 2010 6:48:51 PM UTC+11, stu...@brankovukelic.com > wrote: > > > > It is an open question whether distribution of such modified copies are > > > leg

[web2py] messages for community app - some examples?

2010-12-29 Thread pk
hi, i will create an app for a community. and i need now the messages function (inbox, sent...) have somebody experience with this? can somebody help me? thanks peter

[web2py] Re: CASE statements in DAL?

2010-12-29 Thread mdipierro
You should be able to doL from gluon.dal import Expression db(query).select(Expression("CASE WHEN 1=1 THEN 0 ELSE 1 END")); Nut I never tried. On Dec 29, 8:37 am, Harkirat wrote: > Hi All ! >           I am new to web2py and my company is building an enterprise > level web application that wil

Re: [web2py] Re: Powertable remarks

2010-12-29 Thread Bruno Rocha
2010/12/29 Kenneth Lundström > Hi Bruno, > > waauu what a Plugin your working on, very nice. > > What does the productdetails function look like? In the main table every row has two attributes ID = it is the record id from rows object, if there is not an id field it will be the first row value

[web2py] Re: Evolution of a Python programmer

2010-12-29 Thread mdipierro
c'mon... only for integer numbers (and not even checking)? What about float? Anyway, he is also missing: storage = {} def memoize(f): def g(x): if x in storage: y = strorage[x] else: y = storage[x] = f(x) return y return g @memoize def fact

[web2py] Re: Problems in web2py 1.83.2

2010-12-29 Thread mdipierro
I agree. On Dec 29, 7:29 am, snapy666 wrote: > It doesn't break backwards compatibility, because it *should not* work > the way it did. > > @massimo: I think a SyntaxError should not be used for a case like > this. See that the syntax is correct and the passed values not, a > ValueError or the li

[web2py] Re: unique constraint of multiple columns (at database level)

2010-12-29 Thread mdipierro
virtual fields are not computed fields. They do not exist in the db. They are computed when records are retrieved. They cannot have requirements or attributes because there no way to input their values in a form. So this is simply imporssible: db.mytable.uniqueField.requires = ... On Dec 29, 5:

[web2py] Re: Web2Py Foundation?

2010-12-29 Thread Anthony
Also, what about the book? Would the community have to start from scratch on new documentation? The online version says "modified content cannot be reproduced." Anthony On Wednesday, December 29, 2010 2:21:20 AM UTC-5, Graham Dumpleton wrote: > > > On Wednesday, December 29, 2010 5:49:17 PM U

[web2py] Re: customize json output

2010-12-29 Thread DenesL
def jsonlist(): import gluon.contrib.simplejson L = [ { 'label': "Foo", 'data': [ [10, 1], [17, -14], [30, 5] ] }, { 'label': "Bar", 'data': [ [11, 13], [19, 11], [30, -7] ] } ] response.headers['Content-Type']='text/json' return gluon.contrib.simplejson.dumps(L) On Dec 29, 9:38 am, b

[web2py] How to change form.vars before validation?

2010-12-29 Thread Marin Pranjic
Hi, I need to customize Auth: 1. use username instead of e-mail for login 2. remove first_name and last_name fields 3. make username case_insensitive I decided to use first_name field to store the "real" username, and username field to store lowercase username (for case-insensitive login). Used

[web2py] Re: Not open source yet... but

2010-12-29 Thread mikech
Very Impressive! On Dec 27, 10:55 pm, mdipierro wrote: > http://vimeo.com/18232653

Re: [web2py] Re: Powertable remarks

2010-12-29 Thread Kenneth Lundström
Hi Bruno, waauu what a Plugin your working on, very nice. What does the productdetails function look like? Kenneth Hi, Thank you for testing, it is more updated in bitbucket. Now it has search by column and a test version of server side processing. If you want to change the pager do: plu

[web2py] Re: Auto reload of file

2010-12-29 Thread KR
I don't use Eclipse anymore but I can just tell that on my ubuntu box I never need to restart the server when I edit a file in the application folder (that is Model, View or Controller) and I tought that web2py works like that. If you work in the framework itself, I think that stop and start is a

[web2py] Re: CASE statements in DAL?

2010-12-29 Thread Arun K.Rajeevan
I'm not aware of anything like this, but of course you can execute SQL directly with web2py

[web2py] Re: I don't understand this error, anyone to help ?

2010-12-29 Thread Arun K.Rajeevan
where is the attachment pdf?

Re: [web2py] customize json output

2010-12-29 Thread Branko Vukelić
On Wed, Dec 29, 2010 at 3:38 PM, bova wrote: > Hello! > > I'm using web2py with jquery and jquery.flot plugin > > Tell me please how can I get json output like following: >  [ { label: "Foo", data: [ [10, 1], [17, -14], [30, 5] ] }, >    { label: "Bar", data: [ [11, 13], [19, 11], [30, -7] ] } ] >

[web2py] customize json output

2010-12-29 Thread bova
Hello! I'm using web2py with jquery and jquery.flot plugin Tell me please how can I get json output like following: [ { label: "Foo", data: [ [10, 1], [17, -14], [30, 5] ] }, { label: "Bar", data: [ [11, 13], [19, 11], [30, -7] ] } ]

  1   2   >