- {% if headersCount > 1 and decisionsCount > 1 and not filter %}
+ {% if headingCount > 1 and headingCount > 1 and not filter %}
Headings
- {% for header in headers %}
+ {% for heading in headings %}
{% endfor %}
{% endif %}
-
Decisions
+
Cases
- {% for decision in decisions %}
+ {% for case in cases %}
{% endfor %}
@@ -80,7 +80,7 @@
- {% if headersCount %}{{ headersCount }} Headers, {% endif %}{{ decisionsCount }} Decision{% if decisionsCount > 1 %}s{% endif %}
+ {% if headingCount %}{{ headingCount }} Headings, {% endif %}{{ caseCount }} Case{% if caseCount > 1 %}s{% endif %}
diff --git a/case_law/templates/case.html b/case_law/templates/case.html
new file mode 100644
index 0000000..0959b16
--- /dev/null
+++ b/case_law/templates/case.html
@@ -0,0 +1,19 @@
+{% extends 'base.html' %}
+{% load static %}
+
+{% block body %}
+
+
+
Synopsis
+ {% for heading in headings %}
+
{{ heading }}
+ {% endfor %}
+
{{ case.synopsis | linebreaks }}
+
Published: {{ case.published }}
+ {% if perms.case_law.view_pdf %}
+
View PDF
+
+ {% endif %}
+
+
+{% endblock %}
\ No newline at end of file
diff --git a/case_law/templates/decision.html b/case_law/templates/decision.html
deleted file mode 100644
index 68beb8b..0000000
--- a/case_law/templates/decision.html
+++ /dev/null
@@ -1,19 +0,0 @@
-{% extends 'base.html' %}
-{% load static %}
-
-{% block head %}
-
-{% endblock %}
-
-{% block body %}
-
-
-
Synopsis
-
Date: {{ decision.date }}
-
{{ decision.synopsis | linebreaks }}
- {% if perms.case_law.view_pdf %}
-
View PDF
- {% endif %}
-
-
-{% endblock %}
\ No newline at end of file
diff --git a/case_law/views.py b/case_law/views.py
index 8dcc86b..977e0a8 100644
--- a/case_law/views.py
+++ b/case_law/views.py
@@ -1,42 +1,42 @@
from django.shortcuts import render
-from .models import Decision, Subtitle
+from .models import Case, Heading
def browser(request):
- headers = {}
+ headings = {}
path = request.GET.get('path')
filter = request.GET.get('filter')
- decisions = Decision.objects.all()
+ cases = Case.objects.all()
if filter:
filter = filter.split('/')
print(filter)
- ids = Subtitle.objects.filter(name__in=filter).values_list('id')
+ ids = Heading.objects.filter(name__in=filter).values_list('id')
for id in ids:
- decisions = decisions.filter(headers__in=id)
+ cases = cases.filter(headings__in=id)
elif path:
path = path.split('/')
- ids = Subtitle.objects.filter(name__in=path).values_list('id')
+ ids = Heading.objects.filter(name__in=path).values_list('id')
for id in ids:
- decisions = decisions.filter(headers__in=id)
+ cases = cases.filter(headings__in=id)
- headers = set()
- for decision in decisions:
- headers = headers.union(decision.headers.all().values_list('name', flat=True))
- if path: headers = headers.difference(path)
+ headings = set()
+ for decision in cases:
+ headings = headings.union(decision.headings.all().values_list('name', flat=True))
+ if path: headings = headings.difference(path)
return render(request, 'browser.html', {
- 'allHeaders': Subtitle.objects.all().order_by('name'),
- 'decisions': decisions.order_by('synopsis'),
- 'decisionsCount': len(decisions),
+ 'allHeadings': Heading.objects.all().order_by('name'),
+ 'cases': cases.order_by('synopsis'),
+ 'caseCount': len(cases),
'filter': filter,
- 'headers': sorted(headers),
- 'headersCount': len(headers),
+ 'headings': sorted(headings),
+ 'headingCount': len(headings),
'url': request.GET.get('path'),
'urls': path
})
def case(request, id):
- decision = Decision.objects.get(id=id)
- return render(request, 'decision.html', {'decision': decision})
+ case = Case.objects.get(id=id)
+ return render(request, 'case.html', {'case': case, 'headings': case.headings.all()})
diff --git a/charter_members/migrations/__init__.py b/charter_members/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/expert_witnesses/migrations/__init__.py b/expert_witnesses/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/expert_witnesses/models.py b/expert_witnesses/models.py
index d569358..2fb1e0c 100644
--- a/expert_witnesses/models.py
+++ b/expert_witnesses/models.py
@@ -1,6 +1,6 @@
from django.db import models
-from case_law.models import Decision
+from case_law.models import Case
class AreaOfExpertise(models.Model):
@@ -15,7 +15,7 @@ class AreaOfExpertise(models.Model):
class Expert(models.Model):
- cases = models.ManyToManyField(Decision, null=True, blank=True)
+ cases = models.ManyToManyField(Case, null=True, blank=True)
expertise = models.ManyToManyField(AreaOfExpertise)
institute = models.CharField(max_length=255, null=True, blank=True)
name = models.CharField(max_length=255)
diff --git a/forum/migrations/__init__.py b/forum/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/main/migrations/__init__.py b/main/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/newsletters/migrations/__init__.py b/newsletters/migrations/__init__.py
new file mode 100644
index 0000000..e69de29