Remove bl_info references from the extensions website #10
|
@ -0,0 +1,29 @@
|
|||
# Generated by Django 4.0.6 on 2024-01-25 13:55
|
||||
|
||||
from django.db import migrations
|
||||
import extensions.fields
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('extensions', '0007_alter_version_blender_version_max_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='version',
|
||||
name='blender_version_max',
|
||||
field=extensions.fields.VersionStringField(coerce=False, help_text='Maximum version of Blender this extension was tested and is compatible with. The value is taken from <code>"blender_version_max"</code> in the manifest file.', max_length=64, null=True, partial=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='version',
|
||||
name='blender_version_min',
|
||||
field=extensions.fields.VersionStringField(coerce=False, default='2.93.0', help_text='Minimum version of Blender this extension is compatible with. The value is taken from <code>"blender_version_min"</code> in the manifest file.', max_length=64, partial=False),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='version',
|
||||
name='version',
|
||||
field=extensions.fields.VersionStringField(coerce=False, default='0.1.0', help_text='Current (latest) version of extension. The value is taken from <code>"version"</code> in the manifest.', max_length=255, partial=False),
|
||||
),
|
||||
]
|
|
@ -399,7 +399,7 @@ class Version(CreatedModifiedMixin, RatingMixin, TrackChangesMixin, SoftDeleteMi
|
|||
blank=False,
|
||||
help_text=(
|
||||
'Current (latest) version of extension. '
|
||||
'In case of an add-on, the value is taken from <code>bl_info["version"]</code>.'
|
||||
'The value is taken from <code>"version"</code> in the manifest.'
|
||||
),
|
||||
)
|
||||
blender_version_min = extensions.fields.VersionStringField(
|
||||
|
@ -409,14 +409,15 @@ class Version(CreatedModifiedMixin, RatingMixin, TrackChangesMixin, SoftDeleteMi
|
|||
blank=False,
|
||||
help_text=(
|
||||
'Minimum version of Blender this extension is compatible with. '
|
||||
'In case of an add-on, the value is taken from <code>bl_info["blender"]</code>.'
|
||||
'The value is taken from <code>"blender_version_min"</code> in the manifest file.'
|
||||
),
|
||||
)
|
||||
blender_version_max = extensions.fields.VersionStringField(
|
||||
max_length=64,
|
||||
null=True,
|
||||
blank=False,
|
||||
help_text=('Maximum version of Blender this extension was tested and is compatible with.'),
|
||||
help_text=('Maximum version of Blender this extension was tested and is compatible with. '
|
||||
'The value is taken from <code>"blender_version_max"</code> in the manifest file.'),
|
||||
)
|
||||
license = models.ForeignKey(
|
||||
License,
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 4.0.6 on 2024-01-25 13:55
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('files', '0003_alter_file_type'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='file',
|
||||
name='metadata',
|
||||
field=models.JSONField(blank=True, default=dict, help_text='Meta information that was parsed from the `manifest file.'),
|
||||
),
|
||||
]
|
|
@ -103,11 +103,9 @@ class File(CreatedModifiedMixin, TrackChangesMixin, SoftDeleteMixin, models.Mode
|
|||
null=False,
|
||||
default=dict,
|
||||
blank=True,
|
||||
# TODO add link to the manifest file user manual page.
|
||||
help_text=(
|
||||
'Meta information that was parsed from the file, e.g. `bl_info` '
|
||||
'<a href="https://wiki.blender.org/wiki/Process/Addons/Guidelines/metainfo">'
|
||||
'https://wiki.blender.org/wiki/Process/Addons/Guidelines/metainfo</a> '
|
||||
'in case file contains an add-on.'
|
||||
'Meta information that was parsed from the `manifest file.'
|
||||
),
|
||||
)
|
||||
|
||||
|
@ -185,7 +183,6 @@ class File(CreatedModifiedMixin, TrackChangesMixin, SoftDeleteMixin, models.Mode
|
|||
@property
|
||||
def parsed_extension_fields(self) -> Dict[str, Any]:
|
||||
"""Return Extension-related data that was parsed from file's content."""
|
||||
# Currently, bl_info is the only kind of file metadata that is supported.
|
||||
data = self.metadata
|
||||
|
||||
original_name = data.get('name', self.original_name)
|
||||
|
@ -214,7 +211,7 @@ class File(CreatedModifiedMixin, TrackChangesMixin, SoftDeleteMixin, models.Mode
|
|||
@property
|
||||
def parsed_version_fields(self) -> Dict[str, Any]:
|
||||
"""Return Version-related data that was parsed from file's content."""
|
||||
# Currently, bl_info is the only kind of file metadata that is supported.
|
||||
# Currently, the content of the manifest file is the only kind of file metadata that is supported.
|
||||
data = self.metadata
|
||||
return {
|
||||
'version': data.get('version'),
|
||||
|
|
|
@ -13,7 +13,7 @@ from django import forms
|
|||
|
||||
logger = logging.getLogger(__name__)
|
||||
MODULE_DIR = Path(__file__).resolve().parent
|
||||
BL_INFO_REQUIRED_KEYS = {'name', 'description', 'author', 'version', 'blender', 'location'}
|
||||
MANIFEST_REQUIRED_KEYS = {'schema_version', 'id', 'name', 'type', 'version', 'blender_version_min', 'author', 'license', 'description'}
|
||||
|
||||
THEME_SCHEMA = []
|
||||
|
||||
|
|
Loading…
Reference in New Issue