[Booki-dev] ToDo List and Sidebar Tabs Patches

Aleksandar Erkalovic aerkalov at gmail.com
Wed Sep 29 15:24:36 PDT 2010


hi brendan,

sorry, i was (still am) a bit sick, so it took me some time.

On Mon, Sep 27, 2010 at 10:40 PM, Brendan Howell
<brendan at howell-ersatz.com> wrote:
> I had my first Booki hacking session about two weeks back with Adam, here in
> Berlin.  It was really quite pleasant.  I was surprised that I actually had
> a very easy time getting into the code and making things happen.  It's not
> perfect but it certainly seems like a nice code base to hack on and I think
> you guys have made some smart architectural decisions.  Cheers for nice
> code!

good to hear you did not have many problems. but, feel free to give
any suggestions
or say whatever is bothering you with the system. i say that because
of "it is not
perfect". but do not be afraid.... i am not sure about adam, but the
rest of us still don't
know where you live :)

> I do have to apologise for taking so long to send these patches in but they
> are attached to this mail.  Please give them a look over and let me know if
> they seem ok.  Aside from any obvious mistakes, I'm especially interested in
> knowing if I have done anything that does not fit with your coding
> conventions.

i quickly looked trough it and it looks fine. when it comes to coding
conventions. i use more
or less similar things in javascript and django. for html i don't care
much. unlike django or python
i use camelcase names and i use extra space (for arguments and etc).
everything else is unreadable to me,
and that is one of the rare things where i don't make compromise :)

> To make this stuff work, I'm going to need the following bits on the Django
> side and I'm not quite sure where I should start or if you even want me
> mucking around with the models.  The model looks something like this:
>
> todo:
>  Title - String
>  Description - String
>  Done - Boolean
>  id - Integer or UUID

well, you can do whatever you want with models on your local
installation. you might have problems
if you are using sqlite, because you can't change table definitions
and etc... the only thing that is a
big no-no is any kind of work on live booki.cc database (except
dumping it :). anyhoo, do you want
done (or status) to be only 1 and 0? did you and adam talk about it?
i know it could be changed later,
but it also means making migration scripts + possible special
migration scripts for sqlite users and etc.
also, how familiar are you with django. if you need help i could do
this part for you.

> A book has a one-to-many relation to the ToDos but you probably have thought
> about that.  Adam and I discussed it and we thought that it would only
> complicate things to have ToDos attached to chapters or any smaller
> elements.
>
> The queries would be something like this:
>    get_todos(done="False") - returns a list of ToDo items
>    add_todo(title, description) - returns the Id
>    update_todo(id, title, description) - returns status Ok/Err
>    mark_todo_done(id) - returns status Ok/Err
>    mark_todo_undone(id) - returns status Ok/Err

yes this is ok... get_todos and add_todo is something that should go
to BookVersion,
everything else to ToDos. ah yes... is todo related to book or to
specific version of a book?

> I hope this all makes sense, I would really like to have this feature
> wrapped up this week if possible.

so... work work :) also.. i use beta version of jqueryui, one from the
repository that has
support for buttons and etc... so, use of all jqueryui elements is
encouraged.  i did not
write any, but i plan to make jquery widgets out of some elements
(tables and etc...).

do you need account on the system and access to the repository?

aco

-- 
 http://www.binarni.net/



More information about the Booki-dev mailing list