summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/garden/migrations/0006_auto_20200706_0854.py23
-rw-r--r--app/garden/migrations/0007_auto_20200706_0854.py18
-rw-r--r--app/garden/models.py33
3 files changed, 67 insertions, 7 deletions
diff --git a/app/garden/migrations/0006_auto_20200706_0854.py b/app/garden/migrations/0006_auto_20200706_0854.py
new file mode 100644
index 0000000..a036635
--- /dev/null
+++ b/app/garden/migrations/0006_auto_20200706_0854.py
@@ -0,0 +1,23 @@
+# Generated by Django 2.1.2 on 2020-07-06 08:54
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('garden', '0005_auto_20200705_1652'),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name='plant',
+ name='annual',
+ field=models.BooleanField(default=True),
+ ),
+ migrations.AlterField(
+ model_name='plant',
+ name='family',
+ field=models.IntegerField(choices=[(0, 'Tomatoes'), (1, 'Cucumbers'), (2, 'Watermelons'), (3, 'Pumkins'), (4, 'Cantelope'), (5, 'Kale'), (6, 'Okra'), (7, 'Collards'), (8, 'Arugula'), (9, 'Butter Lettuce'), (10, 'Basil'), (11, 'Lemongrass'), (12, 'Thyme'), (13, 'Mint')], default=0),
+ ),
+ ]
diff --git a/app/garden/migrations/0007_auto_20200706_0854.py b/app/garden/migrations/0007_auto_20200706_0854.py
new file mode 100644
index 0000000..94f85e7
--- /dev/null
+++ b/app/garden/migrations/0007_auto_20200706_0854.py
@@ -0,0 +1,18 @@
+# Generated by Django 2.1.2 on 2020-07-06 08:54
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('garden', '0006_auto_20200706_0854'),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name='plant',
+ name='conditions',
+ field=models.IntegerField(choices=[(0, 'Vegetable'), (1, 'Herb'), (2, 'Berry'), (3, 'Nut')], default=0),
+ ),
+ ]
diff --git a/app/garden/models.py b/app/garden/models.py
index 2ae47f6..5af306a 100644
--- a/app/garden/models.py
+++ b/app/garden/models.py
@@ -5,15 +5,26 @@ from django.contrib.gis.db import models
from utils.util import render_images, markdown_to_html
+PLANT_FAMILY = (
+ (0, 'Tomatoes'),
+ (1, 'Cucumbers'),
+ (2, 'Watermelons'),
+ (3, 'Pumkins'),
+ (4, 'Cantelope'),
+ (5, 'Kale'),
+ (6, 'Okra'),
+ (7, 'Collards'),
+ (8, 'Arugula'),
+ (9, 'Butter Lettuce'),
+ (10, 'Basil'),
+ (11, 'Lemongrass'),
+ (12, 'Thyme'),
+ (13, 'Mint'),
+)
+
+
class Plant(models.Model):
name = models.CharField(max_length=200)
- PLANT_FAMILY = (
- (0, 'Tomatoes'),
- (1, 'Cucumbers'),
- (2, 'Watermelons'),
- (3, 'Pumkins'),
- (4, 'Basil'),
- )
family = models.IntegerField(choices=PLANT_FAMILY, default=0)
scientific_name = models.CharField(max_length=200, null=True, blank=True)
edible = models.BooleanField(default=False)
@@ -28,8 +39,16 @@ class Plant(models.Model):
(2, 'Shade'),
)
conditions = models.IntegerField(choices=CONDITIONS, default=0)
+ PLANT_TYPE= (
+ (0, 'Vegetable'),
+ (1, 'Herb'),
+ (2, 'Berry'),
+ (3, 'Nut'),
+ )
+ conditions = models.IntegerField(choices=PLANT_TYPE, default=0)
organic = models.BooleanField(default=True)
heirloom = models.BooleanField(default=True)
+ annual = models.BooleanField(default=True)
class Meta:
ordering = ('-date_created',)