css - Language choice affects text overflow in html(bootstrap) (Django) -
i'm using bootstrap
implement post detail page.
it works , fit tho format when using korean.
but, if wrote english contents, overflow format.
what's wrong it?
here code :
models.py
from django.db import models django.core.urlresolvers import reverse django.conf import settings def upload_location(instance, file_name): return "{}/{}".format(instance.author.username, file_name) class post(models.model): author = models.foreignkey(settings.auth_user_model, on_delete=models.cascade) title = models.charfield(max_length=100) content = models.textfield() image = models.imagefield(upload_to=upload_location, blank=true, null=true) created_at = models.datetimefield(auto_now_add=true) updated_at = models.datetimefield(auto_now=true) class meta: ordering = ('-created_at',) def __str__(self): return self.title def get_absolute_url(self): return reverse( "posts:detail", kwargs={ "pk": self.id, } ) def get_image_url(self): if self.image: return self.image.url return "http://placehold.it/300x200"
post_detail.html
{% extends 'chacha_dabang/skeleton/base.html' %} {% load pipeline %} {% block content %} <div class="container"> <section class="post-content-section"> <h2> {{ post.title }} </h2> <h5 style="text-align: right;"> {{ post.created_at }} </h5> <hr class="thin"> <img src="{{ post.get_image_url }}" alt="image"> <p> {{ post.content }} </p> </section> </br> <hr class="thin"> </br> <section id="comment-section" data-post-id={{ post.pk }}> <h3> 댓 글 (<span id="comment-count"></span>)</h3> <ul> </ul> <form method="post" action=""> {% csrf_token %} {{ form.as_p }} <button type="submit" class="save btn btn-default">save</button> </form> </section> </div> {% endblock %} {% block custom_js %} {% javascript "comments" %} {% javascript "message" %} {% endblock %}
Comments
Post a Comment