Esempio n. 1
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(DevSection,
                                     self,
                                     'title',
                                     title=self.title)
     return super(DevSection, self).save(*args, **kwargs)
Esempio n. 2
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(MovieList,
                                     self,
                                     'title',
                                     title=self.title)
     return super(MovieList, self).save(*args, **kwargs)
Esempio n. 3
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(ResearchBlogSeries,
                                     self,
                                     'title',
                                     title=self.title)
     return super(ResearchBlogSeries, self).save(*args, **kwargs)
Esempio n. 4
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(TransactionTag,
                                     self,
                                     'name',
                                     name=self.name)
     return super(TransactionTag, self).save(*args, **kwargs)
Esempio n. 5
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(JournalSection,
                                     self,
                                     'name',
                                     name=self.name)
     return super(JournalSection, self).save(*args, **kwargs)
Esempio n. 6
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(LifeXGoal,
                                     self,
                                     'title',
                                     title=self.title)
     return super(LifeXGoal, self).save(*args, **kwargs)
Esempio n. 7
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(LifeXCategory,
                                     self,
                                     'name',
                                     name=self.name)
     return super(LifeXCategory, self).save(*args, **kwargs)
Esempio n. 8
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(FinanceAccount,
                                     self,
                                     'name',
                                     name=self.name)
     return super(FinanceAccount, self).save(*args, **kwargs)
Esempio n. 9
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(BrainbankIdea, self, 'title')
     if self.body_type == 'markdown':
         self.body_text = markdown.markdown(
             self.body, extensions=ext_all, output_format='html5')
     else:
         self.body_text = self.body
     return super(BrainbankIdea, self).save(*args, **kwargs)
Esempio n. 10
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(BrainbankIdea, self, 'title')
     if self.body_type == 'markdown':
         self.body_text = markdown.markdown(self.body,
                                            extensions=ext_all,
                                            output_format='html5')
     else:
         self.body_text = self.body
     return super(BrainbankIdea, self).save(*args, **kwargs)
Esempio n. 11
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(JournalEntry, self, 'title')
     self.date_updated = timezone.now()
     if self.body_type == 'markdown':
         self.body_text = markdown.markdown(
             self.body, extensions=ext_formatting, output_format='html5')
     else:
         self.body_text = self.body
     return super(JournalEntry, self).save(*args, **kwargs)
Esempio n. 12
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(
             LifeXIdea, self, 'title', title=self.title)
     if self.body_type == 'markdown':
         self.body_text = markdown.markdown(
             self.description, extensions=ext_all, output_format='html5')
     else:
         self.body_text = self.description
     return super(LifeXIdea, self).save(*args, **kwargs)
Esempio n. 13
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(BrainbankPost, self, 'title')
     self.date_updated = timezone.now()
     if self.body_type == 'markdown':
         self.body_text = markdown.markdown(
             self.body, extensions=ext_all, output_format='html5')
     else:
         self.body_text = self.body
     super(BrainbankPost, self).save(*args, **kwargs)
Esempio n. 14
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(
             Story, self, 'title', title=self.title)
     self.date_updated = timezone.now()
     if self.body_type == 'markdown':
         self.body_text = markdown.markdown(
             self.body, extensions=ext_formatting, output_format='html5')
     else:
         self.body_text = self.body
     return super(Story, self).save(*args, **kwargs)
Esempio n. 15
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(
             LifeXBlog, self, 'title', title=self.title)
     self.date_updated = timezone.now()
     if self.body_type == 'markdown':
         self.body_text = markdown.markdown(
             self.body, extensions=ext_all, output_format='html5')
     else:
         self.body_text = self.body
     return super(LifeXBlog, self).save(*args, **kwargs)
Esempio n. 16
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(BrainbankPost, self, 'title')
     self.date_updated = timezone.now()
     if self.body_type == 'markdown':
         self.body_text = markdown.markdown(self.body,
                                            extensions=ext_all,
                                            output_format='html5')
     else:
         self.body_text = self.body
     super(BrainbankPost, self).save(*args, **kwargs)
Esempio n. 17
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(LifeXIdea,
                                     self,
                                     'title',
                                     title=self.title)
     if self.body_type == 'markdown':
         self.body_text = markdown.markdown(self.description,
                                            extensions=ext_all,
                                            output_format='html5')
     else:
         self.body_text = self.description
     return super(LifeXIdea, self).save(*args, **kwargs)
Esempio n. 18
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(
             LifeXExperiment, self, 'title', title=self.title)
     self.date_updated = timezone.now()
     if self.body_type == 'markdown':
         self.premise_body = markdown.markdown(
             self.premise, extensions=ext_all, output_format='html5')
         self.outcome_body = markdown.markdown(self.outcome, extensions=[
             'markdown.extensions.abbr',
             # 'markdown.extensions.codehilite',
             'markdown.extensions.smarty',
         ], output_format='html5')
     else:
         self.premise_body = self.premise
         self.outcome_body = self.outcome
     return super(LifeXExperiment, self).save(*args, **kwargs)
Esempio n. 19
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(LifeXExperiment,
                                     self,
                                     'title',
                                     title=self.title)
     self.date_updated = timezone.now()
     if self.body_type == 'markdown':
         self.premise_body = markdown.markdown(self.premise,
                                               extensions=ext_all,
                                               output_format='html5')
         self.outcome_body = markdown.markdown(
             self.outcome,
             extensions=[
                 'markdown.extensions.abbr',
                 # 'markdown.extensions.codehilite',
                 'markdown.extensions.smarty',
             ],
             output_format='html5')
     else:
         self.premise_body = self.premise
         self.outcome_body = self.outcome
     return super(LifeXExperiment, self).save(*args, **kwargs)
Esempio n. 20
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(Author, self, 'name', name=self.name)
     return super(Author, self).save(*args, **kwargs)
Esempio n. 21
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(Author, self, 'name', name=self.name)
     return super(Author, self).save(*args, **kwargs)
Esempio n. 22
0
    def save(self, password=False):
        if not self.slug:
            self.slug = get_unique_slug(Slug, self.name)

        super(Caterer, self).save()
Esempio n. 23
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(
             LifeXGoal, self, 'title', title=self.title)
     return super(LifeXGoal, self).save(*args, **kwargs)
Esempio n. 24
0
    def save(self, password=False):
        if not self.slug:
            self.slug = get_unique_slug(Slug, self.name)

        super(Caterer, self).save()
Esempio n. 25
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(
             LifeXCategory, self, 'name', name=self.name)
     return super(LifeXCategory, self).save(*args, **kwargs)
Esempio n. 26
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(
             ArticleSeries, self, 'title', title=self.title)
     return super(ArticleSeries, self).save(*args, **kwargs)
Esempio n. 27
0
 def save(self, *args, **kwargs):
     if self.pk is None:
         self.slug = get_unique_slug(
             JournalSection, self, 'name', name=self.name)
     return super(JournalSection, self).save(*args, **kwargs)