title: Manually deploying on Ubuntu a Django application made in Visual Studio
body: <p>I have installed on the Ubuntu server:</p>
  
  <pre><code>apt-get install python-pip apache2 libapache2-mod-wsgi
  pip install virtualenv
  mkdir -p /django/projects/prj01
  cd /django/projects/prj01
  </code></pre>
  
  <p>create the virtual environment:</p>
  
  <pre><code>virtualenv prj01env
  </code></pre>
  
  <p>activate the virtual environment:</p>
  
  <pre><code>source prj01env/bin/activate
  </code></pre>
  
  <p>install django in the virtual environment:</p>
  
  <pre><code>pip install django
  </code></pre>
  
  <p>I previously uploaded project folder with winscp
  now I copy that project in /django/projects/prj01:</p>
  
  <pre><code>cp /home/myuser/prj01/ ./
  cd prj01
  </code></pre>
  
  <p>change permissions:</p>
  
  <pre><code>chmod +x /django/projects/prj01
  chown -R www-data:www-data /django/projects/
  </code></pre>
  
  <p>convert the text file from windows to linux format:</p>
  
  <pre><code>dos2unix manage.py
  </code></pre>
  
  <p>Finally I run manage.py</p>
  
  <pre><code>./manage.py makemigrations
  </code></pre>
  
  <p>And then I receive the follow error message:</p>
  
  <pre><code>(prj01env) root@RSR0008:/django/projects/prj01/prj01# ./manage.py createsuperuser
  Traceback (most recent call last):
    File "./manage.py", line 17, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
      utility.execute()
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/core/management/base.py", line 294, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py", line 63, in execute
      return super(Command, self).execute(*args, **options)
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/core/management/base.py", line 342, in execute
      self.check()
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/core/management/base.py", line 374, in check
      include_deployment_checks=include_deployment_checks,
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/core/management/base.py", line 361, in _run_checks
      return checks.run_checks(**kwargs)
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/core/checks/registry.py", line 81, in run_checks
      new_errors = check(app_configs=app_configs)
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 14, in check_url_config
      return check_resolver(resolver)
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 24, in check_resolver
      for pattern in resolver.url_patterns:
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 313, in url_patterns
      patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/utils/functional.py", line 35, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "/django/projects/prj01/prj01env/local/lib/python2.7/site-packages/django/urls/resolvers.py", line 306, in urlconf_module
      return import_module(self.urlconf_name)
    File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
      __import__(name)
    File "/django/projects/prj01/prj01/prj01/urls.py", line 6, in &lt;module&gt;
      from django.conf.urls import patterns, url
  ImportError: cannot import name patterns
  </code></pre>
  
  <p>Anyone can tell me what is wrong with that procedure?</p>
  
  <p>If I create an empty project directly from the server, everything is working fine, but if I copy my project from my windows client, it is not working.</p>