[web2py:14180] Re: Minimal web2py installation on GAE

2008-12-28 Thread mdipierro
mkdir applications/mynewapp cd applications/mynewapp tar xvf ../../welcome.tar Massimo On Dec 28, 1:35 am, sudhakar m sudhakar...@gmail.com wrote: Sorry for the double post. I was having admin welcome, in the application folder. Now its 1.1mb. I was of the impression tat these 2 folders are

[web2py:/] Re: IS_IN_DB ability to sort selections?

2008-12-28 Thread mdipierro
in trunk now... IS_IN_DB(orderby=) Massimo On Dec 27, 10:51 pm, Jon jondjenk...@gmail.com wrote: Sounds good. So even for alphabetical sorting, the right approach is to just return my data in the right order via the controller and then have the view iterate through it to build the

[web2py:14181] asp web hosting for your business

2008-12-28 Thread peakydh
go to my site for info about asp net web hosting for your business, http://www.davecars.com/asp_net_web_hosting.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To post to this group,

[web2py:14182] T3 patterns - wishfull thinking

2008-12-28 Thread notabene
I need 2 patterns - and I believe they would be usefull in general: - t2.copy to supplement insert, update, delete. - a popup page - attached by an edit or search button to a field - which can be customized to supply the field-content. I am not that experienced in web2py and python, and would

[web2py:/] Re: Minimal web2py installation on GAE

2008-12-28 Thread sudhakar m
Thanks massimo. I did it little bit differently. I created the symbolic link between web2py GAE folder, with GAE folder pointing to only the required files folders. I could use the admin project for editing files locally then use appcfg for upload from GAE. So far its been working great.

[web2py:14184] Re: T3 patterns - wishfull thinking

2008-12-28 Thread mdipierro
1) def mycopy(table,id): records=table._db(table.id==id).select() if not records: return False table.insert(**dict([(x,records[0][x]) for x in table.fields if not x=='id'])) return True use it as in mycopy(db.puppy,3) 2) this is very much open ended. For example you can do in

[web2py:14185] admin interface

2008-12-28 Thread ondrejs
Hi all, I've started developing some examples in web2py using admin interface + Ulipad combination. The following shortcuts would save a few clicks: - in the ticket view, where a stacktrace with files is shown, the names of files that belong to the application could be hyperlinks - the page for

[web2py:14186] Re: Minimal web2py installation on GAE

2008-12-28 Thread mdipierro
If you have time would you write a howto on AlterEgo? Massimo On Dec 28, 7:55 am, sudhakar m sudhakar...@gmail.com wrote: Thanks massimo. I did it little bit differently. I created the symbolic link between web2py GAE folder, with GAE folder pointing to only the required files folders. I

[web2py:14187] Re: admin interface

2008-12-28 Thread mdipierro
1) the ticket page is generated by the restrictederror class in gluon/ resitricted.py If you send me a patch I will include it. 2) let me think about this. I am afraid it may make the interface to cluttered. What do people think? Massimo On Dec 28, 6:56 am, ondrejs ondrej.s...@gmail.com wrote:

[web2py:14189] Re: Proposal: MVC separation - son of custom views

2008-12-28 Thread Peter
Massimo, I'm trying to use this technique, as follows: Controller: def inschrijving(): vrouw=db(db.t2_person.id==t2.person_id).select()[0] form=SQLFORM(db.t2_person,vrouw) if form.accepts(request.vars,session): response.flash='OK.' return dict(form=form) View

[web2py:14190] Re: Database Synchronization Howto and UUID

2008-12-28 Thread Fran
On Dec 27, 1:20 pm, Fran francisb...@googlemail.com wrote: Fixed it :) if you need to display an image instead of just having the name of the uploaded file, then can use the very long: db.table.field.display=lambda uuid: DIV(A(IMG(_src=URL

[web2py:14191] Re: Minimal web2py installation on GAE

2008-12-28 Thread Robin B
In gaehandler.py, you can add a section called skip_files which lists file patterns that appcfg skips when uploading to GAE. http://code.google.com/appengine/docs/configuringanapp.html#Skipping_Files I thought a skip_files section was included in the cgi handler, that skipped the tar files the

[web2py:14192] Re: Minimal web2py installation on GAE

2008-12-28 Thread Robin B
In app.yaml, the section called skip_files lists file patterns that appcfg skips when uploading to GAE. http://code.google.com/appengine/docs/configuringanapp.html#Skipping_... The skip_files patterns currently skip the tar files the admin, example app etc, since those files are not used on GAE

[web2py:14193] Helper for Custom Forms

2008-12-28 Thread rfx_labs
Some treads here disus the handling of custom forms. One hint was use SQLFORM in the controller and build anything else in the view. I don't like the idea to do things twice. Another hint was {{=form[0][1][1][0]}}. Not so handy and may break when fields are added to the table. So i wrapped

[web2py:14194] error with date field

2008-12-28 Thread carlo
I have a custom form with a date ('data_prev') field, when I try to view the table from appadmin after a date insert I get: Traceback (most recent call last): File C:\Python25\web2py\gluon\restricted.py, line 62, in restricted exec ccode in environment File

[web2py:14195] Re: Proposal: MVC separation - son of custom views

2008-12-28 Thread mdipierro
try add input name=id value={{=form.record.id}} type=hidden / On Dec 28, 9:22 am, Peter peter.kleyn...@gmail.com wrote: Massimo, I'm trying to use this technique, as follows: Controller: def inschrijving(): vrouw=db(db.t2_person.id==t2.person_id).select()[0]

[web2py:14196] Re: Helper for Custom Forms

2008-12-28 Thread mdipierro
Can you email me the code below? the indentation is messed up. Massimo On Dec 28, 9:53 am, rfx_labs l...@reproflex.de wrote: Some treads here disus the handling of custom forms. One hint was use SQLFORM in the controller and build anything else in the view. I don't like the idea to do

[web2py:14197] Re: error with date field

2008-12-28 Thread mdipierro
This should not be happening. It seems the data is incorrect in the database. Which database? Which web2py version? Can you send me (confidentially) your app via email? Massimo On Dec 28, 10:24 am, carlo syseng...@gmail.com wrote: I have a custom form with a date ('data_prev') field, when I

[web2py:14198] Re: admin interface

2008-12-28 Thread mr.freeze
On 2, I think you could contain it on a single line for most cases and reuse the code that creates the links after the word 'exposes' in the admin/design view: appadmin.py [ test | edit | delete ] exposes index, insert, download, csv, select, update, state On Dec 28, 8:37 am, mdipierro

[web2py:14199] Re: error with date field

2008-12-28 Thread carlo
Massimo, could be a datepicker issue? I noticed that if I put SQLField('data_prev','string')... in the model then everything is fine. Who should be in charge of converting the datepicker dates (which are strings) in date objects for sqlite? carlo On 28 Dic, 17:41, mdipierro

[web2py:14200] Re[2]: Bug in nesting cache?

2008-12-28 Thread Iceberg
Hi Massimo, News round up: Both of my proposals, the nesting cache, and IS_IN_SET() accepts a dict, work like a charm in web2py 1.55 rc1 ! And other things work as usual, nothing breaks. Later I'll write another feature proposal to you. Stay tune, and thanks!. :-) Best regards,

[web2py:14201] Re: error with date field

2008-12-28 Thread mdipierro
in web2py_ajax those strings are marked by T so you should be able to translate them to. there may be problems if IS_DATE is inconsistent with datepicker. Massimo On Dec 28, 11:25 am, carlo syseng...@gmail.com wrote: Massimo, could be a datepicker issue? I noticed that if I put

[web2py:14202] Re: Proposal: MVC separation - son of custom views

2008-12-28 Thread Peter
Massimo, thanks for the incredibly fast turnaround -- on a Sunday even. ;-) I've done some more experimenting. This works beautifully on my PRODUCT table. I do have to add the name=id to the form, as you suggested, to prevent a user is tampering with form error. BUT I keep having the same

[web2py:14203] Re: Minimal web2py installation on GAE

2008-12-28 Thread sudhakar m
In app.yaml, the section called skip_files lists file patterns that appcfg skips when uploading to GAE. Yep. This is a much better approach for doing the same. For contribution, I have created a dark color scheme for Edit area. I will put it in another thread, so that it can be easly

[web2py:14204] Re: Proposal: MVC separation - son of custom views

2008-12-28 Thread Peter
Oh -- forgot to say: the same SQLFORM for a t2_person embedded in the view with {{=form}} DOES work. So it seems there's a relationship between the t2 stuff and this specific way to build a custom form? Just to reiterate, the problem is still this: nothing happens if I click submit (no flash

[web2py:14205] Re: error with date field

2008-12-28 Thread sudhakar m
I too got the same error with the date field, when I was trying to import the data from csv. After investigation, it turned out to be problem with imported data. It was expecting data for date in -MM-DD format but some of my data were in YYY-MMM-DD format. After changing the data, things were

[web2py:14206] Re: Helper for Custom Forms

2008-12-28 Thread mdipierro
I really like your idea although there are some of the implemetation issues too specific. I modified it slightly and this is what I have in trunk: a=DIV('hello',DIV('world',_id='test')) print a.element(_id='test',_class=None).update(_class='junk').xml() div class='junk' id='test'world/div any

[web2py:14208] Re: Proposal: MVC separation - son of custom views

2008-12-28 Thread mdipierro
I see. You need form=SQLFORM(db.t2_person,vrouw,fields=[]) instead of form=SQLFORM(db.t2_person,vrouw) else you have errors in fields that are not visualized by the custom form. You can check this by printing: {{=form.errors}} Massimo On Dec 28, 12:02 pm, Peter

[web2py:14209] Re: Dark color scheme for admin EditArea in web2py

2008-12-28 Thread mdipierro
do you know of a way to keep the current (default) color scheme but improve the contrast in the highlighted (selected) text? Massimo On Dec 28, 12:29 pm, sudhakar m sudhakar...@gmail.com wrote: I have created a dark color scheme for EditArea. For those who are looking for better color scheme,

[web2py:14210] Re: Proposal: MVC separation - son of custom views

2008-12-28 Thread Peter
Check -- that did the trick. I didn't know that specifying the fields in the SQLFORM had this effect on the scope of the update. You live and learn... Thanks for the support! -Peter On Dec 28, 7:48 pm, mdipierro mdipie...@cs.depaul.edu wrote: I see. You need    

[web2py:14211] Re: Dark color scheme for admin EditArea in web2py

2008-12-28 Thread sudhakar m
Making modifications to only the language files(in this case python.js) will do. This will retain the existing color scheme. Each of the attributes defined in reg_syntax can hold any vaild css data. So bold, italic, underline background-color can be added. Sudhakar.M 2008/12/29 mdipierro

[web2py:14212] Re: admin interface

2008-12-28 Thread mr.freeze
Something like this for 2?: At the bottom of admin/controllers/default.py edit function: functions=None if filetype=='python' and request.args=3: data=open(path,'r').read() functions=regex_expose.findall(data) controller=request.args[2][:-3] return

[web2py:14213] Running web2py with python 2.4

2008-12-28 Thread sudhakar m
Did any one tried running web2py with python2.4. As per the documentation at download page http://mdp.cti.depaul.edu/examples/default/download, it supports only 2.5. To make the admin app to run on 2.4, what changes needs to be done? Can anyone give me some lead on this? I have a shared hosting

[web2py:14214] Re: Running web2py with python 2.4

2008-12-28 Thread sudhakar m
My fault. Got few answers from old threads. Will post back if any addiional info is required. Sudhakar.M --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py Web Framework group. To post to this group, send email

[web2py:14215] Re: Helper for Custom Forms

2008-12-28 Thread rfx_labs
Hi Massimo, This is not equivalent to your patch but it will make your simpler. I have tried your modifikation. it does all what i need, without any magic anymore , that's great. Hope it is acceptable. For me it is, hopefully this helps other too ;-) Martin

[web2py:14216] Re: IS_IN_DB ability to sort selections?

2008-12-28 Thread Jon
Massimo-- Thanks! This is fantastic. This is one of the main reasons I like this framework--it is a tightknit community. I am thinking that the new custom form helper will give me enough insight to build something to handle my many-to-many form field needs. My vision from an automated

[web2py:14217] Re: admin interface

2008-12-28 Thread mr.freeze
Whoops, you can remove this: data=open(path,'r').read() from the above sample. It is redundant. On Dec 28, 1:49 pm, mr.freeze nfre...@gmail.com wrote: Something like this for 2?: At the bottom of admin/controllers/default.py edit function: functions=None     if filetype=='python' and

[web2py:14218] Re: IS_IN_DB ability to sort selections?

2008-12-28 Thread mdipierro
The problem with many2many is not so much an implementation issues as much as a logical one. There is a reason SQL does not implement APIs for many2many. Django does what it does by considering a only one case of many2many, i.e. when there is no info associated to the link. think of buyer -

[web2py:14219] Re: admin interface

2008-12-28 Thread mdipierro
in trunk now! Thanks. On Dec 28, 2:52 pm, mr.freeze nfre...@gmail.com wrote: Whoops, you can remove this: data=open(path,'r').read() from the above sample. It is redundant. On Dec 28, 1:49 pm, mr.freeze nfre...@gmail.com wrote: Something like this for 2?: At the bottom of

[web2py:14223] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-28 Thread Peter
Fran, thanks. Yeah, I had seen the .element(...) mod. That should allow me to locate and rip the download URL from the HTML tree and put it in an IMG tag. Not the prettiest way, and I would like to have something that works in production 1.54. So I will maintain my question on how to retrieve

[web2py:14224] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-28 Thread mr.freeze
You might try using SQLFORM's col3 parameter. It comes in handy for me. On Dec 28, 3:42 pm, Peter peter.kleyn...@gmail.com wrote: I need to display a form with images inline, ie with img tags. The default behavior for SQLFORM is to only show a file link on the form (assuming I provide a

[web2py:14225] Re: Helper for Custom Forms

2008-12-28 Thread rfx_labs
Jon, If you use this successfully to build custom form(s) can you post a sample of your controller and view here? Model: proof=SQLDB(sqlite://proof.db) proof.define_table('match', SQLField('name'), SQLField('min', 'integer'),

[web2py:14226] running web2py on a hosted machine

2008-12-28 Thread paratracker
Starting up python2.5 web2py.py cannot be all there is to getting web2py up on a hosted machine. The documentation seems to assume that there is a one to one mapping between ip addresses and websites. Hosted machines have many sites running on the same machine, so a one- to-one mapping is

[web2py:14227] Re: running web2py on a hosted machine

2008-12-28 Thread Yarko Tymciurak
If init exists, that is the default application; if not, and welcome exists, that is the default application... This is how you get websurfers who go to http://x.y.z The port you can setup from the command line (at startup;); For Apache setup - you can search Apache on

[web2py:14228] Re: Helper for Custom Forms

2008-12-28 Thread Jon
I got it working, thanks! Only question: what does the 'returns:' part of your update.html do? That part seemed hard-coded for Cyan and I couldn't figure out its purpose. Thanks! On Dec 28, 6:22 pm, rfx_labs l...@reproflex.de wrote:  Jon, If you use this successfully to build custom form(s)

[web2py:14229] Re: Helper for Custom Forms

2008-12-28 Thread Jon
One other question: it kept saying this function was invalid (.update): {{=form.element(_name=reference).update(_type=hidden)}} Can you tell me if the syntax is wrong? I see the value in making the type of some form elements hidden, etc...! Jon On Dec 28, 6:22 pm, rfx_labs l...@reproflex.de

[web2py:14230] sorting my date

2008-12-28 Thread Joel
i'm doing something like this: events = db(db.territory_event.territory==territory.id).select (db.territory_event.ALL,orderby='-date') db.territory_event.date is of type 'date' for some reason, it seems like 2020-01-28 is greater than 2008-12-28 but 2008-12-29 is not greater than 2008-12-28

[web2py:14231] Re: sorting my date

2008-12-28 Thread mdipierro
this is not Django. events = db(db.territory_event.territory==territory.id).select (db.territory_event.ALL,orderby=~db.territory_event.date) or orderby=~db.territory_event.date|db.territory_event.territory or orderby=~db.territory_event.date.month() etc. Massimo On Dec 28, 9:50 pm, Joel

[web2py:14233] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-28 Thread mdipierro
define a widget, something like: def myhelper(field,value): field_id='%s_%s' % (field._tablename,field.name) inp=INPUT(_type='file',_id=field_id,_class=field.type, _name=field.name, requires=field.requires) if not value: return inp

[web2py:14234] Re: web2py with T2 does not work on GAE

2008-12-28 Thread Miguel Goncalves
So I suppose the JOIN in the puppy tutorial is the friendship declaration. What is the recommended pattern to simulate a JOIN in order to run on the GAE? Thanks Miguel On Fri, Dec 26, 2008 at 2:54 PM, mdipierro mdipie...@cs.depaul.edu wrote: you cannot do JOINS on GAE. The puppy tutorial

[web2py:14235] AlterEgo substring search

2008-12-28 Thread mr.freeze
A search for 'widget' on AlterEgo yields no results but a search for 'widgets' found the article I was looking for. Seemed strange. Is this expected behavior? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups web2py