-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Simplify Tag Models [FC-0030] (#87)
* feat: Remove object_tag_class from Taxonomy * feat: set tags by value, not tag_ref. Remove ObjectTag from Taxonomy. * chore: updated tests for system defined taxonomies * feat: more cleanups and validation for ObjectTag * feat: Remove "re-sync" of deleted taxonomies, update test_api.py * fix: case-insensitive values on MySQL * feat: minor cleanups * fix: fix flaky test * docs: Update system defined taxonomy creation ADR * chore: version bump: 0.2.0
- Loading branch information
1 parent
0c4ca76
commit 5de0969
Showing
15 changed files
with
811 additions
and
1,065 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
""" | ||
Open edX Learning ("Learning Core"). | ||
""" | ||
__version__ = "0.1.8" | ||
__version__ = "0.2.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Generated by Django 3.2.19 on 2023-09-29 16:59 | ||
|
||
import django.db.models.expressions | ||
from django.db import migrations, models | ||
|
||
import openedx_learning.lib.fields | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('oel_tagging', '0009_alter_objecttag_object_id'), | ||
] | ||
|
||
operations = [ | ||
migrations.DeleteModel( | ||
name='ModelObjectTag', | ||
), | ||
migrations.DeleteModel( | ||
name='UserModelObjectTag', | ||
), | ||
migrations.AlterUniqueTogether( | ||
name='objecttag', | ||
unique_together={('object_id', 'taxonomy', 'tag_id'), ('object_id', 'taxonomy', '_value')}, | ||
), | ||
# ObjectTag.Tag can be blank | ||
migrations.AlterField( | ||
model_name='objecttag', | ||
name='tag', | ||
field=models.ForeignKey(blank=True, default=None, help_text="Tag associated with this object tag. Provides the tag's 'value' if set.", null=True, on_delete=django.db.models.deletion.SET_NULL, to='oel_tagging.tag'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
""" | ||
Core models for Tagging | ||
""" | ||
from .base import ObjectTag, Tag, Taxonomy | ||
from .import_export import TagImportTask, TagImportTaskState | ||
from .system_defined import LanguageTaxonomy, ModelObjectTag, ModelSystemDefinedTaxonomy, UserSystemDefinedTaxonomy | ||
from .system_defined import LanguageTaxonomy, ModelSystemDefinedTaxonomy, UserSystemDefinedTaxonomy |
Oops, something went wrong.