--- a/projects/admin.py Tue Mar 24 17:57:23 2009 -0400
+++ b/projects/admin.py Tue Mar 24 18:05:25 2009 -0400
@@ -1,4 +1,4 @@
-from stevelosh.projects.models import Project, ProjectFile, Comment
+from stevelosh.projects.models import Project, Comment
from django.contrib import admin
class ProjectAdmin(admin.ModelAdmin):
@@ -9,12 +9,6 @@
ordering = ('-posted',)
prepopulated_fields = { 'slug': ('name',) }
-class ProjectFileAdmin(admin.ModelAdmin):
- fields = ('title', 'description', 'project', 'file',)
- list_display = ('project', 'title', 'description',)
- search_fields = ('title', 'description',)
- list_filter = ('project',)
-
class CommentAdmin(admin.ModelAdmin):
fields = ('name', 'body', 'submitted', 'project', 'spam')
list_display = ('project', 'name', 'submitted', 'body', 'spam')
@@ -25,5 +19,4 @@
admin.site.register(Project, ProjectAdmin)
-admin.site.register(ProjectFile, ProjectFileAdmin)
admin.site.register(Comment, CommentAdmin)
--- a/projects/models.py Tue Mar 24 17:57:23 2009 -0400
+++ b/projects/models.py Tue Mar 24 18:05:25 2009 -0400
@@ -20,18 +20,6 @@
return u"%s" % (self.name,)
-class ProjectFile(models.Model):
- """A single file for a project."""
-
- title = models.CharField(blank=False, max_length=140)
- description = models.TextField(blank=True, null=True)
- file = models.FileField(upload_to='storage/projects/files')
- project = models.ForeignKey(Project)
-
- def __unicode__(self):
- return u"%s - %s" % (self.project.name, self.title)
-
-
class Comment(models.Model):
name = models.CharField(blank=False, null=False, max_length=40)
body = models.TextField(blank=False, null=False)