<s> import os <EOL> import json <EOL> from datetime import datetime <EOL> from django . core . management . base import NoArgsCommand , CommandError <EOL> from mmm . models import Document <EOL> from knesset . settings import DATA_ROOT <EOL> class Command ( NoArgsCommand ) : <EOL> help = "<STR_LIT>" <EOL> def handle_noargs ( self , ** options ) : <EOL> FIXTURE_FILE = "<STR_LIT>" <EOL> try : <EOL> f = open ( DATA_ROOT + FIXTURE_FILE , '<STR_LIT>' ) <EOL> j = json . load ( f ) <EOL> for m in j [ '<STR_LIT>' ] [ '<STR_LIT>' ] : <EOL> m [ '<STR_LIT>' ] = datetime . strptime ( m [ '<STR_LIT>' ] , '<STR_LIT>' ) . date ( ) <EOL> Document . objects . from_json ( j ) <EOL> finally : <EOL> f . close ( ) ; </s>
