On Mon, Mar 11, 2013 at 08:35:48PM +0100, Alessandro Dentella wrote:
> Hi Chris,
>
> On Mon, Mar 11, 2013 at 12:08:49PM +0000, Chris Green wrote:
> > I have added an empty layout template to one of my nicks:-
> >
> > sqledit --create-template layout jessica
> >
> > However I am now completely lost as to how to use it. I've looked at
> > the demo layouts by running the demo.py but all that does is create
> > standalaone layouts.
>
> This should have created a directory named .sqledit/jessica
> Within that directory you should find a file named layout.py with commented
> code::
>
> from sqlkit.db import utils
>
> #LAYOUT =
> #utils.register_layout('table_name', LAYOUT)
>
Yes, OK, I have that - so far so good.
> that you are supposed to uncomment and modify according to you're needs:
>
> from sqlkit.db import utils
>
> LAYOUT = """
> field1, field2
> """
> utils.register_layout('table_name', LAYOUT)
>
Yes, uncommented, but should it get used by the 'parent' nick
automatically or do I have to do something else as well?
>
> > How do I, for example, change a date column in my sqledit display
> > created when I run:-
> you want to change a date column into what?
>
I don't want to change it into anything really but it would be lovely to
have one of those little date selection widgets by it.
The table I'm playing with has the following columns:-
id
Date
Description
Credit
Debit
I'd like to have a date selection widget for the Date column and also
make the Description column wider when the table is opened by sqledit.
--
Chris Green