You need to convert the new lines to html code there are 2 templatetags
for doing so:
https://docs.djangoproject.com/en/1.3/ref/templates/builtins/#linebreaks
On 12.01.2012 09:54, Nikhil Verma wrote:
Hi
I have a column which is a TextField. When we look at django admin it
appears as a box.
models.py
add_detail = models.TextField()
Let say you write the following text in that add_detail textbox in
django admin :-
Mission Impossible 4
Actor : Tom cruise
I am displaying this add_detail in template in the following way:-
<tr>
<td>{{add_detial}}</td>
</tr>
I have to display it in a box with proper alignment so i am using it
in a table format.
Now when you look at the template It will appear like this:-
Mission Impossible 4 Actor : Tom cruise
What i want is the way it is saved in admin add_detail field in
whatever manner whether he gave whitespaces,breaks,press return
it should appear exactly the same in html. How can i achieve this ?
Regards
Nikhil Verma
--
Regards
Nikhil Verma
+91-958-273-3156
--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.