Massive UI changes, and updates to the collection system

This commit is contained in:
Raelon Masters
2020-03-22 01:05:42 -04:00
parent 72e54ab001
commit 53e9a1d222
10 changed files with 183 additions and 51 deletions

View File

@@ -30,6 +30,15 @@ class Books(models.Model):
progress = models.IntegerField(null=True)
file_name = models.CharField(max_length=255, null=False)
def generic_search(self, query):
try:
results = Books.objects.annotate(
search=SearchVector("title", "file_name", "author"),
).filter(search=query)
except Exception as e:
raise
return results
class Collections(models.Model):
class Meta: