diff options
Diffstat (limited to 'ctrack/organisations')
-rw-r--r-- | ctrack/organisations/forms.py | 5 | ||||
-rw-r--r-- | ctrack/organisations/migrations/0003_auto_20200424_1607.py | 18 | ||||
-rw-r--r-- | ctrack/organisations/models.py | 2 |
3 files changed, 23 insertions, 2 deletions
diff --git a/ctrack/organisations/forms.py b/ctrack/organisations/forms.py index 59782e0..63291a5 100644 --- a/ctrack/organisations/forms.py +++ b/ctrack/organisations/forms.py @@ -1,5 +1,5 @@ from crispy_forms.helper import FormHelper -from crispy_forms.layout import Layout, Fieldset, ButtonHolder, Submit, Button, Hidden +from crispy_forms.layout import Layout, Fieldset, ButtonHolder, Submit, Button from django import forms from django.urls import reverse @@ -35,3 +35,6 @@ class OrganisationCreateForm(forms.ModelForm): fields = ["name", "submode", "oes", "designation_type", "registered_company_name", "registered_company_number", "updated_by", "comments", "active"] + labels = { + "oes": "OES" + } diff --git a/ctrack/organisations/migrations/0003_auto_20200424_1607.py b/ctrack/organisations/migrations/0003_auto_20200424_1607.py new file mode 100644 index 0000000..75268a0 --- /dev/null +++ b/ctrack/organisations/migrations/0003_auto_20200424_1607.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.9 on 2020-04-24 16:07 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('organisations', '0002_auto_20200403_1407'), + ] + + operations = [ + migrations.AlterField( + model_name='organisation', + name='comments', + field=models.TextField(blank=True, max_length=500, null=True), + ), + ] diff --git a/ctrack/organisations/models.py b/ctrack/organisations/models.py index 06ae037..6824eeb 100644 --- a/ctrack/organisations/models.py +++ b/ctrack/organisations/models.py @@ -129,7 +129,7 @@ class Organisation(models.Model): registered_company_number = models.CharField(max_length=100, blank=True) date_updated = models.DateField(auto_now=True) updated_by = models.ForeignKey(get_user_model(), on_delete=models.SET(get_sentinel_user)) - comments = models.TextField(max_length=500) + comments = models.TextField(max_length=500, blank=True, null=True) active = models.BooleanField(default=True) def get_absolute_url(self): |