Skip to content

Commit

Permalink
Added a description field
Browse files Browse the repository at this point in the history
  • Loading branch information
Corey Oordt committed Oct 6, 2009
1 parent 2e9cba2 commit 598a418
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions categories/migration/add_description.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BEGIN;
ALTER TABLE "categories_category" ADD COLUMN "description" varchar(255);
COMMIT;
3 changes: 3 additions & 0 deletions categories/migration/drop_description.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
BEGIN;
ALTER TABLE "categories_category" DROP COLUMN "description";
COMMIT;
1 change: 1 addition & 0 deletions categories/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class Category(models.Model):
help_text="Leave this blank for an Category Tree",
verbose_name='Parent')
name = models.CharField(max_length=100)
description = models.CharField(blank=True, null=True, max_length=255)
order = models.IntegerField(blank=True, null=True)
slug = models.SlugField()

Expand Down

0 comments on commit 598a418

Please sign in to comment.