@@ -43,7 +43,8 class JROReport(models.Model): | |||||
43 | description = models.CharField(max_length=260) |
|
43 | description = models.CharField(max_length=260) | |
44 | date = models.DateField(default=datetime.date(2020,1,1)) |
|
44 | date = models.DateField(default=datetime.date(2020,1,1)) | |
45 | image = models.ImageField(upload_to='%Y/images/') |
|
45 | image = models.ImageField(upload_to='%Y/images/') | |
46 | upload = models.FileField(upload_to='%Y/') |
|
46 | upload = models.FileField(upload_to='%Y/', verbose_name='Spanish file') | |
|
47 | upload_en = models.FileField(upload_to='%Y/', verbose_name='English file', null=True, blank=True) | |||
47 |
|
48 | |||
48 | def __str__(self): |
|
49 | def __str__(self): | |
49 | return self.title |
|
50 | return self.title |
@@ -38,7 +38,10 | |||||
38 | <div class="col-md-6 mt-4 pl-5 border-left"> |
|
38 | <div class="col-md-6 mt-4 pl-5 border-left"> | |
39 | <h3>{{obj.title}}</h3> |
|
39 | <h3>{{obj.title}}</h3> | |
40 | <p>{{obj.description|truncatechars:160}}</p> |
|
40 | <p>{{obj.description|truncatechars:160}}</p> | |
41 |
<a class="btn btn-primary mt-2" |
|
41 | <a class="btn btn-primary mt-2" href="{% static 'reports' %}{{obj.upload.url}}" download>Spanish Version</a> | |
|
42 | {% if obj.upload_en %} | |||
|
43 | <a class="btn btn-primary mt-2" href="{% static 'reports' %}{{obj.upload_en.url}}" download>English Version</a> | |||
|
44 | {% endif %} | |||
42 | </div> |
|
45 | </div> | |
43 | </div> |
|
46 | </div> | |
44 |
|
47 |
@@ -47,7 +47,7 | |||||
47 | <h3>Regional Magnetic Indices</h3> |
|
47 | <h3>Regional Magnetic Indices</h3> | |
48 | <p class="">Magnetic indices, are used to characterize the magnitude of geomagnetic storms. These indices are derived from a Peruvian magnetormeters stations.</p> |
|
48 | <p class="">Magnetic indices, are used to characterize the magnitude of geomagnetic storms. These indices are derived from a Peruvian magnetormeters stations.</p> | |
49 | <select id="index-type" class="form-control tools-input"> |
|
49 | <select id="index-type" class="form-control tools-input"> | |
50 |
<option value="K">K |
|
50 | <option value="K">K index</option> | |
51 | <option value="D">Delta-H</option> |
|
51 | <option value="D">Delta-H</option> | |
52 | </select> |
|
52 | </select> | |
53 | <select id="index-station" class="form-control tools-input mt-2"> |
|
53 | <select id="index-station" class="form-control tools-input mt-2"> |
General Comments 0
You need to be logged in to leave comments.
Login now