Python Django not running
<p>Firstly I installed Django using pip in my "CentOS" operating system.
After that I performed these steps using terminal.</p>

<pre><code>django-admin startproject mysite
</code></pre>

<p>a folder mysite is created with :</p>

<pre><code>manage.py and another subfolder mysite
</code></pre>

<p>Then simply I just used these commands :</p>

<pre><code>python manage.py runserver
</code></pre>

<p>and the server was running as clicked on the url :
  <a href="http://localhost:portnumber/" rel="nofollow">http://localhost:portnumber/</a></p>

<p>But after that when I made another app to run it is not running, my step are as follows :</p>

<pre><code>python manage.py startapp webapp
</code></pre>

<p>Then one new folder created webapp in same mysite directory is created.</p>

<p>After changing settings.py and urls.py of mysite and also changing urls.py and views.py of webapp.</p>

<p>when I run :</p>

<pre><code>python manage.py runserver 
</code></pre>

<p>error is coming</p>

<pre><code>    Performing system checks...

    Unhandled exception in thread started by &lt;function wrapper at 0x24a7398&gt;
    Traceback (most recent call last):
    File "/usr/lib/python2.7/site-packages/django/utils/autoreload.py", line           
    226, in wrapper
    fn(*args, **kwargs)
    File "/usr/lib/python2.7/site-       
    packages/django/core/management/commands/runserver.py", line 121, in    
    inner_run
    self.check(display_num_errors=True)
    File "/usr/lib/python2.7/site-packages/django/core/management/base.py",   
    line 374, in check
    include_deployment_checks=include_deployment_checks,
    File "/usr/lib/python2.7/site-packages/django/core/management/base.py",    
    line 361, in _run_checks
    return checks.run_checks(**kwargs)
    File "/usr/lib/python2.7/site-packages/django/core/checks/registry.py",   
    line 81, in run_checks
    new_errors = check(app_configs=app_configs)
    File "/usr/lib/python2.7/site-packages/django/core/checks/urls.py", line 
    14, in check_url_config
    return check_resolver(resolver)
    File "/usr/lib/python2.7/site-packages/django/core/checks/urls.py", line   
    28, in check_resolver
    warnings.extend(check_resolver(pattern))
    File "/usr/lib/python2.7/site-packages/django/core/checks/urls.py", line 
    24, in check_resolver
    for pattern in resolver.url_patterns:
    File "/usr/lib/python2.7/site-packages/django/utils/functional.py", line   
    35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
    File "/usr/lib/python2.7/site-packages/django/urls/resolvers.py", line 
    322, in url_patterns
    raise ImproperlyConfigured(msg.format(name=self.urlconf_name))
    django.core.exceptions.ImproperlyConfigured: The included URLconf    
    '&lt;module 'webapp.urls' from   
    '/home/username/Desktop/prog/django/mysite/webapp/urls.pyc'&gt;' does not  
    appear to have any patterns in it. If you see valid patterns in the file   
    then the issue is probably caused by a circular import.
</code></pre>

<p>This right here:</p>

<pre><code>'/home/username/Desktop/prog/django/mysite/webapp/urls.pyc'&gt;' does not appear to have any patterns in it.
</code></pre>

<p>Check <code>urls.py</code></p>

<p>I can't tell you exactly what to check without seeing the file, but here is a sample <code>urls.py</code>:</p>

<pre><code>urlpatterns = patterns('',
    # Examples:
    # url(r'^blog/', include('blog.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^webapp/', include('webapp.urls')),
)
</code></pre>

<p>codes are as follows :
 urls.py [/mysite/mysite/urls.py]</p>

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

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

<p>settings.py[/mysite/mysite/settings.py]</p>

<pre><code>    INSTALLED_APPS = [
                       'webapp',
                       'django.contrib.admin',
                       'django.contrib.auth',
                       'django.contrib.contenttypes',
                       'django.contrib.sessions',
                       'django.contrib.messages',
                       'django.contrib.staticfiles',
                     ]
</code></pre>

<p>urls.py [/mysite/webapp/urls.py]</p>

<pre><code>    from django.conf.urls import url
    from. import views

    urlpatterns = [
                    url(r'^$', views.index, name='index')
                   ]
</code></pre>

<p>views.py [/mysite/webapp/views.py]</p>

<pre><code>    from django.shortcuts import render
    from django.http import HttpResponse

    def index(request):
          return HttpResponse("&lt;h2&gt;Hey!&lt;/h2&gt;")
</code></pre>

python django