Skip to content

Commit

Permalink
Create field for assessment id (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
mwvolo authored and RoyEJohnson committed Feb 28, 2018
1 parent 40fef21 commit bf0830f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
6 changes: 6 additions & 0 deletions errata/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class ErrataAdmin(admin.ModelAdmin):
'modified',
'book',
'is_assessment_errata',
'assessment_id',
'status',
'resolution',
'duplicate_id',
Expand Down Expand Up @@ -84,6 +85,7 @@ def export_as_csv(self, request, queryset):
smart_str("Modified"),
smart_str("Book"),
smart_str("Assessment"),
smart_str("Assessment ID"),
smart_str("Status"),
smart_str("Resolution"),
smart_str("Archived"),
Expand All @@ -104,6 +106,7 @@ def export_as_csv(self, request, queryset):
smart_str(obj.modified),
smart_str(obj.book.title),
smart_str(obj.is_assessment_errata),
smart_str(obj.assessment_id),
smart_str(obj.status),
smart_str(obj.resolution),
smart_str(obj.archived),
Expand Down Expand Up @@ -158,6 +161,7 @@ def get_form(self, request, obj=None, **kwargs):
'modified',
'book',
'is_assessment_errata',
'assessment_id',
'status',
'resolution',
'duplicate_id',
Expand All @@ -183,6 +187,7 @@ def get_form(self, request, obj=None, **kwargs):
'modified',
'book',
'is_assessment_errata',
'assessment_id',
'status',
'resolution',
'duplicate_id',
Expand All @@ -203,6 +208,7 @@ def get_form(self, request, obj=None, **kwargs):
'modified',
'book',
'is_assessment_errata',
'assessment_id',
'status',
'resolution',
'duplicate_id',
Expand Down
20 changes: 20 additions & 0 deletions errata/migrations/0024_errata_assessment_id.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-27 19:29
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('errata', '0023_auto_20180222_1002'),
]

operations = [
migrations.AddField(
model_name='errata',
name='assessment_id',
field=models.CharField(blank=True, max_length=255, null=True),
),
]
1 change: 1 addition & 0 deletions errata/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class Errata(models.Model):
blank=True,
null=True,
)
assessment_id = models.CharField(max_length=255, null=True, blank=True)
status = models.CharField(
max_length=100,
choices=ERRATA_STATUS,
Expand Down

0 comments on commit bf0830f

Please sign in to comment.