Django project integration

This commit is contained in:
Mike
2019-11-09 23:28:08 -05:00
parent 5c2d93a9e9
commit 24cc24fb15
14 changed files with 248 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
from django.db import models
# Create your models here.
class books(models.Model):
"""
pyShelfs Book Database class
:param title: Book title
:param author: Author
:param categories: Categories <-- Not implemented
:param cover: Cover image BinaryField
:param pages: # of pages <-- Not implemented
:param progress: Reader percentage <-- Not implented
:param file_name: Path to book
"""
title = models.CharField(max_length=255)
author = models.CharField(max_length=255, blank=True)
categories = models.CharField(max_length=255, blank=True)
cover = models.BinaryField(blank=True, editable=True)
pages = models.IntegerField(blank=True)
progress = models.IntegerField(blank=True)
file_name = models.CharField(max_length=255, blank=False)