1
+ # Third-party
1
2
from django .db import models
2
3
from django .utils .translation import gettext_lazy as _
3
-
4
4
from django_countries .fields import CountryField
5
5
from markdownx .models import MarkdownxField
6
6
from ordered_model .models import OrderedModel
@@ -12,7 +12,8 @@ class BaseModel(models.Model):
12
12
blank = True , null = True , help_text = "Internal notes or description."
13
13
)
14
14
created_at = models .DateTimeField (
15
- auto_now_add = True , help_text = "A timestamp of when the object is first created."
15
+ auto_now_add = True ,
16
+ help_text = "A timestamp of when the object is first created." ,
16
17
)
17
18
updated_at = models .DateTimeField (
18
19
auto_now = True ,
@@ -24,13 +25,16 @@ class Meta:
24
25
25
26
26
27
class LegalResource (BaseModel ):
27
- """Abstract Class to contain the commons attributes of Cases and Scholarship"""
28
+ """
29
+ Abstract Class to contain the commons attributes of Cases and Scholarship
30
+ """
28
31
29
32
license = models .CharField (
30
33
max_length = 50 ,
31
34
blank = True ,
32
35
null = True ,
33
- help_text = "The Creative Commons licence associated to the legal resource." ,
36
+ help_text = "The Creative Commons licence associated to the legal"
37
+ " resource." ,
34
38
)
35
39
contributor_name = models .CharField (max_length = 120 )
36
40
contributor_email = models .EmailField ()
@@ -67,42 +71,47 @@ class Case(LegalResource):
67
71
max_length = 200 ,
68
72
blank = True ,
69
73
null = True ,
70
- help_text = "If there are multiple lawsuits between the parties, please just "
71
- "include one here and note the others in the related cases field." ,
74
+ help_text = "If there are multiple lawsuits between the parties, please"
75
+ " just include one here and note the others in the related cases"
76
+ " field." ,
72
77
)
73
78
related_cases = models .CharField (
74
79
max_length = 255 ,
75
80
blank = True ,
76
81
null = True ,
77
- help_text = "If there are multiple lawsuits between the parties in this dispute, "
78
- "please note additional cases here." ,
82
+ help_text = "If there are multiple lawsuits between the parties in this"
83
+ " dispute, please note additional cases here." ,
84
+ )
85
+ country = CountryField (
86
+ blank_label = "Select a country" , blank = True , null = True
79
87
)
80
- country = CountryField (blank_label = "Select a country" , blank = True , null = True )
81
88
courts = models .CharField (
82
89
max_length = 255 ,
83
90
blank = True ,
84
91
null = True ,
85
- help_text = "The original court name and/or English translation. If the lawsuit "
86
- "was filed in one court and then went to another court on appeal, please note "
87
- "all relevant courts here." ,
92
+ help_text = "The original court name and/or English translation. If the"
93
+ " lawsuit was filed in one court and then went to another court on"
94
+ " appeal, please note all relevant courts here." ,
88
95
)
89
96
background = models .TextField (
90
97
blank = True ,
91
98
null = True ,
92
- help_text = "Describe the factual information that led to the lawsuit "
93
- "being filed, and explain what claims were filed in the lawsuit." ,
99
+ help_text = "Describe the factual information that led to the lawsuit"
100
+ " being filed, and explain what claims were filed in the lawsuit." ,
94
101
)
95
102
decision_year = models .PositiveSmallIntegerField (
96
103
blank = True , null = True , help_text = "Year of case resolution."
97
104
)
98
105
is_pending = models .BooleanField (
99
- blank = True , null = True , help_text = "Indicate if is an ongoing case or not."
106
+ blank = True ,
107
+ null = True ,
108
+ help_text = "Indicate if is an ongoing case or not." ,
100
109
)
101
110
links = models .ManyToManyField (
102
111
Link ,
103
- help_text = "Include any links to pleadings, briefs, and opinions in the "
104
- "lawsuit, as well as blog posts, academic articles, or other relevant "
105
- "materials." ,
112
+ help_text = "Include any links to pleadings, briefs, and opinions in the"
113
+ " lawsuit, as well as blog posts, academic articles, or other relevant"
114
+ " materials." ,
106
115
)
107
116
108
117
def __str__ (self ):
0 commit comments