These are chat archives for django/django

14th
Jul 2017
Roel
@roelzkie15
Jul 14 2017 06:09
Anyone knows how to let table cell text display to vertical in pdf report using xhtml2pdf?
flai
@f-lai
Jul 14 2017 07:30
Hello just wanna say hey! Nothing to ask atm, but will have a ton of questions on Django later on. Just landed a consulting gig that's Django based and am currently learning more about the framework. (Done some node.js+express and php+apache work before)
MBijman
@MBijman
Jul 14 2017 13:35
@frankc201106 Welcome to sanity:)
Dimas Ari
@DimasInchidi
Jul 14 2017 21:54
if you are telegram user and searching for Django group we have new small community here
delirious44
@delirious44
Jul 14 2017 23:42
is someone here to help me with templating
Jossnaz
@Jossnaz
Jul 14 2017 23:45
A little question to jinja templating:
I want to create a reusable template to include and then overwrite blocks. Macros do not let me write junks of HTML easily as parameters do they? Say I want to reuse an include several times and am using BIG junks of HTML in blocks that I want to dynamically assign
how would I do it?
certainly not with macros I guess, or am I wrong?
{% render_foo('bar',2) %} is fine
{% render_foo('<table><tr><th>something</th><th>somethingelse</th></tr><tbody><tr>....etc') %} is not fine any more is it
delirious44
@delirious44
Jul 14 2017 23:47
@Jossnaz do you know something for templating.. i need some answers
Jossnaz
@Jossnaz
Jul 14 2017 23:47
what is ur question
delirious44
@delirious44
Jul 14 2017 23:48
I have loaded 'humanize' in my template
have a date
and I want to get the time since that date
like this
{{ post.date|timesince:datenow }}
but it doesnt work.. and i think it doesnt because of {{ post.date }}
{{ post.date }} is not a variable.. i need some workaround
Jossnaz
@Jossnaz
Jul 14 2017 23:51
then output
{{ post.date.__dict__ }}
tell me what you see
you need a datetime object