Django 1.6 compatibility

Hi,

here are Django 1.6 compatibility patches.

Problems that were fixed:

1. Edit widget disappearing.
2. 'Preview' button was broken.