aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--admin.py4
-rw-r--r--models.py3
2 files changed, 4 insertions, 3 deletions
diff --git a/admin.py b/admin.py
index e17948a..c93b6b3 100644
--- a/admin.py
+++ b/admin.py
@@ -44,12 +44,12 @@ class TimetableAdmin(admin.ModelAdmin):
class GroupAdmin(admin.ModelAdmin):
fieldsets = (
(None, {"fields": ("name", "celcat_name", "timetable", "hidden",)}),
- ("Groupes", {"fields": ("mention", "subgroup", "td", "tp", "parent",)}),)
+ ("Groupes", {"fields": ("mention", "subgroup",)}),)
list_display = ("name", "timetable", "hidden",)
list_editable = ("hidden",)
list_filter = ("timetable",)
ordering = ("timetable",)
- readonly_fields = ("celcat_name", "mention", "subgroup", "td", "tp",)
+ readonly_fields = ("celcat_name", "mention",)
actions = (make_hidden, make_visible,)
diff --git a/models.py b/models.py
index bfc026b..868cbd1 100644
--- a/models.py
+++ b/models.py
@@ -90,8 +90,9 @@ class Group(models.Model):
verbose_name="emploi du temps")
mention = models.CharField(max_length=128)
- subgroup = models.CharField(max_length=1, verbose_name="sous-groupe",
+ subgroup = models.CharField(max_length=16, verbose_name="sous-groupe",
null=True)
+
slug = models.SlugField(max_length=64, default="")
hidden = models.BooleanField(verbose_name="caché", default=False)