[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GMG-Devel] writting media views mentoring, please!

From: Christopher Allan Webber
Subject: Re: [GMG-Devel] writting media views mentoring, please!
Date: Sun, 24 Jun 2012 22:32:29 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux)

Joar Wandborg <address@hidden> writes:

> Only, and need to be there.
> The MEDIA_MANAGER object should be filled in, we only _need_ the
> fields sniff_handler, processor, display_template, accepted_extensions for
> the application not to crash.
> In, the sniffing handler and the processing function should be
> imported, so that you can put the references to those in the MEDIA_MANAGER.
> For examples on the sniffing handler and the processing functions look in
> mediagoblin/media_types/image/
> I think Chris Webber or Elvenlord Elrond can fill you in on and
>, as I don't grok that part of the infrastructure as good as
> they might. can contain more than one model, but probably it contains just
the media-specific information.  This is basically what
MediaEntry.media_data() returns.

So, basically, with every media entry, it has both information general
to *any* type of media (which goes in the MediaEntry class/table), then
there's a separate row in a separate table that is information specific
to this media type.

You can look at mediagoblin/media_types/ascii/ as the most
"minimal" version of what's needed and largely mime this.  Basically,
you need a table definition, you need to list that table as DATA_MODEL,
and you need to list it in MODELS.  DATA_MODEL is what's expected to be
the MediaEntry.media_data() for this table, and MODELS is a list of
*all* tables that might be used by this media type (but for now, you can
assume you can just edit

For a complex version of models, look at
mediagoblin/media_types/image/ which contains a lot of "extra
data".  I'd say if you think you need extra data for your model, let's
discuss it as we go.

As for, you don't need to touch that until later if you
are making a new media type.  Basically, if the structure of your media
data tables or related change, you can describe migrations that can be
run from here.

Hope that helps!
 - Chris

reply via email to

[Prev in Thread] Current Thread [Next in Thread]