Skip to content
Snippets Groups Projects
Unverified Commit 87b317bd authored by Martin Burchell's avatar Martin Burchell Committed by Luke Murphy
Browse files

Allow SheetProfile to be edited from the admin interface

parent b341eeea
No related branches found
No related tags found
1 merge request!58Bangladesh staging demo
import pytest
from ..models import SheetProfile
@pytest.mark.django_db
def test_unicode_is_label():
profile = SheetProfile.objects.create(label='Test')
assert unicode(profile) == 'Test'
from django.contrib import admin
from .models import SheetProfile
# Register your models here.
admin.site.register(SheetProfile, admin.ModelAdmin)
......@@ -18,3 +18,6 @@ class SheetProfile(models.Model):
label = models.CharField(max_length=256)
profile = JSONField(
load_kwargs={'object_pairs_hook': collections.OrderedDict})
def __unicode__(self):
return self.label
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment