title: Django - AttributeError: 'UserProfile' object has no attribute 'urls'
body: <p>I'm trying to extend <code>User</code> in Django. This new <code>User</code> should have more attributes than built-in <code>User</code> and some of them should be required during registration. Moreover, I would like to see this new type of user in <code>Admin</code>. I've followed official tutorial and <a href="https://www.youtube.com/watch?v=JZD5Z4-5JZ8&amp;list=PL313A26329E0C8900&amp;index=6" rel="noreferrer">this</a> youtube video but there is an <code>error</code>.</p>
  
  <p>I'm new in Django so I can't find out where the problem could be. Do you know whats wrong?</p>
  
  <p>EDIT: I've tried to stop server and <code>makemigrations</code> - the same error occured.</p>
  
  <p><strong>CMD:</strong></p>
  
  <pre><code>  File "C:\Users\Milano\PycharmProjects\FutileStudio\SolutionsForLanguages\venv\
  lib\site-packages\django\core\urlresolvers.py", line 417, in url_patterns
      patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    File "C:\Users\Milano\PycharmProjects\FutileStudio\SolutionsForLanguages\venv\
  lib\site-packages\django\utils\functional.py", line 33, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "C:\Users\Milano\PycharmProjects\FutileStudio\SolutionsForLanguages\venv\
  lib\site-packages\django\core\urlresolvers.py", line 410, in urlconf_module
      return import_module(self.urlconf_name)
    File "c:\python27\Lib\importlib\__init__.py", line 37, in import_module
      __import__(name)
    File "C:\Users\Milano\PycharmProjects\FutileStudio\SolutionsForLanguages\Solut
  ionsForLanguagesProject\urls.py", line 22, in &lt;module&gt;
      url(r'^admin/', admin.site.urls),
    File "C:\Users\Milano\PycharmProjects\FutileStudio\SolutionsForLanguages\venv\
  lib\site-packages\django\contrib\admin\sites.py", line 303, in urls
      return self.get_urls(), 'admin', self.name
    File "C:\Users\Milano\PycharmProjects\FutileStudio\SolutionsForLanguages\venv\
  lib\site-packages\django\contrib\admin\sites.py", line 287, in get_urls
      url(r'^%s/%s/' % (model._meta.app_label, model._meta.model_name), include(mo
  del_admin.urls)),
  AttributeError: 'UserProfile' object has no attribute 'urls'
  </code></pre>
  
  <p><strong>MODELS.PY:</strong></p>
  
  <pre><code>...
  from django.db.models.signals import post_save
  ...
  class UserProfile(models.Model):
      user = models.OneToOneField(User,on_delete=models.CASCADE)
  
      first_name = models.CharField(max_length=40)
      surname = models.CharField(max_length=40)
      email = models.EmailField()
      telephone = models.CharField(max_length=40)
  
      def __unicode__(self):
          return '{} {}'.format(self.first_name,self.surname)
  
  def create_profile_user_callback(sender,instance, **kwargs):
      profile, new = UserProfile.objects.get_or_create(user=instance)
  post_save.connect(create_profile_user_callback, User)
  </code></pre>
  
  <p><strong>ADMIN.PY:</strong></p>
  
  <pre><code>from django.contrib import admin
  from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
  from models import *
  from .models import UserProfile
  
  admin.site.register(AdminContact)
  
  class UserProfileInline(admin.StackedInline):
      model = UserProfile
      can_delete = False
      verbose_name_plural = 'User_Profile'
  
  class UserAdmin(BaseUserAdmin):
      inlines = (UserProfileInline, )
  
  admin.site.unregister(User)
  admin.site.register(User,UserProfile)
  </code></pre>
  
  <p><strong>URLS.PY:</strong></p>
  
  <pre><code>urlpatterns = [
      url(r'^admin/', admin.site.urls),
      url(r'^about', TemplateView.as_view(template_name='static/about-us.html')),
      url(r'^terms-and-conditions', TemplateView.as_view(template_name='static/terms-and-conditions.html')),
      url(r'^faq', TemplateView.as_view(template_name='static/faq.html')),
      url(r'^$', views.index),
      url(r'^contact-us', views.contact_us),
  ]
  
  registration_patterns = [
      url(r'register', views.register),
      url(r'register_success', views.register_success),
  ]
  
  urlpatterns += registration_patterns
  </code></pre>