Phase 1: T-101/T-102/T-103 内容模型 + 17 tests. T-104 BLOCKED 待种子数据

This commit is contained in:
ila
2026-07-06 20:50:14 +08:00
parent fdec385afc
commit a2d2cd226d
8 changed files with 635 additions and 13 deletions
@@ -0,0 +1,60 @@
# Generated by Django 6.0.6 on 2026-07-06 12:45
import django.core.validators
import django.db.models.deletion
import modelcluster.fields
import wagtail.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
('wagtailcore', '0097_baselogentry_uuid_action_timestamp_indexes'),
]
operations = [
migrations.CreateModel(
name='ProjectIndexPage',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')),
],
options={
'verbose_name': 'Project Index',
},
bases=('wagtailcore.page',),
),
migrations.CreateModel(
name='SkeletonProjectPage',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')),
('summary', models.TextField()),
('github_url', models.URLField()),
('official_url', models.URLField(blank=True)),
('license_name', models.CharField(blank=True, max_length=100)),
('maturity', models.CharField(choices=[('experimental', 'Experimental'), ('stable', 'Stable'), ('mature', 'Mature')], max_length=20)),
('maintenance_status', models.CharField(choices=[('active', 'Active'), ('slow', 'Slow'), ('unknown', 'Unknown'), ('archived', 'Archived')], default='unknown', max_length=20)),
('structure_score', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
('docs_score', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
('tests_score', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
('example_score', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
('dependency_score', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
('incremental_score', models.IntegerField(validators=[django.core.validators.MinValueValidator(0), django.core.validators.MaxValueValidator(5)])),
('recommended_for', wagtail.fields.RichTextField()),
('not_recommended_for', wagtail.fields.RichTextField(blank=True)),
('review_notes', wagtail.fields.RichTextField(blank=True)),
('is_featured', models.BooleanField(default=False)),
('is_sponsored', models.BooleanField(default=False)),
('databases', modelcluster.fields.ParentalManyToManyField(blank=True, to='core.databaseoption')),
('features', modelcluster.fields.ParentalManyToManyField(blank=True, to='core.skeletonfeature')),
('frameworks', modelcluster.fields.ParentalManyToManyField(blank=True, to='core.framework')),
('languages', modelcluster.fields.ParentalManyToManyField(to='core.language')),
('scenarios', modelcluster.fields.ParentalManyToManyField(to='core.scenariopage')),
],
options={
'verbose_name': 'Skeleton Project',
},
bases=('wagtailcore.page',),
),
]