Merge branch 'Kerl/new_category' into 'master'
Kerl/new category Le nouvel ordre des catégories est : - Actif - Optionnel - À venir - Archive Fixes #4 See merge request !1
This commit is contained in:
commit
a51de1d7b6
4 changed files with 33 additions and 0 deletions
24
partitions/migrations/0007_add_category_optional.py
Normal file
24
partitions/migrations/0007_add_category_optional.py
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.db import models, migrations
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('partitions', '0006_partitionset_category_and_infos'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='partitionset',
|
||||||
|
name='category',
|
||||||
|
field=models.CharField(
|
||||||
|
default='incoming',
|
||||||
|
verbose_name='Types de partitions',
|
||||||
|
choices=[('active', 'Actif'), ('incoming', 'À venir'),
|
||||||
|
('old', 'Archive'), ('optional', 'Optionnel')],
|
||||||
|
max_length=8),
|
||||||
|
),
|
||||||
|
]
|
|
@ -7,6 +7,7 @@ PARTITION_TYPES = (
|
||||||
("active", "Actif"),
|
("active", "Actif"),
|
||||||
("incoming", "À venir"),
|
("incoming", "À venir"),
|
||||||
("old", "Archive"),
|
("old", "Archive"),
|
||||||
|
("optional", "Optionnel"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,13 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<h3 class="part">Partitions optionnelles</h3>
|
||||||
|
<ul class="filelist">
|
||||||
|
{% for part in optional_partitions %}
|
||||||
|
{% include "partitions/liste_item.html" with part=part %}
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
<h3 class="part">Partitions à venir</h3>
|
<h3 class="part">Partitions à venir</h3>
|
||||||
<ul class="filelist">
|
<ul class="filelist">
|
||||||
{% for part in incoming_partitions %}
|
{% for part in incoming_partitions %}
|
||||||
|
|
|
@ -18,6 +18,7 @@ def liste(request):
|
||||||
context = {
|
context = {
|
||||||
"request": request,
|
"request": request,
|
||||||
"active_partitions": partitions.filter(category="active").all(),
|
"active_partitions": partitions.filter(category="active").all(),
|
||||||
|
"optional_partitions": partitions.filter(category="optional").all(),
|
||||||
"incoming_partitions": partitions.filter(category="incoming").all(),
|
"incoming_partitions": partitions.filter(category="incoming").all(),
|
||||||
"old_partitions": partitions.filter(category="old").all()
|
"old_partitions": partitions.filter(category="old").all()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue