# Path: dinette/views.py
# class LatestTopicsByCategory(Feed):
#     title_template = 'dinette/feeds/title.html'
#     description_template = 'dinette/feeds/description.html'
# 
#     def get_object(self, request, whichcategory):
#         mlogger.debug("Feed for category %s " % whichcategory)
#         return get_object_or_404(Category, slug=whichcategory)
# 
#     def title(self, obj):
#         return "Latest topics in category %s" % obj.name
# 
#     def link(self, obj):
#         return  settings.SITE_URL
# 
#     def items(self, obj):
#         return obj.ftopics_set.all()[:10]
# 
#     #construct these links by means of reverse lookup  by
#     #using permalink decorator
#     def item_link(self,obj):
#         return  obj.get_absolute_url()
# 
#     def item_pubdate(self,obj):
#         return obj.created_on
# 
# class LatestRepliesOfTopic(Feed):
#     title_template = 'dinette/feeds/title.html'
#     description_template = 'dinette/feeds/description.html'
# 
#     def get_object(self, request, whichtopic):
#         mlogger.debug("Feed for category %s " % whichtopic)
#         return get_object_or_404(Ftopics, slug=whichtopic)
# 
#     def title(self, obj):
#         return "Latest replies in topic %s" % obj.subject
# 
#     def link(self, obj):
#         return  settings.SITE_URL
# 
#     def items(self, obj):
#         list = []
#         list.insert(0,obj)
#         for obj in obj.reply_set.all()[:10] :
#             list.append(obj)
#         return list
# 
#      #construct these links by means of reverse lookup  by
#      #using permalink decorator
#     def item_link(self,obj):
#         return  obj.get_absolute_url()
# 
#     def item_pubdate(self,obj):
#         return obj.created_on


from django.conf.urls import *
from dinette.views import LatestTopicsByCategory,LatestRepliesOfTopic



urlpatterns = patterns('dinette.views',
    url(r'^$','index_page',name='dinette_category'),
    url(r'^new/$','new_topics',name='dinette_new_for_user'),
    url(r'^active/$','active',name='dinette_active'),

# Path: dinette/views.py
# class LatestTopicsByCategory(Feed):
#     title_template = 'dinette/feeds/title.html'
#     description_template = 'dinette/feeds/description.html'
# 
#     def get_object(self, request, whichcategory):
#         mlogger.debug("Feed for category %s " % whichcategory)
#         return get_object_or_404(Category, slug=whichcategory)
# 
#     def title(self, obj):
#         return "Latest topics in category %s" % obj.name
# 
#     def link(self, obj):
#         return  settings.SITE_URL
# 
#     def items(self, obj):
#         return obj.ftopics_set.all()[:10]
# 
#     #construct these links by means of reverse lookup  by
#     #using permalink decorator
#     def item_link(self,obj):
#         return  obj.get_absolute_url()
# 
#     def item_pubdate(self,obj):
#         return obj.created_on
# 
# class LatestRepliesOfTopic(Feed):
#     title_template = 'dinette/feeds/title.html'
#     description_template = 'dinette/feeds/description.html'
# 
#     def get_object(self, request, whichtopic):
#         mlogger.debug("Feed for category %s " % whichtopic)
#         return get_object_or_404(Ftopics, slug=whichtopic)
# 
#     def title(self, obj):
#         return "Latest replies in topic %s" % obj.subject
# 
#     def link(self, obj):
#         return  settings.SITE_URL
# 
#     def items(self, obj):
#         list = []
#         list.insert(0,obj)
#         for obj in obj.reply_set.all()[:10] :
#             list.append(obj)
#         return list
# 
#      #construct these links by means of reverse lookup  by
#      #using permalink decorator
#     def item_link(self,obj):
#         return  obj.get_absolute_url()
# 
#     def item_pubdate(self,obj):
#         return obj.created_on


# Path: dinette/urls.py
from django.conf.urls import *
from dinette.views import LatestTopicsByCategory,LatestRepliesOfTopic




urlpatterns = patterns('dinette.views',
    url(r'^$','index_page',name='dinette_category'),
    url(r'^new/$','new_topics',name='dinette_new_for_user'),
    url(r'^active/$','active',name='dinette_active'),

    url(r'^unanswered/$','unanswered',name='dinette_unanswered'),