title: Django AttributeError: module 'cal.views' has no attribute 'index'
body: <p>I have a problem to create a calendar with django, this code is similar a tutorial, but the problem is in folder cal/views
  my code with django detects attribute errors and I no longer know what could be wrong, I already checked the files in the "cal" folder
  pls help me in my code :(</p>
  
  <p>this is the code in descubretepic/cal/views</p>
  
  <pre><code>from datetime import datetime
  from django.shortcuts import render
  from django.http import HttpResponse
  from django.views import generic
  from django.utils.safestring import mark_safe
  
  from .models import *
  from .utils import Calendar
  </code></pre>
  
  <pre><code>class CalendarView(generic.ListView):
      model = Event
      template_name = 'cal/calendar.html'
  
      def get_context_data(self, **kwargs):
          context = super().get_context_data(**kwargs)
  
          # use today's date for the calendar
          d = get_date(self.request.GET.get('day', None))
  
          # Instantiate our calendar class with today's year and date
          cal = Calendar(d.year, d.month)
  
          # Call the formatmonth method, which returns our calendar as a table
          html_cal = cal.formatmonth(withyear=True)
          context['calendar'] = mark_safe(html_cal)
          return context
  
  def get_date(req_day):
      if req_day:
          year, month = (int(x) for x in req_day.split('-'))
          return date(year, month, day=1)
      return datetime.today()
  </code></pre>
  
  <p>my code in descubretepic/cal/urls</p>
  
  <pre><code>from django.conf.urls import url
  from . import views
  
  
  app_name = 'cal'
  urlpatterns = [
      '',
      url(r'^$', views.index, name='index'),
      url(r'^calendar/$', views.CalendarView.as_view(), name='calendar'), # here
  ]
  
  </code></pre>