Created
January 19, 2012 03:20
-
-
Save Alir3z4/1637523 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.contrib import admin | |
from django.db import models | |
class Item(models.Model): | |
name = models.CharField(max_length=60) | |
created = models.DateTimeField(auto_now_add=True) | |
priority = models.IntegerField(default=0) | |
difficulty = models.IntegerField(default=0) | |
done = models.BooleanField(default=False) | |
class ItemAdmin(admin.ModelAdmin): | |
list_display = ["name", "priority", "difficulty", "created", "done"] | |
search_fields = ["name"] | |
admin.site.register(Item, ItemAdmin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment