Skip to content

Category: Django

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 two instances and view them, then delete them.

 

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 Note where we store text from the user. This is our base for e-lo on web.

We feed e-lo some text and select a of several NLP functions that will be implemented later (Some of them are implemented, but must interfaced with Django, now they are interfaced with class cmd.Cmd([completekey[, stdin[, stdout]]]).