title: Django could not import [function]. The path must be fully qualified
body: <p>I recently started Django and I'm having a problem rendering a "hello world" page, the issue goes like this : </p>
  
  <pre><code>Could not import 'index'. The path must be fully qualified.
  </code></pre>
  
  <p>Django is not detecting my views.index function</p>
  
  <p>here is the code:</p>
  
  <p><strong>src/urls.py</strong></p>
  
  <pre><code>from django.conf.urls import url
  from django.contrib import admin
  from django.conf.urls import include
  
  urlpatterns = [
      url(r'^admin/', admin.site.urls),
      url(r'^pages/', include('pages.urls')),
  ]
  </code></pre>
  
  <p><strong>pages/urls.py</strong></p>
  
  <pre><code>from django.conf.urls import url
  
  urlpatterns = [
      url(r'', 'index', name="index"), #error
  ]
  </code></pre>
  
  <p><strong>pages/views.py</strong></p>
  
  <pre><code>from django.shortcuts import render
  
  # Create your views here.
  def index(request):
      context = {}
      return render('index.html', context)
  </code></pre>
  
  <p>I want to render the index.html, how can I do this?</p>
  
  <p>--------------- UPDATE ---------------</p>
  
  <p><strong>CMD error</strong></p>
  
  <pre><code>Unhandled exception in thread started by &lt;function check_errors.&lt;locals&gt;.wrapper at 0x00000000044D70D0&gt;
  Traceback (most recent call last):
    File "C:\Python34\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper
      fn(*args, **kwargs)
    File "C:\Python34\lib\site-packages\django\core\management\commands\runserver.py", line 116, in inner_run
      self.check(display_num_errors=True)
    File "C:\Python34\lib\site-packages\django\core\management\base.py", line 426, in check
      include_deployment_checks=include_deployment_checks,
    File "C:\Python34\lib\site-packages\django\core\checks\registry.py", line 75, in run_checks
      new_errors = check(app_configs=app_configs)
    File "C:\Python34\lib\site-packages\django\core\checks\urls.py", line 10, in check_url_config
      return check_resolver(resolver)
    File "C:\Python34\lib\site-packages\django\core\checks\urls.py", line 19, in check_resolver
      for pattern in resolver.url_patterns:
    File "C:\Python34\lib\site-packages\django\utils\functional.py", line 33, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "C:\Python34\lib\site-packages\django\core\urlresolvers.py", line 417, in url_patterns
      patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
    File "C:\Python34\lib\site-packages\django\utils\functional.py", line 33, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File "C:\Python34\lib\site-packages\django\core\urlresolvers.py", line 410, in urlconf_module
      return import_module(self.urlconf_name)
    File "C:\Python34\lib\importlib\__init__.py", line 109, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 2254, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 2237, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 2226, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 1200, in _load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 1129, in _exec
    File "&lt;frozen importlib._bootstrap&gt;", line 1471, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 321, in _call_with_frames_removed
    File "C:\Python34\Scripts\src\src\urls.py", line 26, in &lt;module&gt;
      url(r'^pages/', include('pages.urls')),
    File "C:\Python34\lib\site-packages\django\conf\urls\__init__.py", line 52, in include
      urlconf_module = import_module(urlconf_module)
    File "C:\Python34\lib\importlib\__init__.py", line 109, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "&lt;frozen importlib._bootstrap&gt;", line 2254, in _gcd_import
    File "&lt;frozen importlib._bootstrap&gt;", line 2237, in _find_and_load
    File "&lt;frozen importlib._bootstrap&gt;", line 2226, in _find_and_load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 1200, in _load_unlocked
    File "&lt;frozen importlib._bootstrap&gt;", line 1129, in _exec
    File "&lt;frozen importlib._bootstrap&gt;", line 1471, in exec_module
    File "&lt;frozen importlib._bootstrap&gt;", line 321, in _call_with_frames_removed
    File "C:\Python34\Scripts\src\pages\urls.py", line 5, in &lt;module&gt;
      url(r'^$', views.index, name="index"),
  AttributeError: 'module' object has no attribute 'index'
  </code></pre>
  
  <p>added <code>from pages import views</code> in urls.py</p>