Unified · Split
| @@ -231,6 +231,11 @@ credits = [ · 230 unmodified lines | ||
| 231 | 231 | 'Django Software Foundation and individual contributors', |
| 232 | 232 | 'BSD', |
| 233 | 233 | 'https://raw.githubusercontent.com/django/django/master/LICENSE' |
| 234 | + ], [ | |
| 235 | + 'Django REST Framework', | |
| 236 | + '2011-present Encode OSS Ltd.', | |
| 237 | + 'BSD', | |
| 238 | + 'https://raw.githubusercontent.com/encode/django-rest-framework/master/LICENSE.md' | |
| 234 | 239 | ], [ |
| 235 | 240 | 'Docker', |
| 236 | 241 | '2019 Docker, Inc.<br>Docker and the Docker logo are trademarks of Docker, Inc.', |
| @@ -1,14 +1,14 @@ | ||
| 1 | 1 | module Docs |
| 2 | − class RestFramework | |
| 2 | + class DjangoRestFramework | |
| 3 | 3 | class CleanHtmlFilter < Docs::Filter |
| 4 | 4 | def call |
| 5 | 5 | css('hr').remove |
| 6 | − | |
| 7 | 6 | css('.badges').remove |
| 8 | 7 | |
| 9 | 8 | css('pre').attr('data-language', 'python') |
| 10 | 9 | |
| 11 | − css('h1').attr('style', nil) | |
| 10 | + css('h1').remove_attribute('style') | |
| 11 | + css('.promo a').remove_attribute('style') | |
| 12 | 12 | |
| 13 | 13 | # Translate source files links to DevDocs links |
| 14 | 14 | links = Nokogiri::XML::Node.new('p', doc) |
| @@ -20,6 +20,7 @@ module Docs · 5 unmodified lines | ||
| 20 | 20 | node['class'] = '_links-link' |
| 21 | 21 | links.add_child(node) |
| 22 | 22 | end |
| 23 | + | |
| 23 | 24 | doc.add_child(links) |
| 24 | 25 | |
| 25 | 26 | doc |
| @@ -1,7 +1,6 @@ | ||
| 1 | 1 | module Docs |
| 2 | − class RestFramework | |
| 2 | + class DjangoRestFramework | |
| 3 | 3 | class EntriesFilter < Docs::EntriesFilter |
| 4 | − | |
| 5 | 4 | def get_name |
| 6 | 5 | name = css('h1').first.content |
| 7 | 6 | name.slice! 'Tutorial ' |
| @@ -46,7 +45,7 @@ module Docs · 38 unmodified lines | ||
| 46 | 45 | next |
| 47 | 46 | end |
| 48 | 47 | entries << [node.content, node['id'], local_type] |
| 49 | − elsif accepted_headers.include? node.content | |
| 48 | + elsif accepted_headers.include? node.content | |
| 50 | 49 | in_category = true |
| 51 | 50 | elsif endings.any? { |word| node.content.ends_with?(word) } |
| 52 | 51 | entries << [node.content, node['id'], local_type] |
| @@ -1,8 +1,8 @@ | ||
| 1 | 1 | module Docs |
| 2 | − class RestFramework < Mkdocs | |
| 2 | + class DjangoRestFramework < Mkdocs | |
| 3 | 3 | self.name = 'Django REST Framework' |
| 4 | − self.release = '3.9.2' | |
| 5 | − self.slug = 'rest_framework' | |
| 4 | + self.release = '3.9.3' | |
| 5 | + self.slug = 'django_rest_framework' | |
| 6 | 6 | self.base_url = 'https://www.django-rest-framework.org/' |
| 7 | 7 | self.root_path = 'index.html' |
| 8 | 8 | self.links = { |
| @@ -10,7 +10,7 @@ module Docs · 1 unmodified line | ||
| 10 | 10 | code: 'https://github.com/encode/django-rest-framework' |
| 11 | 11 | } |
| 12 | 12 | |
| 13 | − html_filters.push 'rest_framework/clean_html', 'rest_framework/entries' | |
| 13 | + html_filters.push 'django_rest_framework/clean_html', 'django_rest_framework/entries' | |
| 14 | 14 | |
| 15 | 15 | options[:skip_patterns] = [ |
| 16 | 16 | /\Atopics\//, |
| @@ -18,8 +18,12 @@ module Docs · 1 unmodified line | ||
| 18 | 18 | ] |
| 19 | 19 | |
| 20 | 20 | options[:attribution] = <<-HTML |
| 21 | − Copyright 2011–present Encode OSS Ltd<br> | |
| 21 | + Copyright 2011–present Encode OSS Ltd.<br> | |
| 22 | 22 | Licensed under the BSD License. |
| 23 | 23 | HTML |
| 24 | + | |
| 25 | + def get_latest_version(opts) | |
| 26 | + get_latest_github_release('encode', 'django-rest-framework', opts) | |
| 27 | + end | |
| 24 | 28 | end |
| 25 | 29 | end |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.