very nice work
On 6/15/15, Vijay Khemlani wrote:
> If the description is stored as HTML I guess you could use something like
> BeautifulSoup or pyquery to parse it and find the tag
>
> from bs4 import BeautifulSoup
>
> soup = BeautifulSoup(blog.description)
> image_src = soup.find('img')['src']
>
If the description is stored as HTML I guess you could use something like
BeautifulSoup or pyquery to parse it and find the tag
from bs4 import BeautifulSoup
soup = BeautifulSoup(blog.description)
image_src = soup.find('img')['src']
On Mon, Jun 15, 2015 at 8:59 AM, Robin Lery wrote:
> I have
I have a model to write blogs. In that I'm using a wysiwyg editor for the
Blog's descritpion, through which I can insert an image within the
description.
class Blog(models.Model):
title = models.CharField(max_length=150, blank=True)
description = models.TextField()
pubdate = models.Dat
3 matches
Mail list logo