# 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,)
# 
# class Tag(models.Model):
#     name = models.CharField(
#         max_length=31, unique=True)
#     slug = models.SlugField(
#         max_length=31,
#         unique=True,
#         help_text='A label for URL config.')
# 
#     objects = TagManager()
# 
#     class Meta:
#         ordering = ['name']
# 
#     def __str__(self):
#         return self.name.title()
# 
#     def get_absolute_url(self):
#         return reverse('organizer_tag_detail',
#                        kwargs={'slug': self.slug})
# 
#     def get_delete_url(self):
#         return reverse('organizer_tag_delete',
#                        kwargs={'slug': self.slug})
# 
#     def get_update_url(self):
#         return reverse('organizer_tag_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 date
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
from organizer.models import Startup, Tag
            .select_related('author__profile'))

    def get_by_natural_key(self, pub_date, slug):
        return self.get(
            pub_date=pub_date,
            slug=slug)


PostManager = BasePostManager.from_queryset(
    PostQueryset)


class Post(models.Model):
    title = models.CharField(max_length=63)
    slug = models.SlugField(
        max_length=63,
        help_text='A label for URL config',
        unique_for_month='pub_date')
    author = models.ForeignKey(
        settings.AUTH_USER_MODEL,
        related_name='blog_posts')
    text = models.TextField()
    pub_date = models.DateField(
        'date published',
        auto_now_add=True)
    tags = models.ManyToManyField(
        Tag,
        blank=True,
        related_name='blog_posts')
    startups = models.ManyToManyField(

# 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,)
# 
# class Tag(models.Model):
#     name = models.CharField(
#         max_length=31, unique=True)
#     slug = models.SlugField(
#         max_length=31,
#         unique=True,
#         help_text='A label for URL config.')
# 
#     objects = TagManager()
# 
#     class Meta:
#         ordering = ['name']
# 
#     def __str__(self):
#         return self.name.title()
# 
#     def get_absolute_url(self):
#         return reverse('organizer_tag_detail',
#                        kwargs={'slug': self.slug})
# 
#     def get_delete_url(self):
#         return reverse('organizer_tag_delete',
#                        kwargs={'slug': self.slug})
# 
#     def get_update_url(self):
#         return reverse('organizer_tag_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: blog/models.py
from datetime import date
from django.conf import settings
from django.core.urlresolvers import reverse
from django.db import models
from organizer.models import Startup, Tag

            .select_related('author__profile'))

    def get_by_natural_key(self, pub_date, slug):
        return self.get(
            pub_date=pub_date,
            slug=slug)


PostManager = BasePostManager.from_queryset(
    PostQueryset)


class Post(models.Model):
    title = models.CharField(max_length=63)
    slug = models.SlugField(
        max_length=63,
        help_text='A label for URL config',
        unique_for_month='pub_date')
    author = models.ForeignKey(
        settings.AUTH_USER_MODEL,
        related_name='blog_posts')
    text = models.TextField()
    pub_date = models.DateField(
        'date published',
        auto_now_add=True)
    tags = models.ManyToManyField(
        Tag,
        blank=True,
        related_name='blog_posts')
    startups = models.ManyToManyField(

        Startup,