diff --git a/backend/RateMyCourse/urls.py b/backend/RateMyCourse/urls.py index a3f6829..9cbc84d 100644 --- a/backend/RateMyCourse/urls.py +++ b/backend/RateMyCourse/urls.py @@ -20,8 +20,8 @@ from django.contrib.staticfiles.views import serve from django.views.generic import RedirectView urlpatterns = [ - # / routes to index2.html - url(r'^$', serve, kwargs={'path': 'index2.html'}), + # / routes to index.html + url(r'^$', serve, kwargs={'path': 'index.html'}), # static files (*.css, *.js, *.jpg etc.) served on / # (assuming Django uses /static/ and /media/ for static/media urls) diff --git a/backend/db.sqlite3 b/backend/db.sqlite3 index 2361f25..359edf3 100644 Binary files a/backend/db.sqlite3 and b/backend/db.sqlite3 differ diff --git a/backend/postings/api/serializers.py b/backend/postings/api/serializers.py index b8052b0..af78342 100644 --- a/backend/postings/api/serializers.py +++ b/backend/postings/api/serializers.py @@ -15,8 +15,7 @@ class UniversityReviewSerializer(serializers.ModelSerializer): 'content', ] read_only_fields =[ - 'pk', - 'username' + 'pk' ] # Serializes the generic Review object. @@ -75,4 +74,4 @@ class ProfessorSerializer(serializers.ModelSerializer): ] read_only_fields = [ 'pk' - ] \ No newline at end of file + ] diff --git a/backend/postings/migrations/0002_auto_20180927_1115.py b/backend/postings/migrations/0002_auto_20180927_1115.py new file mode 100644 index 0000000..68acb33 --- /dev/null +++ b/backend/postings/migrations/0002_auto_20180927_1115.py @@ -0,0 +1,18 @@ +# Generated by Django 2.1.1 on 2018-09-27 11:15 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('postings', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='universityreview', + name='date_published', + field=models.DateTimeField(auto_now_add=True), + ), + ] diff --git a/backend/postings/models.py b/backend/postings/models.py index b1d8bb8..f6cf652 100644 --- a/backend/postings/models.py +++ b/backend/postings/models.py @@ -50,6 +50,6 @@ class UniversityReview(models.Model): username = models.CharField(max_length=200) rating = models.IntegerField(default=1) title = models.CharField(max_length=200) - date_published = models.DateField('date published') + date_published = models.DateTimeField(auto_now_add=True) content = models.CharField(max_length=200) \ No newline at end of file diff --git a/frontpage/index.html b/frontpage/index.html index 3b3b033..fdc2fa0 100644 --- a/frontpage/index.html +++ b/frontpage/index.html @@ -3,81 +3,240 @@ -
- - -