Issues deploying Django project
<p>Okay I am new to the Django framework but I have a basic site that I want live. I have a droplet up on Digital Ocean and my files have been moved over to there.</p>

<p>I get this error:</p>

<pre><code>ImportError at /

cannot import name patterns

Request Method:     GET
Request URL:    http://188.166.147.202/
Django Version:     1.10.2
Exception Type:     ImportError
Exception Value:    

cannot import name patterns

Exception Location:     /home/django/django_project/django_project/urls.py in &lt;module&gt;, line 1
Python Executable:  /usr/bin/python
Python Version:     2.7.6
Python Path:    

['/home/django/django_project',
 '/home/django',
 '/usr/bin',
 '/usr/lib/python2.7',
 '/usr/lib/python2.7/plat-x86_64-linux-gnu',
 '/usr/lib/python2.7/lib-tk',
 '/usr/lib/python2.7/lib-old',
 '/usr/lib/python2.7/lib-dynload',
 '/usr/local/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages',
 '/usr/lib/python2.7/dist-packages/gtk-2.0']

Server time:    Sun, 16 Oct 2016 16:26:46 +0000
</code></pre>

<p>urls.py looks like:</p>

<pre><code>from django.conf.urls import patterns, include, url

from django.contrib import admin
admin.autodiscover()

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^', include('personal.urls')),
    url(r'^blog/', include('blog.urls')),
]
</code></pre>

<p>The doplet is currently using python 2.7 but I used python3 while developing so how can I upgrade the version of python on my droplet?</p>

<p><code>patterns</code> was deprecated in Django 1.8 and removed in Django 1.10. </p>

<p>Your <code>urlpatterns</code> is already as it should be, a list of <code>url()</code> instances. Simply change your import to:</p>

<pre><code>from django.conf.urls import include, url
</code></pre>

python django digital-ocean