Commit 1771920b authored by RJC's avatar RJC

pep guidelines

parent 5913a0f5
from django.db import models
from django.urls import reverse
# Create your models here.
......@@ -13,6 +14,7 @@ class Author(models.Model):
def __str__(self):
return str(self.first_name + ' ' + self.last_name)
class Books(models.Model):
title = models.CharField(max_length=255, null=True, blank=True)
author = models.ForeignKey(Author, related_name='books', on_delete=models.CASCADE, null=True)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment