From 76d4fe9ad5cf1e31f30f0a20acfeb788580facd3 Mon Sep 17 00:00:00 2001 From: Greg Lind Date: Fri, 30 Aug 2024 17:14:34 -0700 Subject: [PATCH] null fields and warning for agency register --- mysite/templates/register.html | 2 ++ .../migrations/0007_auto_20240831_0013.py | 31 +++++++++++++++++++ punchlist/models.py | 5 +-- 3 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 punchlist/migrations/0007_auto_20240831_0013.py diff --git a/mysite/templates/register.html b/mysite/templates/register.html index 7cf3c96..59922cc 100644 --- a/mysite/templates/register.html +++ b/mysite/templates/register.html @@ -18,6 +18,8 @@ +

If you're a product manager, designer, or a startup founder, you can join the CollabHub to collaborate with other software, marketing or creative professionals and agenices by registering below.

+

If you are a software developer, agency or a freelancer, you can join the CollabHub to collaborate with other software, marketing or creative professionals and agenices by registering over here as a partner.

Join the CollabHub
diff --git a/punchlist/migrations/0007_auto_20240831_0013.py b/punchlist/migrations/0007_auto_20240831_0013.py new file mode 100644 index 0000000..c27139c --- /dev/null +++ b/punchlist/migrations/0007_auto_20240831_0013.py @@ -0,0 +1,31 @@ +# Generated by Django 3.2.25 on 2024-08-31 00:13 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('punchlist', '0006_auto_20240830_1914'), + ] + + operations = [ + migrations.AddField( + model_name='developmentagency', + name='owner', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='product', + name='owner', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterField( + model_name='punchlist', + name='product', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='punchlists', to='punchlist.product'), + ), + ] diff --git a/punchlist/models.py b/punchlist/models.py index f45bf96..aae71d2 100644 --- a/punchlist/models.py +++ b/punchlist/models.py @@ -76,7 +76,7 @@ class Product(models.Model): prod_url = models.CharField(max_length=255,null=True, blank=True) repository_url = models.CharField(max_length=255,null=True, blank=True) product_uuid = models.UUIDField(unique=True,null=True, blank=True) - owner = models.ForeignKey(User, on_delete=models.CASCADE) + owner = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True) organization_uuid = models.UUIDField(null=True, blank=True) # Add this field for organization UUID product_team = models.UUIDField(null=True, blank=True) # Add this field for product team UUID start_date = models.DateTimeField(null=True, blank=True) @@ -183,7 +183,7 @@ class Punchlist(models.Model): labs_product_name = models.CharField(max_length=255, blank=True, null=True, help_text="Product Name from Buildly Insights API") labs_product_id = models.CharField(max_length=255, blank=True, null=True, help_text="Product ID from Buildly Insights API") labs_release_id = models.JSONField(max_length=255, blank=True, null=True, help_text="Release IDs from Buildly Insights API for Product") - product = models.ForeignKey(Product, on_delete=models.CASCADE, related_name='punchlists') + product = models.ForeignKey(Product, on_delete=models.CASCADE, related_name='punchlists', null=True, blank=True) create_date = models.DateTimeField(null=True, blank=True) edit_date = models.DateTimeField(null=True, blank=True) @@ -405,6 +405,7 @@ class DevelopmentAgency(models.Model): contact_email = models.EmailField() contact_phone = models.CharField(max_length=20) linkedin_url = models.URLField(null=True, blank=True) + owner = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True) how_they_found_us = models.TextField() logo = models.ImageField(upload_to='agency-logo', null=True, blank=True)