Skip to content

Commit

Permalink
Merge pull request #3499 from davidfischer/prog-language-in-readthedo…
Browse files Browse the repository at this point in the history
…csdata

Add programming language to API/READTHEDOCS_DATA
  • Loading branch information
ericholscher authored Jan 10, 2018
2 parents c411ca3 + 9289d54 commit d63caef
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions readthedocs/doc_builder/backends/mkdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def generate_rtd_data(self, docs_dir):
'project': self.version.project.slug,
'version': self.version.slug,
'language': self.version.project.language,
'programming_language': self.version.project.programming_language,
'page': None,
'theme': "readthedocs",
'builder': "mkdocs",
Expand Down
1 change: 1 addition & 0 deletions readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ context = {
'slug': '{{ project.slug }}',
'name': u'{{ project.name }}',
'rtd_language': u'{{ project.language }}',
'programming_language': u'{{ project.programming_language }}',
'canonical_url': '{{ project.get_canonical_url }}',
'analytics_code': '{{ project.analytics_code }}',
'single_version': {{ project.single_version }},
Expand Down
2 changes: 1 addition & 1 deletion readthedocs/restapi/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Meta(object):
fields = (
'id',
'name', 'slug', 'description', 'language',
'repo', 'repo_type',
'programming_language', 'repo', 'repo_type',
'default_version', 'default_branch',
'documentation_type',
'users',
Expand Down
1 change: 1 addition & 0 deletions readthedocs/rtd_tests/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ def test_get_version_by_id(self):
'install_project': False,
'language': 'en',
'name': 'Pip',
'programming_language': 'words',
'python_interpreter': 'python',
'repo': 'https://github.com/pypa/pip',
'repo_type': 'git',
Expand Down

0 comments on commit d63caef

Please sign in to comment.