docs: def register_model(self, app, model_name, field_type, field_definitions):
          """
          Process for Django 1.7 +
          app: app name/label
          model_name: name of the model
          field_definitions: a string, tuple or list of field configurations
          field_type: either 'ForeignKey' or 'ManyToManyField'
          """
          from django.apps import apps
          import collections
  
          app_label = app
  
          if isinstance(field_definitions, str):
              field_definitions = [field_definitions]
          elif not isinstance(field_definitions, collections.Iterable):
              raise ImproperlyConfigured(_('Field configuration for %(app)s should be a string or iterable') % {'app': app})
  
          if field_type not in ('ForeignKey', 'ManyToManyField'):
              raise ImproperlyConfigured(_('`field_type` must be either `"ForeignKey"` or `"ManyToManyField"`.'))
  
          try:
              if not hasattr(model_name, "_meta"):
                  app_config = apps.get_app_config(app)
                  app_label = app_config.label
                  model = app_config.get_model(model_name)
              else:
                  model = model_name
                  model_name = model._meta.model_name
              opts = model._meta
              if app_label not in self._model_registry:
                  self._model_registry[app_label] = []
              if model not in self._model_registry[app_label]:
                  self._model_registry[app_label].append(model)
          except LookupError:
              raise ImproperlyConfigured('Model "%(model)s" doesn\'t exist in app "%(app)s".' % {'model': model_name, 'app': app})
  
          if not isinstance(field_definitions, (tuple, list)):
              field_definitions = [field_definitions]
  
          for fld in field_definitions:
              extra_params = {'to': 'categories.Category', 'blank': True}
              if field_type != 'ManyToManyField':
                  extra_params['on_delete'] = CASCADE
                  extra_params['null'] = True
              if isinstance(fld, str):
                  field_name = fld
              elif isinstance(fld, dict):
                  if 'name' in fld:
                      field_name = fld.pop('name')
                  else:
                      continue
                  extra_params.update(fld)
              else:
                  raise ImproperlyConfigured(
                      _("%(settings)s doesn't recognize the value of %(app)s.%(model)s") % {
                          'settings': 'CATEGORY_SETTINGS',
                          'app': app,
                          'model': model_name})
              registry_name = ".".join([app_label, model_name.lower(), field_name])
              if registry_name in self._field_registry:
                  continue
  
              try:
                  opts.get_field(field_name)
              except FieldDoesNotExist:
                  self._field_registry[registry_name] = FIELD_TYPES[field_type](**extra_params)
                  self._field_registry[registry_name].contribute_to_class(model, field_name)