mirror of
https://github.com/jazzband/django-categories.git
synced 2026-03-16 22:30:24 +00:00
Added a description field
This commit is contained in:
parent
2e9cba224c
commit
598a418a0f
3 changed files with 7 additions and 0 deletions
3
categories/migration/add_description.sql
Normal file
3
categories/migration/add_description.sql
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
BEGIN;
|
||||
ALTER TABLE "categories_category" ADD COLUMN "description" varchar(255);
|
||||
COMMIT;
|
||||
3
categories/migration/drop_description.sql
Normal file
3
categories/migration/drop_description.sql
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
BEGIN;
|
||||
ALTER TABLE "categories_category" DROP COLUMN "description";
|
||||
COMMIT;
|
||||
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue