[web2py:14387] Re: 1.55rc2 and Happy New Year.

2009-01-01 Thread pmate
Always working to web2py, even on holidays, eh? :-) Happy new year to all! Paolo On 1 Gen, 12:00, mdipierro wrote: > reposted. to fix a change that could have broken backward > compatibility. > > Massimo > > On Dec 31 2008, 9:53 am, mdipierro wrote: > > > Please check out > > >http://mdp.cti.d

[web2py:14115] Re: MERRY CHRISTMAS ALL!

2008-12-24 Thread pmate
Merry Christmas to all of you and to your families. Let's hope it will bring to all a little more of peace. Paolo On Dec 23, 6:09 pm, "Yarko Tymciurak" wrote: > Whether you celebrate Christmas or not, > I wish you all - Peace on Earth, and Goodwill amongst People... > > Thanks for the sense of

[web2py:14114] Re: reportlab in web2py?

2008-12-24 Thread pmate
Pisa is really nice, but i'm totally pro reportlab. It's true that it is a little heavy but it's a great solution for printing in web2py Paolo On Dec 24, 3:36 pm, Timothy Farrell wrote: > Just like you would normally run a long-running process in web2py, os.spawn > is my favorite (python offer

[web2py:14039] Re: css doubts

2008-12-22 Thread pmate
e is loaded at all and check out the > > path of the css file from html source, does it point to correct > > location. > > > -Marko > > > On 22 joulu, 04:02, pmate wrote: > > > Hi all, > > > in my static/styles.css i added: > > > > /*User

[web2py:13989] css doubts

2008-12-21 Thread pmate
Hi all, in my static/styles.css i added: /*User Information*/ #logged { width:100%; height:14px; color: black; font-size: 0.75em; text-align: right; display:block; margin-top: 0.5em; } #logged p { text-align: right; margin-right: 5.0em; color: #195866; } and in my layout.html: {{if t2

[web2py:13859] Re: select like and form.vars

2008-12-19 Thread pmate
ok, i solved this way: records=db(db.names.surname.like('%'+form.vars.surname+'%')).select() Paolo On 19 Dic, 11:48, pmate wrote: > This istruction doesn't work: > records=db(db.names.surname.like('%(form.vars.surname')).select() > > but w

[web2py:13857] select like and form.vars

2008-12-19 Thread pmate
This istruction doesn't work: records=db(db.names.surname.like('%(form.vars.surname')).select() but why? I would want to select all the records in db.names whose surname begins with the content of form.vars.surname. E.g. form.vars.surname='cli' result: 'clinton' 'clio' 'clippers' better, my desi

[web2py:13837] Re: security tips

2008-12-18 Thread pmate
Great post, Massimo! Thanks Paolo On 18 Dic, 19:59, mdipierro wrote: > simple way to block attackers on Linux > > 1) give sudo access to user running web2py to /sbin/iptables > 2) create a new app, let's call it "gatekeeper" with the following > default.py controller > >      def block(): >    

[web2py:13788] Re: Date

2008-12-18 Thread pmate
> Massimo > > On Dec 17, 5:51 pm, pmate wrote: > > > this doesn't work: > > > form=FORM(TABLE( > >         TR(TD('Data 1:'),TD(INPUT > > (_class="date",_type="text",_name="data1",requires=IS_DATE('%d/%m/ > &g

[web2py:13763] Re: Date

2008-12-17 Thread pmate
this doesn't work: form=FORM(TABLE( TR(TD('Data 1:'),TD(INPUT (_class="date",_type="text",_name="data1",requires=IS_DATE('%d/%m/ %Y',error_message='date format: gg/mm/', TR(TD('Data 2:'),TD(INPUT (_class="date",_type="text",_name="data2",requires=IS_DATE('%d/%m/ %Y',error_

[web2py:13528] Re: print function

