Wednesday, March 28, 2018

self.assertTemplateUsed bug?

Ive created a sample repository to demonstrate what i think is a bug.
 https://github.com/seospace/djangorendertostringtest < its fully usable django project,

 I encountered that bug again in my new project... its pretty frustrating... and this time without "render_to_string" i cant verify used templated.....

I think this must be checked by someone who knows this stuff, beacuse i suck.


Heres line that makes the "bug?" happen:
https://github.com/seospace/djangorendertostringtest/blob/master/djangorenderbug/renderbug/views.py#L11

Here is simple test that will print used templates:
https://github.com/seospace/djangorendertostringtest/blob/master/djangorenderbug/renderbug/tests.py


And results are:

{'name': 'renderbug/email/body.txt', 'origin': <django.template.base.Origin object at 0x000001F8205BEE80>, 'engine': <django.template.engine.Engine object at 0x000001F81FB09978>, 'source': '', 'nodelist': []}  {'name': 'renderbug/theview.html', 'origin': <django.template.base.Origin object at 0x000001F8205CA1D0>, 'engine': <django.template.engine.Engine object at 0x000001F81FB09978>, 'source': '<!DOCTYPE html>\n<html lang="en">\n<head>

--
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+unsubscribe@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/1de39e14-0829-4d97-9f24-6b5b48f40e23%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment