Commits

Steve Losh committed 93d0f89

Add the feedback app.

  • Participants
  • Parent commits e894941

Comments (0)

Files changed (4)

File feedback/__init__.py

Empty file added.

File feedback/admin.py

+from django.contrib import admin
+from noodlebucket.feedback.models import FeedbackRepoRequest
+
+class FeedbackRepoRequestAdmin(admin.ModelAdmin):
+    search_fields = ('author', 'repo_name', 'message')
+    list_filter = ('created', 'updated')
+
+admin.site.register(FeedbackRepoRequest, FeedbackRepoRequestAdmin)

File feedback/models.py

+from django.db import models
+
+class FeedbackRepoRequest(models.Model):
+    """A request for a repo to be added."""
+    
+    author = models.CharField(
+        max_length=100
+    )
+    repo_name = models.CharField(
+        max_length=200
+    )
+    message = models.TextField(
+        blank=True
+    )
+    
+    created = models.DateTimeField(null=False, blank=False, editable=False, auto_now_add=True)
+    updated = models.DateTimeField(null=False, blank=False, editable=False, auto_now=True)
+    
+    class Meta:
+        ordering = ['-created']
+        verbose_name = "repository request"
+    
+    
+    def __unicode__(self):
+        return u"Request: %s" % self.repo_name
+    
     'django.contrib.admin',
     'django.contrib.flatpages',
     'django.contrib.markup',
+    'noodlebucket.feedback',
     'gravatar',
     'typogrify',
 )