from django.conf.urls.defaults import *
from models import GeneralPost
from feeds import LatestPosts

post_list = {
    'queryset': GeneralPost.objects.all(),
}

feeds = {
    'all': LatestPosts,
}

urlpatterns = patterns('django.views.generic',
   (r'^(?P<slug>[a-z0-9-]+)/$', 'list_detail.object_detail', post_list, 'dzenlog-post-details'),
   (r'^$', 'list_detail.object_list', post_list, 'dzenlog-post-list'),
)

urlpatterns += patterns('django.contrib.syndication.views',
   (r'^rss/(?P<url>.*)/$', 'feed', {'feed_dict': feeds}, 'dzenlog-feeds'),
)


from django.conf.urls.defaults import *
from models import GeneralPost
from feeds import latest

post_list = {
    'queryset': GeneralPost.objects.all(),
}

feeds = {
    'all': latest(GeneralPost, 'dzenlog-post-list'),
}

urlpatterns = patterns('django.views.generic',
   (r'^(?P<slug>[a-z0-9-]+)/$', 'list_detail.object_detail', post_list, 'dzenlog-post-details'),
   (r'^$', 'list_detail.object_list', post_list, 'dzenlog-post-list'),
)

urlpatterns += patterns('django.contrib.syndication.views',
   (r'^rss/(?P<url>.*)/$', 'feed', {'feed_dict': feeds}, 'dzenlog-feeds'),
)


Use 'latest' to generate feed for GeneralPost.
Use 'latest' to generate feed for GeneralPost.

  from django.conf.urls.defaults import *
  from models import GeneralPost
- from feeds import LatestPosts
+ from feeds import latest
  
  post_list = {
      'queryset': GeneralPost.objects.all(),
  }
  
  feeds = {
-     'all': LatestPosts,
+     'all': latest(GeneralPost, 'dzenlog-post-list'),
  }
  
  urlpatterns = patterns('django.views.generic',
     (r'^(?P<slug>[a-z0-9-]+)/$', 'list_detail.object_detail', post_list, 'dzenlog-post-details'),
     (r'^$', 'list_detail.object_list', post_list, 'dzenlog-post-list'),
  )
  
  urlpatterns += patterns('django.contrib.syndication.views',
     (r'^rss/(?P<url>.*)/$', 'feed', {'feed_dict': feeds}, 'dzenlog-feeds'),
  )
  
  
Use 'latest' to generate feed for GeneralPost.
## Code Before:
from django.conf.urls.defaults import *
from models import GeneralPost
from feeds import LatestPosts

post_list = {
    'queryset': GeneralPost.objects.all(),
}

feeds = {
    'all': LatestPosts,
}

urlpatterns = patterns('django.views.generic',
   (r'^(?P<slug>[a-z0-9-]+)/$', 'list_detail.object_detail', post_list, 'dzenlog-post-details'),
   (r'^$', 'list_detail.object_list', post_list, 'dzenlog-post-list'),
)

urlpatterns += patterns('django.contrib.syndication.views',
   (r'^rss/(?P<url>.*)/$', 'feed', {'feed_dict': feeds}, 'dzenlog-feeds'),
)


## Instruction:
Use 'latest' to generate feed for GeneralPost.
## Code After:
from django.conf.urls.defaults import *
from models import GeneralPost
from feeds import latest

post_list = {
    'queryset': GeneralPost.objects.all(),
}

feeds = {
    'all': latest(GeneralPost, 'dzenlog-post-list'),
}

urlpatterns = patterns('django.views.generic',
   (r'^(?P<slug>[a-z0-9-]+)/$', 'list_detail.object_detail', post_list, 'dzenlog-post-details'),
   (r'^$', 'list_detail.object_list', post_list, 'dzenlog-post-list'),
)

urlpatterns += patterns('django.contrib.syndication.views',
   (r'^rss/(?P<url>.*)/$', 'feed', {'feed_dict': feeds}, 'dzenlog-feeds'),
)

