diff --git a/backend/db.sqlite3 b/backend/db.sqlite3 index c569ecb..92f7380 100644 Binary files a/backend/db.sqlite3 and b/backend/db.sqlite3 differ diff --git a/backend/postings/migrations/0005_review_author_name.py b/backend/postings/migrations/0005_review_author_name.py new file mode 100644 index 0000000..dae5770 --- /dev/null +++ b/backend/postings/migrations/0005_review_author_name.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.1 on 2018-10-18 08:30 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('postings', '0004_remove_reviewhelpfulvote_user'), + ] + + operations = [ + migrations.AddField( + model_name='review', + name='author_name', + field=models.CharField(default='Anonymous', max_length=64), + ), + ] diff --git a/backend/postings/models.py b/backend/postings/models.py index de4c017..f6ca417 100644 --- a/backend/postings/models.py +++ b/backend/postings/models.py @@ -74,6 +74,8 @@ class Review(models.Model): last_updated_date = models.DateTimeField(auto_now=True) # A reference to the person who created this review. author = models.ForeignKey('postings.User', on_delete=models.PROTECT, null=True, blank=True) + # TEMPORARY: Name of person who gave review. + author_name = models.CharField(max_length=64, default='Anonymous') # Gets the total number of votes which marked this review as 'helpful'. @property diff --git a/backend/postings/templates/postings/frontend/entity.html b/backend/postings/templates/postings/frontend/entity.html index 52c58aa..3350487 100644 --- a/backend/postings/templates/postings/frontend/entity.html +++ b/backend/postings/templates/postings/frontend/entity.html @@ -55,8 +55,8 @@ {# Username input #}