summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2018-12-03 17:55:06 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2018-12-03 17:55:46 +0100
commitdf40e324fa1b5eed4bc4dc3ece0f0e8eea98ea10 (patch)
tree8e2e982bc1accf09dd53b43a70f88acccc05b758
parentbc1ad1f8452cdbab08b05d3a5bec8bcc5ad0dcae (diff)
downloadIshtar-df40e324fa1b5eed4bc4dc3ece0f0e8eea98ea10.tar.bz2
Ishtar-df40e324fa1b5eed4bc4dc3ece0f0e8eea98ea10.zip
Finds: add circumference
-rw-r--r--archaeological_finds/forms.py14
-rw-r--r--archaeological_finds/migrations/0048_auto_20181203_1746.py25
-rw-r--r--archaeological_finds/models_finds.py2
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html3
4 files changed, 39 insertions, 5 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py
index 9e64a901a..ae592d013 100644
--- a/archaeological_finds/forms.py
+++ b/archaeological_finds/forms.py
@@ -149,9 +149,9 @@ class BaseFindForm(CustomForm, ManageOldType):
'material_type_quality', 'object_type', 'object_type_quality',
'find_number', 'min_number_of_individuals', 'inscription',
'manufacturing_place', 'communicabilitie', 'comment', 'dating_comment',
- 'length', 'width', 'height', 'diameter', 'thickness', 'volume',
- 'weight', 'clutter_long_side', 'clutter_short_side', 'clutter_height',
- 'dimensions_comment', 'checked_type', 'check_date'
+ 'length', 'width', 'height', 'thickness', 'diameter', 'circumference',
+ 'volume', 'weight', 'clutter_long_side', 'clutter_short_side',
+ 'clutter_height', 'dimensions_comment', 'checked_type', 'check_date'
]
HEADERS = {}
HEADERS['label'] = FormHeader(_(u"Identification"))
@@ -209,6 +209,9 @@ class BaseFindForm(CustomForm, ManageOldType):
widget=widgets.CentimeterMeterWidget, required=False)
diameter = FloatField(label=_(u"Diameter (cm)"),
widget=widgets.CentimeterMeterWidget, required=False)
+ circumference = FloatField(
+ label=_(u"Circumference (cm)"), widget=widgets.CentimeterMeterWidget,
+ required=False)
volume = FloatField(label=_(u"Volume (l)"), required=False)
weight = FloatField(label=_(u"Weight (g)"),
widget=widgets.GramKilogramWidget, required=False)
@@ -279,7 +282,8 @@ class FindForm(BaseFindForm):
'is_complete', 'material_type', 'material_type_quality', 'object_type',
'object_type_quality', 'find_number', 'min_number_of_individuals',
'inscription', 'manufacturing_place', 'communicabilitie', 'comment',
- 'dating_comment', 'length', 'width', 'height', 'diameter', 'thickness',
+ 'dating_comment', 'length', 'width', 'height', 'thickness', 'diameter',
+ 'circumference',
'volume', 'weight', 'clutter_long_side', 'clutter_short_side',
'clutter_height', 'dimensions_comment', 'get_first_base_find__x',
'get_first_base_find__estimated_error_x', 'get_first_base_find__y',
@@ -449,6 +453,8 @@ class ResultingFindForm(CustomForm, ManageOldType):
resulting_width = FloatField(label=_(u"Width (cm)"), required=False)
resulting_height = FloatField(label=_(u"Height (cm)"), required=False)
resulting_diameter = FloatField(label=_(u"Diameter (cm)"), required=False)
+ resulting_circumference = FloatField(label=_(u"Circumference (cm)"),
+ required=False)
resulting_thickness = FloatField(label=_(u"Thickness (cm)"), required=False)
resulting_volume = FloatField(label=_(u"Volume (l)"), required=False)
resulting_weight = FloatField(label=_(u"Weight (g)"), required=False)
diff --git a/archaeological_finds/migrations/0048_auto_20181203_1746.py b/archaeological_finds/migrations/0048_auto_20181203_1746.py
new file mode 100644
index 000000000..567832d72
--- /dev/null
+++ b/archaeological_finds/migrations/0048_auto_20181203_1746.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.10 on 2018-12-03 17:46
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('archaeological_finds', '0047_auto_20181203_1442'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='find',
+ name='circumference',
+ field=models.FloatField(blank=True, null=True, verbose_name='Circumference (cm)'),
+ ),
+ migrations.AddField(
+ model_name='historicalfind',
+ name='circumference',
+ field=models.FloatField(blank=True, null=True, verbose_name='Circumference (cm)'),
+ ),
+ ]
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index d4cb9fc2f..3404749c7 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -1113,6 +1113,8 @@ class Find(BulkUpdatedItem, ValueGetter, BaseHistorizedItem, OwnPerms,
width = models.FloatField(_(u"Width (cm)"), blank=True, null=True)
height = models.FloatField(_(u"Height (cm)"), blank=True, null=True)
diameter = models.FloatField(_(u"Diameter (cm)"), blank=True, null=True)
+ circumference = models.FloatField(_(u"Circumference (cm)"), blank=True,
+ null=True)
thickness = models.FloatField(_(u"Thickness (cm)"), blank=True, null=True)
clutter_long_side = models.FloatField(
_(u"Clutter - long side (cm)"), blank=True, null=True)
diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html
index ceda2a563..b676d6235 100644
--- a/archaeological_finds/templates/ishtar/sheet_find.html
+++ b/archaeological_finds/templates/ishtar/sheet_find.html
@@ -148,8 +148,9 @@
{% field_flex "Length (cm)" item.length %}
{% field_flex "Width (cm)" item.width %}
{% field_flex "Height (cm)" item.height %}
- {% field_flex "Diameter (cm)" item.diameter %}
{% field_flex "Thickness (cm)" item.thickness %}
+ {% field_flex "Diameter (cm)" item.diameter %}
+ {% field_flex "Circumference (cm)" item.circumference %}
{% field_flex "Volume (l)" item.volume %}
{% trans "Weight (g)" as weight_label %}
{% field_flex weight_label item.weight_string %}