On Fri, Mar 20, 2009 at 9:22 PM, chachra <sumit.chac...@gmail.com> wrote:

>
> Excellent. This would work. Except that this work would have to be
> done on every page load, unless template (pre-rendered versions) get
> cached?
>
> Thanks!
>
>
> On Mar 20, 5:30 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
> > On Fri, Mar 20, 2009 at 8:28 PM, chachra <sumit.chac...@gmail.com>
> wrote:
> >
> > > Agreed. I was just wondering if people using Django do this often, and
> > > if there is a "django way" of doing it!
> >
> > > I have the fabric bit working, albeit serially. But looking at some
> > > library to compress html templates, before launching new code.
> >
> > > Thanks!
> >
> > > On Mar 20, 4:23 pm, Alex Gaynor <alex.gay...@gmail.com> wrote:
> > > > On Fri, Mar 20, 2009 at 7:19 PM, chachra <sumit.chac...@gmail.com>
> > > wrote:
> >
> > > > > Hi,
> >
> > > > > Sorry if this has been discussed before. I am minifying my js/css
> > > > > using a simply python script + yui compressor.
> >
> > > > > I would like to write a "deploy script" that takes all my code +
> > > > > removes all white spaces, newlines etc. from all my template
> (.html)
> > > > > files.
> >
> > > > > This should help improve page loads + not make my html source
> easily
> > > > > readable ? Is there an easy way of doing this, or a django way of
> > > > > doing this ?
> >
> > > > > Cheers!
> > > > > Sumit
> >
> > > > I would argue that building the "deployment" version of your stuff
> isn't
> > > > really a task for Django(Django is built for handling Http requests
> and
> > > > return http responses at it's core), so I would look at a python
> > > deployment
> > > > tool like fabric:http://pypi.python.org/pypi/Fabric/
> >
> > > > Alex
> >
> > > > --
> > > > "I disapprove of what you say, but I will defend to the death your
> right
> > > to
> > > > say it." --Voltaire
> > > > "The people's good is the highest law."--Cicero
> >
> > Take a look at the {% spaceless %} template tag.  It removes whitespace
> > between tags, while leaving the source files untouched.
> >
> > Alex
> >
> > --
> > "I disapprove of what you say, but I will defend to the death your right
> to
> > say it." --Voltaire
> > "The people's good is the highest law."--Cicero
> >
>
Yes it will happen on every request, but it's just a regular expression, so
I would profile your application before being overly concerned with it's
speed effects.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to