From 94c23b986d3986667351971487761d59f9c50438 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Sun, 7 Oct 2012 20:09:26 +0200 Subject: Move default data to another JSON file. --- chimere/fixtures/default_data.json | 69 ++++++++++++++++++++++++++++++++++++++ chimere/fixtures/initial_data.json | 67 ------------------------------------ docs/install.rst | 5 +++ 3 files changed, 74 insertions(+), 67 deletions(-) create mode 100644 chimere/fixtures/default_data.json diff --git a/chimere/fixtures/default_data.json b/chimere/fixtures/default_data.json new file mode 100644 index 0000000..56df4c3 --- /dev/null +++ b/chimere/fixtures/default_data.json @@ -0,0 +1,69 @@ +[ + { + "pk": 1, + "model": "chimere.colortheme", + "fields": { + "name": "Blue" + } + }, + { + "pk": 1, + "model": "chimere.color", + "fields": { + "code": "0000FF", + "color_theme": 1, + "order": 10 + } + }, + { + "pk": 2, + "model": "chimere.color", + "fields": { + "code": "2222FF", + "color_theme": 1, + "order": 20 + } + }, + { + "pk": 3, + "model": "chimere.color", + "fields": { + "code": "4444FF", + "color_theme": 1, + "order": 30 + } + }, + { + "pk": 1, + "model": "chimere.category", + "fields": { + "available": true, + "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc blandit porta eros, quis varius orci luctus nec. Suspendisse tempor sagittis tortor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus imperdiet consequat dolor. Etiam risus orci, auctor nec hendrerit ut, congue at ante. Aliquam et accumsan neque. Aliquam ac massa felis, ac porttitor nunc. Curabitur blandit odio id enim sodales blandit. Curabitur eleifend commodo lorem a feugiat. Nam at quam semper justo ultricies tempor.\r\n", + "name": "Default category", + "order": 10 + } + }, + { + "pk": 1, + "model": "chimere.icon", + "fields": { + "width": 21, + "image": "icons/marker.png", + "name": "Default icon", + "height": 25 + } + }, + { + "pk": 1, + "model": "chimere.subcategory", + "fields": { + "category": 1, + "available": true, + "name": "Default subcategory", + "item_type": "M", + "color_theme": null, + "order": 10, + "icon": 1 + } + } +] diff --git a/chimere/fixtures/initial_data.json b/chimere/fixtures/initial_data.json index fe1cc98..473640c 100644 --- a/chimere/fixtures/initial_data.json +++ b/chimere/fixtures/initial_data.json @@ -1,71 +1,4 @@ [ - { - "pk": 1, - "model": "chimere.colortheme", - "fields": { - "name": "Blue" - } - }, - { - "pk": 1, - "model": "chimere.color", - "fields": { - "code": "0000FF", - "color_theme": 1, - "order": 10 - } - }, - { - "pk": 2, - "model": "chimere.color", - "fields": { - "code": "2222FF", - "color_theme": 1, - "order": 20 - } - }, - { - "pk": 3, - "model": "chimere.color", - "fields": { - "code": "4444FF", - "color_theme": 1, - "order": 30 - } - }, - { - "pk": 1, - "model": "chimere.category", - "fields": { - "available": true, - "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc blandit porta eros, quis varius orci luctus nec. Suspendisse tempor sagittis tortor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Vivamus imperdiet consequat dolor. Etiam risus orci, auctor nec hendrerit ut, congue at ante. Aliquam et accumsan neque. Aliquam ac massa felis, ac porttitor nunc. Curabitur blandit odio id enim sodales blandit. Curabitur eleifend commodo lorem a feugiat. Nam at quam semper justo ultricies tempor.\r\n", - "name": "Default category", - "order": 10 - } - }, - { - "pk": 1, - "model": "chimere.icon", - "fields": { - "width": 21, - "image": "icons/marker.png", - "name": "Default icon", - "height": 25 - } - }, - { - "pk": 1, - "model": "chimere.subcategory", - "fields": { - "category": 1, - "available": true, - "name": "Default subcategory", - "item_type": "M", - "color_theme": null, - "order": 10, - "icon": 1 - } - }, { "pk": 7, "model": "chimere.multimediatype", diff --git a/docs/install.rst b/docs/install.rst index a6d3558..c8b91b3 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -242,6 +242,11 @@ to create tables managed with south:: The database is set, congratulations! +If you want to populate your installation with default data (don't do this on +an already populated instance!):: + + ./manage.py loaddata ../chimere/fixtures/default_data.json + Webserver configuration *********************** -- cgit v1.2.3