Comments

nitely

- 3
- 4h

texto normal
texto en negrita
texto en italica

- item de lista
- item de lista

texto del enlace

text

some text some more

@estecb

> quote
> line quote
> some more text text text text text text
> some more text text text text text text

texto normal

- report
- share
- like
- reply

close

nitely

- 3
- 4h

Comment text

- report
- like
- reply

nitely
This comment was deleted
nitely

- 3
- 4h

text

`this is an inline code block`

    #-*- coding: utf-8 -*-

    from django.db import models
    from django.utils.translation import ugettext as _
    from django.core.urlresolvers import reverse
    from django.utils.encoding import python_2_unicode_compatible

    from spirit.managers.category import CategoryManager
    from spirit.utils.models import AutoSlugField

    @python_2_unicode_compatible
    class Category(models.Model):

        parent = models.ForeignKey('self', verbose_name=_("category parent"), null=True, blank=True)

        title = models.CharField(_("title"), max_length=75)
        slug = AutoSlugField(populate_from="title", db_index=False, blank=True)
        description = models.CharField(_("description"), max_length=255, blank=True)
        is_closed = models.BooleanField(_("closed"), default=False)
        is_removed = models.BooleanField(_("removed"), default=False)
        is_private = models.BooleanField(_("private"), default=False)

        #topic_count = models.PositiveIntegerField(_("topic count"), default=0)

        objects = CategoryManager()

        class Meta:
            app_label = 'spirit'
            ordering = ['title', ]
            verbose_name = _("category")
            verbose_name_plural = _("categories")

        def get_absolute_url(self):
            return reverse('spirit:category-detail', kwargs={'pk': str(self.id), 'slug': self.slug})

        @property
        def is_subcategory(self):
            if self.parent_id:
                return True
            else:
                return False

        def __str__(self):
            if self.parent:
                return "%s, %s" % (self.parent.title, self.title)
            else:
                return self.title

- report
- like
- reply

nitely

- 3
- 4h

This topi is now closed

nitely Esteban Castro Borsani

- 3
- 4h

Comment text

- report
- like
- reply

- Page 1 of 3
- First
- Last

Notify me