Add support for synchronizing bootstrap setups available with the official repository

This commit is contained in:
Roberto Rosario
2012-12-11 01:22:46 -04:00
parent 74689a970d
commit 1743ce93f2
8 changed files with 76 additions and 12 deletions

View File

@@ -8,7 +8,8 @@ from main import __version__
from .links import (link_bootstrap_setup_create, link_bootstrap_setup_execute,
link_bootstrap_setup_list, link_bootstrap_setup_edit, link_bootstrap_setup_delete,
link_bootstrap_setup_view, link_bootstrap_setup_dump, link_bootstrap_setup_export,
link_bootstrap_setup_import_from_url, link_bootstrap_setup_import_from_file)
link_bootstrap_setup_import_from_url, link_bootstrap_setup_import_from_file,
link_bootstrap_setup_repository_sync)
from .models import BootstrapSetup
from .classes import FixtureMetadata
from .literals import (FIXTURE_METADATA_CREATED, FIXTURE_METADATA_EDITED,
@@ -16,8 +17,8 @@ from .literals import (FIXTURE_METADATA_CREATED, FIXTURE_METADATA_EDITED,
FIXTURE_METADATA_DESCRIPTION, DATETIME_STRING_FORMAT, FIXTURE_METADATA_SLUG)
register_links([BootstrapSetup], [link_bootstrap_setup_view, link_bootstrap_setup_edit, link_bootstrap_setup_delete, link_bootstrap_setup_execute, link_bootstrap_setup_export])
register_links([BootstrapSetup], [link_bootstrap_setup_list, link_bootstrap_setup_create, link_bootstrap_setup_dump, link_bootstrap_setup_import_from_file, link_bootstrap_setup_import_from_url], menu_name='secondary_menu')
register_links(['bootstrap_setup_list', 'bootstrap_setup_create', 'bootstrap_setup_dump', 'bootstrap_setup_import_from_file', 'bootstrap_setup_import_from_url'], [link_bootstrap_setup_list, link_bootstrap_setup_create, link_bootstrap_setup_dump, link_bootstrap_setup_import_from_file, link_bootstrap_setup_import_from_url], menu_name='secondary_menu')
register_links([BootstrapSetup], [link_bootstrap_setup_list, link_bootstrap_setup_create, link_bootstrap_setup_dump, link_bootstrap_setup_import_from_file, link_bootstrap_setup_import_from_url, link_bootstrap_setup_repository_sync], menu_name='secondary_menu')
register_links(['bootstrap_setup_list', 'bootstrap_setup_create', 'bootstrap_setup_dump', 'bootstrap_setup_import_from_file', 'bootstrap_setup_import_from_url', 'bootstrap_setup_repository_sync'], [link_bootstrap_setup_list, link_bootstrap_setup_create, link_bootstrap_setup_dump, link_bootstrap_setup_import_from_file, link_bootstrap_setup_import_from_url, link_bootstrap_setup_repository_sync], menu_name='secondary_menu')
FixtureMetadata(FIXTURE_METADATA_CREATED, generate_function=lambda fixture_instance: fixture_instance.created.strftime(DATETIME_STRING_FORMAT), read_function=lambda x: datetime.datetime.strptime(x, DATETIME_STRING_FORMAT), property_name='created')
FixtureMetadata(FIXTURE_METADATA_EDITED, generate_function=lambda fixture_instance: datetime.datetime.now().strftime(DATETIME_STRING_FORMAT))