Permalink
Browse files

Getting things to work

  • Loading branch information...
1 parent 10d4e25 commit 08bfadf31ca16b3166d3a767952240bbbf1d8d86 @pydanny committed Sep 8, 2009
Showing with 17 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +10 −0 admin.py
  3. +6 −0 models.py
View
1 .gitignore
@@ -0,0 +1 @@
+*pyc
View
10 admin.py
@@ -0,0 +1,10 @@
+from django.contrib import admin
+
+from wall.models import Post
+
+class PostAdmin(admin.ModelAdmin):
+ list_display = ('name', 'slug', 'creator', 'created')
+
+admin.site.register(Dance, DanceAdmin)
+
+
View
6 models.py
@@ -1,15 +1,21 @@
""" Sample model for group aware projects """
+import datetime
+
from django.db import models
+from django.contrib.auth.models import User
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
+from django.utils.translation import ugettext_lazy as _
class Post(models.Model):
# Sample text fields below
title = models.CharField(max_length=140)
+ creator = models.ForeignKey(User, verbose_name=_('creator'), related_name="%(class)s_created")
+ created = models.DateTimeField(_('created'), default=datetime.datetime.now)
# The following three fields are required for being group aware
object_id = models.IntegerField(null=True)

0 comments on commit 08bfadf

Please sign in to comment.