mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-17 04:25:42 +00:00
Remove reliance on django-markdownx (#3231)
* Remove reliance on django-markdownx - We are now rendering notes on the client side using easymde - No longer any need to utilize the markdownx integration - Adds character limit for notes fields` * Adjust legacy migrations - remove references to markdownx * Fix bug for company notes field
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
# Generated by Django 2.2.9 on 2020-02-01 12:47
|
||||
|
||||
from django.db import migrations
|
||||
import markdownx.models
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
@ -14,6 +13,6 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='build',
|
||||
name='notes',
|
||||
field=markdownx.models.MarkdownxField(blank=True, help_text='Extra build notes'),
|
||||
field=models.TextField(blank=True, help_text='Extra build notes'),
|
||||
),
|
||||
]
|
||||
|
@ -4,7 +4,6 @@ import InvenTree.fields
|
||||
import django.core.validators
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import markdownx.models
|
||||
import mptt.fields
|
||||
|
||||
|
||||
@ -31,7 +30,7 @@ class Migration(migrations.Migration):
|
||||
migrations.AlterField(
|
||||
model_name='build',
|
||||
name='notes',
|
||||
field=markdownx.models.MarkdownxField(blank=True, help_text='Extra build notes', verbose_name='Notes'),
|
||||
field=models.TextField(blank=True, help_text='Extra build notes', verbose_name='Notes'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='build',
|
||||
|
19
InvenTree/build/migrations/0035_alter_build_notes.py
Normal file
19
InvenTree/build/migrations/0035_alter_build_notes.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Generated by Django 3.2.13 on 2022-06-20 07:28
|
||||
|
||||
import InvenTree.fields
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('build', '0034_alter_build_reference_int'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='build',
|
||||
name='notes',
|
||||
field=InvenTree.fields.InvenTreeNotesField(blank=True, help_text='Extra build notes', max_length=50000, null=True, verbose_name='Notes'),
|
||||
),
|
||||
]
|
@ -16,8 +16,6 @@ from django.dispatch.dispatcher import receiver
|
||||
from django.urls import reverse
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from markdownx.models import MarkdownxField
|
||||
|
||||
from mptt.models import MPTTModel, TreeForeignKey
|
||||
from mptt.exceptions import InvalidMove
|
||||
|
||||
@ -320,9 +318,8 @@ class Build(MPTTModel, ReferenceIndexingMixin):
|
||||
blank=True, help_text=_('Link to external URL')
|
||||
)
|
||||
|
||||
notes = MarkdownxField(
|
||||
verbose_name=_('Notes'),
|
||||
blank=True, help_text=_('Extra build notes')
|
||||
notes = InvenTree.fields.InvenTreeNotesField(
|
||||
help_text=_('Extra build notes')
|
||||
)
|
||||
|
||||
def sub_builds(self, cascade=True):
|
||||
|
Reference in New Issue
Block a user