mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 05:05: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:31 | ||||
|  | ||||
| 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='company', | ||||
|             name='notes', | ||||
|             field=markdownx.models.MarkdownxField(blank=True), | ||||
|             field=models.TextField(blank=True), | ||||
|         ), | ||||
|     ] | ||||
|   | ||||
| @@ -5,7 +5,6 @@ import company.models | ||||
| import django.core.validators | ||||
| from django.db import migrations, models | ||||
| import django.db.models.deletion | ||||
| import markdownx.models | ||||
| import stdimage.models | ||||
|  | ||||
|  | ||||
| @@ -44,7 +43,7 @@ class Migration(migrations.Migration): | ||||
|         migrations.AlterField( | ||||
|             model_name='company', | ||||
|             name='notes', | ||||
|             field=markdownx.models.MarkdownxField(blank=True, verbose_name='Notes'), | ||||
|             field=models.TextField(blank=True, verbose_name='Notes'), | ||||
|         ), | ||||
|         migrations.AlterField( | ||||
|             model_name='supplierpart', | ||||
|   | ||||
							
								
								
									
										19
									
								
								InvenTree/company/migrations/0045_alter_company_notes.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								InvenTree/company/migrations/0045_alter_company_notes.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,19 @@ | ||||
| # Generated by Django 3.2.13 on 2022-06-20 11:23 | ||||
|  | ||||
| import InvenTree.fields | ||||
| from django.db import migrations | ||||
|  | ||||
|  | ||||
| class Migration(migrations.Migration): | ||||
|  | ||||
|     dependencies = [ | ||||
|         ('company', '0044_auto_20220607_2204'), | ||||
|     ] | ||||
|  | ||||
|     operations = [ | ||||
|         migrations.AlterField( | ||||
|             model_name='company', | ||||
|             name='notes', | ||||
|             field=InvenTree.fields.InvenTreeNotesField(blank=True, help_text='Company Notes', max_length=50000, null=True, verbose_name='Notes'), | ||||
|         ), | ||||
|     ] | ||||
| @@ -11,12 +11,12 @@ from django.db.models import Q, Sum, UniqueConstraint | ||||
| from django.urls import reverse | ||||
| from django.utils.translation import gettext_lazy as _ | ||||
|  | ||||
| from markdownx.models import MarkdownxField | ||||
| from moneyed import CURRENCIES | ||||
| from stdimage.models import StdImageField | ||||
|  | ||||
| import common.models | ||||
| import common.settings | ||||
| import InvenTree.fields | ||||
| import InvenTree.validators | ||||
| from common.settings import currency_code_default | ||||
| from InvenTree.fields import InvenTreeURLField | ||||
| @@ -135,7 +135,7 @@ class Company(models.Model): | ||||
|         verbose_name=_('Image'), | ||||
|     ) | ||||
|  | ||||
|     notes = MarkdownxField(blank=True, verbose_name=_('Notes')) | ||||
|     notes = InvenTree.fields.InvenTreeNotesField(help_text=_("Company Notes")) | ||||
|  | ||||
|     is_customer = models.BooleanField(default=False, verbose_name=_('is customer'), help_text=_('Do you sell items to this company?')) | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user