diff --git a/dreamjub/migrations/0004_auto_20171029_1427.py b/dreamjub/migrations/0004_auto_20171029_1427.py new file mode 100644 index 0000000..199e278 --- /dev/null +++ b/dreamjub/migrations/0004_auto_20171029_1427.py @@ -0,0 +1,55 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.6 on 2017-10-29 14:27 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('dreamjub', '0003_auto_20161204_2258'), + ] + + operations = [ + migrations.AlterField( + model_name='student', + name='building', + field=models.CharField(blank=True, max_length=255, null=True), + ), + migrations.AlterField( + model_name='student', + name='college', + field=models.CharField(blank=True, choices=[('Krupp', 'Krupp College'), ('Mercator', 'Mercator College'), ('C3', 'College III'), ('Nordmetall', 'College Nordmetall')], max_length=255, null=True), + ), + migrations.AlterField( + model_name='student', + name='country', + field=models.TextField(blank=True, null=True), + ), + migrations.AlterField( + model_name='student', + name='degree', + field=models.CharField(blank=True, choices=[('Bachelor of Science', 'Bachelor of Science'), ('Bachelor of Art', 'Bachelor of Art'), ('Master of Science', 'Master of Science'), ('Master of Art', 'Master of Art'), ('PhD', 'PhD')], max_length=255, null=True), + ), + migrations.AlterField( + model_name='student', + name='majorShort', + field=models.CharField(blank=True, max_length=255, null=True), + ), + migrations.AlterField( + model_name='student', + name='picture', + field=models.ImageField(blank=True, null=True, upload_to='faces/%Y/%m/%d/'), + ), + migrations.AlterField( + model_name='student', + name='status', + field=models.CharField(blank=True, choices=[('foundation-year', 'Foundation Year'), ('medprep', 'Medprep'), ('undergrad', 'Undergraduate'), ('master', 'Master'), ('phd-integrated', 'integrated PhD'), ('phd', 'PhD'), ('winter', 'Winter School Student'), ('guest', 'Guest Student')], max_length=255, null=True), + ), + migrations.AlterField( + model_name='student', + name='year', + field=models.PositiveIntegerField(blank=True, null=True), + ), + ] diff --git a/dreamjub/models.py b/dreamjub/models.py index a6ca35f..2d11fc8 100644 --- a/dreamjub/models.py +++ b/dreamjub/models.py @@ -30,8 +30,9 @@ def fullName(self): return '%s %s' % (self.firstName, self.lastName) # Colorfoul Info - country = models.TextField(null=True) #: Country of origin - picture = models.ImageField(null=True, upload_to='faces/%Y/%m/%d/') #: + country = models.TextField(blank=True, null=True) #: Country of origin + picture = models.ImageField(blank=True, null=True, + upload_to='faces/%Y/%m/%d/') #: # Picture (if available) # College Contact Info @@ -44,13 +45,13 @@ def fullName(self): (MERCATOR, 'Mercator College'), (COLLEGE_III, 'College III'), (COLLEGE_NORDMETALL, 'College Nordmetall') - ), null=True, max_length=255) + ), blank=True, null=True, max_length=255) # Physical contact information phone = models.TextField(blank=True, null=True) isCampusPhone = models.BooleanField(default=False) room = models.TextField(blank=True, null=True) - building = models.CharField(null=True, max_length=255) + building = models.CharField(blank=True, null=True, max_length=255) # Types of people isStudent = models.BooleanField() @@ -77,7 +78,7 @@ def fullName(self): (WINTER, 'Winter School Student'), (GUEST, 'Guest Student') - ), null=True, max_length=255) #: current student status + ), blank=True, null=True, max_length=255) #: current student status #: Degree Status BACHELOR_OF_SCIENCE = 'Bachelor of Science' @@ -93,12 +94,12 @@ def fullName(self): (MASTER_OF_ART, 'Master of Art'), (PHD_DEGREE, 'PhD') - ), null=True, max_length=255) + ), blank=True, null=True, max_length=255) # year and major year = models.PositiveIntegerField( - null=True) #: (Last known) year of Graduation - majorShort = models.CharField(null=True, max_length=255) + blank=True, null=True) #: (Last known) year of Graduation + majorShort = models.CharField(blank=True, null=True, max_length=255) # TODO: Fill this MAJOR_NAMES_MAP = {