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
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
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
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
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
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
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
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():
>
> 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
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_
, 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',
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]
>
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
;
> 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
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
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
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.
> >
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
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_
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
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
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
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=
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(
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
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
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
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
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).
>
--~--~-~-
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
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
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
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,
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
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
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
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
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('
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
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
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
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
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
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
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
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
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
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
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
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
; 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
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
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'),
53 matches
Mail list logo