golf/views/view_export.py
def roundImportPlugin(request, roundImportPluginId):
    """
    View function for import export backup dialog in home page
    Sends the selected tournament format plugin in json format
    url: 'exportroundimportplugin/(?P<roundImportPluginId>\d+)$'
    """
    plugin = RoundImportPlugin.objects.get(pk=roundImportPluginId)
    tempModel = serializers.serialize('json', [plugin])
    context = json.loads(tempModel[1:-1])
    del context['pk']
    del context['model']
    del context['fields']['class_module']
    del context['fields']['class_module_name']
    del context['fields']['class_archive']
    del context['fields']['class_archive_name']
    del context['fields']['version']
    readme = 'The archive must include context.json and 1 python module\r\ncontext.json:\r\nbecause data is a free-form field, you cannot use single-quotes (\') and double-quotes must be escaped (\\")\r\n\tname: is unique to each plugin and if you upload a duplicate a new version will be created\r\n\tpriority: is used to sort the plugin list in club settings, -1 priority plugins are sorted only by name\r\n\tdata: is sent to your plugin when it is run\r\n\tclass_name: is the class within the module that will be used by Abstract Base Class\r\n\tdescription: helpful text for the users of the plugin'
    return createFileResponse(context, plugin.name, plugin.class_archive_name, plugin.class_module_name, os.path.join(settings.BASE_DIR, 'golf/media/'+plugin.class_module.name), readme)

    View function for import export backup dialog in home page
    Sends the selected tournament format plugin in json format
    url: 'exportroundimportplugin/(?P<roundImportPluginId>\d+)$'
    
View function for import export backup dialog in home page
Sends the selected tournament format plugin in json format
url: 'exportroundimportplugin/(?P\d+)$'
View function for import export backup dialog in home page Sends the selected tournament format plugin in json format url : ' exportroundimportplugin / ( ?P \ d + ) $ '
def roundImportPlugin(request, roundImportPluginId):
    plugin = RoundImportPlugin.objects.get(pk=roundImportPluginId)
    tempModel = serializers.serialize('json', [plugin])
    context = json.loads(tempModel[1:-1])
    del context['pk']
    del context['model']
    del context['fields']['class_module']
    del context['fields']['class_module_name']
    del context['fields']['class_archive']
    del context['fields']['class_archive_name']
    del context['fields']['version']
    readme = 'The archive must include context.json and 1 python module\r\ncontext.json:\r\nbecause data is a free-form field, you cannot use single-quotes (\') and double-quotes must be escaped (\\")\r\n\tname: is unique to each plugin and if you upload a duplicate a new version will be created\r\n\tpriority: is used to sort the plugin list in club settings, -1 priority plugins are sorted only by name\r\n\tdata: is sent to your plugin when it is run\r\n\tclass_name: is the class within the module that will be used by Abstract Base Class\r\n\tdescription: helpful text for the users of the plugin'
    return createFileResponse(context, plugin.name, plugin.class_archive_name, plugin.class_module_name, os.path.join(settings.BASE_DIR, 'golf/media/'+plugin.class_module.name), readme)
def roundImportPlugin ( request , roundImportPluginId ) : plugin = RoundImportPlugin . objects . get ( pk = roundImportPluginId ) tempModel = serializers . serialize ( 'json' , [ plugin ] ) context = json . loads ( tempModel [ 1 : - 1 ] ) del context [ 'pk' ] del context [ 'model' ] del context [ 'fields' ] [ 'class_module' ] del context [ 'fields' ] [ 'class_module_name' ] del context [ 'fields' ] [ 'class_archive' ] del context [ 'fields' ] [ 'class_archive_name' ] del context [ 'fields' ] [ 'version' ] readme = 'The archive must include context.json and 1 python module\r\ncontext.json:\r\nbecause data is a free-form field, you cannot use single-quotes (\') and double-quotes must be escaped (\\")\r\n\tname: is unique to each plugin and if you upload a duplicate a new version will be created\r\n\tpriority: is used to sort the plugin list in club settings, -1 priority plugins are sorted only by name\r\n\tdata: is sent to your plugin when it is run\r\n\tclass_name: is the class within the module that will be used by Abstract Base Class\r\n\tdescription: helpful text for the users of the plugin' return createFileResponse ( context , plugin . name , plugin . class_archive_name , plugin . class_module_name , os . path . join ( settings . BASE_DIR , 'golf/media/' + plugin . class_module . name ) , readme )
View function for import export backup dialog in home page
Sends the selected tournament format plugin in json format
url: 'exportroundimportplugin/(?P<roundImportPluginId>\d+)$'
View function for import export backup dialog in home page Sends the selected tournament format plugin in json format url : ' exportroundimportplugin / ( ?P<roundImportPluginId > \ d + ) $ '
"""
    View function for import export backup dialog in home page
    Sends the selected tournament format plugin in json format
    url: 'exportroundimportplugin/(?P<roundImportPluginId>\d+)$'
    """
request
roundImportPluginId