Closed harutmarg closed 2 months ago
I want to create model named 'MediaContent' and in this model have these fields:
url = models.URLField() - this is url of the website
parsed_urls = models.JSONField(default=list) - this represents parsed_urls of this website
created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)
Is this correct?
Yes, let's create an abstract model with datetime fields and inherit every model from it Also, maybe it makes sense to also create an abstract Parser model and inherit all parsers from that And I think it's more scalable to add those two image and video parser models, even if they don't add new fields at this moment
Is this correct relation? Url->Parser->ParsedObject So at the end should i represent ParsedObject?
Motivation
We want to save all objects during parsing to database, in order to save a history of outputs of our parsers. Also, the data can be used in CRUD operations for some frontend apps
TODO
parse
method for saving objects to database during parsingpgadmin4
for local debugging)