title: Django Models: init.py Import Error
body: <p>So I have my ordinary DJango project, with a selection of add ons:</p>
  
  <ul>
  <li>Django Oauth Toolkit</li>
  <li>Django Rest Framework</li>
  <li>CORS</li>
  </ul>
  
  <p>So it was working up until I started creating custom "retrieve" request in a Rest Framework View Set. To help, the traceback is below:</p>
  
  <pre><code>Traceback (most recent call last):
    File "/Users/Mason/Documents/dev/DIRNAME/SERCETDIR/manage.py", line 10, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/Users/Mason/Documents/dev/DIRNAME/SERCETDIR/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
      utility.execute()
    File "/Users/Mason/Documents/dev/DIRNAME/SERCETDIR/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 345, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/Users/Mason/Documents/dev/DIRNAME/SERCETDIR/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 195, in fetch_command
      klass = load_command_class(app_name, subcommand)
    File "/Users/Mason/Documents/dev/DIRNAME/SERCETDIR/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 39, in load_command_class
      module = import_module('%s.management.commands.%s' % (app_name, name))
    File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
      __import__(name)
    File "/Users/Mason/Documents/dev/DIRNAME/SERCETDIR/env/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 13, in &lt;module&gt;
      from django.core.servers.basehttp import get_internal_wsgi_application, run
    File "/Users/Mason/Documents/dev/DIRNAME/SERCETDIR/env/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 17, in &lt;module&gt;
      from django.core.handlers.wsgi import ISO_8859_1, UTF_8
    File "/Users/Mason/Documents/dev/DIRNAME/SERCETDIR/env/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 10, in &lt;module&gt;
      from django import http
    File "/Users/Mason/Documents/dev/DIRNAME/SERCETDIR/env/lib/python2.7/site-packages/django/http/__init__.py", line 5, in &lt;module&gt;
      from django.http.response import (
    File "/Users/Mason/Documents/dev/DIRNAME/SERCETDIR/env/lib/python2.7/site-packages/django/http/response.py", line 13, in &lt;module&gt;
      from django.core.serializers.json import DjangoJSONEncoder
    File "/Users/Mason/Documents/dev/DIRNAME/SERCETDIR/env/lib/python2.7/site-packages/django/core/serializers/__init__.py", line 23, in &lt;module&gt;
      from django.core.serializers.base import SerializerDoesNotExist
    File "/Users/Mason/Documents/dev/DIRNAME/SERCETDIR/env/lib/python2.7/site-packages/django/core/serializers/base.py", line 4, in &lt;module&gt;
      from django.db import models
    File "/Users/Mason/Documents/dev/DIRNAME/SECRETDIR/env/lib/python2.7/site-packages/django/db/models/__init__.py", line 3, in &lt;module&gt;
      from django.db.models import signals  # NOQA
  ImportError: cannot import name signals
  </code></pre>
  
  <p>So thats that, I have hidden some personal information, but if you need any more info, I can add it.</p>
  
  <p>I am using a signal, at one point in the project, but I hadn't done anything to it to break it, and Django is V1.9 according to pip.</p>
  
  <p>For your info, I only use one <code>models.py</code> for the whole project, to save confusion.</p>
  
  <p>Below is the snippet of my only <code>models.py</code>:
   `</p>
  
  <pre><code>from __future__ import unicode_literals
  
  import string
  import uuid
  from datetime import timedelta, datetime
  from random import randint
  
  from django.contrib.auth.models import User, Group
  from django.db import models
  from django.utils.crypto import random
  from django.utils.html import format_html
  from helpers import fields # Doesn't import this file
  
  
  class CardHolder(models.Model):
      user = models.ForeignKey(User, related_name='rest_framework')
      card_number = fields.CardNumberField(unique=True, max_length=16)  # My special field
      authentication_code = models.IntegerField()
      transaction_auth_code = models.BigIntegerField()
      universal_user_id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
      client_sign_up_key = models.CharField(max_length=20, default="hi")
  
      def generate_attr(self):
          self.authentication_code = randint(0, 2147483647)  # 2147483647 is IntegerFields top limit
          self.transaction_auth_code = randint(0, 9223372036854775807)
          self.card_number = generate_card_number(max_length=16, min_length=16)
  
      def __str__(self):
          return self.user.username
  
      def client(self):
          try:
              if len(self.user.groups.all()) &gt; 0:
                  user_group = self.user.groups.all().last()
                  print "Here: ", self.user, ' ', user_group
                  client = Client.objects.get(name=user_group.name)
                  print client
                  universal_client_id = client.universal_client_id
                  client_url = "/admin/{}/client/{}/change".format(self._meta.app_label, universal_client_id)
                  return format_html("&lt;span&gt;&lt;a href='{}'&gt;{}&lt;/a&gt;&lt;/span&gt;".format(client_url, client.name))
              else:
                  return "No Clients :("
          except Exception as e:
              raise e
  
      def generate_client_sign_up_key(self):
          size = 20
          chars = string.ascii_uppercase + string.digits
          code = ''.join(random.choice(chars) for _ in range(size))
          self.client_sign_up_key = code
          self.save()
          return code
  
  
  client_image_choices = (
      ('SQ', 'Square'),
      ('RC', 'Rectangle'),
      ('RO', 'Round')
  )
  
  
  class Client(models.Model):
      temp = False
  
      name = models.CharField(max_length=500, default="NAME")
      email = models.EmailField(default="sam@themasons.org")
  
      colour_style = models.CharField(default="ff0000", max_length=8, help_text="Please remove any # from the front")
      icon = models.FileField(default="logo.png", help_text="If you can, please upload a square/round icon, not a big "
                                                            "rectangular shape.")
      image_shape = models.CharField(max_length=20, choices=client_image_choices)
  
      website = models.URLField(max_length=500, default="https://example.com/")
      request_url_segment = models.CharField(max_length=500, default="api/request")
      login_url_segment = models.CharField(max_length=500, default="api/login")
      universal_client_id = models.UUIDField(primary_key=True, editable=True, default=uuid.uuid4)
      description = models.CharField(max_length=500, default="HI")
      admin = models.ForeignKey(User, default=1)
  
      active = models.BooleanField(default=True)
      deleted = models.BooleanField(default=False)
      deletion_key = models.CharField(max_length=20)
  
      def create_random_key(self, term_length, do_return_object):
          random_key = randint(0, 9999999999999999)
          date_time_created = datetime.now
          random_key_object = ClientRandomKey(client=self, random_key=random_key, date_time_created=date_time_created,
                                              valid_term_length=term_length)
          random_key_object.save()
  
          if do_return_object:
              return random_key_object
  
      def is_active(self):
          return self.active
  
      def delete(self, using=None, keep_parents=False):
          group = Group.objects.get(name=self.name)
          group.delete()
          super(Client, self).delete()
  
      def __str__(self):
          return "{}".format(self.name)
  
      def transactions_for_client(self):
          transactions_for_client = TransactionLogItem.objects.filter(client=self)
          return transactions_for_client
  
      def generate_deletion_key(self):
          size = 20
          chars = string.ascii_uppercase + string.digits
          code = ''.join(random.choice(chars) for _ in range(size))
          self.deletion_key = code
          self.save()
          return code
  
  
  class TransactionLogItem(models.Model):
      expiry_length = 100  # In days
  
      client = models.ForeignKey(Client)
      card_holder = models.ForeignKey(CardHolder)
      name = models.CharField(max_length=500, default="A transaction")
      date_created = models.DateTimeField()
      visible = models.BooleanField(default=True)
  
      def make_invisible(self):
          print "here"
          self.visible = False
          self.save()
  
      def get_client(self):
          return Client.objects.get(universal_client_id=self.client.universal_client_id)
  
      def __str__(self):
          return "Transaction for {}".format(self.card_holder)
  
  
  class ClientRandomKey(models.Model):
      client = models.ForeignKey(Client)
      random_key = models.BigIntegerField()
      date_time_created = models.DateTimeField(auto_now_add=True)
      valid_term_length = models.IntegerField()  # Number of days that the Key is valid for.
  
      def get_finishing_date(self):
          start_date_time = self.date_time_created
          valid_term_length = self.valid_term_length
  
          finish_date = start_date_time + timedelta(days=valid_term_length)
          return finish_date
  
      def is_valid(self):
          if self.get_finishing_date() == datetime.now() or self.get_finishing_date() &lt; datetime.now():
              return False
          else:
              return True
  
      def __str__(self):
          return "Random Key for: {}".format(self.client)
  
  
      def generate_card_number(**kwargs):
          """
          Generates card number, used definitely in CardHolder.generate_attr()
  
          :param kwargs:
          :return:
          """
          try:
              max_length = kwargs["max_length"]
              min_length = kwargs["min_length"]
  
              value = []
              if max_length &gt;= min_length:
                  if max_length % 4 == 0:
                      segment_length = max_length / 4
  
                      for s in range(segment_length):
                          segment = random.randint(1000, 9999)
                          value.append(segment)
  
                      temp_value_str = map(str, value)
                      temp_value_parsed = "".join(temp_value_str)
  
                      return temp_value_parsed
                  else:
                      return None
              else:
                  raise ValueError("min_length is greater than max_length")
          except Exception as e:
              raise e
  </code></pre>
  
  <p>`</p>