title: I'm trying to graphic with django using python but jump IndentationError: expected an indented block
body: <p>Looks like simple but I'm starting code and I don't know what to do or why this error happened.</p>
  <p>What I'm trying is to make an example graphic in django that's all not with success, all the information showed is confusing me.</p>
  <p>this is my views.py</p>
  <pre><code>
  from django.shortcuts import render
  import matplotlib.pyplot as plt 
  
  def home(request):
      
      plt.plot(range(10))
      return render(request, 'app1/home.html')
  
  
  def about(request):
      return render(request, 'app1/about.html', {'title': 'About'})
  
  </code></pre>
  <p>and jump the next error</p>
  <pre><code>Exception in thread django-main-thread:
  Traceback (most recent call last):
    File &quot;/usr/lib/python3.9/threading.py&quot;, line 950, in _bootstrap_inner
      self.run()
    File &quot;/usr/lib/python3.9/threading.py&quot;, line 888, in run
      self._target(*self._args, **self._kwargs)
    File &quot;/home/corbin/ProyectoDB/venv/lib/python3.9/site-packages/django/utils/autoreload.py&quot;, line 53, in wrapper
      fn(*args, **kwargs)
    File &quot;/home/corbin/ProyectoDB/venv/lib/python3.9/site-packages/django/core/management/commands/runserver.py&quot;, line 118, in inner_run
      self.check(display_num_errors=True)
    File &quot;/home/corbin/ProyectoDB/venv/lib/python3.9/site-packages/django/core/management/base.py&quot;, line 392, in check
      all_issues = checks.run_checks(
    File &quot;/home/corbin/ProyectoDB/venv/lib/python3.9/site-packages/django/core/checks/registry.py&quot;, line 70, in run_checks
      new_errors = check(app_configs=app_configs, databases=databases)
    File &quot;/home/corbin/ProyectoDB/venv/lib/python3.9/site-packages/django/core/checks/urls.py&quot;, line 13, in check_url_config
      return check_resolver(resolver)
    File &quot;/home/corbin/ProyectoDB/venv/lib/python3.9/site-packages/django/core/checks/urls.py&quot;, line 23, in check_resolver
      return check_method()
    File &quot;/home/corbin/ProyectoDB/venv/lib/python3.9/site-packages/django/urls/resolvers.py&quot;, line 408, in check
      for pattern in self.url_patterns:
    File &quot;/home/corbin/ProyectoDB/venv/lib/python3.9/site-packages/django/utils/functional.py&quot;, line 48, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File &quot;/home/corbin/ProyectoDB/venv/lib/python3.9/site-packages/django/urls/resolvers.py&quot;, line 589, in url_patterns
      patterns = getattr(self.urlconf_module, &quot;urlpatterns&quot;, self.urlconf_module)
    File &quot;/home/corbin/ProyectoDB/venv/lib/python3.9/site-packages/django/utils/functional.py&quot;, line 48, in __get__
      res = instance.__dict__[self.name] = self.func(instance)
    File &quot;/home/corbin/ProyectoDB/venv/lib/python3.9/site-packages/django/urls/resolvers.py&quot;, line 582, in urlconf_module
      return import_module(self.urlconf_name)
    File &quot;/usr/lib/python3.9/importlib/__init__.py&quot;, line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1030, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1007, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 986, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 680, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 790, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 228, in _call_with_frames_removed
    File &quot;/home/corbin/ProyectoDB/LabBD/Web_DB/urls.py&quot;, line 21, in &lt;module&gt;
      path('', include('app1.urls')),
    File &quot;/home/corbin/ProyectoDB/venv/lib/python3.9/site-packages/django/urls/conf.py&quot;, line 34, in include
      urlconf_module = import_module(urlconf_module)
    File &quot;/usr/lib/python3.9/importlib/__init__.py&quot;, line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1030, in _gcd_import
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 1007, in _find_and_load
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 986, in _find_and_load_unlocked
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 680, in _load_unlocked
    File &quot;&lt;frozen importlib._bootstrap_external&gt;&quot;, line 790, in exec_module
    File &quot;&lt;frozen importlib._bootstrap&gt;&quot;, line 228, in _call_with_frames_removed
    File &quot;/home/corbin/ProyectoDB/LabBD/app1/urls.py&quot;, line 2, in &lt;module&gt;
      from . import views
    File &quot;/home/corbin/ProyectoDB/LabBD/app1/views.py&quot;, line 11
      
      ^
  IndentationError: expected an indented block
  </code></pre>
  <p>I will apreciate all your help.</p>