Skip to content

Commit

Permalink
Made the gettingstarted guide configurable in settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
espenak committed Jan 8, 2015
1 parent fc9ada6 commit 3c6cc01
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions trix/project/default/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,4 @@

TRIX_ADMIN_DOCUMENTATION_URL = 'http://trix2.readthedocs.org/'
TRIX_ADMIN_DOCUMENTATION_LABEL = 'trix2.readthedocs.org'
TRIX_STUDENT_GETTINGSTARTEDGUIDE_URL = 'http://trix2.readthedocs.org/en/latest/student/gettingstarted.html'
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1>{% trans "Welcome to Trix" %}</h1>
{% blocktrans %}Trix follows a simple tag structure where assignments are marked with informative tags. This along with filtering capabilities ensures a tailored selection of assignments perfectly suited to your personal level. Trix is a day to day learning tool as well as a preparatory tool for focused learning.{% endblocktrans %}
</p>
<p>
{% trans "For more informataion" %}, <a href="http://trix2.readthedocs.org/en/latest/student/gettingstarted.html" target="_blank" role="button">{% trans "read the getting started guide" %}</a>.
{% trans "For more informataion" %}, <a href="{{ TRIX_STUDENT_GETTINGSTARTEDGUIDE_URL }}">{% trans "read the getting started guide" %}</a>.
</p>
</div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions trix/trix_student/views/dashboard.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
from django.conf import settings
from django.views.generic import ListView
from trix.trix_core import models


class CourseListView(ListView):
model = models.Course
template_name = "trix_student/dashboard.django.html"

def get_context_data(self, **kwargs):
context = super(CourseListView, self).get_context_data(**kwargs)
context['TRIX_STUDENT_GETTINGSTARTEDGUIDE_URL'] = settings.TRIX_STUDENT_GETTINGSTARTEDGUIDE_URL
return context

0 comments on commit 3c6cc01

Please sign in to comment.