From c4786c3be183edfb2b693fe2615e23cc114ec516 Mon Sep 17 00:00:00 2001 From: Emmanouil Konstantinidis Date: Sun, 20 Dec 2015 20:58:04 +0000 Subject: [PATCH 1/4] Move static files inside "rest_framework_docs" dir, include all type of files within static --- MANIFEST.in | 2 +- rest_framework_docs/static/package.json | 8 ++++---- .../static/{ => rest_framework_docs}/css/style.css | 0 .../{ => rest_framework_docs}/fonts/FontAwesome.otf | Bin .../fonts/fontawesome-webfont.eot | Bin .../fonts/fontawesome-webfont.svg | 0 .../fonts/fontawesome-webfont.ttf | Bin .../fonts/fontawesome-webfont.woff | Bin .../fonts/fontawesome-webfont.woff2 | Bin .../fonts/glyphicons-halflings-regular.eot | Bin .../fonts/glyphicons-halflings-regular.svg | 0 .../fonts/glyphicons-halflings-regular.ttf | Bin .../fonts/glyphicons-halflings-regular.woff | Bin .../fonts/glyphicons-halflings-regular.woff2 | Bin .../{ => rest_framework_docs}/less/style.less | 0 15 files changed, 5 insertions(+), 5 deletions(-) rename rest_framework_docs/static/{ => rest_framework_docs}/css/style.css (100%) rename rest_framework_docs/static/{ => rest_framework_docs}/fonts/FontAwesome.otf (100%) rename rest_framework_docs/static/{ => rest_framework_docs}/fonts/fontawesome-webfont.eot (100%) rename rest_framework_docs/static/{ => rest_framework_docs}/fonts/fontawesome-webfont.svg (100%) rename rest_framework_docs/static/{ => rest_framework_docs}/fonts/fontawesome-webfont.ttf (100%) rename rest_framework_docs/static/{ => rest_framework_docs}/fonts/fontawesome-webfont.woff (100%) rename rest_framework_docs/static/{ => rest_framework_docs}/fonts/fontawesome-webfont.woff2 (100%) rename rest_framework_docs/static/{ => rest_framework_docs}/fonts/glyphicons-halflings-regular.eot (100%) rename rest_framework_docs/static/{ => rest_framework_docs}/fonts/glyphicons-halflings-regular.svg (100%) rename rest_framework_docs/static/{ => rest_framework_docs}/fonts/glyphicons-halflings-regular.ttf (100%) rename rest_framework_docs/static/{ => rest_framework_docs}/fonts/glyphicons-halflings-regular.woff (100%) rename rest_framework_docs/static/{ => rest_framework_docs}/fonts/glyphicons-halflings-regular.woff2 (100%) rename rest_framework_docs/static/{ => rest_framework_docs}/less/style.less (100%) diff --git a/MANIFEST.in b/MANIFEST.in index 9d0ea34..3d9af21 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,7 +1,7 @@ include README.md include LICENSE -recursive-include rest_framework_docs/static *.js *.css *.less *.png *.eot *.svg *.ttf *.woff +recursive-include rest_framework_docs/static * recursive-include rest_framework_docs/templates *.html recursive-exclude rest_framework_docs/static/node_modules *.* diff --git a/rest_framework_docs/static/package.json b/rest_framework_docs/static/package.json index 6b5fff1..55dbbf9 100644 --- a/rest_framework_docs/static/package.json +++ b/rest_framework_docs/static/package.json @@ -4,10 +4,10 @@ "description": "Document Web APIs made with Django Rest Framework", "main": "index.js", "scripts": { - "build-font-awesome": "cp -r node_modules/font-awesome/fonts .", - "build-bootstrap-fonts": "cp -r node_modules/bootstrap/fonts .", - "build-less": "lessc --clean-css less/style.less css/style.css", - "watch-less": "watch 'npm run build-less' less/", + "build-font-awesome": "cp -r node_modules/font-awesome/fonts rest_framework_docs/", + "build-bootstrap-fonts": "cp -r node_modules/bootstrap/fonts rest_framework_docs/", + "build-less": "lessc --clean-css rest_framework_docs/less/style.less rest_framework_docs/css/style.css", + "watch-less": "watch 'npm run build-less' rest_framework_docs/less/", "build": "npm run build-font-awesome && npm run build-bootstrap-fonts && npm run build-less", "start": "npm run build && npm run watch-less", "test": "echo \"Error: no test specified\" && exit 1" diff --git a/rest_framework_docs/static/css/style.css b/rest_framework_docs/static/rest_framework_docs/css/style.css similarity index 100% rename from rest_framework_docs/static/css/style.css rename to rest_framework_docs/static/rest_framework_docs/css/style.css diff --git a/rest_framework_docs/static/fonts/FontAwesome.otf b/rest_framework_docs/static/rest_framework_docs/fonts/FontAwesome.otf similarity index 100% rename from rest_framework_docs/static/fonts/FontAwesome.otf rename to rest_framework_docs/static/rest_framework_docs/fonts/FontAwesome.otf diff --git a/rest_framework_docs/static/fonts/fontawesome-webfont.eot b/rest_framework_docs/static/rest_framework_docs/fonts/fontawesome-webfont.eot similarity index 100% rename from rest_framework_docs/static/fonts/fontawesome-webfont.eot rename to rest_framework_docs/static/rest_framework_docs/fonts/fontawesome-webfont.eot diff --git a/rest_framework_docs/static/fonts/fontawesome-webfont.svg b/rest_framework_docs/static/rest_framework_docs/fonts/fontawesome-webfont.svg similarity index 100% rename from rest_framework_docs/static/fonts/fontawesome-webfont.svg rename to rest_framework_docs/static/rest_framework_docs/fonts/fontawesome-webfont.svg diff --git a/rest_framework_docs/static/fonts/fontawesome-webfont.ttf b/rest_framework_docs/static/rest_framework_docs/fonts/fontawesome-webfont.ttf similarity index 100% rename from rest_framework_docs/static/fonts/fontawesome-webfont.ttf rename to rest_framework_docs/static/rest_framework_docs/fonts/fontawesome-webfont.ttf diff --git a/rest_framework_docs/static/fonts/fontawesome-webfont.woff b/rest_framework_docs/static/rest_framework_docs/fonts/fontawesome-webfont.woff similarity index 100% rename from rest_framework_docs/static/fonts/fontawesome-webfont.woff rename to rest_framework_docs/static/rest_framework_docs/fonts/fontawesome-webfont.woff diff --git a/rest_framework_docs/static/fonts/fontawesome-webfont.woff2 b/rest_framework_docs/static/rest_framework_docs/fonts/fontawesome-webfont.woff2 similarity index 100% rename from rest_framework_docs/static/fonts/fontawesome-webfont.woff2 rename to rest_framework_docs/static/rest_framework_docs/fonts/fontawesome-webfont.woff2 diff --git a/rest_framework_docs/static/fonts/glyphicons-halflings-regular.eot b/rest_framework_docs/static/rest_framework_docs/fonts/glyphicons-halflings-regular.eot similarity index 100% rename from rest_framework_docs/static/fonts/glyphicons-halflings-regular.eot rename to rest_framework_docs/static/rest_framework_docs/fonts/glyphicons-halflings-regular.eot diff --git a/rest_framework_docs/static/fonts/glyphicons-halflings-regular.svg b/rest_framework_docs/static/rest_framework_docs/fonts/glyphicons-halflings-regular.svg similarity index 100% rename from rest_framework_docs/static/fonts/glyphicons-halflings-regular.svg rename to rest_framework_docs/static/rest_framework_docs/fonts/glyphicons-halflings-regular.svg diff --git a/rest_framework_docs/static/fonts/glyphicons-halflings-regular.ttf b/rest_framework_docs/static/rest_framework_docs/fonts/glyphicons-halflings-regular.ttf similarity index 100% rename from rest_framework_docs/static/fonts/glyphicons-halflings-regular.ttf rename to rest_framework_docs/static/rest_framework_docs/fonts/glyphicons-halflings-regular.ttf diff --git a/rest_framework_docs/static/fonts/glyphicons-halflings-regular.woff b/rest_framework_docs/static/rest_framework_docs/fonts/glyphicons-halflings-regular.woff similarity index 100% rename from rest_framework_docs/static/fonts/glyphicons-halflings-regular.woff rename to rest_framework_docs/static/rest_framework_docs/fonts/glyphicons-halflings-regular.woff diff --git a/rest_framework_docs/static/fonts/glyphicons-halflings-regular.woff2 b/rest_framework_docs/static/rest_framework_docs/fonts/glyphicons-halflings-regular.woff2 similarity index 100% rename from rest_framework_docs/static/fonts/glyphicons-halflings-regular.woff2 rename to rest_framework_docs/static/rest_framework_docs/fonts/glyphicons-halflings-regular.woff2 diff --git a/rest_framework_docs/static/less/style.less b/rest_framework_docs/static/rest_framework_docs/less/style.less similarity index 100% rename from rest_framework_docs/static/less/style.less rename to rest_framework_docs/static/rest_framework_docs/less/style.less From dbf1ab39c6bfca476ff01d444fcd505d8bdf253a Mon Sep 17 00:00:00 2001 From: Emmanouil Konstantinidis Date: Sun, 20 Dec 2015 20:59:36 +0000 Subject: [PATCH 2/4] Fix typo in 404 Error --- README.md | 2 +- rest_framework_docs/views.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8c7f309..c721c77 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ First of all thanks to the [Django](http://www.djangoproject.com/) core team and [travis-image]: https://travis-ci.org/ekonstantinidis/django-rest-framework-docs.svg?branch=master [travis-url]: https://travis-ci.org/ekonstantinidis/django-rest-framework-docs -[pypi-image]: https://img.shields.io/pypi/v/drfdocs.svg +[pypi-image]: https://badge.fury.io/py/drfdocs.svg [pypi-url]: https://pypi.python.org/pypi/drfdocs/ [codecov-image]: https://codecov.io/github/ekonstantinidis/django-rest-framework-docs/coverage.svg?branch=master diff --git a/rest_framework_docs/views.py b/rest_framework_docs/views.py index 3b0012b..3d8805a 100644 --- a/rest_framework_docs/views.py +++ b/rest_framework_docs/views.py @@ -11,7 +11,7 @@ class DRFDocsView(TemplateView): def get_context_data(self, **kwargs): settings = DRFSettings().settings if settings["HIDDEN"]: - raise Http404("Django Rest Framework Docs are hidden. Check you settings.") + raise Http404("Django Rest Framework Docs are hidden. Check your settings.") context = super(DRFDocsView, self).get_context_data(**kwargs) docs = ApiDocumentation() From 9497ee1c3858081320724f0a697842b9f4d54776 Mon Sep 17 00:00:00 2001 From: Emmanouil Konstantinidis Date: Sun, 20 Dec 2015 21:01:28 +0000 Subject: [PATCH 3/4] Fix path to css --- rest_framework_docs/templates/rest_framework_docs/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework_docs/templates/rest_framework_docs/base.html b/rest_framework_docs/templates/rest_framework_docs/base.html index 3d3887d..ff5a6b4 100644 --- a/rest_framework_docs/templates/rest_framework_docs/base.html +++ b/rest_framework_docs/templates/rest_framework_docs/base.html @@ -10,7 +10,7 @@ {% block title %}DRF Docs{% endblock %} - + From 79743ff58e99c6720063536eea727f13e911e384 Mon Sep 17 00:00:00 2001 From: Emmanouil Konstantinidis Date: Sun, 20 Dec 2015 21:07:45 +0000 Subject: [PATCH 4/4] Bump 0.0.3 --- rest_framework_docs/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework_docs/__init__.py b/rest_framework_docs/__init__.py index d18f409..ffcc925 100644 --- a/rest_framework_docs/__init__.py +++ b/rest_framework_docs/__init__.py @@ -1 +1 @@ -__version__ = '0.0.2' +__version__ = '0.0.3'