diff --git a/.gitignore b/.gitignore index bdaab25..0e3a3b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ +__pycache__/ env/ +drfdocs.egg-info/ diff --git a/MANIFEST.in b/MANIFEST.in index e69de29..aa9cba7 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -0,0 +1,7 @@ +include README.md +include LICENSE + +recursive-include drfdocs/static *.js *.css *.png *.eot *.svg *.ttf *.woff +recursive-include drfdocs/templates *.html +recursive-exclude * __pycache__ +recursive-exclude * *.py[co] diff --git a/README.md b/README.md index 9c9cc09..49216b3 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,38 @@ -# drf-docs -Documentation for Web APIs made with Django Rest Framework +# drf-docs [](https://travis-ci.com/ekonstantinidis/drf-docs) +Documentation for Web APIs made with Django Rest Framework. ### Prerequisites - Python (3.3, 3.4, 3.5) - Django (1.8, 1.9) + - Django Rest Framework (3+) ### Development pyvenv env env/bin/pip install -r requirements.txt + + # To test within another django project + pip install -e ~/Projects/drf-docs/ + +### Installation + +Install using pip: + + pip install drfdocs + +Add 'drfdocs' to your `INSTALLED_APPS` setting: + + INSTALLED_APPS = ( + ... + 'drfdocs', + ) + +Finally include the `drfdocs` urls in your `urls.py`: + + urlpatterns = [ + ... + url(r'^docs/', include('drfdocs.urls', namespace='drfdocs')), + ] diff --git a/drfdocs/templates/drfdocs/base.html b/drfdocs/templates/drfdocs/base.html new file mode 100644 index 0000000..39f414c --- /dev/null +++ b/drfdocs/templates/drfdocs/base.html @@ -0,0 +1,11 @@ + + +
+ +