Re: Manage static files using Jinja2

2018-12-19 Thread shiva kumar
Yes static files need a url path. But that path should be mentioned in setting.py file. That makes django, when there is use of css or js files it refers to that path On Tue 11 Dec, 2018 4:32 am I am using the documentation to learn Django. When I started creating > static files, I started to get

Re: Manage static files using Jinja2

2018-12-11 Thread Yarving Liu
The document said you need to create a static root path first, then Django will auto reverse your static file's URL. On Tue, Dec 11, 2018 at 7:03 AM wrote: > I am using the documentation to learn Django. When I started creating > static files, I started to get problems. I am using this: > http

Manage static files using Jinja2

2018-12-10 Thread miguel . yurivilca
I am using the documentation to learn Django. When I started creating static files, I started to get problems. I am using this: https://docs.djangoproject.com/en/2.1/howto/static-files/ but I think it is using Django template engine. How can I fix this problem? Does every static file needs a ur

Re: csrf_token is not being set when using Jinja2

2014-01-18 Thread Chen Xu
That gives me : Encountered unknown tag 'csrf_token'. Thanks On Sat, Jan 18, 2014 at 8:57 PM, Mario Gudelj wrote: > Try {% csrf_token %} by itself > On 19/01/2014 12:12 pm, "Chen Xu" wrote: > >> Hi everyone, >> I am using Jinja2 instead of D

Re: csrf_token is not being set when using Jinja2

2014-01-18 Thread Mario Gudelj
Try {% csrf_token %} by itself On 19/01/2014 12:12 pm, "Chen Xu" wrote: > Hi everyone, > I am using Jinja2 instead of Django's own template engine, however I am > having an issue where csrf_token is empty, I included the following line in > my form: > > > &g

csrf_token is not being set when using Jinja2

2014-01-18 Thread Chen Xu
Hi everyone, I am using Jinja2 instead of Django's own template engine, however I am having an issue where csrf_token is empty, I included the following line in my form: But csrf_token has no value. Can someone help? Thanks in advance -- ⚡ Chen Xu ⚡ -- You received this message be

Re: Using Jinja2

2011-07-08 Thread Shawn Milochik
Did you guys know that Armin Ronacher (the author of Jinja2) is actively working on this for Google Summer of Code? https://www.djangoproject.com/weblog/2011/apr/25/gsoc/ If you're interested in the development of Django it's very informative to subscribe to django-developers and lurk. You can

Re: Using Jinja2

2011-07-08 Thread Tomáš Ehrlich
re from 5x to 10x faster that Django > > templates. So if you can see that half of your time is spent in > > template rendering, then you could probably almost double the speed of > > your application using Jinja2. If you don't want to do that, you can > > check how

Using Jinja2

2011-07-08 Thread Venkatraman S
e time for sure. > > What you could do is check out the profiler suggested in this thread. > Jinja2 is generally somewhere from 5x to 10x faster that Django > templates. So if you can see that half of your time is spent in > template rendering, then you could probably almost double the spe

Re: Will it lost some features(middleware/contextprocessor) of Django when using Jinja2 ?

2009-10-05 Thread John Wang
ost-some-features%28middleware-contextprocessor%29-of-Django--when-using-Jinja2---tp25733878p25753266.html Sent from the django-users mailing list archive at Nabble.com. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Will it lost some features(middleware/contextprocessor) of Django when using Jinja2 ?

2009-10-04 Thread Kristaps Kūlis
Hi! You can use RequestContext (and also middlewares and context processor). Just pass it to jinja2 render method like this template.render(**context) See this blog post: http://lethain.com/entry/2008/jul/22/replacing-django-s-template-language-with-jinja2/ On Sun, Oct 4, 2009 at 2:36 AM, John

Will it lost some features(middleware/contextprocessor) of Django when using Jinja2 ?

2009-10-03 Thread John Wang
Hi all, I want to use Jinja2 in a django project but keep some features django, e.g, middleware and context processor. My question is, can I still use middleware and contextprocess in django when replace it template with Jinja2 ? BTW, what most i like jinja2 is that i can define macros in it wh