add a description to document types and avoid a filter on jci standards
This commit is contained in:
parent
eb259d972f
commit
3bc5e5a45a
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
|
@ -2,7 +2,6 @@ from django import forms
|
|||
import django_filters
|
||||
|
||||
from evolus.models import Audience, Document, Site, Structure
|
||||
from jci.models import Standard
|
||||
|
||||
|
||||
class DocumentFilter(django_filters.FilterSet):
|
||||
|
@ -18,11 +17,7 @@ class DocumentFilter(django_filters.FilterSet):
|
|||
queryset=Structure.objects.all(),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
standards = django_filters.ModelMultipleChoiceFilter(
|
||||
queryset=Standard.objects.all(),
|
||||
widget=forms.CheckboxSelectMultiple
|
||||
)
|
||||
|
||||
class Meta:
|
||||
model = Document
|
||||
fields = ('audiences', 'sites', 'structures', 'standards')
|
||||
fields = ('audiences', 'sites', 'structures',)
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.5 on 2017-10-24 09:02
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('evolus', '0003_auto_20170921_1839'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='documenttype',
|
||||
name='description',
|
||||
field=models.CharField(blank=True, max_length=255),
|
||||
),
|
||||
]
|
|
@ -0,0 +1,20 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.5 on 2017-10-24 09:05
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('evolus', '0004_documenttype_description'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='documenttype',
|
||||
name='description',
|
||||
field=models.TextField(blank=True, max_length=255),
|
||||
),
|
||||
]
|
|
@ -44,6 +44,7 @@ class DocumentType(models.Model):
|
|||
name = models.CharField(max_length=50)
|
||||
level = models.IntegerField()
|
||||
template = models.FileField(upload_to='documents_templates/', null=True, blank=True)
|
||||
description = models.TextField(max_length=255, blank=True)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11.5 on 2017-10-24 09:02
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('jci', '0024_auto_20171021_2005'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='standard',
|
||||
name='intent',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='standards', to='jci.Intent'),
|
||||
),
|
||||
]
|
Loading…
Reference in New Issue