public
Description: A full featured and opinionated blogging solution using Django
Homepage: http://lethain.com/projects/lifeflow/
Clone URL: git://github.com/lethain/lifeflow.git
Added newforms-admin support.
lukeman (author)
Mon Aug 04 21:11:51 -0700 2008
commit  e0e5cdcabfce4368a17ef9d7911e890fa503d7ea
tree    1840fb2ea06a5f7e22f2d817b2031a536ee9574f
parent  3db4ac97b4fe707eafb3afc9106d431234c95c25
...
12
13
14
15
16
17
18
...
34
35
36
37
38
39
40
41
42
43
...
64
65
66
67
68
69
70
71
72
73
...
96
97
98
99
100
101
102
...
130
131
132
133
134
135
136
...
158
159
160
161
 
162
163
164
165
 
166
167
168
169
 
170
171
172
173
 
174
175
176
177
 
178
179
180
...
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
...
315
316
317
318
319
320
321
 
322
323
324
...
335
336
337
338
339
340
341
 
342
343
344
...
357
358
359
360
361
362
363
...
373
374
375
376
 
377
378
379
...
388
389
390
391
392
393
394
395
396
397
398
399
400
401
...
426
427
428
429
430
431
432
433
...
447
448
449
450
451
452
453
454
...
459
460
461
462
 
463
464
465
466
467
468
469
470
471
472
...
508
509
510
511
512
513
514
515
...
524
525
526
527
 
528
529
530
531
532
533
...
575
576
577
578
579
580
 
581
582
583
...
12
13
14
 
15
16
17
...
33
34
35
 
 
 
 
36
37
38
...
59
60
61
 
 
 
 
62
63
64
...
87
88
89
 
90
91
92
...
120
121
122
 
123
124
125
...
147
148
149
 
150
151
152
153
 
154
155
156
157
 
158
159
160
161
 
162
163
164
165
 
166
167
168
169
...
176
177
178
 
 
 
 
 
 
 
 
 
 
 
 
 
179
180
181
...
291
292
293
 
 
 
 
294
295
296
297
...
308
309
310
 
 
 
 
311
312
313
314
...
327
328
329
 
330
331
332
...
342
343
344
 
345
346
347
348
...
357
358
359
 
 
 
 
 
 
 
 
360
361
362
...
387
388
389
 
 
390
391
392
...
406
407
408
 
 
409
410
411
...
416
417
418
 
419
420
421
422
423
424
 
 
425
426
427
...
463
464
465
 
 
466
467
468
...
477
478
479
 
480
481
 
 
482
483
484
...
526
527
528
 
 
 
529
530
531
532
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
         )
0
     link = models.CharField(
0
@@ -34,10 +33,6 @@ class Author(models.Model):
0
     class Meta:
0
         ordering = ('id',)
0
 
0
-    class Admin:
0
-        list_display = ('name', 'link')
0
-        search_fields = ['name']
0
-
0
     def __unicode__(self):
0
         return self.name
0
 
0
@@ -64,10 +59,6 @@ class Comment(models.Model):
0
     class Meta:
0
         ordering = ('-date',)
0
 
0
-    class Admin:
0
-        list_display = ('entry', 'name', 'email', 'webpage', 'date')
0
-        search_fields = ['name', 'email','body']
0
-
0
     def save(self):
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
                             blank=True, null=True)
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
         )
0
     slug = models.SlugField(
0
         unique_for_date='pub_date',
0
-        prepopulate_from=('title',),
0
         help_text='Automatically built from the title.'
0
         )
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
         )
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
         )
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
         )
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
         )
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
         )
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
         )
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
 
0
-    class Admin:
0
-        list_display = ('title', 'pub_date')
0
-        search_fields = ['title', 'summary', 'body']
0
-        fields = (
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
-            )
0
-
0
     def __unicode__(self):
0
         return self.title
0
 
0
@@ -315,10 +291,7 @@ class Flow(models.Model):
0
     at /slug/ instead of /tags/slug/
0
     """
0
     title = models.CharField(max_length=100)
0
-    slug = models.SlugField(prepopulate_from=("title",))
0
-
0
-    class Admin:
0
-        pass
0
+    slug = models.SlugField()
0
 
0
     def __unicode__(self):
0
         return self.title
0
@@ -335,10 +308,7 @@ class Flow(models.Model):
0
 
0
 class Language(models.Model):
0
     title = models.CharField(max_length=50, core=True)
0
-    slug = models.SlugField(prepopulate_from=("title",))
0
-
0
-    class Admin:
0
-        pass
0
+    slug = models.SlugField()
0
 
0
     def __unicode__(self):
0
         return self.title
0
@@ -357,7 +327,6 @@ class Project(models.Model):
0
     """
0
     title = models.CharField(max_length=50)
0
     slug = models.SlugField(
0
-        prepopulate_from=('title',),
0
         help_text='Automatically built from the title.'
0
         )
0
     summary = models.TextField(help_text="One paragraph. Don't add <p> tag.")
0
@@ -373,7 +342,7 @@ class Project(models.Model):
0
         max_length=50,
0
         help_text="The license under which the project is released.",
0
         )
0
-    resources = models.ManyToManyField('Resource', filter_interface=models.HORIZONTAL, blank=True, null=True)
0
+    resources = models.ManyToManyField('Resource', blank=True, null=True)
0
     SIZE_CHOICES = (
0
         ('0', 'Script'),
0
         ('1', 'Small'),
0
@@ -388,14 +357,6 @@ class Project(models.Model):
0
     class Meta:
0
         ordering = ('-size',)
0
 
0
-    class Admin:
0
-        list_display = ('title', 'language', 'license', 'size',)
0
-        search_fields = ['title', 'summary', 'body']
0
-        fields = (
0
-            (None, {
0
-                    'fields' : ('title', 'slug', 'size', 'language', 'license', 'use_markdown',)}),
0
-            ('Content', {'fields': ('summary', 'body', 'resources')}),
0
-            )
0
    
0
     def __unicode__(self):
0
         return self.title
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
 
0
-    class Admin:
0
-        pass
0
 
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
 
0
-    class Admin:
0
-        pass
0
 
0
     def __unicode__(self):
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
     """
0
     title = models.CharField(max_length=200, core=True)
0
-    slug= models.SlugField(prepopulate_from=("title",))
0
+    slug= models.SlugField()
0
 
0
     class Meta:
0
         ordering = ('-id',)
0
         verbose_name_plural = "Series"
0
 
0
-    class Admin:
0
-        pass
0
 
0
     def __unicode__(self):
0
         return self.title
0
@@ -508,8 +463,6 @@ class SiteToNotify(models.Model):
0
     class Meta:
0
         verbose_name_plural = "Sites to Notify"
0
 
0
-    class Admin:
0
-        pass
0
 
0
     def __unicode__(self):
0
         return self.title
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
 
0
-    class Admin:
0
-        pass
0
 
0
     class Meta:
0
         ordering = ('title',)
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
-
0
-    class Admin:
0
-        pass
0
+    
0
 
0
     def __unicode__(self):
0
         return u"Translation of %s into %s" % (self.original, self.language,)

Comments