I've tidied up my branch of the import-export extension[0], and merged some bug-fixes from Ihoka's branch[1]. I've tested it on a fairly simple site, and it works nicely.

My modifications add functionality that exports all models to a yaml file, rather than just the models used by Radiant without extensions: [Radiant::ExtensionMeta, Radiant::Config, User, Page, PagePart, Snippet, Layout]. I needed this, because I was backing up a site using the subscriber_lists extension, which adds a subscribers table to the db.


As Alex Wayne pointed out[2], the export task has another blind spot: it won't back up join tables in HABTM relationships. I can't think of an extension that creates a HABTM relationship, but if anyone can name one, I'd like to install it and test the export functionality on it.

Cheers,
Drew


[0]: http://github.com/nelstrom/radiant-import-export-extension/tree
[1]: http://github.com/ihoka/radiant-import-export-extension/tree
[2]: http://lists.radiantcms.org/pipermail/radiant/2008-June/009330.html

On 24 Jun 2008, at 23:57, Andrew Neil wrote:

Hi,

I was trying out the import_export extension, and I noticed that it wasn't backing up records from my subscribers table. (The subscribers table was added by a migration in the subscriber_lists extension[1]). Looking at the source, I could see an easy way of fixing this, changing:

self.models = [Radiant::Config, User, Page, PagePart, Snippet, Layout]
to:
self.models = [Radiant::Config, User, Page, PagePart, Snippet, Layout, Subscriber]

I figured it would be better if the exporter actually looked at the database to find out what tables are there. I've forked the extension, and added this functionality. Here it is:

http://github.com/nelstrom/radiant-import-export-extension/tree/ master

It seems to work OK for export. It will need a little more work though for the importer, but that is for another day.


Cheers,
Drew

[1]: http://github.com/nelstrom/radiant-subscriber-lists-extension/tree/master
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to