Added glossary and acknowledgement pages, and reworked the structure of the theory pages.
This commit is contained in:
@@ -3,10 +3,11 @@ Configuration for the Django admin site
|
||||
"""
|
||||
|
||||
from django.contrib import admin
|
||||
from three_d_viewer.models import Category, Sample, Question, Answer, Mineral
|
||||
from three_d_viewer.models import Category, Sample, Question, Answer, Mineral, GlossaryEntry
|
||||
|
||||
admin.site.register(Category)
|
||||
admin.site.register(Sample)
|
||||
admin.site.register(Question)
|
||||
admin.site.register(Answer)
|
||||
admin.site.register(Mineral)
|
||||
admin.site.register(GlossaryEntry)
|
||||
|
||||
78
three_d_viewer/migrations/0007_auto__add_glossaryentry.py
Normal file
78
three_d_viewer/migrations/0007_auto__add_glossaryentry.py
Normal file
@@ -0,0 +1,78 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import datetime
|
||||
from south.db import db
|
||||
from south.v2 import SchemaMigration
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(SchemaMigration):
|
||||
|
||||
def forwards(self, orm):
|
||||
# Adding model 'GlossaryEntry'
|
||||
db.create_table(u'three_d_viewer_glossaryentry', (
|
||||
(u'id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('name', self.gf('django.db.models.fields.CharField')(max_length=200)),
|
||||
('definition', self.gf('django.db.models.fields.CharField')(max_length=2000)),
|
||||
))
|
||||
db.send_create_signal(u'three_d_viewer', ['GlossaryEntry'])
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
# Deleting model 'GlossaryEntry'
|
||||
db.delete_table(u'three_d_viewer_glossaryentry')
|
||||
|
||||
|
||||
models = {
|
||||
u'three_d_viewer.answer': {
|
||||
'Meta': {'object_name': 'Answer'},
|
||||
'correct': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'question': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'answers'", 'to': u"orm['three_d_viewer.Question']"}),
|
||||
'text': ('django.db.models.fields.CharField', [], {'max_length': '2000'})
|
||||
},
|
||||
u'three_d_viewer.category': {
|
||||
'Meta': {'object_name': 'Category'},
|
||||
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['three_d_viewer.Category']"})
|
||||
},
|
||||
u'three_d_viewer.glossaryentry': {
|
||||
'Meta': {'object_name': 'GlossaryEntry'},
|
||||
'definition': ('django.db.models.fields.CharField', [], {'max_length': '2000'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'})
|
||||
},
|
||||
u'three_d_viewer.mineral': {
|
||||
'Meta': {'object_name': 'Mineral', '_ormbases': [u'three_d_viewer.Sample']},
|
||||
'chemical_formula': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
|
||||
'cleavage_fracture': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
|
||||
'colour': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
|
||||
'crystallography': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
|
||||
'habit': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'blank': 'True'}),
|
||||
'hardness': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '3', 'decimal_places': '2', 'blank': 'True'}),
|
||||
'identifying_features': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'blank': 'True'}),
|
||||
'lustre': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}),
|
||||
'occurance': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'blank': 'True'}),
|
||||
u'sample_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['three_d_viewer.Sample']", 'unique': 'True', 'primary_key': 'True'}),
|
||||
'specific_gravity': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '4', 'decimal_places': '2', 'blank': 'True'}),
|
||||
'streak': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'})
|
||||
},
|
||||
u'three_d_viewer.question': {
|
||||
'Meta': {'object_name': 'Question'},
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'sample': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'questions'", 'to': u"orm['three_d_viewer.Sample']"}),
|
||||
'text': ('django.db.models.fields.CharField', [], {'max_length': '2000'})
|
||||
},
|
||||
u'three_d_viewer.sample': {
|
||||
'Meta': {'object_name': 'Sample'},
|
||||
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||
'description': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '2000', 'null': 'True', 'blank': 'True'}),
|
||||
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'model_filename': ('django.db.models.fields.CharField', [], {'max_length': '1000'}),
|
||||
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||
'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'samples'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['three_d_viewer.Category']"})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['three_d_viewer']
|
||||
@@ -43,6 +43,9 @@ class Category(CommonInfo):
|
||||
def active_samples(self):
|
||||
return self.samples.select_subclasses(Sample, Mineral).filter(active=True).order_by('name')
|
||||
|
||||
class Meta:
|
||||
verbose_name_plural = "Categories"
|
||||
|
||||
|
||||
class Sample(CommonInfo):
|
||||
"""
|
||||
@@ -135,3 +138,16 @@ class Answer(models.Model):
|
||||
|
||||
def __unicode__(self):
|
||||
return self.text
|
||||
|
||||
class GlossaryEntry(models.Model):
|
||||
"""
|
||||
A glossary entry
|
||||
"""
|
||||
name = models.CharField(max_length=200)
|
||||
definition = models.CharField(max_length=2000)
|
||||
|
||||
def __unicode__(self):
|
||||
return self.name
|
||||
|
||||
class Meta:
|
||||
verbose_name_plural = "Glossary Entries"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDown"></div>
|
||||
<div id="mainText">
|
||||
<p><h3>Acknowledgements</h3><br><br>
|
||||
3DVOL is funded by the QUT Teaching and Learning Unit and the School of Earth, Environmental, and Biological Sciences. QUT High Performance Computing provides technical support.
|
||||
</p>
|
||||
</div><!-- CLOSE MAINTEXT !-->
|
||||
{% endblock %}
|
||||
@@ -26,11 +26,11 @@
|
||||
<li class='active mainitem'><a href="{% url 'three_d_viewer:home' %}"><span>Home</span></a></li>
|
||||
<li class='has-sub mainitem'><a href='#'><span>Minerals</span></a>
|
||||
<ul>
|
||||
<li class='has-sub'><a href="{% url 'three_d_viewer:minerals_theory' %}"><span>Theory</span></a>
|
||||
<li class='has-sub'><a><span>Theory</span></a>
|
||||
<ul>
|
||||
<li><a href="{% url 'three_d_viewer:minerals_theory' %}"><span>Structure of Earth</span></a></li>
|
||||
<li><a href="{% url 'three_d_viewer:minerals_theory' %}"><span>Pressure and temperature</span></a></li>
|
||||
<li class='last'><a href="{% url 'three_d_viewer:minerals_theory' %}"><span>Bowen's reaction series</span></a></li>
|
||||
<li><a href="{% url 'three_d_viewer:theory_structure' %}"><span>Structure of Earth</span></a></li>
|
||||
<li><a href="{% url 'three_d_viewer:theory_pt' %}"><span>Pressure and temperature</span></a></li>
|
||||
<li class='last'><a href="{% url 'three_d_viewer:theory_bowen' %}"><span>Bowen's reaction series</span></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="{% url 'three_d_viewer:minerals_practice' %}"><span>Practice</span></a></li>
|
||||
@@ -52,9 +52,9 @@
|
||||
</div><!-- CLOSE WRAPPER !-->
|
||||
<div id="footer">
|
||||
<ul>
|
||||
<li><a href="#">Glossary</a></li>
|
||||
<li><a href="{% url 'three_d_viewer:glossary' %}">Glossary</a></li>
|
||||
<li> - </li>
|
||||
<li><a href="#">Acknowledgements</a></li>
|
||||
<li><a href="{% url 'three_d_viewer:acknowledgements' %}">Acknowledgements</a></li>
|
||||
</ul>
|
||||
</div><!-- CLOSE FOOTER !-->
|
||||
</body>
|
||||
|
||||
16
three_d_viewer/templates/three_d_viewer/glossary.html
Normal file
16
three_d_viewer/templates/three_d_viewer/glossary.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDown"></div>
|
||||
<div id="mainText">
|
||||
<p><h3>Glossary</h3><br><br>
|
||||
<table>
|
||||
{% for entry in entries %}
|
||||
<tr>
|
||||
<td><p>{{ entry.name }}</p></td>
|
||||
<td><p>{{ entry.definition }}</p></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -19,10 +19,6 @@
|
||||
We hope that you enjoy using 3DVOL.
|
||||
<br><br>
|
||||
Your 3DVOL team
|
||||
<br><br>
|
||||
Acknowledgements
|
||||
<br>
|
||||
3DVOL is funded by the QUT Teaching and Learning Unit and the School of Earth, Environmental, and Biological Sciences. QUT High Performance Computing provides technical support.
|
||||
</p>
|
||||
</div><!-- CLOSE MAINTEXT !-->
|
||||
{% endblock %}
|
||||
25
three_d_viewer/templates/three_d_viewer/theory/bowen.html
Normal file
25
three_d_viewer/templates/three_d_viewer/theory/bowen.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDownTwo"></div>
|
||||
<div id="mainText">
|
||||
<h1 class="subHeadings">Theory</h1>
|
||||
<h2 class="theoryHeadings" id="bowensreactionseries">Bowen's Reaction Series</h2>
|
||||
<p>
|
||||
Bowen's Reaction Series arranges the silicate minerals in the order that they crystallise from a magma. The minerals at the top of the series crystallise from the melt at higher temperature than those
|
||||
lower down. It contains a continuous series, (right hand limb), discontinuous series (left hand limb), and the residual phases that describe the reaction pathway of different silicate minerals.
|
||||
The discontinuous series crystallises different minerals, with abrupt changes separating the different minerals due to a mineral reacting with the melt to form a different mineral (eg. Olivine reacting to crystallise pyroxene).
|
||||
The continuous series always crystallises plagioclase, but the composition of the plagioclase varies from more calcic at higher temperatures and more sodic as the temperature decreases.
|
||||
with the minerals at the bottom of the series being more stable, and less susceptible to weathering.
|
||||
The residual phases are the minerals at the bottom and crystallise last. Bowen's reaction series also predicts the stability of minerals in the low pressure conditions at the Earth's surface,
|
||||
<br /><br />
|
||||
It should be noted that all reactions do not start crystallising olivine/anorthite-rich plagioclase and continue through until they crystallise quartz.
|
||||
The actual reactions depend on many factors, such as the chemical composition of the melt, temperature, pressure, and amount of fractional crystallisation.
|
||||
For example, basalts form from the crystallisation of olivine, pyroxene and calcic plagioclase meaning that crystallisation stopped without the series progressing.
|
||||
If more fractional crystallisation were to occur, more intermediate and felsic minerals can crystallise.
|
||||
<img src="{% static "three_d_viewer/images/bowen.png" %}">
|
||||
</p>
|
||||
<div id="pushDownThree"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,13 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDownTwo"></div>
|
||||
<div id="mainText">
|
||||
<h1 class="subHeadings">Theory</h1>
|
||||
<h2 class="theoryHeadings" id="pressureandtemp">Pressure and Temperature</h2>
|
||||
<p>
|
||||
</p>
|
||||
<div id="pushDownThree"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,37 @@
|
||||
{% extends "three_d_viewer/base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block content %}
|
||||
<div id="pushDownTwo"></div>
|
||||
<div id="mainText">
|
||||
<h1 class="subHeadings">Theory</h1>
|
||||
<h2 class="theoryHeadings" id="structureofearth">Structure of Earth</h2>
|
||||
<p>
|
||||
The Earth's structure is differentiated in three distinct layers: the core, mantle, and crust. The layers are distinguished by a change in the velocity of seismic waves at their boundaries.
|
||||
The crust is the upper most part of the earth, with depths ranging from an average of 7km in in the oceans, to an average of 38km in continental crust.
|
||||
The crust thickens underneath mountain ranges, and can reach depths of 90km underneath the Himalayas. The composition of the crust also differs between oceanic and
|
||||
continental environments. Ocean crust is young mafic crust dominated by basalts and gabbros that is recycled regularly(~300Ma) due to subduction processes.
|
||||
Continental crust is much more varied in structure and composition than oceanic, but has an overall average composition of granodiorite.
|
||||
<br /><br />
|
||||
The boundary of the crust and mantle is defined by the Mohorovi?i? discontinuity, commonly referred to as the Moho.
|
||||
It is defined by a sharp increase in seismic wave velocity, due to a change in material properties between crustal rocks and mantle rocks. The mantle is dominated by
|
||||
silicate minerals that are rich in iron and magnesium, chiefly pyroxenes and polymorphs of olivine, forming peridotite. The mantle, while solid, behaves plastically,
|
||||
allowing to flow at very slow rates.
|
||||
<br /><br />
|
||||
The core is distinguished by the absence of S waves, leading to the inference that the core is liquid. The core is separated into the outer core and the inner core.
|
||||
The outer core is liquid dominated by iron and nickel. The inner core is solid, as determined by the strong refraction of P waves at the inner core-outer core boundary,
|
||||
and was formed by crystalizing minerals from the liquid part of the core as the Earth cools.
|
||||
<br /><br />
|
||||
The crust and mantle are also further distinguished by material properties into the lithosphere, asthenosphere, and mesosphere. The chemical composition is
|
||||
uniform throughout the mantle though, but changes in pressure and temperature determine which polymorphs will exist at different depths.
|
||||
The lithosphere contains the crust, and the upper part of the mantle down to ~100km under oceanic crust, and 200-300km under continental crust (Twiss & Moores, 2007).
|
||||
The lithosphere-asthenosphere boundary is defined by the 1300K isotherm, which is the temperature where olivine starts to behave viscously.
|
||||
The rocks in the mesosphere are under more pressure than those in the asthenosphere, so no longer behave viscously.
|
||||
<figure>
|
||||
<img src="{% static "three_d_viewer/images/structure - usgs.gif" %}">
|
||||
<figcaption>Image sourced from <a href="http://pubs.usgs.gov/gip/dynamic/graphics/FigS1-1.gif">USGS</a>.</figcaption>
|
||||
<figure>
|
||||
</p>
|
||||
<div id="pushDownThree"></div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -8,6 +8,9 @@ urlpatterns = patterns(
|
||||
url(r'^$', views.HomeView.as_view(), name='home'),
|
||||
url(r'^$', generic.TemplateView.as_view(template_name="three_d_viewer/home.html"), name='home'),
|
||||
url(r'^minerals_theory/$', generic.TemplateView.as_view(template_name="three_d_viewer/minerals_theory.html"), name='minerals_theory'),
|
||||
url(r'^theory/structure/$', generic.TemplateView.as_view(template_name="three_d_viewer/theory/structure.html"), name='theory_structure'),
|
||||
url(r'^theory/bowen/$', generic.TemplateView.as_view(template_name="three_d_viewer/theory/bowen.html"), name='theory_bowen'),
|
||||
url(r'^theory/pressure_temp/$', generic.TemplateView.as_view(template_name="three_d_viewer/theory/pressure_temp.html"), name='theory_pt'),
|
||||
url(r'^minerals_practice/$', views.MineralPracticeView.as_view(template_name="three_d_viewer/minerals_practice.html"), name='minerals_practice'),
|
||||
url(r'^minerals/(?P<pk>\d+)/$', views.MineralDetailView.as_view(), name='mineral_detail'),
|
||||
url(r'^minerals_selftest/$', generic.TemplateView.as_view(template_name="three_d_viewer/minerals_selftest.html"), name='minerals_selftest'),
|
||||
@@ -15,6 +18,8 @@ urlpatterns = patterns(
|
||||
url(r'^rocks/(?P<pk>\d+)/$', views.RockDetailView.as_view(), name='rock_detail'),
|
||||
url(r'^fossil_practice/$', views.FossilPracticeView.as_view(), name='fossil_practice'),
|
||||
url(r'^fossils/(?P<pk>\d+)/$', views.FossilDetailView.as_view(), name='fossil_detail'),
|
||||
url(r'^glossary/$', views.GlossaryView.as_view(), name='glossary'),
|
||||
url(r'^acknowledgements/$', generic.TemplateView.as_view(template_name='three_d_viewer/acknowledgements.html'), name='acknowledgements'),
|
||||
url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
|
||||
{'document_root': settings.MEDIA_ROOT}),
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ from django.views import generic
|
||||
from itertools import chain
|
||||
from operator import attrgetter
|
||||
|
||||
from three_d_viewer.models import Sample, Category, Mineral
|
||||
from three_d_viewer.models import Sample, Category, Mineral, GlossaryEntry
|
||||
register = template.Library()
|
||||
|
||||
|
||||
@@ -137,4 +137,13 @@ class FossilDetailView(generic.DetailView):
|
||||
result = chain(result, child.active_samples)
|
||||
|
||||
context['active_samples'] = sorted(result, key=attrgetter('name'))
|
||||
return context
|
||||
return context
|
||||
|
||||
class GlossaryView(generic.ListView):
|
||||
model = GlossaryEntry
|
||||
template_name = 'three_d_viewer/glossary.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(GlossaryView, self).get_context_data(**kwargs)
|
||||
context['entries'] = GlossaryEntry.objects.all()
|
||||
return context
|
||||
|
||||
Reference in New Issue
Block a user