djangosnippets.org: Latest snippets posted by msaeliceshttp://djangosnippets.org/users/msaelices/2008-06-24T17:06:07.581166-05:00msaelicesbackupdb command
2008-06-24T17:06:07.581166-05:00msaeliceshttp://djangosnippets.org/snippets/823/<p><code>backupdb</code> command allows to make a database backup automatically. It's supposed to do this just before a <code>syncdb</code>, <code>reset</code> or <code>flush</code> command in a server deployment. A usual upgrade task in production server could be:</p>
<pre><code>./manage.py backupdb
./manage.py reset myapp
./manage.py syncdb
</code></pre>
<p>Put this code in your project's <code>management/commands/backupdb.py …</code></p>
Freely redistributableTemplatetag for JS merging and compression
2007-09-05T07:45:52.944982-05:00msaeliceshttp://djangosnippets.org/snippets/405/<p><strong>Javascript merging and compression templatetag</strong></p>
<p>One of the most important things for improving web performance is to reduce the number of HTTP requests. This is a templatetag that merges several javascript files (compressing its code) into only one javascript.</p>
<p>It checks if this merged file is up to date, comparing …</p>
Freely redistributable