Blog Archive for May 12, 2010

Django Blog Images

May 12, 2010

I wanted a nice way to be able to upload images for display in a blog entry. I'm already using Markdown for the blog syntax, so I was looking for a way to integrate with this too.

Le Morne, Mauritius

Mauritius Rock

Model

I added a new model to the blog application, …

Django ORM Extra

May 12, 2010

Given a two model structure, BlogEntry and BlogComment, where there is one BlogEntry to many BlogComments, then there are three possible ways of getting hold of the comment count for a given entry, when displaying a list of entries.

Simple

The simple approach is to use the reverse links on …

Proxying Tomcat with HTTPS

May 12, 2010

If you proxy tomcat using HTTPS, and you're providing externally visible (in our case jibx-soap) web services, then you need to tell tomcat to offer the WSDL using https and the correct port.

The default connector in server.xml is:

<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443"/>

You …