2008-12-13 Thread pmate
, inside: if form.accepts(request.vars,session): ??? ??? how can i call that function myPrint() in controller printings and, after printing, get back to my default controller? Thanks Paolo On 12 Dic, 19:21, pmate wrote: > edit: > redirect(URL(r=request,c='printings',

[web2py:13481] Re: print function

2008-12-12 Thread pmate
edit: redirect(URL(r=request,c='printings',f='myPrint',args=[myDict])) On 12 Dic, 19:03, pmate wrote: > Hi, > using pyrtf i created a new controller called printings.py. > In it i have a function: > def myPrint(): >     myDict = request.args[0] >    

[web2py:13479] print function

2008-12-12 Thread pmate
Hi, using pyrtf i created a new controller called printings.py. In it i have a function: def myPrint(): myDict = request.args[0] ... ... return q.dumps(doc) from my default controller i want to call that function passing to it a dictionary. After it finishes printing i want to get

[web2py:13378] Re: t3 on launchpad, t2 will die

2008-12-11 Thread pmate
; > On Thu, Dec 11, 2008 at 8:10 AM, mdipierro wrote: > > > nothing changes, except the include statement in your app. t2.py is in > > t3 and will stay there. > > > Massimo > > > On Dec 11, 2:18 am, pmate wrote: > > > Hi Massimo, > > > i am usin

[web2py:13333] Re: t3 on launchpad, t2 will die

2008-12-11 Thread pmate
Hi Massimo, i am using t2 with my application. I downloaded it and imported as plugin_t2. Now, t2 is going to be deprecated as you say. So, in which way should i replace it in my application with t3? I read that T3 "is" the application, but how to use it in a existing one? Just a little bit confus

[web2py:13078] Re: new T2

2008-12-07 Thread pmate
t2 in YOUR app > > Search this grouup for t2 wiki to see an exmple > > You include t2 in your app's model file. > > Hope this helps (I'm out right now, replying from my Moto Q9). > > Regards > Yarko > > -Original Message- > From: pmate <[EMAIL PROT

[web2py:13064] Re: new T2

2008-12-06 Thread pmate
ailable;  the link > Massimo provides he makes manually. > > Regards, > Yarko > > On Sat, Dec 6, 2008 at 5:51 PM, pmate <[EMAIL PROTECTED]> wrote: > > > hi Yarko, > > thanks for your answer. Could you please post the direct link to > > t2_plugin.tar. > >

[web2py:13059] Re: new T2

2008-12-06 Thread pmate
s usually up to date w/ launchpad > by anywhere from minutes to a day or two. > > Regards, > Yarko > > On Sat, Dec 6, 2008 at 5:06 PM, pmate <[EMAIL PROTECTED]> wrote: > > > I downloaded t2 from > >http://mdp.cti.depaul.edu/examples/static/web2py.app.plug

[web2py:13056] Re: new T2

2008-12-06 Thread pmate
I downloaded t2 from http://mdp.cti.depaul.edu/examples/static/web2py.app.plugin_t2.tar, called it plugin_t2. Login, logout work perfect but when i call: def reset_password(): return t2.reset_password() or def reset_password(): return dict(form=t2.reset_password()) i get respectively: def reset_

[web2py:12956] Re: redirection

2008-12-05 Thread pmate
so, which is the correct way to pass args=[tablename] in order to make work correctly: if len(request.args)==2 and request.args[0] in db.tables: table=request.args[0] Paolo On 5 Dic, 22:24, mdipierro <[EMAIL PROTECTED]> wrote: > > def provvedimenti_insert(): > >         id=requ

[web2py:12947] Re: redirection

2008-12-05 Thread pmate
eer) return dict(form=form) Paolo On 5 Dic, 16:13, mdipierro <[EMAIL PROTECTED]> wrote: > I cannot say which one line is 230 without the entire app. > It may help if you print request > > On Dec 5, 2:35 am, pmate <[EMAIL PROTECTED]> wrote: > > > Massi

[web2py:12928] Re: redirection

2008-12-05 Thread pmate
Massimo, it keeps not working. This is the error it gives when i call the update function: Error traceback Traceback (most recent call last): File "gluon\restricted.pyc", line 62, in restricted File "C:\...\myapp/controllers/gestione.py", line 255, in File "gluon\globals.pyc", line 55, in

[web2py:12898] Re: redirection

2008-12-04 Thread pmate
i made some attempts: to avoid calling eval(dbname) and passing dbname as args[0], in gestione/update: def update(): try: dbname='db' table=request.vars.tabella and in default/provvedimenti_insert: linkto=URL(r=request,c='gestione',f=

[web2py:12891] Re: redirection

2008-12-03 Thread pmate
Thanks a lot massimo i will follow your suggestions and i will study your code. Ciao Paolo On 4 Dic, 01:02, mdipierro <[EMAIL PROTECTED]> wrote: > I edited the code below, look for the lines that contain refereer > > def update(): >      try: >          dbname=request.args[0] >          db=eval(

[web2py:12884] Re: redirection

2008-12-03 Thread pmate
So, wich is the best way to do it? What do you suggest? Paolo On 3 Dic, 17:24, mdipierro <[EMAIL PROTECTED]> wrote: > Yes, as long you do not allow the possibility of two browser windows > on two different pages. > > Massimo > > On Dec 3, 9:58 am, pmate <[EMAIL PROT

[web2py:12875] Re: redirection

2008-12-03 Thread pmate
i made this way: in controller default: session.path='http://'+request.env.http_host+request.env.path_info in controller gestione/update: redirect(session.path) it seems it is working but i wonder if this is the correct solution On 3 Dic, 10:26, pmate <[EMAIL PROTECTED]> wrote

[web2py:12858] Re: redirection

2008-12-03 Thread pmate
d=id) i tried redirect(request.env.http_referer) as you suggested but it didn't work Paolo On 3 Dic, 03:45, mdipierro <[EMAIL PROTECTED]> wrote: > PS. Your english is not bad all. Now worse than mine anyway. ;-) > > On Dec 2, 6:55 pm, pmate <[EMAIL PROTECTED]> wrot

[web2py:12839] redirection

2008-12-02 Thread pmate
Hi all, my update function ends with: .. if form.accepts(request.vars,session): response.flash=T('done!') redirect(URL(r=request,f='select/%s/%s'%(dbname,table))) ok, so when a form is validated, an update is performed and there is the redirection to a prefixed page. Bu

[web2py:12714] Re: one to many relations

2008-12-01 Thread pmate
t consider it a good software engineering practice. That's all > > Pmate: with respect, how does referencing by id or field affect > indices in respect of speed and foreign relationship? (apart from if > the non-id is text it will probably be a little slower). > --~--~-~-

[web2py:12692] Re: focus on a specific text input

2008-11-30 Thread pmate
for me - assumes address is in the first form: > > > <!-- > document.forms[0].address.focus() > //--> > > > On Nov 30, 11:48 pm, pmate <[EMAIL PROTECTED]> wrote: > > > hi, > > this is my code in the view: > > > {{extend 'lay

[web2py:12687] focus on a specific text input

2008-11-30 Thread pmate
hi, this is my code in the view: {{extend 'layout.html'}} Page Title {{=form}} so, i want that the focus goes to the field named "address" in my form. But it doesn't work. What am i missing? --~--~-~--~~~---~--~~ You re

[web2py:12627] Re: one to many relations

2008-11-29 Thread pmate
yes Denesi, that's the point. Usually indexes in a table can be more than one. And they are useful for the speed of queries and for foreign relationship, i think --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py

[web2py:12612] Re: one to many relations

2008-11-28 Thread pmate
Your second solution is exactly that one that i have chosen as alternative to my first question. Thanks a lot Paolo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group,

[web2py:12606] Re: one to many relations

2008-11-28 Thread pmate
Yes, but in this case field codice is unique too. The only difference is that i want to choose its value, not the autoincrement of an id field. Paolo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framew

[web2py:12602] Re: one to many relations

2008-11-28 Thread pmate
Thanks for your quick replay. My problem is there: i don't want the relation on id of violazioni because if i delete a record the id sequence would change. For example in violazioni: id codice violazione 1 1 something 2 2 other thing 3 3 an other thing Well, if i delete

[web2py:12590] one to many relations

2008-11-28 Thread pmate
Hi, in my model i have: db.define_table('violazioni', SQLField('codice','integer',requires=IS_NOT_IN_DB (db,'violazioni.codice',error_message="codice duplicato")), SQLField('infrazione','text',requires=IS_NOT_EMPTY()), SQLField('note','text')) db.define_table('sanzi

[web2py:12372] Re: error with date

2008-11-22 Thread pmate
Massimo, Yarko, the problem was exactly there. I didn't realize that " 'data' " was missing... Thanks a lot Paolo --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, s

[web2py:12367] Re: error with date

2008-11-22 Thread pmate
ct. When do you get the error? It is possible > now is a string instead of a datetime.date object? > Which database backend? > > Massimo > > n Nov 22, 10:13 am, pmate <[EMAIL PROTECTED]> wrote: > > > Hi all, > > > in model: > > db.define_table('

[web2py:12361] error with date

2008-11-22 Thread pmate
Hi all, in model: db.define_table('people', SQLField('surname'), SQLField('birth',requires=IS_DATE('%d/%m/%Y'),default=now) but it gives me this error: return value.strftime(str(self.format)) AttributeError: 'str' object has no attribute 'strftime' why? I even tried with: IS_DATE(T('%d

[web2py:12079] Re: problem with record sum

2008-11-18 Thread pmate
oops, i just wanted to have the id of the logged user in that field... Paolo --~--~-~--~~~---~--~~ 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

[web2py:12063] Re: problem with record sum

2008-11-18 Thread pmate
Thanks Massimo, _extra[str( solved my first problem. For the second one, here is what you asked: db.define_table('movimenti', SQLField('data','date',requires=IS_DATE('%d/%m/%Y'),default=now), SQLField('t2_person_id',default=db.t2_person.id), SQLField('ente_id',db.enti), SQLFi

[web2py:12053] Re: problem with record sum

2008-11-18 Thread pmate
i don't know what's going on, even this stopped working: def nuovo_carico(): session.idnuovocarico=gemag.movimenti.insert(tipo='carico') redirect(URL(r=request,f='carico')) it gives me: Traceback (most recent call last): File "/home/pmate/software/w

[web2py:12052] problem with record sum

2008-11-18 Thread pmate
What's the problem with this piece of code: Tot. articoli {{tot=x._extra[db.articles.quantity.sum()]}} {{if tot==None: tot="-"}} {{=tot}} It gives me this error: Traceback (most recent call last): File "/home/pmate/s

[web2py:11905] Re: web2py.net?

2008-11-15 Thread pmate
Well done Vihang! --~--~-~--~~~---~--~~ 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, send email to [EMAIL PROTECT

[web2py:11862] Re: web2py.net?

2008-11-14 Thread pmate
Well, my opinion: i just don't understand why to buy web2py.net,web2py.org, web2py.eu, etc. Really i don't understand. For what? I think, in respect of Massimo who created it, of the developers who work on it day-by-day and of community, would be nice to make an other choise, like Yarko'advice. Ju

[web2py:11775] Re: navigate form

2008-11-13 Thread pmate
Thanks Massimo, for option in form[0][1][1][0]: if option['_value']==str(myparameter): option ['_selected']='selected' did it. > You should never need to get to this low level of programming anyway. > This may mess up automatic form handling. > > Massimo form is the form of a n

[web2py:11767] navigate form

2008-11-13 Thread pmate
Hi, in a form, for a dropdown select control: form[0][1][1][0]['value']='Pc' doesn't work. What i mean is that the value is set to 'Pc' but it doesn't show selected. If it is, instead, a text one, it works perfectly. Where do i go wrong? --~--~-~--~~~---~--~~ You

[web2py:11295] Re: reports generating

2008-11-06 Thread pmate
dedicated controller. there is no specific > web2py doc but you can read the example on making RTF documents. The API are > different but the idea is the same. Massimo On Nov 6, 9:08 am, pmate<[EMAIL > PROTECTED]>wrote:Hi, i read that reportlab it is perfect to generate repor

[web2py:11279] reports generating

2008-11-06 Thread pmate
Hi, i read that reportlab it is perfect to generate reports from web2py. Any tutorial, howto, online examples? For example: is it better to embed the report generation code in a separate controller (for example myprints.py) or it is good pratice to embed it in the default one? I couldn't find any

[web2py:11237] Re: t2.display image file

2008-11-05 Thread pmate
you may be already > including jquery.js (the first) and the web2py_ajax (the last). > > Anyway it should not hurt. > > Massimo > > On Nov 4, 5:07 pm, pmate <[EMAIL PROTECTED]> wrote: > > > Ok, including {{=t2.include()}} in my html solved the problem. > &g

[web2py:11156] Re: t2.display image file

2008-11-04 Thread pmate
; In your page add {{=response.files}} to see what you need. > > Massimo > > On Nov 4, 4:40 pm, pmate <[EMAIL PROTECTED]> wrote: > > > Thanks Massimo, > > it was it! Now the image displays correctly but the zoom function > > doesn't work. > > Any othe

[web2py:11151] Re: t2.display image file

2008-11-04 Thread pmate
Thanks Massimo, it was it! Now the image displays correctly but the zoom function doesn't work. Any other mistake? Thanks again On 4 Nov, 23:37, mdipierro <[EMAIL PROTECTED]> wrote: > do you have in controller? > > def download(): return t2.download() > > Massimo &g

[web2py:11148] t2.display image file

2008-11-04 Thread pmate
Hi, i'm new to web2py but i'm impressed: it is great. I have a problem with t2 plugin and display images like in the example of puppy: in my model: db.define_table('articoli', SQLField('myserial'), SQLField('categoria'), SQLField('descrizione'),