diff --git a/backend/postings/api/serializers.py b/backend/postings/api/serializers.py index 433639f..b8052b0 100644 --- a/backend/postings/api/serializers.py +++ b/backend/postings/api/serializers.py @@ -8,6 +8,7 @@ class UniversityReviewSerializer(serializers.ModelSerializer): fields = [ 'pk', 'university_name', + 'rating', 'title', 'username', 'date_published', diff --git a/backend/postings/migrations/0004_auto_20180926_1312.py b/backend/postings/migrations/0004_auto_20180926_1312.py new file mode 100644 index 0000000..77e23cf --- /dev/null +++ b/backend/postings/migrations/0004_auto_20180926_1312.py @@ -0,0 +1,86 @@ +# Generated by Django 2.0.6 on 2018-09-26 11:12 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('postings', '0003_universityreview_title'), + ] + + operations = [ + migrations.CreateModel( + name='RateableEntity', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=256)), + ], + ), + migrations.CreateModel( + name='Review', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('rating', models.IntegerField(default=1)), + ('title', models.CharField(max_length=128)), + ('content', models.TextField()), + ('created_date', models.DateTimeField(auto_now_add=True)), + ('last_updated_date', models.DateTimeField(auto_now=True)), + ], + ), + migrations.CreateModel( + name='ReviewHelpfulVote', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('helpful', models.BooleanField()), + ('review', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postings.Review')), + ], + ), + migrations.AddField( + model_name='universityreview', + name='rating', + field=models.IntegerField(default=1), + ), + migrations.CreateModel( + name='Course', + fields=[ + ('rateableentity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='postings.RateableEntity')), + ], + bases=('postings.rateableentity',), + ), + migrations.CreateModel( + name='Professor', + fields=[ + ('rateableentity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='postings.RateableEntity')), + ], + bases=('postings.rateableentity',), + ), + migrations.CreateModel( + name='University', + fields=[ + ('rateableentity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='postings.RateableEntity')), + ], + bases=('postings.rateableentity',), + ), + migrations.AddField( + model_name='review', + name='rateable_entity', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postings.RateableEntity'), + ), + migrations.AddField( + model_name='professor', + name='university', + field=models.ManyToManyField(to='postings.University'), + ), + migrations.AddField( + model_name='course', + name='professors', + field=models.ManyToManyField(to='postings.Professor'), + ), + migrations.AddField( + model_name='course', + name='taught_at_university', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postings.University'), + ), + ] diff --git a/backend/postings/migrations/0005_auto_20180927_0916.py b/backend/postings/migrations/0005_auto_20180927_0916.py new file mode 100644 index 0000000..55c9a4a --- /dev/null +++ b/backend/postings/migrations/0005_auto_20180927_0916.py @@ -0,0 +1,18 @@ +# Generated by Django 2.0.6 on 2018-09-27 07:16 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('postings', '0004_auto_20180926_1312'), + ] + + operations = [ + migrations.AlterField( + model_name='universityreview', + name='date_published', + field=models.DateField(verbose_name='date published'), + ), + ] diff --git a/backend/postings/models.py b/backend/postings/models.py index 1896970..b1d8bb8 100644 --- a/backend/postings/models.py +++ b/backend/postings/models.py @@ -48,7 +48,8 @@ class Course(RateableEntity): class UniversityReview(models.Model): university_name = models.CharField(max_length=200) username = models.CharField(max_length=200) + rating = models.IntegerField(default=1) title = models.CharField(max_length=200) - date_published = models.DateTimeField('date published') + date_published = models.DateField('date published') content = models.CharField(max_length=200) \ No newline at end of file diff --git a/frontpage/css/main.css b/frontpage/css/main.css index db1b058..515b546 100644 --- a/frontpage/css/main.css +++ b/frontpage/css/main.css @@ -73,4 +73,14 @@ body { .review-block-description { font-size: 13px; } +.animated { + -webkit-transition: height 0.2s; + -moz-transition: height 0.2s; + transition: height 0.2s; } + +.stars { + margin: 20px 0; + font-size: 24px; + color: #d17581; } + /*# sourceMappingURL=main.css.map */ diff --git a/frontpage/css/main.css.map b/frontpage/css/main.css.map index a548d4a..021c2fa 100644 --- a/frontpage/css/main.css.map +++ b/frontpage/css/main.css.map @@ -1,6 +1,6 @@ { "version": 3, -"mappings": "AACA,IAAI;EACF,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,0FAA0F;EACtG,KAAK,EAAE,IAAI;EACX,UAAU,EAAE,MAAM;EAClB,aAAa,EAAE,CAAC;EAChB,UAAU,EAAC,MAAM;;AAEnB,cAAe;EACb,OAAO,EAAE,IAAI;EACb,WAAW,EAAE,MAAM;EACnB,MAAM,EAAE,0BAA0B;EAClC,MAAM,EAAE,uBAAuB;EAC/B,MAAM,EAAE,kBAAkB;;AAE5B,iBAAiB;EACf,SAAS,EAAE,IAAI;;AAEjB,iBAAiB;EACf,aAAa,EAAE,IAAI;;AAOrB,KAAM;EACJ,UAAU,EAAE,OAAO;EACnB,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,IAAI;;AAGb,MAAM;EACJ,UAAU,EAAE,KAAK;;AAGnB,IAAK;EACH,WAAW,EAAE,IAAI;;AAEnB,SAAS;EACP,gBAAgB,EAAC,OAAO;EACxB,KAAK,EAAC,IAAI;;AAEZ,aAAa;EACX,gBAAgB,EAAC,OAAO;EACxB,MAAM,EAAC,iBAAiB;EACxB,OAAO,EAAC,mBAAmB;EAC3B,aAAa,EAAC,GAAG;;AAEnB,KAAK;EACH,WAAW,EAAC,GAAG;;AAEjB,iBAAiB;EACf,cAAc,EAAC,GAAG;;AAGpB,aAAa;EACX,gBAAgB,EAAC,OAAO;EACxB,MAAM,EAAC,iBAAiB;EACxB,OAAO,EAAC,IAAI;EACZ,aAAa,EAAC,GAAG;EACjB,aAAa,EA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aAAa,EAAC,GAAG;EACjB,aAAa,EAAC,IAAI;;AAEpB,kBAAkB;EAChB,SAAS,EAAC,IAAI;EACd,MAAM,EAAC,MAAM;;AAEf,kBAAkB;EAChB,SAAS,EAAC,IAAI;;AAEhB,kBAAkB;EAChB,SAAS,EAAC,IAAI;EACd,aAAa,EAAC,IAAI;;AAEpB,mBAAmB;EACjB,SAAS,EAAC,IAAI;EACd,WAAW,EAAC,GAAG;EACf,aAAa,EAAC,IAAI;;AAEpB,yBAAyB;EACvB,SAAS,EAAC,IAAI;;AAGhB,SAAU;EACR,kBAAkB,EAAE,WAAW;EAC/B,eAAe,EAAE,WAAW;EAC5B,UAAU,EAAE,WAAW;;AAGzB,MACA;EACE,MAAM,EAAE,MAAM;EACd,SAAS,EAAE,IAAI;EACf,KAAK,EAAE,OAAO", "sources": ["main.scss"], "names": [], "file": "main.css" diff --git a/frontpage/css/main.scss b/frontpage/css/main.scss index c9f83c7..2f1ca7d 100644 --- a/frontpage/css/main.scss +++ b/frontpage/css/main.scss @@ -81,4 +81,21 @@ body { } .review-block-description{ font-size:13px; +} + +.animated { + -webkit-transition: height 0.2s; + -moz-transition: height 0.2s; + transition: height 0.2s; +} + +.stars +{ + margin: 20px 0; + font-size: 24px; + color: #d17581; +} + +.nopointer{ + } \ No newline at end of file diff --git a/frontpage/index2.html b/frontpage/index2.html index 9c25473..c3e23b5 100644 --- a/frontpage/index2.html +++ b/frontpage/index2.html @@ -12,7 +12,6 @@ -