def __init__(self, instance=None, initial=None, **kwargs):
    opts = self._meta
    self.instance = instance
    object_data = {}
    if instance is not None:
      for name, prop in instance.properties().iteritems():
        if opts.fields and name not in opts.fields:
          continue
        if opts.exclude and name in opts.exclude:
          continue
        object_data[name] = prop.get_value_for_form(instance)
    if initial is not None:
      object_data.update(initial)
    kwargs['initial'] = object_data
    kwargs = dict((name, value)
                  for name, value in kwargs.iteritems()
                  if value is not None)
    super(BaseModelForm, self).__init__(**kwargs)
Return a copy of this connection.
dataset/ETHPy150Open IanLewis/kay/kay/utils/forms/modelform.py/BaseModelForm.__init__--crossover with--dataset/ETHPy150Open django/django/django/db/backends/base/base.py/BaseDatabaseWrapper.copy