From 1.7 onwards, we need to call django.setup() before we can use the
Model interfaces.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
from patchwork.parser import parse_patch
from patchwork.models import Patch, Project, Person, Comment, State, \
get_default_initial_patch_state
+import django
from django.contrib.auth.models import User
list_id_headers = ['List-ID', 'X-Mailing-List', 'X-list']
return 0
def main(args):
+ django.setup()
mail = message_from_file(sys.stdin)
return parse_mail(mail)