title: django function based generic views migration to class based views
body: <p>i recently migrated from django 1.4 to django 1.5 and i am getting this error</p>
  
  <pre><code>ViewDoesNotExist: Could not import django.views.generic.date_based.archive_index. Parent module django.views.generic.date_based does not exist.
  </code></pre>
  
  <p>googling gives me that function based views have been deprecieted. I am trying to migrate to Class based views but is finding it difficult. here is my views.py</p>
  
  <pre><code>from app.models import Season
  from django.conf.urls import *
  from cms.models import News, File
  
  
  def get_extra_context():
      past_seasons = Season.objects.filter(in_progress = False)
      try:
          current_season = Season.objects.get(in_progress = True)
      except Season.DoesNotExist:
          current_season = None
      files = File.objects.all().order_by('-id')[:5]
      output = {
          'current_season': current_season,
          'past_seasons': past_seasons,
          'files': files,
          }
      return output
  
  dictionary = {
      'queryset': News.objects.all(),
      'date_field': 'date',
      'extra_context': get_extra_context(),
  }
  
  
  urlpatterns= patterns(
      'django.views.generic.date_based',
      url(
          r'(?P&lt;year&gt;\d{4})/(?P&lt;month&gt;\w{3})/(?P&lt;day&gt;\d{2})/(?P&lt;slug&gt;[-\w]+)/$',
          'object_detail',
          dict(dictionary, slug_field = 'slug', template_name = 'cms/news/object.html'),
          name='object'
      ),
      url(
          r'^$',
          'archive_index',
          dict(dictionary, template_name = 'cms/news/list.html'),
          name='list'
      )
  )
  </code></pre>
  
  <p>i am not able to convert it class based views. can any body help. dictionary is the object i want to put into the context.</p>
  
  <p>thanks in advance.</p>
  
  <p>//mouse</p>