Django database API foreign key 102

https://docs.djangoproject.com/en/2.0/topics/db/queries/   Our models have now changed and a new model has been added to e-lo. In RawText, we store the input, in BlobText we store the functions from TextBlob lib. If we remove the instance from the first table, we also need to remove it from the second. Ref on_delete = models.CASCADE Lets add […]

Leviathan Thomas Hobbes

http://www.sparknotes.com/philosophy/leviathan/summary/ Leviathan rigorously argues that civil peace and social unity are best achieved by the establishment of a commonwealth through social contract. Hobbes’s ideal commonwealth is ruled by a sovereign power responsible for protecting the security of the commonwealth and granted absolute authority to ensure the common defense. In his introduction, Hobbes describes this commonwealth […]

Django database API migrations and models 101

Django API Once you’ve created your data models, Django automatically gives you a database-abstraction API that lets you create, retrieve, update and delete objects. This document explains how to use this API. Refer to the data model reference for full details of all the various model lookup options. https://docs.djangoproject.com/en/2.0/topics/db/queries/ So our testmodel is a simple […]