[Booki-dev] list-books.json
Lachlan Musicman
datakid at gmail.com
Thu Aug 12 19:01:47 PDT 2010
On Thu, Aug 12, 2010 at 15:48, Douglas Bagnall <douglas at paradise.net.nz> wrote:
> On 12/08/10 16:47, Lachlan Musicman wrote:
>
> Ah yes, though he uses slightly different information and wants it to
> be sensibly formatted, whereas I aimed for a small lazy patch as a
> prototype.
:)
> while mine currently looks like this:
>
> [
> {
> "pk": 14,
> "model": "editor.book",
> "fields": {
> "url_title": "firefox",
> "title": "FIREFOX"
> }
> }
> ]
>
> That weird stuff like "pk" is Django's idea. "url_title" is the Booki
> term for the book's ID in url space.
Yah, common across django apps
> It should be simple enough to unify the two, though it could be
> expensive on the Booki side (because it would mean pulling in the
> metadata table to get author names), and I'm not entirely sure how
> Andy's epub urls would be calculated.
I think the best strategy is to have creation at save/publish time.
Potentially as another object that's associated with any particular
book?
Creating the json entry at publish/save time means that:
- url can be created correctly (looks like a YYYY.MM.DD.HH.MM.SS
format, presumably from the time published/saved)
- authors list will be up to date. Note that this is something that
we should think about removing from the iphone app given the potential
number of authors...
- reduce server/booki load by creating them as it happens rather than
all at once.
cheers
L.
More information about the Booki-dev
mailing list