[web2py] Re: Date field represent not respected when for validation fails [SOLVED]

2010-08-31 Thread smg
Sorry, what I use not my own conversation, but I try to change
calendar widget for date field and have same problem like RipRyness
had.

I create small application just to recreate this problem:


In model:

T.force('it') # force internationalization to change date format to %d/
%m/%Y
db.define_table('atable',
Field('a','date',requires=IS_NULL_OR(IS_DATE(str(T('%Y-
%m-%d',widget=SQLFORM.widgets.date.widget),
Field('b','date',requires=IS_NULL_OR(IS_DATE(str(T('%Y-
%m-%d'))


In controller:

def index():
return dict(form=crud())

def data():
return dict(form=crud())


In view:

{{extend 'layout.html'}}

{{=form}}


Let's try to add row with form at 'default/index/create/atable'.  Put
proper formatted date 31/08/2010 to  field A  and and incorrect date
01/08/201 to field B. After submitting this form, I got normal red
message about error in field B, but date in field A changed from
31/08/2010  to 2010-08-31. This effect happens if I change widget. For
this test I use native widget for date - SQLFORM.widgets.date.widget,
but have described problem. But if I remove
widget=SQLFORM.widgets.date.widget from Field A, all works fine, with
correct date format.   I use web2py 1.83.2


[web2py] Re: Date field represent not respected when for validation fails [SOLVED]

2010-09-04 Thread smg
Sorry, I forgot to add 'old_value' to widget. My fault. Now all works
right.


[web2py] Re: Simple PDF Report in Slices

2010-10-01 Thread smg
Hi Mariano,

I want to say thank you for  fpdf port.

> Pyfpdf should work well with accented characters (LATIN1, by PDF specs).
> In fact I use it in Argentina (spanish).

> Of course, suggestions are wellcome, and any fix will be accepted :-)

Pyfpdf add_font method is broken in 1.54b, and  I made quick dirty
fix  for my web2py application. Is it hard to port UTF-8 support to
pyfpdf?



[web2py] Re: Simple PDF Report in Slices

2010-10-01 Thread smg
Thank You!

On Oct 1, 3:42 pm, mdipierro  wrote:
> Meanwhile I remind you that you can do
>
> from gluon.contrib.markmin2pdf import markmin2pdf
> print markmin2pdf("""
> # title
> ## section
>
> Paragraph
>
> 
> this | is
> a    | table
> 
> """)
>
> requires latex and pdflatex installed. Supports some utf8. European
> languages are fine but not russian and chinese. Sorry.
>
> On Oct 1, 8:12 am, smg  wrote:
>
> > Hi Mariano,
>
> > I want to say thank you for  fpdf port.
>
> > > Pyfpdf should work well with accented characters (LATIN1, by PDF specs).
> > > In fact I use it in Argentina (spanish).
> > > Of course, suggestions are wellcome, and any fix will be accepted :-)
>
> > Pyfpdf add_font method is broken in 1.54b, and  I made quick dirty
> > fix  for my web2py application. Is it hard to port UTF-8 support to
> > pyfpdf?


[web2py] Re: web2py 1.93.1 is OUT

2011-03-04 Thread smg

http://web2py.com/examples/default/changelog - wrong version number
(typo).