Created
July 10, 2012 19:46
-
-
Save ogonbat/3085771 to your computer and use it in GitHub Desktop.
models.py
This file contains hidden or 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 | |
__author__ = 'cingusoft' | |
from django.db import models | |
class Theme(models.Model): | |
name = models.CharField(max_length=125) | |
is_default = models.BooleanField(default=False) | |
created = models.DateTimeField(auto_now_add=True) | |
modified = models.DateTimeField(auto_now=True) | |
class ThemeAdmin(admin.ModelAdmin): | |
date_hierarchy = 'created' | |
list_display = ('name', 'is_default','created') | |
admin.site.register(Theme,ThemeAdmin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment