Example #1
0
    def save(self, *args, **kwargs):
        """
        Save the model
        :param args: For super()
        :param kwargs: For super()
        """

        # Avoid duplicate slug
        # FIXME AutoSlugField
        self.slug = unique_slug(AnnouncementTag, self, self.slug, 'slug', self.name)

        # Save the tag
        super(AnnouncementTag, self).save(*args, **kwargs)
Example #2
0
    def save(self, *args, **kwargs):
        """
        Save the license.
        :param args: For super()
        :param kwargs: For super()
        """

        # Avoid duplicate slug
        # FIXME AutoSlugField
        self.slug = unique_slug(License, self, self.slug, 'slug', self.name)

        # Render the description text
        self.render_description()

        # Save the license
        super(License, self).save(*args, **kwargs)
Example #3
0
    def save(self, *args, **kwargs):
        """
        Save the model
        :param args: For super()
        :param kwargs: For super()
        """

        # Avoid duplicate slug
        # FIXME AutoSlugField
        self.slug = unique_slug(Forum, self, self.slug, 'slug', self.title, {'parent': self.parent})

        # Render the description
        self.render_description()

        # Build complete slug hierarchy
        self.build_slug_hierarchy()

        # Save the forum
        super(Forum, self).save(*args, **kwargs)
Example #4
0
    def save(self, *args, **kwargs):
        """
        Save the announcement, fix non-unique slug, fix/update last content modification date and render the text.
        :param args: For super()
        :param kwargs: For super()
        """

        # Avoid duplicate slug
        # FIXME AutoSlugField
        self.slug = unique_slug(Announcement, self, self.slug, 'slug', self.title)

        # Fix the modification date if necessary
        self.fix_last_content_modification_date()

        # Render the content
        self.render_text()

        # Save the model
        super(Announcement, self).save(*args, **kwargs)
Example #5
0
    def save(self, *args, **kwargs):
        """
        Save the model
        :param args: For super()
        :param kwargs: For super()
        """

        # Avoid duplicate slug
        # FIXME AutoSlugField
        self.slug = unique_slug(ImageAttachment, self, self.slug, 'slug', self.title)

        # Render description text
        self.render_description()

        # Make the thumbnail versions
        self.make_thumbnails()

        # Save the attachment object
        super(ImageAttachment, self).save(*args, **kwargs)