Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Getting things to work

  • Loading branch information...
commit 08bfadf31ca16b3166d3a767952240bbbf1d8d86 1 parent 10d4e25
Daniel Greenfeld authored
Showing with 17 additions and 0 deletions.
  1. +1 −0  .gitignore
  2. +10 −0 admin.py
  3. +6 −0 models.py
1  .gitignore
View
@@ -0,0 +1 @@
+*pyc
10 admin.py
View
@@ -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)
+
+
6 models.py
View
@@ -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)
Please sign in to comment.
Something went wrong with that request. Please try again.