feed config in mysql
Peter Lieverdink
planetjanetschmanet at cafuego.net
Mon Feb 6 19:26:37 EST 2006
Jeff Waugh wrote:
> <quote who="Peter Lieverdink">
>
>> Because I run a site which allows users to store info in mysql, I added
>> mysql support to planet.
>
> So, I don't want to be a drag, but... why? :-) I can imagine that a MySQL
> backend for the configuration would be a nice way of handling a web-based
> Planet administration frontend, but then you could always generate a config
> from the MySQL and run Planet against it, instead of using MySQL directly
> from Planet.
Yeh, but that way I won't learn much python, will I? ;-)
>> It fetches feed/name/face info from a table in mysql, uses python-mysqldb.
>
> One problem with defining the schema this way is that a Planet configuration
> can include all kinds of things in each block. For instance, on Planet GNOME
> I have a 'nick' attribute, which is passed down to the templating engine and
> displayed in the html.
>
> Not sure how you'd get around this in a pleasant manner, though. :-)
Well, you could use "SELECT * FROM planet" in the query. Because I use a
DictCursor, I cna use both the field name and value further on (See
set_as_string() function call). If you need more attributes, just add
appropriately named columns on the table.
- P.
More information about the devel
mailing list