Skip to content

Commit

Permalink
fixed issue in index view calling wrong model field. removed starting…
Browse files Browse the repository at this point in the history
… slash from index url pattern to allow it to work.

Wrapped container-right div in block tags to allow front page to override its content
  • Loading branch information
rwblair committed Nov 12, 2015
1 parent daa0d57 commit 497a32e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion open_fmri/apps/dataset/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,6 @@ def get_context_data(self, **kwargs):
context['num_datasets'] = len(Dataset.objects.all())
total = 0
for x in Dataset.objects.all():
total += x.subjects
total += x.sample_size
context['num_subjects'] = total
return context
2 changes: 2 additions & 0 deletions open_fmri/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
{% endblock content %}
</div>

{% block container-right %}
<div id="container-right" class="col-md-4">
<div id="toc" class="right-elem">
<h3 class="block-title">Find Out More:</h3>
Expand All @@ -101,6 +102,7 @@ <h4><a href="{% url 'dataset_detail' featured_dataset.dataset.id %}">{{ featured
</div>
{% endif %}
</div>
{% endblock container-right %}

</div> <!-- /container -->
<div>
Expand Down
2 changes: 2 additions & 0 deletions open_fmri/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@

{% block content %}
{% endblock %}
{% block container-right %}
{% endblock %}
2 changes: 1 addition & 1 deletion open_fmri/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
url(r'^dataset/', include(dataset.urls)),
url(r'^contact/', include('contact.urls')),
url(r'^$', DatasetList.as_view()),
url(r'^/front/$', Index.as_view(), name='index'),
url(r'^front/$', Index.as_view(), name='index'),
url(r'^(?P<url>.*/)$', views.flatpage),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

0 comments on commit 497a32e

Please sign in to comment.