diff --git a/redwine/models.py b/redwine/models.py index a236a70..010cca2 100755 --- a/redwine/models.py +++ b/redwine/models.py @@ -7,8 +7,8 @@ class Penalty(models.Model): - to = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='penalties') - giver = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='penaltygiver') + to = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='penalties', on_delete=models.CASCADE) + giver = models.ForeignKey(settings.AUTH_USER_MODEL, related_name='penaltygiver', on_delete=models.CASCADE) amount = models.PositiveIntegerField() committee = models.CharField(max_length=60) reason = models.CharField(max_length=100) diff --git a/redwine/urls.py b/redwine/urls.py index 0f79280..57db308 100755 --- a/redwine/urls.py +++ b/redwine/urls.py @@ -7,6 +7,6 @@ url(r'^top/$', redwine_top), url(r'^(\w+)/$', redwine_com), url(r'^$', redwine_home), - url(r'^admin/', include(admin.site.urls)), + url(r'^admin/', admin.site.urls), # (r'accounts/login/',include(admin.site.urls)), ] diff --git a/requirements.txt b/requirements.txt index f305b2f..3160565 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -Django==1.11 +Django==2.0.9