[web2py:22459] Re: doctest error when using trunk code

2009-05-23 Thread Yarko Tymciurak
It appears right there in the svn sources: http://code.google.com/p/web2py/source/browse/trunk/gluon/fileutils.py You should try to either get a fresh svn checkout, or re-do your svn update. On Sat, May 23, 2009 at 1:00 AM, posh wrote: > > I use svn to fetch the trunk code, and when I try to te

[web2py:22460] Feature request: routes.py of each app

2009-05-23 Thread Álvaro Justen [Turicas]
Hi all, what do you think in having routes.py to each app? I think if we have a site and installs an app called my_app, so this app would be "owner" of http://mydomain.com/my_app/ URL. It turns apps more flexible, example: if I create a wiki app and this app have its own routes.py, user that insta

[web2py:22461] Re: allow NULL in date field in SQLFORM

2009-05-23 Thread Horst Herb
On Sat, May 23, 2009 at 4:47 PM, wrote: > T.force('en-de')  ## en-de is a language file you'll create below > > > In the table definition: > > SQLField('fieldname', type='date') > > > ... a validator on this field which reads like: > > db.tablename.fieldname.requires=IS_NULL_OR(IS_DATE(str(T('%Y

[web2py:22462] data being displayed

2009-05-23 Thread NikG
Taken direct from the lulu manual. controllers/default.py def index(): images=db().select(db.image.ALL, orderby=db.image.title) return dict(images=images) default/index.html {{extend 'layout.html'}} {{try:}}{{=H2(message)}}{{except:}}{{=BEAUTIFY(response._vars)}} {{pass}} {{=H1('Cur

[web2py:22463] Please fix spelling error on the Code Editor Revert Button label 'to previour version'

2009-05-23 Thread dlypka
The text label to the right of the 'revert' button at the bottom of the code editor is 'to previour version' should be 'to previous version' --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" gr

[web2py:22464] Re: small paid project with web2py and nicEditor

2009-05-23 Thread desfrenes
Slightly off-topic, but fckeditor does just what you want out of the box, with many connectors in different languages, including python (but not web2py specific). See also the django fck connector project (http://code.google.com/p/django-fckconnector/) that should be easy to port to web2py. On 23

[web2py:22465] Re: Please fix spelling error on the Code Editor Revert Button label 'to previour version'

2009-05-23 Thread NikG
It appears fine on web2py Version 1.62.3 (2009-05-19 23:25:03) On May 23, 5:03 pm, dlypka wrote: > The text label to the right of the 'revert' button at the bottom of > the code editor > is 'to previour version' > should be >    'to previous version' --~--~-~--~~~--

[web2py:22466] Re: Please fix spelling error on the Code Editor Revert Button label 'to previour version'

2009-05-23 Thread dlypka
Oops. I was accidentally running the older web2py 1.60.2 On a more positive note, I just started using Google Chrome 2.0 with web2py. What a difference on the code editor performance compared to IE 8. Like night and day. Under IE 8, the code editor is extremely sluggish and is practically unusable

[web2py:22467] Re: new to web2py re session.counter example

2009-05-23 Thread NikG
I did. I guess this is the only way to go about it On May 22, 9:53 pm, JohnMc wrote: > NikG, > > Buy the electronic copy of the book. I followed the same route you > did. The book really helped me a lot. > > On May 21, 11:54 pm, NikG wrote: > > > Hello everyone. I'm learning web2py on my own by

[web2py:22468] Simple debugging patch

2009-05-23 Thread Alexey Nezhdanov
I found this change to be very helpful, when doing multi-table inserts on single submit: --- sql.py.old 2009-05-23 14:28:15.286720712 +0400 +++ sql.py 2009-05-23 14:27:09.450720875 +0400 @@ -1372,7 +1372,7 @@ fs.append(fieldname) vs.append(sql_represent(fi

[web2py:22469] Re: Update and delete

2009-05-23 Thread Kacper Krupa
if not request.args: return redirect() On 23 Maj, 08:43, annet.verm...@gmail.com wrote: > Massimo, > > After restarting the server if not record: worked. > > However, further down the workflow there is an error ticket issued > when the user clicks the submit button. > > My custom update function:

[web2py:22470] Re: Simple debugging patch

2009-05-23 Thread Alexey Nezhdanov
And another similar one. Massimo, if there are no security implications then may be it worths going over all 'raise' statements and checking if there is more info that could be provided w/o much effort, how do you think? --- sqlhtml.old2.py 2009-05-19 09:51:00.0 +0400 +++ sqlhtml.py

[web2py:22471] Re: small paid project with web2py and nicEditor

2009-05-23 Thread JohnMc
Horst, The NicEdit site references a image upload plug-in: http://www.nicedit.com/forums/viewtopic.php?f=3&t=471. On May 23, 1:50 am, Horst Herb wrote: > I need *urgently* either a plugin or web2py "image server" implemented > that does allow image upload from within nicEditor > I basically use

[web2py:22472] Re: ticketing support on GAE

2009-05-23 Thread HansD
I've made it working too, including a working ticket page. Indeed a ugly hack is needed to store the db value in the request object, I've not yet discovered a better way. On May 20, 2:43 pm, Alexey Nezhdanov wrote: > Today I managed to make ticketing kind of work on GAE. > > The 'kind of' becaus

[web2py:22473] Re: small paid project with web2py and nicEditor

2009-05-23 Thread desfrenes
this plugin works but uses image schack to host the pictures. On May 23, 1:57 pm, JohnMc wrote: > Horst, > > The NicEdit site references a image upload > plug-in:http://www.nicedit.com/forums/viewtopic.php?f=3&t=471. > > On May 23, 1:50 am, Horst Herb > wrote: > > > I need *urgently* either a

[web2py:22474] Re: SQL Import

2009-05-23 Thread Elcimar L. Santos
These are also great news. Atenciosamente, Elcimar Leandro - http://elcimar.blogspot.com Portal Net Fácil - http://www.nfacil.com.br 2009/5/22 dlypka > > I did email it last Monday. > I have just resent it. > > On May 22, 8:35 am, mdipierro wrote: > > Can you email the new auto to me? > > >

[web2py:22475] Re: doctest error when using trunk code

2009-05-23 Thread mdipierro
I know what the problem is. I think I fixed it. Please download trunk again. On May 23, 2:11 am, Yarko Tymciurak wrote: > It appears right there in the svn > sources:http://code.google.com/p/web2py/source/browse/trunk/gluon/fileutils.py > > You should try to either get a fresh svn checkout, or

[web2py:22476] Form elements

2009-05-23 Thread Elcimar
Sorry my laziness on searching a little more into this forum/ documentation/web. I think I understand the way web2py creates forms from model's tables. But I didn't figure out yet how to show only a few fields from a table... Or mix fields from various tables in only one form. Any advice? --~--~-

[web2py:22477] Re: small paid project with web2py and nicEditor

2009-05-23 Thread Horst Herb
On Sat, May 23, 2009 at 10:37 PM, desfrenes wrote: > > this plugin works but uses image schack to host the pictures. I know. I want to host the images locally. That site shows an example in PHP how to implement the feature on your local server Looks easy and straightforward enough, but I have no

[web2py:22478] Re: data being displayed

2009-05-23 Thread mdipierro
Can you email me the application you wrote. I suspect either defaut/ index.html is mispelled or it is in the wrong place. Massimo On May 23, 3:16 am, NikG wrote: > Taken direct from the lulu manual. > > controllers/default.py > > def index(): > >     images=db().select(db.image.ALL, orderby=db.

[web2py:22479] Re: Please fix spelling error on the Code Editor Revert Button label 'to previour version'

2009-05-23 Thread mdipierro
Try edit applications/admin/models.py and change the editor to the Amy editor. There is a flag. On May 23, 4:20 am, dlypka wrote: > Oops. I was accidentally running the older web2py 1.60.2 > On a more positive note, I just started using Google Chrome 2.0 with > web2py. > What a difference on the

[web2py:22480] weird HTML rendering

2009-05-23 Thread Nik
Is there any reason why bold and italic typefaces can't seem render views correctly when underline, strikeout or teletype works fine? Same goes for font face, color and size. Bold Italics Underline Strikeout Teletype This is some text! --~--~-~--~~~---~--~~ You re

[web2py:22481] Re: ticketing support on GAE

2009-05-23 Thread mdipierro
If this does not affect too many files it may get it, please send it to me so that I can take a look. Massimo On May 23, 7:36 am, HansD wrote: > I've made it working too, including a working ticket page. > Indeed a ugly hack is needed to store the db value in the request > object, I've not yet

[web2py:22482] Re: SQL Import

2009-05-23 Thread mdipierro
I did not get it. Twice. :-( On May 22, 6:11 pm, dlypka wrote: > I did email it last Monday. > I have just resent it. > > On May 22, 8:35 am, mdipierro wrote:> Can you email > the new auto to me? > > > On May 22, 1:19 am, dlypka wrote: > > - --~--~-~--~~~---~--~---

[web2py:22483] Re: Form elements

2009-05-23 Thread mdipierro
db.table.field.writable=False db.table.field.readable=False or db.table.field.writable=False #db.table.field.readable=False makes the field readonly. On May 23, 8:02 am, Elcimar wrote: > Sorry my laziness on searching a little more into this forum/ > documentation/web. > > I think I understan

[web2py:22484] new in trunk args[i] == None

2009-05-23 Thread mdipierro
A recurrent problem in web2py is that request.args is a list and if no request.args are provided request.args[0] returns a ticket. To avoid this I have a created a new class called storage.List and not request.args[i] returns None if the index i is out of bounds. This does not break anybody's cod

[web2py:22485] Re: small paid project with web2py and nicEditor

2009-05-23 Thread mdipierro
- from the web page of nicedit download nicedit packed with nicUpload plugin. - edit nicEdit.js replace var nicUploadButton=nicEditorAdvancedButton.extend({nicURI:"http:// files.nicedit.com/", with var nicUploadButton=nicEditorAdvancedButton.extend({nicURI:"http:// YOURUPLOADURL", I h

[web2py:22486] Re: small paid project with web2py and nicEditor

2009-05-23 Thread Horst Herb
On Sat, May 23, 2009 at 11:46 PM, mdipierro wrote: > var nicUploadButton=nicEditorAdvancedButton.extend({nicURI:"http:// > YOURUPLOADURL", > > I have not tried but it should do the trick. The documentation suggests that they require a specific upload protocol Horst --~--~-~--~~

[web2py:22487] Re: small paid project with web2py and nicEditor

2009-05-23 Thread mdipierro
I would just print request.vars, request.args and requesy.body.read() whatever it is, is a trivial protocol since it is coded in very few lines. On May 23, 8:48 am, Horst Herb wrote: > On Sat, May 23, 2009 at 11:46 PM, mdipierro wrote: > > var nicUploadButton=nicEditorAdvancedButton.extend({nic

[web2py:22488] Re: Update and delete

2009-05-23 Thread annet . vermeer
Kacper, Thanks for your reply. Problem solved. 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 t

[web2py:22489] Re: SQL Import

2009-05-23 Thread dlypka
Did you get it on my 3rd attempt (from hotmail)? On May 23, 9:24 am, mdipierro wrote: > I did not get it. Twice. :-( > > On May 22, 6:11 pm, dlypka wrote: > > > > > I did email it last Monday. > > I have just resent it. > > > On May 22, 8:35 am, mdipierro wrote:> Can you > > email the new aut

[web2py:22490] Re: SQL Import

2009-05-23 Thread dlypka
It looks like the zip is corrupted. I will zip again and also will send the unzipped file as well - in a few minutes. On May 23, 9:24 am, mdipierro wrote: > I did not get it. Twice. :-( > > On May 22, 6:11 pm, dlypka wrote: > > > > > I did email it last Monday. > > I have just resent it. > > >

[web2py:22491] Re: custom crud

2009-05-23 Thread annet . vermeer
In case of a custom update() function form= should read like: form=crud.update(db.adres,request.args[0],next=(URL (r=request,f='crud_address'))) In web2py next is set to: URL(r=request) self.settings.update_next = URL(r=request) Which in case of a custom update function calling update() on cru

[web2py:22492] Re: new in trunk args[i] == None

2009-05-23 Thread AchipA
Tt does break existing properly written python code (and is very non- pythonesque). Think: try: target = request.args[0] except: response.flash = 'No target specified' return do_something(target) If this is an issue for people, I think they should improve their python skills (learn except

[web2py:22493] Re: new in trunk args[i] == None

2009-05-23 Thread Alexey Nezhdanov
On Saturday 23 May 2009 18:42:58 AchipA wrote: > Tt does break existing properly written python code (and is very non- > pythonesque). +1 except for harshness. Masking exceptions is a BAD THING (TM) > Think: > > try: target = request.args[0] > except: >response.flash = 'No target specified'

[web2py:22494] Re: new in trunk args[i] == None

2009-05-23 Thread mdipierro
yes but we do this already for request.vars and request.env anyway, I am not sure about myself about this. Let's here a few comments about this can I can revert it. Massimo On May 23, 10:29 am, Alexey Nezhdanov wrote: > On Saturday 23 May 2009 18:42:58 AchipA wrote:> Tt does break existing >

[web2py:22495] Re: new in trunk args[i] == None

2009-05-23 Thread AchipA
Env and vars are somewhat different, being dicts. The Proper (TM) way for those would be target = request.vars.get('myoptionalvar', None). The reason this is the Proper (TM) way is that you *have* to know when you're handling undefined data (is that a None ? Or a '' ? Maybe 0 ?) You can't just thr

[web2py:22496] Re: new in trunk args[i] == None

2009-05-23 Thread mdipierro
request.args is a special list anyway because it could be made readonly and because its elements can only be non-empty strings. This is why I have difficuly seeing how this will create conflicts. I like the fact it would allow to do record = db.table[request.args[0]] or redirect(...) when yo

[web2py:22497] Re: new in trunk args[i] == None

2009-05-23 Thread Yarko Tymciurak
On Sat, May 23, 2009 at 11:34 AM, mdipierro wrote: > > request.args is a special list anyway because it could be made > readonly and because its elements can only be non-empty strings. This > is why I have difficuly seeing how this will create conflicts. > > I like the fact it would allow to do >

[web2py:22499] Re: new in trunk args[i] == None

2009-05-23 Thread mdipierro
Changed it back and uploading to trunk. On May 23, 12:16 pm, mdipierro wrote: > ok, I think I found a better solution: > > request.args stays as originally was > > but I will also define > > request.arg0 as request.args[0] or None > request.arg1 as request.args[1] or None > request.arg2 as reque

[web2py:22500] Re: new in trunk args[i] == None

2009-05-23 Thread Yarko Tymciurak
On Sat, May 23, 2009 at 12:13 PM, Yarko Tymciurak wrote: > On Sat, May 23, 2009 at 11:34 AM, mdipierro wrote: > >> . > >> > I would like to consider if "List" is the strategically correct thing to > extend; > What about extending storage-class deque instead? > A storage-deque class with this

[web2py:22501] Re: new in trunk args[i] == None

2009-05-23 Thread Yarko Tymciurak
On Sat, May 23, 2009 at 12:27 PM, mdipierro wrote: > > Changed it back and uploading to trunk. > > On May 23, 12:16 pm, mdipierro wrote: > > ok, I think I found a better solution: > > > > request.args stays as originally was > > > > but I will also define > > > > request.arg0 as request.args[0]

[web2py:22498] Re: new in trunk args[i] == None

2009-05-23 Thread mdipierro
ok, I think I found a better solution: request.args stays as originally was but I will also define request.arg0 as request.args[0] or None request.arg1 as request.args[1] or None request.arg2 as request.args[2] or None Massimo On May 23, 12:13 pm, Yarko Tymciurak wrote: > On Sat, May 23, 200

[web2py:22503] Re: ticketing support on GAE

2009-05-23 Thread mdipierro
Look into this. in gluon.main there is a try: try: except: # try store exception on filesystem except: # just print exception if should be try: try: except: # try store exception on filesystem except: if settings.web2py_runtime_gae: # store ticket on GAE

[web2py:22502] Re: ticketing support on GAE

2009-05-23 Thread HansD
I will when I've unbroken the ticketing for non-gae :-) On May 23, 3:24 pm, mdipierro wrote: > If this does not affect too many files it may get it, please send it > to me so that I can take a look. > > Massimo > > On May 23, 7:36 am, HansD wrote: > > > I've made it working too, including a wor

[web2py:22504] Re: new in trunk args[i] == None

2009-05-23 Thread Álvaro Justen [Turicas]
On 5/23/09, mdipierro wrote: > > ok, I think I found a better solution: > > request.args stays as originally was > > but I will also define > > request.arg0 as request.args[0] or None > request.arg1 as request.args[1] or None > request.arg2 as request.args[2] or None I like more the old solution

[web2py:22505] Re: ticketing support on GAE

2009-05-23 Thread Alexey Nezhdanov
Sent you restricted.py.diff off-list. > If this does not affect too many files it may get it, please send it > to me so that I can take a look. > > Massimo > > On May 23, 7:36 am, HansD wrote: > > I've made it working too, including a working ticket page. > > Indeed a ugly hack is needed to store

[web2py:22506] Re: ticketing support on GAE

2009-05-23 Thread HansD
Send the patch via email made it that tickets can also be stored in db outside gae (and i managed to brake the view tickets) On May 23, 7:41 pm, mdipierro wrote: > Look into this. in gluon.main there is > a > > try: >    try: >    except: >       # try store exception on filesystem > except: >

[web2py:22507] Re: Form elements

2009-05-23 Thread Pystar
You can try this: * Model.py *** db.define_table("Foo", db.Field("foo1", "string", length=32, default=None, requires=IS_NOT_EMPTY()), db.Field("foo2", "string", length=32, default=None, requires=IS_NOT_EMPTY()), db.Field("foo3", "string", length=32, default=

[web2py:22508] Re: RFC .html, .json, /xml etc

2009-05-23 Thread Álvaro Justen [Turicas]
I really like this - the web2py way to do this. :-) On 5/22/09, mdipierro wrote: > > This is now done in trunk. > > - download trunk > - Create a new app > - make sure you have the new views/generic.* in the new app > > - edit default.py and create an action: > > def test(): > return dict(ti

[web2py:22509] Re: new in trunk args[i] == None

2009-05-23 Thread AchipA
Hang on, not sure if we're talking about the same thing. Style, as in preference of 'if' over 'try' is okay to discuss (although I think *forcing* people to use 'if' is wrong). This proposed change, however, inherently BREAKS backward compatibility, as seen from my example, for anybody using the E

[web2py:22510] Hosting

2009-05-23 Thread Pynthon Pynthon
Hello Who knows some cheap (30 Dollar/Euro a year) or free hosting? Without need to install W2P. Thanks, Pynthon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, s

[web2py:22511] Auth problem

2009-05-23 Thread Hasanat Kazmi
Hi, I am newbie to web2py. I am working on a project where multiple people will have to get different type of authentication, (e.g. teacher and student have different level of access to the system). Now the problem is that I can not create different instances of Auth class, e.g. autht = Auth(glob

[web2py:22513] Using GAE's ReferenceProperty in web2py

2009-05-23 Thread Dan
Hello- I am just starting out with both GAE and web2py. After reading through the GAE docs and thinking about my data, I designed a data model that is a hierarchy of a few levels using ReferenceProperty attributes to create the relationships between levels. Here is a simplified example of what I'm

[web2py:22512] DECIMAL or NUMERIC type for database fields

2009-05-23 Thread Francois (Jersey)
Dear all, Having a numeric/decimal support for web2py is key to produce applications including accounting or financial aspects, and there had been discussions about it back in March. I understand that the reason for not including decimal or numerical is that it is not supported by all the databa

[web2py:22514] Re: new in trunk args[i] == None

2009-05-23 Thread carlo
I am definitely with AchipA this time: no need to change request.args carlo On 23 Mag, 21:32, AchipA wrote: > Hang on, not sure if we're talking about the same thing. Style, as in > preference of 'if' over 'try' is okay to discuss (although I think > *forcing* people to use 'if' is wrong). This

[web2py:22515] Re: Auth problem

2009-05-23 Thread Hasanat Kazmi
Now, I have changed database, I have switched to mysql, and whole database is empty. Now it gives me this error: Table 'web2py.teacher' doesn't exist If create table myself, it says it already exists. Any help? On May 23, 11:49 pm, Hasanat Kazmi wrote: > Hi, > I am newbie to web2py. I am working

[web2py:22516] Re: new in trunk args[i] == None

2009-05-23 Thread mdipierro
other options that will leave the current syntax unchanged 1) request.args.one, request.args.two, ... request.args.last 2) request.args.first, request.args.second, ... request.args.last 3) request.args(0), request.args(1), ... request.args(-1) 4) request.args.get(0,None), request.args.get(1,No

[web2py:22517] Re: Auth problem

2009-05-23 Thread mdipierro
Can you post the entire code that gives the problem? Do you have both authc and autht? There should be only one auth. When delete a database make sure also delete everything in app/ databases/ Massimo On May 23, 5:15 pm, Hasanat Kazmi wrote: > Now, I have changed database, I have switched to

[web2py:22518] jpolite + gmap

2009-05-23 Thread murray3
Hi, I am experimenting with jpolite and tried to show a google map in a module. Cannot get it to work. Maybe google Javascript code conflicts? Is it possible to get it to work with jpolite at this stage, or does it need further work. any ideas/help appreciated, Thanks Chrism --~--~-~--~-

[web2py:22519] Re: DECIMAL or NUMERIC type for database fields

2009-05-23 Thread Pystar
Cant you use "float" when specifying the field type in the database definition? On May 23, 9:43 pm, "Francois (Jersey)" wrote: > Dear all, > > Having a numeric/decimal support for web2py is key to produce > applications including accounting or financial aspects, and there had > been discussions

[web2py:22520] Re: DECIMAL or NUMERIC type for database fields

2009-05-23 Thread dlypka
A workaround (until web2py mission control can be convinced to support decimal type) would be to store them as string (similar to BCD concept) and then convert to python decimal when needed. Luckily python itself supports decimal. On May 23, 7:56 pm, Pystar wrote: > Cant you use "float" when spe

[web2py:22521] Re: Hosting

2009-05-23 Thread Pystar
Have you tried Google App Engine? On May 23, 8:38 pm, Pynthon Pynthon wrote: > Hello > > Who knows some cheap (30 Dollar/Euro a year) or free hosting? Without need > to install W2P. > > Thanks, > Pynthon --~--~-~--~~~---~--~~ You received this message because you

[web2py:22522] Re: new in trunk args[i] == None

2009-05-23 Thread Álvaro Justen [Turicas]
I like option 3) but I think having __call__ and __getattr__ is much "magic" to a new web2py user I think. It can cause confusion and must be well documented. On 5/23/09, mdipierro wrote: > > other options that will leave the current syntax unchanged > > 1) request.args.one, request.args.two, ..

[web2py:22523] Re: Auth problem

2009-05-23 Thread Álvaro Justen [Turicas]
On 5/23/09, Hasanat Kazmi wrote: > > Now, I have changed database, I have switched to mysql, and whole > database is empty. Now it gives me this error: > Table 'web2py.teacher' doesn't exist > If create table myself, it says it already exists. Any help? If database already exists you should use

[web2py:22524] Re: New in trunk .html, .xml, .json, .rss

2009-05-23 Thread Álvaro Justen [Turicas]
Massimo, and about to setting views? With "normal" views we can do: response.view = 'blablabla.html' How we can setup these RSS, XML etc. views with response? Is there a way? If not, I think we should create one. On 5/23/09, mdipierro wrote: > > You can remove the generic.xxx file that you do no

[web2py:22525] Re: Auth problem

2009-05-23 Thread Hasanat Kazmi
I have two different objects for Auth autha = Auth() authb = Auth() Can we have multiple instances of Auth, if no then why not? On May 24, 4:03 am, mdipierro wrote: > Can you post the entire code that gives the problem? > > Do you have both authc and autht? There should be only one auth

[web2py:22526] Re: Non-relational databases

2009-05-23 Thread Cory Preus
> Perhaps some unification between these two - so that applications can be > portable accross both types - will emerge, and this would be useful. > > But I think the first step is to cleanly, intentionally separate the two > kinds of back ends and see where that leads. These two statements are ke

[web2py:22527] Re: Using GAE's ReferenceProperty in web2py

2009-05-23 Thread mdipierro
Hi Dan, for now we do not support GAE ListProperty becase it would make the code not portable on relational databases. This is what you can do: db.define_table('user', SQLField('name'), SQLField('email'), SQLField('phone'), SQLField('pets')) db.define_table('pet', SQLField('name'),

[web2py:22528] Re: jpolite + gmap

2009-05-23 Thread mdipierro
I do not know. I do not think it should conflict. I have not tried it yet. On May 23, 6:33 pm, murray3 wrote: > Hi, > I am experimenting with jpolite and tried to show a google map in a > module. > Cannot get it to work. Maybe google Javascript code conflicts? > > Is it possible to get it to wor

[web2py:22529] Re: DECIMAL or NUMERIC type for database fields

2009-05-23 Thread mdipierro
Mission control is convinced there is no real reason not to use double since, even if the database may store them as decimals there is no decimal type in python, hence this extra conversion can only hurt you. You can very much mimic decimals using validators: class IS_DECIMAL: def __init__ (s

[web2py:22530] Re: New in trunk .html, .xml, .json, .rss

2009-05-23 Thread mdipierro
currently you can set view but that overrides the requested extension. For example http:///action.xml def action(): response.view='myview.html' return dict() unless def action(): response.view='myview.'+request.extension return dict() Is this sufficient? I think so. On M

[web2py:22531] Re: Auth problem

2009-05-23 Thread mdipierro
You can but I do not see why you would ever do it. I am sure there is a better way to do what you are trying to do and perhaps you should explain what you are trying to do. Anyayw, since this is what you are doing there are some caveats. auth.settings.table_user by default is called 'auth_user'

[web2py:22532] Re: Non-relational databases

2009-05-23 Thread mdipierro
> 1. A separate DAL for GAE/BigTable is needed to harness it. web2py is > too relational specific and not portable to column oriented databases > like BigTable. After going through several data model design > iterations and getting to one that feels correct, web2py imposes the > relational model

[web2py:22533] Re: New in trunk .html, .xml, .json, .rss

2009-05-23 Thread Álvaro Justen [Turicas]
Yes, I think so. Using only response.view = 'myview' (without extension) works too? On 5/24/09, mdipierro wrote: > > currently you can set view but that overrides the requested extension. > For example > > http:///action.xml > > def action(): > response.view='myview.html' > return d

[web2py:22534] Re: New in trunk .html, .xml, .json, .rss

2009-05-23 Thread mdipierro
It works in the sense that it will for a file without extension. On May 23, 11:54 pm, Álvaro Justen [Turicas] wrote: > Yes, I think so. > > Using only response.view = 'myview' (without extension) works too? > > On 5/24/09, mdipierro wrote: > > > > > > > currently you can set view but that overr

[web2py:22535] Re: Non-relational databases

2009-05-23 Thread Cory Preus
> Can you make a concrete example? It will help us improve. The oft-cited ListProperty is a great example. Because GAE/BigTable doesn't provide substr support, we have a couple options for a search facility. One is to take a string, say "foobar" and tokenize it into parts. ['fo','oo','ba','ar','

[web2py:22536] executesql is safe?

2009-05-23 Thread b-global.net
Hello: I'm really new using python and web2py, and now I need to make some dynamic queries (the table name and the field name will be dynamic), and I think that I can use: executesql But I have some questions: 1.- Is more safe to use executesql? 2.- Advantage and disadvantage of executesql?

[web2py:22537] Re: Non-relational databases

2009-05-23 Thread mdipierro
Good point. I think we can and should support listproperty. I also think its behavior can be mimicked in relational databases. This will probably happen within 1-2 weeks. Massimo On May 24, 12:50 am, Cory Preus wrote: > > Can you make a concrete example? It will help us improve. > > The oft-cit

[web2py:22538] Re: executesql is safe?

2009-05-23 Thread mdipierro
> But I have some questions: > > 1.- Is more safe to use  executesql? It is less safe because you must validate values yourself to avoid SQL- injection vulnerabilities. > 2.- Advantage and disadvantage of executesql? No advantage if you have the option not to use it. If you need to build a quer

[web2py:22539] Re: Non-relational databases

2009-05-23 Thread Yarko Tymciurak
Note that testing of appengengine specific development can / should be able to go on local machines; I haven't tried it, but I will remind of the announcement in http://googleappengine.blogspot.com/2009/05/web2py-support-new-datastore-backend.html of the datastore backend - claiming to be more rob