def get_initial_data(self):
data = {}<EOL>ng_models = hasattr(self, '<STR_LIT:Meta>') and getattr(self.Meta, '<STR_LIT>', []) or []<EOL>for name, field in self.fields.items():<EOL><INDENT>if '<STR_LIT>' in self.ng_directives or name in ng_models:<EOL><INDENT>data[name] = self.initial.get(name) if self.initial else field.initial<EOL><DEDENT><DEDENT>return data<EOL>
Return a dictionary specifying the defaults for this form. This dictionary can be used to
inject the initial values for an Angular controller using the directive:
``ng-init={{ thisform.get_initial_data|js|safe }}``.