Skip to content

Commit

Permalink
Merge pull request #14 from ekonstantinidis/serve-own-website
Browse files Browse the repository at this point in the history
Generate View's Website
  • Loading branch information
ekonstantinidis committed Dec 18, 2015
2 parents ce9e4f1 + e04565b commit 38800d3
Show file tree
Hide file tree
Showing 21 changed files with 1,017 additions and 17 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Expand Up @@ -5,7 +5,8 @@ covhtml/
__pycache__/

env/
demo/db.sqlite3
dist/
djangorestframeworkdocs.egg-info/

demo/env/
demo/db.sqlite3
rest_framework_docs/static/node_modules/
2 changes: 2 additions & 0 deletions MANIFEST.in
Expand Up @@ -3,5 +3,7 @@ include LICENSE

recursive-include rest_framework_docs/static *.js *.css *.less *.png *.eot *.svg *.ttf *.woff
recursive-include rest_framework_docs/templates *.html

recursive-exclude rest_framework_docs/static/node_modules *.*
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -6,7 +6,7 @@ Document Web APIs made with Django Rest Framework.
### Supports

- Python (2.7, 3.3, 3.4, 3.5)
- Django (1.7, 1.8, 1.9)
- Django (1.8, 1.9)
- Django Rest Framework (3+)


Expand Down
11 changes: 9 additions & 2 deletions demo/README.md
Expand Up @@ -3,18 +3,25 @@ A demo project to get you started with DRF docs development.


### Installation
From the route of the repository:

# Create the virtual environment
pyvenv env

# Install requirements
env/bin/pip install -r requirements.txt

# Activate the environment
source env/bin/activate

# Cd Into the demo
cd demo/

# Install Django Rest Framework Docs
env/bin/pip install -e ../
pip install -e ../

# Run the project
env/bin/python manage.py runserver
python manage.py runserver

**Note**: You **do not** need a database or to run `migrate`.

Expand Down
2 changes: 0 additions & 2 deletions demo/requirements.txt

This file was deleted.

8 changes: 8 additions & 0 deletions rest_framework_docs/static/css/style.css

Large diffs are not rendered by default.

Binary file added rest_framework_docs/static/fonts/FontAwesome.otf
Binary file not shown.
Binary file not shown.
655 changes: 655 additions & 0 deletions rest_framework_docs/static/fonts/fontawesome-webfont.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
288 changes: 288 additions & 0 deletions rest_framework_docs/static/fonts/glyphicons-halflings-regular.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions rest_framework_docs/static/less/style.less
@@ -1,3 +1,8 @@
@import "node_modules/bootstrap/less/bootstrap";
@import "node_modules/bootswatch/flatly/variables.less";
@import "node_modules/font-awesome/less/font-awesome.less";
@import url(http://fonts.googleapis.com/css?family=ABeeZee);

/* @group Colours */

@ThemeAlt: #c9c9c9;
Expand Down
42 changes: 42 additions & 0 deletions rest_framework_docs/static/package.json
@@ -0,0 +1,42 @@
{
"name": "django-rest-framework-docs",
"version": "0.0.1",
"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": "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"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ekonstantinidis/django-rest-framework-docs.git"
},
"keywords": [
"django",
"rest",
"framework",
"docs",
"jekyll"
],
"author": "Emmanouil Konstantinidis",
"license": "SEE LICENSE IN LICENSE",
"bugs": {
"url": "https://github.com/ekonstantinidis/django-rest-framework-docs/issues"
},
"homepage": "https://www.drfdocs.com/",
"dependencies": {
"bootstrap": "=3.3.6",
"bootswatch": "=3.3.6",
"font-awesome": "=4.5.0"
},
"devDependencies": {
"less": "=2.5.3",
"less-plugin-clean-css": "=1.5.1",
"watch": "=0.16.0"
}
}
11 changes: 2 additions & 9 deletions rest_framework_docs/templates/rest_framework_docs/base.html
@@ -1,4 +1,4 @@
{% load staticfiles %}
{% load static from staticfiles %}

<!DOCTYPE html>
<html>
Expand All @@ -9,15 +9,8 @@

<title>{% block title %}DRF Docs{% endblock %}</title>

<!-- Bootstrap & Flatly -->
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.5/flatly/bootstrap.min.css" rel="stylesheet">
<!-- Font Awesome -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
<!-- Custom Style -->
<link rel="stylesheet/less" type="text/css" href="{% static "less/style.less" %}" />

<!-- LESS CSS -->
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.3/less.min.js"></script>
<link rel="stylesheet" href="{% static "css/style.css" %}">
</head>

<body>
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Expand Up @@ -20,8 +20,9 @@
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.5'
],
)

0 comments on commit 38800d3

Please sign in to comment.