0
@@ -12,7 +12,6 @@ from lifeflow.text_filters import entry_markup
0
class Author(models.Model):
0
name = models.CharField(max_length=100)
0
slug = models.SlugField(
0
- prepopulate_from=('name',),
0
help_text="Automatically built from author's name.",
0
link = models.CharField(
0
@@ -34,10 +33,6 @@ class Author(models.Model):
0
- list_display = ('name', 'link')
0
- search_fields = ['name']
0
@@ -64,10 +59,6 @@ class Comment(models.Model):
0
- list_display = ('entry', 'name', 'email', 'webpage', 'date')
0
- search_fields = ['name', 'email','body']
0
if self.name == u"name" or self.name == u"":
0
self.name = u"anonymous"
0
@@ -96,7 +87,6 @@ class Comment(models.Model):
0
class Draft(models.Model):
0
title = models.CharField(max_length=200, blank=True, null=True)
0
slug = models.SlugField(unique_for_date='pub_date',
0
- prepopulate_from=('title',),
0
summary = models.TextField(blank=True, null=True)
0
body = models.TextField(blank=True, null=True)
0
@@ -130,7 +120,6 @@ class Entry(models.Model):
0
slug = models.SlugField(
0
unique_for_date='pub_date',
0
- prepopulate_from=('title',),
0
help_text='Automatically built from the title.'
0
summary = models.TextField(help_text="One paragraph. Don't add <p> tag.")
0
@@ -158,23 +147,23 @@ class Entry(models.Model):
0
help_text="If true users may add comments on this entry.",
0
flows = models.ManyToManyField(
0
- 'Flow',
filter_interface=models.HORIZONTAL, blank=True, null=True,
0
+ 'Flow',
blank=True, null=True,
0
help_text="Determine which pages and feeds to show entry on.",
0
tags = models.ManyToManyField(
0
- 'Tag',
filter_interface=models.HORIZONTAL, blank=True, null=True,
0
+ 'Tag',
blank=True, null=True,
0
help_text="Select tags to associate with this entry.",
0
series = models.ManyToManyField(
0
- 'Series',
filter_interface=models.HORIZONTAL, blank=True, null=True,
0
+ 'Series',
blank=True, null=True,
0
help_text='Used to associated groups of entries together under one theme.',
0
resources = models.ManyToManyField(
0
- 'Resource',
filter_interface=models.HORIZONTAL, blank=True, null=True,
0
+ 'Resource',
blank=True, null=True,
0
help_text='Files or images used in entries. MarkDown links are automatically generated.',
0
authors = models.ManyToManyField(
0
- 'Author',
filter_interface=models.HORIZONTAL, blank=True, null=True,
0
+ 'Author',
blank=True, null=True,
0
help_text='The authors associated with this entry.',
0
# main manager, allows access to all entries, required primarily for admin functionality
0
@@ -187,19 +176,6 @@ class Entry(models.Model):
0
get_latest_by = 'pub_date'
0
verbose_name_plural = "entries"
0
- list_display = ('title', 'pub_date')
0
- search_fields = ['title', 'summary', 'body']
0
- (None, {'fields' : ('title', 'slug', 'pub_date',)}),
0
- ('Content', {'fields': ('summary', 'body',)}),
0
- ('Options', {'fields': ('use_markdown', 'is_translation', 'send_ping', 'allow_comments', ), 'classes': 'collapse'}),
0
- ('Authors', {'fields' : ('authors',), 'classes': 'collapse'}),
0
- ('Resources', {'fields' : ('resources',), 'classes': 'collapse'}),
0
- ('Series', {'fields': ('series',), 'classes': 'collapse'}),
0
- ('Organization', {'fields': ('flows', 'tags',),}),
0
@@ -315,10 +291,7 @@ class Flow(models.Model):
0
at /slug/ instead of /tags/slug/
0
title = models.CharField(max_length=100)
0
- slug = models.SlugField(prepopulate_from=("title",))
0
+ slug = models.SlugField()
0
@@ -335,10 +308,7 @@ class Flow(models.Model):
0
class Language(models.Model):
0
title = models.CharField(max_length=50, core=True)
0
- slug = models.SlugField(prepopulate_from=("title",))
0
+ slug = models.SlugField()
0
@@ -357,7 +327,6 @@ class Project(models.Model):
0
title = models.CharField(max_length=50)
0
slug = models.SlugField(
0
- prepopulate_from=('title',),
0
help_text='Automatically built from the title.'
0
summary = models.TextField(help_text="One paragraph. Don't add <p> tag.")
0
@@ -373,7 +342,7 @@ class Project(models.Model):
0
help_text="The license under which the project is released.",
0
- resources = models.ManyToManyField('Resource',
filter_interface=models.HORIZONTAL, blank=True, null=True)
0
+ resources = models.ManyToManyField('Resource',
blank=True, null=True)
0
@@ -388,14 +357,6 @@ class Project(models.Model):
0
- list_display = ('title', 'language', 'license', 'size',)
0
- search_fields = ['title', 'summary', 'body']
0
- 'fields' : ('title', 'slug', 'size', 'language', 'license', 'use_markdown',)}),
0
- ('Content', {'fields': ('summary', 'body', 'resources')}),
0
@@ -426,8 +387,6 @@ class Resource(models.Model):
0
markdown_id = models.CharField(max_length=50)
0
content = models.FileField(upload_to="lifeflow/resource")
0
def get_relative_url(self):
0
# figure out why I named this relative instead of absolute
0
@@ -447,8 +406,6 @@ class RecommendedSite(models.Model):
0
title = models.CharField(max_length=50)
0
url = models.URLField()
0
return u"%s ==> %s" % (self.title, self.url)
0
@@ -459,14 +416,12 @@ class Series(models.Model):
0
A series is a collection of Entry instances on the same theme.
0
title = models.CharField(max_length=200, core=True)
0
- slug= models.SlugField(
prepopulate_from=("title",))
0
+ slug= models.SlugField(
)
0
verbose_name_plural = "Series"
0
@@ -508,8 +463,6 @@ class SiteToNotify(models.Model):
0
verbose_name_plural = "Sites to Notify"
0
@@ -524,10 +477,8 @@ class SiteToNotify(models.Model):
0
class Tag(models.Model):
0
"Tags are associated with Entry instances to describe their contents."
0
title = models.CharField(max_length=50, core=True)
0
- slug = models.SlugField(
prepopulate_from=("title",))
0
+ slug = models.SlugField(
)
0
@@ -575,9 +526,7 @@ class Translation(models.Model):
0
language = models.ForeignKey('Language')
0
original = models.ForeignKey('Entry')
0
translated = models.ForeignKey('Entry', related_name="translated")
0
return u"Translation of %s into %s" % (self.original, self.language,)