Repository: Cloud-CV/EvalAI

Issue:
Add nullable attribute to the Team Model
Following changes are required in the Team model: 

- [x] Convert the URLFields to CharField with URL

- [x] Change the fields `email`, `github_url`, `linkedin_url`, `personal_website` to nullable fields


Discussion:
@deshraj Can I work on this?
Yeah sure. Go ahead. :) 

@deshraj Can we use [slugfield](https://docs.djangoproject.com/en/1.8/ref/models/fields/#slugfield) for task 1? 
No, can you please change them with `CharField` ? 
@deshraj okay sure.

Resolving patch:
diff --git a/apps/web/migrations/0004_change_team_model_field_type.py b/apps/web/migrations/0004_change_team_model_field_type.py
--- a/apps/web/migrations/0004_change_team_model_field_type.py
+++ b/apps/web/migrations/0004_change_team_model_field_type.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Generated by Django 1.10.2 on 2017-03-19 21:06
+# Generated by Django 1.10.2 on 2017-03-19 21:58
 from __future__ import unicode_literals
 
 from django.db import migrations, models
@@ -15,21 +15,21 @@ class Migration(migrations.Migration):
         migrations.AlterField(
             model_name='team',
             name='email',
-            field=models.EmailField(max_length=70, null=True),
+            field=models.EmailField(blank=True, max_length=70, null=True),
         ),
         migrations.AlterField(
             model_name='team',
             name='github_url',
-            field=models.CharField(max_length=200, null=True),
+            field=models.CharField(blank=True, max_length=200, null=True),
         ),
         migrations.AlterField(
             model_name='team',
             name='linkedin_url',
-            field=models.CharField(max_length=200, null=True),
+            field=models.CharField(blank=True, max_length=200, null=True),
         ),
         migrations.AlterField(
             model_name='team',
             name='personal_website',
-            field=models.CharField(max_length=200, null=True),
+            field=models.CharField(blank=True, max_length=200, null=True),
         ),
     ]
diff --git a/apps/web/models.py b/apps/web/models.py
--- a/apps/web/models.py
+++ b/apps/web/models.py
@@ -32,13 +32,13 @@ class Team(models.Model):
     )
 
     name = models.CharField(max_length=100)
-    email = models.EmailField(max_length=70, null=True)
+    email = models.EmailField(max_length=70, null=True, blank=True)
     description = models.TextField(null=True)
     headshot = models.ImageField(upload_to="headshots", null=True, blank=True)
     visible = models.BooleanField(default=True)
-    github_url = models.CharField(max_length=200, null=True)
-    linkedin_url = models.CharField(max_length=200, null=True)
-    personal_website = models.CharField(max_length=200, null=True)
+    github_url = models.CharField(max_length=200, null=True, blank=True)
+    linkedin_url = models.CharField(max_length=200, null=True, blank=True)
+    personal_website = models.CharField(max_length=200, null=True, blank=True)
     background_image = models.ImageField(upload_to="bg-images", null=True, blank=True)
     team_type = models.CharField(choices=TEAM_TYPE_OPTIONS, max_length=50)
 


Test patch: