I didn’t do a very good job explaining.  Let me try again.

If you take a look at this image of Blogger, the red arrow points to the 
formatting bar <https://imgur.com/LpksoNE>.  The formatting is a helpful 
feature in Blogger which allows blog posters to add an essay worth of 
content, and then alter the appearance of the Lorem Ipsum essay content 
with bold, italics, underline and a few dozen other buttons and options.

Then when you click the HTML button <https://imgur.com/4SD6abe> in the 
Blogger dashboard, it shows you the same Lorem Ipsum content, but just the 
raw HTML source.

My Django admin panel when creating a new blog post just accepts plain 
text.  No HTML markup formatting.  Here is a pic of my Django dashboard with 
a red arrow pointing to where I am hoping to add an HTML formatting bar 
<https://imgur.com/Pkcva1s>. Or does Django not have an HTML formatting 
menu feature helping blog contributors to format their content?  I can’t 
find it in the model field type / option doc that I linked to in my 
original post.

Thank you.

On Wednesday, November 15, 2017 at 10:41:31 PM UTC-5, Amitesh Sahay wrote:
>
> The HTML file in Django is parsed through views.py if that is what you are 
> looking for. For Italics <em> tag should work. For strong text, you may use 
> <strong> tag. I hope that I have understood your question correctly.
>
> Hello,
>
> Regards,
> Amitesh Sahay
>
> primary :: *91-907 529 6235*
>
>
> On Thursday 16 November 2017, 6:51:03 AM IST, drone4four <
> drone...@gmail.com <javascript:>> wrote: 
>
>
> The contents of my models.py looks like this:
>
> from django.db import models
>
>
> # Create your models here.
> class Post(models.Model):
>         title = models.CharField(max_length=256)
>         pub_date = models.DateTimeField()
>         image = models.ImageField(upload_to='media/')
>         body = models.TextField()
>
>
>         def __str__(self):
>             return self.title
>
>
>         def pub_date_pretty(self):
>             return self.pub_date.strftime('%A %d %B %Y @ %-I:%M:%S %p')
>
>
>         def summary(self):
>             return self.body[:350]
>
> Lines 5 through 8 initiate the model class variables for my blog 
> dashboard. My dashboard looks like this <https://imgur.com/a/HTffL>. 
> There is a title, pub date, image and body. The Udemy instructor suggests 
> consulting the official Django doc for field types/options 
> <https://docs.djangoproject.com/en/1.11/ref/models/fields/>. I’m not sure 
> I really understand most of it. There is just so much information there. My 
> question for all of you: Which field option or field type initiates an HTML 
> parser for body text? I mean, when I go to to create a new blog post, how 
> do I create rich text with HTML formatting buttons like bold, underline and 
> italics? It’s not really the buttons I care about. I just want my HTML tags 
> to parse. Take note of the HTML tags I’ve circled in red here 
> <https://imgur.com/a/wV4qs>. How do I get the h5, hr and em to parse? Is 
> there a field option/type for this? I don’t see it in the models fields doc.
>
> Thanks for your attention.
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users...@googlegroups.com <javascript:>.
> To post to this group, send email to django...@googlegroups.com 
> <javascript:>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/d387add4-9859-4410-a882-cf98ee3a6278%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/d387add4-9859-4410-a882-cf98ee3a6278%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b7d066e4-0cdf-46af-aa56-47a211611c67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to