Closed GoogleCodeExporter closed 9 years ago
I guess that self.ora return a non-unicode string. You should try:
def __unicode__(self):
return unicode(str(self.ora))
Original comment by gael.pas...@gmail.com
on 12 Oct 2010 at 9:43
*Thanks, that did the trick!*
Now I'm stuck on another thing: I have a table I NEED to insert primary_key by
hand but admin controller does not show it.
Product
+---------------+
| serial | desc |
+---------------+
| 1245 | item |
| 1657 | item |
| 9999 | item |
...
product = Table('product', Base.metadata,
Column('serial', Integer, primary_key=True, autoincrement=False),
Column('desc', Unicode(40))
)
I'm using sqlite in development and I read autoincrement is disabled but in
production I'll switch to mySQL which I can't install on this machine.
Will it work with mySQL and let me insert/edit serial or it's not expected to
work?
I wish I'll not iscover this thing only at deployment...
Sorry if I hijack my own issue ^^
Thanks again
Original comment by neur...@gmail.com
on 12 Oct 2010 at 10:09
As I remember you can use pk=True to allow to edit primary keys:
http://docs.formalchemy.org/forms.html#formalchemy.forms.FieldSet.configure
Original comment by gael.pas...@gmail.com
on 12 Oct 2010 at 10:23
That worked too, thanks a lot!
P.S. 00:00:00 keeps on being shown as an empty string... not a problem anyway.
Thanks for all your answers.
Original comment by neur...@gmail.com
on 12 Oct 2010 at 10:47
P.P.S.: this my be a (little) bug:
if I edit by hand my primary_key (that's the product serial, let's say from 11
to 22) after hitting save I'm redirected to ...Product/models/11 that, of
course returns, a 404.
Cheers
Original comment by neur...@gmail.com
on 12 Oct 2010 at 10:51
Can you fill an other issue for this with an explicit title ? thanks
Original comment by gael.pas...@gmail.com
on 12 Oct 2010 at 10:54
Done,
about my first post: I also have found that editing / adding an already
existing time to the table (declared with unique=True) I get an unhandled
IntegrityError.
IntegrityError: (IntegrityError) column ora is not unique u'INSERT INTO timer
(ora) VALUES (?)' ('06:00:00.000000',)
Should I add this issue too?
I'm asking it before since I don't want to seem a nutcracker... ^^
Thank you
Original comment by neur...@gmail.com
on 12 Oct 2010 at 11:37
Original issue reported on code.google.com by
neur...@gmail.com
on 12 Oct 2010 at 9:16