title: Troubles extending from Django-Oscar AbstractUser model
body: <p>I've been trying to fork django-oscar <code>customer</code> app. I've followed the guidelines on their documentation, but I can not apply migrations due to a <code>ValueError: Related model 'customer.user' cannot be resolved</code>.
  My project directory looks like this:</p>
  <pre><code>
  project
  ├── config
  │   ├── asgi.py
  │   ├── __init__.py
  │   ├── settings.py
  │   ├── urls.py
  │   └── wsgi.py
  ├── customer
  │   ├── apps.py
  │   ├── __init__.py
  │   ├── migrations
  │   │   ├── 0001_initial.py
  │   │   ├── 0002_auto_20150807_1725.py
  │   │   ├── 0003_update_email_length.py
  │   │   ├── 0004_email_save.py
  │   │   ├── 0005_auto_20181115_1953.py
  │   │   ├── 0006_auto_20190430_1736.py
  │   │   ├── 0007_auto_20200801_0817.py
  │   │   ├── 0008_alter_productalert_id.py
  │   │   ├── 0009_user.py
  │   │   ├── __init__.py
  │   ├── models.py
  ├── manage.py
  
  </code></pre>
  <p>Here are the steps I followed to arrive at the point I am now:</p>
  <ul>
  <li><code>./manage.py oscar_fork_app customer .</code></li>
  <li>I added the <code>customer</code> app to my list of <code>INSTALLED_APPS</code></li>
  </ul>
  <pre class="lang-py prettyprint-override"><code>
  DJANGO_APPS = [
      &quot;django.contrib.admin&quot;,
      &quot;django.contrib.auth&quot;,
      &quot;django.contrib.contenttypes&quot;,
      &quot;django.contrib.sessions&quot;,
      &quot;django.contrib.messages&quot;,
      &quot;django.contrib.staticfiles&quot;,
      &quot;django.contrib.sites&quot;,
      &quot;django.contrib.flatpages&quot;,
  ]
  
  PROJECT_APPS = [
      &quot;customer&quot;,
      # &quot;customer.apps.CustomerConfig&quot;,,
  ]
  
  OSCAR_APPS = [
      &quot;oscar.config.Shop&quot;,
      &quot;oscar.apps.analytics.apps.AnalyticsConfig&quot;,
      &quot;oscar.apps.checkout.apps.CheckoutConfig&quot;,
      &quot;oscar.apps.address.apps.AddressConfig&quot;,
      &quot;oscar.apps.shipping.apps.ShippingConfig&quot;,
      &quot;oscar.apps.catalogue.apps.CatalogueConfig&quot;,
      &quot;oscar.apps.catalogue.reviews.apps.CatalogueReviewsConfig&quot;,
      &quot;oscar.apps.communication.apps.CommunicationConfig&quot;,
      &quot;oscar.apps.partner.apps.PartnerConfig&quot;,
      &quot;oscar.apps.basket.apps.BasketConfig&quot;,
      &quot;oscar.apps.payment.apps.PaymentConfig&quot;,
      &quot;oscar.apps.offer.apps.OfferConfig&quot;,
      &quot;oscar.apps.order.apps.OrderConfig&quot;,
      # &quot;oscar.apps.customer.apps.CustomerConfig&quot;,
      &quot;oscar.apps.search.apps.SearchConfig&quot;,
      &quot;oscar.apps.voucher.apps.VoucherConfig&quot;,
      &quot;oscar.apps.wishlists.apps.WishlistsConfig&quot;,
      &quot;oscar.apps.dashboard.apps.DashboardConfig&quot;,
      &quot;oscar.apps.dashboard.reports.apps.ReportsDashboardConfig&quot;,
      &quot;oscar.apps.dashboard.users.apps.UsersDashboardConfig&quot;,
      &quot;oscar.apps.dashboard.orders.apps.OrdersDashboardConfig&quot;,
      &quot;oscar.apps.dashboard.catalogue.apps.CatalogueDashboardConfig&quot;,
      &quot;oscar.apps.dashboard.offers.apps.OffersDashboardConfig&quot;,
      &quot;oscar.apps.dashboard.partners.apps.PartnersDashboardConfig&quot;,
      &quot;oscar.apps.dashboard.pages.apps.PagesDashboardConfig&quot;,
      &quot;oscar.apps.dashboard.ranges.apps.RangesDashboardConfig&quot;,
      &quot;oscar.apps.dashboard.reviews.apps.ReviewsDashboardConfig&quot;,
      &quot;oscar.apps.dashboard.vouchers.apps.VouchersDashboardConfig&quot;,
      &quot;oscar.apps.dashboard.communications.apps.CommunicationsDashboardConfig&quot;,
      &quot;oscar.apps.dashboard.shipping.apps.ShippingDashboardConfig&quot;,
  ]
  
  INSTALLED_APPS = DJANGO_APPS + PROJECT_APPS + OSCAR_APPS
  
  </code></pre>
  <p>As you can see I tried the &quot;oscar&quot; way of addind the app by specifying the path to the <code>CustomerConfig</code> method they generate with their command but it did not help, so I tried the regular &quot;django&quot; way and it did not work either.</p>
  <ul>
  <li>And then I added my new model to the <code>AUTH_USER_MODEL</code> settings keys like this:</li>
  </ul>
  <pre class="lang-py prettyprint-override"><code>
  AUTH_USER_MODEL = &quot;customer.User&quot;
  
  </code></pre>
  <p>When I try to make migrations, it works as intended, and creates the migration number 9 in the list you can see above, but when I try to apply the migrations, I get this error:</p>
  <pre class="lang-sh prettyprint-override"><code>
  ./manage.py migrate
  Operations to perform:
  Apply all migrations: address, admin, analytics, auth, basket, catalogue, communication, contenttypes, customer, flatpages, offer, order, partner, payment, reviews, sessions, shipping, sites, thumbnail, voucher, wishlists
  Running migrations:
  Applying contenttypes.0001_initial... OK
  Applying catalogue.0001_initial... OK
  Applying customer.0001_initial...Traceback (most recent call last):
  File &quot;./manage.py&quot;, line 22, in &lt;module&gt;
      main()
  File &quot;./manage.py&quot;, line 18, in main
      execute_from_command_line(sys.argv)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/core/management/__init__.py&quot;, line 419, in execute_from_command_line
      utility.execute()
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/core/management/__init__.py&quot;, line 413, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/core/management/base.py&quot;, line 354, in run_from_argv
      self.execute(*args, **cmd_options)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/core/management/base.py&quot;, line 398, in execute
      output = self.handle(*args, **options)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/core/management/base.py&quot;, line 89, in wrapped
      res = handle_func(*args, **kwargs)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/core/management/commands/migrate.py&quot;, line 244, in handle
      post_migrate_state = executor.migrate(
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/migrations/executor.py&quot;, line 117, in migrate
      state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/migrations/executor.py&quot;, line 147, in _migrate_all_forwards
      state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/migrations/executor.py&quot;, line 227, in apply_migration
      state = migration.apply(state, schema_editor)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/migrations/migration.py&quot;, line 126, in apply
      operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/migrations/operations/models.py&quot;, line 92, in database_forwards
      schema_editor.create_model(model)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/backends/base/schema.py&quot;, line 343, in create_model
      sql, params = self.table_sql(model)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/backends/base/schema.py&quot;, line 162, in table_sql
      definition, extra_params = self.column_sql(model, field)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/backends/base/schema.py&quot;, line 215, in column_sql
      db_params = field.db_parameters(connection=self.connection)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/models/fields/related.py&quot;, line 1004, in db_parameters
      return {&quot;type&quot;: self.db_type(connection), &quot;check&quot;: self.db_check(connection)}
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/models/fields/related.py&quot;, line 1001, in db_type
      return self.target_field.rel_db_type(connection=connection)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/models/fields/related.py&quot;, line 897, in target_field
      return self.foreign_related_fields[0]
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/utils/functional.py&quot;, line 48, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/models/fields/related.py&quot;, line 644, in foreign_related_fields
      return tuple(rhs_field for lhs_field, rhs_field in self.related_fields if rhs_field)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/utils/functional.py&quot;, line 48, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/models/fields/related.py&quot;, line 632, in related_fields
      return self.resolve_related_fields()
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/models/fields/related.py&quot;, line 936, in resolve_related_fields
      related_fields = super().resolve_related_fields()
  File &quot;/home/oscar/.virtualenvs/project-venv/lib/python3.8/site-packages/django/db/models/fields/related.py&quot;, line 615, in resolve_related_fields
      raise ValueError('Related model %r cannot be resolved' % self.remote_field.model)
  ValueError: Related model 'customer.user' cannot be resolved
  
  </code></pre>
  <p>Is there something I'm missing from the documentation ? Any ideas ?</p>