Brad's Blog

Published: 2010-06-09

Vim Syntax highlighting for Apache Config Files

apache django vim

I use Django with Apache and mod_wsgi. Each project that I work on has different apache config files, so I like to keep those in the same mercurial repo that contains my django project's code.For some time now, it's been bugging me that vim doesn't do syntax highlighting for those apache configs (nor the wsgi files). I finally decided to do something about it, and I'm glad I did, because it's a fairly simple ...


Published: 2009-11-24

Gahhh!! Django, virtualenv, and cx_Oracle

apache cx_oracle django virtualenv

UPDATE: Thanks in advance to the comments from Graham Dumpleton whose comments below pointed me in the right direction!This wasis a plea for help.I've got django installed and configured with apache and virtualenv. I also have one particular app (named myapp) that queries an Oracle database directly (django is configured to use MySQL). All of the apps work, except for anything thatbrequires the myapp app... which includes the admin!Requesting any view that uses cx_Oracle results in ...


Published: 2009-05-01

Have Apache Force File Downloads

apache django web

I have a Django app that lets users upload files. Any kind of file. It's nice that Apache will let me force file downloads based on the files extension. <LocationMatch "\.(gz|tar|pdf|docx|doc|xls|xlsx|bz2|zip)$"> SetHandler None Header set Content-Disposition attachment</LocationMatch>So, in my HTML/templates: all I have to do is this:<a href="SomFile.docx">Some File</a>