How are you creating these entries? Is that a separate view and form? (You don’t need to post them, I’m just wondering how you’re populating your data.)
And what is generate_slug?
Also, since you’re relying upon slug having a value, you should probably remove the null=True and blank=True attributes from the field.
That template you posted in your first reply; is that the complete “blog.html” template file, or is it just a portion of the template file, or is it a template file that is being included by “blog.html”?
I’m not seeing anything wrong with the information you’ve posted so far.
The next thing I’d check - trying to identify where the error is happening, would be to replace this part of your template:
With this:
==={{ blog.slug }}===
The equal signs create a “fence” for the visual representation of the blog.slug field - this lets you see whether blog.slug is being identified correctly within the template, hopefully preventing the error from appearing but giving you visual confirmation of that field within the template.