# Path: organizer/models.py
# class Startup(models.Model):
#     name = models.CharField(
#         max_length=31, db_index=True)
#     slug = models.SlugField(
#         max_length=31,
#         unique=True,
#         help_text='A label for URL config.')
#     description = models.TextField()
#     founded_date = models.DateField(
#         'date founded')
#     contact = models.EmailField()
#     website = models.URLField(max_length=255)
#     tags = models.ManyToManyField(Tag, blank=True)
# 
#     objects = StartupManager()
# 
#     class Meta:
#         ordering = ['name']
#         get_latest_by = 'founded_date'
# 
#     def __str__(self):
#         return self.name
# 
#     def get_absolute_url(self):
#         return reverse('organizer_startup_detail',
#                        kwargs={'slug': self.slug})
# 
#     def get_delete_url(self):
#         return reverse('organizer_startup_delete',
#                        kwargs={'slug': self.slug})
# 
#     def get_feed_atom_url(self):
#         return reverse(
#             'organizer_startup_atom_feed',
#             kwargs={'startup_slug': self.slug})
# 
#     def get_feed_rss_url(self):
#         return reverse(
#             'organizer_startup_rss_feed',
#             kwargs={'startup_slug': self.slug})
# 
#     def get_newslink_create_url(self):
#         return reverse(
#             'organizer_newslink_create',
#             kwargs={'startup_slug': self.slug})
# 
#     def get_update_url(self):
#         return reverse('organizer_startup_update',
#                        kwargs={'slug': self.slug})
# 
#     @cached_property
#     def published_posts(self):
#         return tuple(self.blog_posts.filter(
#             pub_date__lt=date.today()))
# 
#     def natural_key(self):
#         return (self.slug,)


from datetime import datetime
from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse_lazy
from django.shortcuts import get_object_or_404
from django.utils.feedgenerator import (
    Atom1Feed, Rss201rev2Feed)
from .models import Startup




class BaseStartupFeedMixin():

    def description(self, startup):
        return "News related to {}".format(
            startup.name)

    def get_object(self, request, startup_slug):
        # equivalent to GCBV get() method
        return get_object_or_404(

# Path: organizer/models.py
# class Startup(models.Model):
#     name = models.CharField(
#         max_length=31, db_index=True)
#     slug = models.SlugField(
#         max_length=31,
#         unique=True,
#         help_text='A label for URL config.')
#     description = models.TextField()
#     founded_date = models.DateField(
#         'date founded')
#     contact = models.EmailField()
#     website = models.URLField(max_length=255)
#     tags = models.ManyToManyField(Tag, blank=True)
# 
#     objects = StartupManager()
# 
#     class Meta:
#         ordering = ['name']
#         get_latest_by = 'founded_date'
# 
#     def __str__(self):
#         return self.name
# 
#     def get_absolute_url(self):
#         return reverse('organizer_startup_detail',
#                        kwargs={'slug': self.slug})
# 
#     def get_delete_url(self):
#         return reverse('organizer_startup_delete',
#                        kwargs={'slug': self.slug})
# 
#     def get_feed_atom_url(self):
#         return reverse(
#             'organizer_startup_atom_feed',
#             kwargs={'startup_slug': self.slug})
# 
#     def get_feed_rss_url(self):
#         return reverse(
#             'organizer_startup_rss_feed',
#             kwargs={'startup_slug': self.slug})
# 
#     def get_newslink_create_url(self):
#         return reverse(
#             'organizer_newslink_create',
#             kwargs={'startup_slug': self.slug})
# 
#     def get_update_url(self):
#         return reverse('organizer_startup_update',
#                        kwargs={'slug': self.slug})
# 
#     @cached_property
#     def published_posts(self):
#         return tuple(self.blog_posts.filter(
#             pub_date__lt=date.today()))
# 
#     def natural_key(self):
#         return (self.slug,)


# Path: organizer/feeds.py
from datetime import datetime
from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse_lazy
from django.shortcuts import get_object_or_404
from django.utils.feedgenerator import (
    Atom1Feed, Rss201rev2Feed)
from .models import Startup





class BaseStartupFeedMixin():

    def description(self, startup):
        return "News related to {}".format(
            startup.name)

    def get_object(self, request, startup_slug):
        # equivalent to GCBV get() method
        return get_object_or_404(

            Startup,