Пример #1
0
def _generate_license_list():
    package.Package._license_register = license.LicenseRegister()
    package.Package._license_register.licenses = [
        license.License(
            hdx_licenses.LicenseCreativeCommonsIntergovernmentalOrgs()),
        license.License(license.LicenseCreativeCommonsAttribution()),
        license.License(license.LicenseCreativeCommonsAttributionShareAlike()),
        license.License(hdx_licenses.LicenseHdxOpenDatabaseLicense()),
        license.License(
            hdx_licenses.LicenseHdxOpenDataCommonsAttributionLicense()),
        license.License(
            hdx_licenses.
            LicenseHdxOpenDataCommonsPublicdomainDedicationAndLicense()),
        license.License(hdx_licenses.LicenseOtherPublicDomainNoRestrictions()),
        license.License(hdx_licenses.LicenseHdxMultiple()),
        license.License(hdx_licenses.LicenseHdxOther())
    ]
Пример #2
0
 def _get_license_register(self):
     if not hasattr(self, '_license_register'):
         import ckan.model.license as _license
         self._license_register = _license.LicenseRegister()
     return self._license_register
Пример #3
0
 def get_license_register(cls) -> "_license.LicenseRegister":
     if not hasattr(cls, '_license_register'):
         cls._license_register = _license.LicenseRegister()
     return cls._license_register