Hi everyone!
I am developing an appweb and I'm stuck. My homepage is structured as a
ListView, where each row shows every object's attributes using django
template engine (ex: {{object.attribute}}. Last column shows a button to do
an action through a bootstrap modal and if I pu
traightforward way to create an independent
> template engine instance with a subset of the tags/filters/etc. defined?
>
> The use-case is for allowing user-supplied template content, while
> preventing said users from being able to use features that could be
> dangerous
Hope these useful.
On Sat, Jul 11, 2020, 12:25 PM Michael Thomas
wrote:
> Hi,
>
> I'm aware that other template engines could be used, but it would be much
> more preferable to stick with Django's template engine for a variety of
> reasons (eg. using the same tags in th
Hi,
I'm aware that other template engines could be used, but it would be much
more preferable to stick with Django's template engine for a variety of
reasons (eg. using the same tags in the 'sandboxed' environment vs.
regular).
On Friday, 10 July 2020 14:41:30 UTC+4, In
Hi Michael,
Some templates as mako, jinja, genshi...
On Fri, Jul 10, 2020, 4:23 PM Michael Thomas
wrote:
> Hi all,
>
> Does anyone know of a straightforward way to create an independent
> template engine instance with a subset of the tags/filters/etc. defined?
>
> T
Hi all,
Does anyone know of a straightforward way to create an independent template
engine instance with a subset of the tags/filters/etc. defined?
The use-case is for allowing user-supplied template content, while
preventing said users from being able to use features that could be
dangerous
Hello Django users!
Today I sat down and wrote a native template Loader for Chameleon support
in Django. For those not familiar with this template engine, it was used
in the previously infamous Zope and later Plone web frameworks. It uses
mostly XHTML formatting and documentation
i read the doc , just in time compilation to Python bytecode is used in
> jinja..
> >
> > is django default template also do this ?
> >
> > which i see the reason why jinja faster.
>
> Django's template engine doesn't currently bytecode compilation; however
On Sunday, August 14, 2011, Phang Mulianto wrote:
> Thanks Reinout for the response,
>
> i read the doc , just in time compilation to Python bytecode is used in
jinja..
>
> is django default template also do this ?
>
> which i see the reason why jinja faster.
Django'
ang Mulianto wrote:
>
>> and i read about jinja template, why it can be faster than django
>> template engine ?
>>
>
> Jinja basically uses django's syntax, but (if my memory is correct) it
> allows you to do more things than django's templates allows you to.
&g
On 13-08-11 14:41, Phang Mulianto wrote:
and i read about jinja template, why it can be faster than django
template engine ?
Jinja basically uses django's syntax, but (if my memory is correct) it
allows you to do more things than django's templates allows you to.
Is it faster?
Hi all,
i need sugestion about templating.
if i use many include in django template, is it a good practice and effect
the load performance of the application ?
and i read about jinja template, why it can be faster than django template
engine ?
how many of you prefer jinja, and why ?
thanks
but that would of
> course preclude your users from using *any* HTML.
>
> On Oct 16, 12:06 pm, "Henrik Genssen"
> wrote:
> > Hi,
> >
> > can I safely use the template engine to produce user configured output?
> > If I use the template engine li
ntext variable,
and then load the result of that as a template, but that would of
course preclude your users from using *any* HTML.
On Oct 16, 12:06 pm, "Henrik Genssen"
wrote:
> Hi,
>
> can I safely use the template engine to produce user configured output?
> If I use the templat
Be careful,
Don't forget that users will be able to execute random templatetags,
which may be able to do read/write to the database as well.
On 16 oct, 18:06, "Henrik Genssen" wrote:
> Hi,
>
> can I safely use the template engine to produce user configured output?
Hi,
can I safely use the template engine to produce user configured output?
If I use the template engine like it is done in the RSSFeed:
title_tmp = Template('{% load i18n %}' + userInput)
ctx = Context({'dstart': date.dstart,
where userInput is something a user can
On 24 mar, 19:33, Dave A wrote:
> Hi,
>
> I'm new to Django -- I'm evaluating open source frameworks in an
> attempt to port an existing application to a non-proprietary
> platform.
> I like Django, but am not sure about how to approach an application
> templating function from the current system
Hi,
I'm new to Django -- I'm evaluating open source frameworks in an
attempt to port an existing application to a non-proprietary
platform.
I like Django, but am not sure about how to approach an application
templating function from the current system...
In short, each registered user of the sys
Hi again Malcolm,
I've now performed some of the test you suggest here, and I would like
to report my findings.
> > It seems to me that when the Python renderer sees the Decimal() call,
> > it goes and fetches my OS locale, which calls for Swedish decimal
> > commas instead of US decimal points.
On Sun, 2008-11-30 at 01:34 -0800, Ulf Kronman wrote:
> Hi Malcolm,
>
> > I forgot to mention this in my last reply, but you didn't actually
> > answer the question that Karen asked. If you open up a Python prompt on
> > your machine and do this:
> >
> > >>> import decimal
> > >>
Hi Malcolm,
> I forgot to mention this in my last reply, but you didn't actually
> answer the question that Karen asked. If you open up a Python prompt on
> your machine and do this:
>
> >>> import decimal
> >>> decimal.Decimal('1.0')
>
> does it raise an exception?
Sorry, I forg
Karen wrote..
> > does "Decimal('1.0')" on this
> > machine raise that exception?
On Sat, 2008-11-29 at 01:08 -0800, Ulf Kronman wrote:
>
> Yes, you are truly on to something there. Please look at my somewhat
> confused report below. It seems as my pymssql call returning a longint
> as a Dec
On Sat, 2008-11-29 at 04:59 -0800, Ulf Kronman wrote:
> Hi again,
> a follow up:
>
> It seems as if it is a design decision from the pymsql developers to
> return Decimal for BIGINT (sorry; not longint, as I said before). It
> is documented here:
>
> http://freshmeat.net/projects/pymssql/?bran
On Sat, 2008-11-29 at 00:37 -0800, Ulf Kronman wrote:
> Hi, I'm back to report that I have found the cause and a temporarily
> solution to my problem.
>
> First of all; thanks to Malcolm and Karen for trying to help me out,
> even if I didn't give a lot of detail on the problem in the first
> ro
Hi again,
a follow up:
It seems as if it is a design decision from the pymsql developers to
return Decimal for BIGINT (sorry; not longint, as I said before). It
is documented here:
http://freshmeat.net/projects/pymssql/?branch_id=59462&release_id=205925
>
big numbers (MONEY, SMALLMONEY, DECIMAL,
Hi Karen,
> Are you running an SVN checkout and did you update it from something prior
> to r9369/r9370 to something after that level right before this started
> happening?
Yes, it may well be. Is there a place in TortoiseCVS where I can see a
history of my updates? Looking at the log just sho
Hi, I'm back to report that I have found the cause and a temporarily
solution to my problem.
First of all; thanks to Malcolm and Karen for trying to help me out,
even if I didn't give a lot of detail on the problem in the first
round. The reason was that I was frustrated and tired late in the
nig
Thanks Karen and Malcolm,
I'll get back with a more thorough answer when I find more time.
I just wanted to leave a short note that I have verified that the
problem actually *is* somewhere in my view code.
I have been able to run another view containing floatformat and get
floats with decimal po
ode the variable to a string with a comma delimiter it
> passes without error:
> flt_cy_average = '1,24'
>
> I'm running the code on Windows XP, Swedish version and the same code
> is working on an Ubuntu server without any problems. Is the problem
> that the templa
On Tue, 2008-11-25 at 01:01 -0800, Ulf Kronman wrote:
[...]
> You also said that you could see some interesting behaviour on Apache,
> and my (maybe stupid) question was meant to be if that somehow could
> affect the Django template engine.
The "template engine", as you keep
ttle tricky
> > > to do so (it affects the locale for all threads in that process, which
> > > could well lead to interesting behaviour on a multipthreaded Apache
> > > setup, for example).
>
> > OK, but would that effect the Django template engine?
>
>
all setlocale() itself and it would be a little tricky
> > to do so (it affects the locale for all threads in that process, which
> > could well lead to interesting behaviour on a multipthreaded Apache
> > setup, for example).
>
> OK, but would that effect the Django templ
d
float output to MS Excel, but have commented away that code as far as
I can see.)
Do you happen to know if there was some changes made to the template
engine at the end of last week? As I told you, I tried to revert the
Django version from the CVS, but the problem prevails.
> Django doesn
ariable to a string with a comma delimiter it
> passes without error:
> flt_cy_average = '1,24'
>
> I'm running the code on Windows XP, Swedish version and the same code
> is working on an Ubuntu server without any problems. Is the problem
> that the template engine is picking
wedish version and the same code
is working on an Ubuntu server without any problems. Is the problem
that the template engine is picking up my Swedish locale and how do I
change this.
I'm running Django revision 9526 and mod_python through Apache 2.2.
I've set:
USE_I18N = False
and tried:
im
Would it be possible to borrow from the embedded ruby syntax and define
something like this:
{{ variable.name -}}
{% tag param1,param2 -%}
If the '-' was present as part of the tag closure token, the template
processor would eat the next 1-2 characters only if they were a CR or CR/LF.
Although I
Russell Keith-Magee wrote:
> If there is a particular whitespace-eating behaviour that you would
> like, you could always implement it yourself in a template tag. If you
> think the template tag could be useful for others, you can share it on
> djangosnippets.org, or open a ticket to have the tag
Is this white-space behavior the case with all template tags? Is it
desirable for all template tags?
Maybe only tags that are common to be at the top of a template file
could have this enhancement to erase whitespace between them and the
next real tag in the template?
It seems to me that if cer
On Fri, Jun 13, 2008 at 11:58 PM, Arien <[EMAIL PROTECTED]> wrote:
>
> On Fri, Jun 13, 2008 at 9:48 AM, Norman Harman <[EMAIL PROTECTED]> wrote:
>> Template's white space handling is one of the few things that irks me
>> about Django. I hate having to make confusing formating, jamming stuff
>> al
On Fri, Jun 13, 2008 at 9:48 AM, Norman Harman <[EMAIL PROTECTED]> wrote:
> Template's white space handling is one of the few things that irks me
> about Django. I hate having to make confusing formating, jamming stuff
> all on the same line just to get white space correct.
>
> I really wish it h
Juanjo Conti wrote:
> Hi, I am using Django's template engine to produce rtf files and I
> have noticed something: if the first line of my template is a {%load
> ... %} tag then the result has a withe like at the to of it. This is
> not a problem in html, the common use of th
Juanjo Conti wrote:
Hi, I am using Django's template engine to produce rtf files and I
have noticed something: if the first line of my template is a {%load
... %} tag then the result has a withe like at the to of it. This is
not a problem in html, the common use of the tempalte engine, b
Hi, I am using Django's template engine to produce rtf files and I
have noticed something: if the first line of my template is a {%load
... %} tag then the result has a withe like at the to of it. This is
not a problem in html, the common use of the tempalte engine, but is
fatal in a rtf fil
ee that
> for myself by designing a few, simple test cases. The biggest
> surprise came not from the fact that Jinja was faster, but how much
> slower the Django SVN template engine was compared to the Django 0.96
> engine.
It's difficult to tell from your chart what &quo
e not from the fact that Jinja was faster, but how much
slower the Django SVN template engine was compared to the Django 0.96
engine.
I have posted the result as an Excel chart here:
http://www.flickr.com/photos/[EMAIL PROTECTED]/2363195045/
Could anyone tell me if they have similar experiences wit
Hello Malcolm,
thank you for your reply.
Sorry, that I explained my problem too bad. In the meantime I found
the solution for my problem and It's really simple.
And it's a embarrassing situation for me, because the solution is
documented:
http://www.djangoproject.com/documentation/templates_pytho
On Mon, 2007-11-12 at 23:04 -0800, Brot wrote:
> Hello,
>
> I found a code example for "Using Markup" in the django wiki:
> http://code.djangoproject.com/wiki/UsingMarkup
> I need a similar solution, but with the internal django template
> library. Is there any solution for this requirement?
>
Hello,
I found a code example for "Using Markup" in the django wiki:
http://code.djangoproject.com/wiki/UsingMarkup
I need a similar solution, but with the internal django template
library. Is there any solution for this requirement?
I would like to store little html/template chunks in a databas
>Great minds think alike/Fools never differ :-) Check out:
> http://code.djangoproject.com/ticket/1321
>
Lol, yip.
I agree whole heartedly with the premise of this ticket. The ORM and
the Template Engine rock, and I have need of both outside a web
framework.
For my standalone app
On 3/6/06, ChaosKCW <[EMAIL PROTECTED]> wrote:
> This seems coupled to me ? Is there a way to use the template engine on
> its own ? Or am just missing the obvious ?
Great minds think alike/Fools never differ :-) Check out:
http://code.djangoproject.com/ticket/1321
This came up
On 6 mar 2006, at 12.30, ChaosKCW wrote:
> Hi
>
> One of the great design philosohies I love about Django is the
> decoupling. However when trying to use the template engine on its own,
> the import refers the django setttings module env variable, which turn
> should point to a
Hi
One of the great design philosohies I love about Django is the
decoupling. However when trying to use the template engine on its own,
the import refers the django setttings module env variable, which turn
should point to a settings.py which in turn is part of a project ?
This seems coupled
On 2/10/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
>
> On Friday 10 Feb 2006 2:38 pm, Tobias wrote:
> > TemplateSyntaxError: Caught an exception while rendering.
>
> usualy templatesyntaxerror has nothing to do with templates - there
> may be a syntax error in your model itself - a missing c
On Friday 10 Feb 2006 2:38 pm, Tobias wrote:
> TemplateSyntaxError: Caught an exception while rendering.
usualy templatesyntaxerror has nothing to do with templates - there
may be a syntax error in your model itself - a missing comma or a
borked __repr__. Did you run 'validate'?
--
regards
kg
Hi, everyone,
trying to get my first Drango project running, I got the following
error for an "add" action:
Traceback (most recent call last):
File "...\django\core\servers\basehttp.py", line 272, in run
self.result = application(self.environ, self.start_response)
File "...\django\core
55 matches
Mail list logo