Skip to content

Commit 38800d3

Browse files
Merge pull request #14 from ekonstantinidis/serve-own-website
Generate View's Website
2 parents ce9e4f1 + e04565b commit 38800d3

21 files changed

+1017
-17
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ covhtml/
55
__pycache__/
66

77
env/
8+
demo/db.sqlite3
9+
dist/
810
djangorestframeworkdocs.egg-info/
911

10-
demo/env/
11-
demo/db.sqlite3
12+
rest_framework_docs/static/node_modules/

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ include LICENSE
33

44
recursive-include rest_framework_docs/static *.js *.css *.less *.png *.eot *.svg *.ttf *.woff
55
recursive-include rest_framework_docs/templates *.html
6+
7+
recursive-exclude rest_framework_docs/static/node_modules *.*
68
recursive-exclude * __pycache__
79
recursive-exclude * *.py[co]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Document Web APIs made with Django Rest Framework.
66
### Supports
77

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

1212

demo/README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,25 @@ A demo project to get you started with DRF docs development.
33

44

55
### Installation
6+
From the route of the repository:
67

78
# Create the virtual environment
89
pyvenv env
910

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

14+
# Activate the environment
15+
source env/bin/activate
16+
17+
# Cd Into the demo
18+
cd demo/
19+
1320
# Install Django Rest Framework Docs
14-
env/bin/pip install -e ../
21+
pip install -e ../
1522

1623
# Run the project
17-
env/bin/python manage.py runserver
24+
python manage.py runserver
1825

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

demo/requirements.txt

Lines changed: 0 additions & 2 deletions
This file was deleted.

rest_framework_docs/static/css/style.css

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Binary file not shown.
Binary file not shown.

rest_framework_docs/static/fonts/fontawesome-webfont.svg

Lines changed: 655 additions & 0 deletions
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

rest_framework_docs/static/fonts/glyphicons-halflings-regular.svg

Lines changed: 288 additions & 0 deletions
Loading
Binary file not shown.
Binary file not shown.
Binary file not shown.

rest_framework_docs/static/less/style.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
@import "node_modules/bootstrap/less/bootstrap";
2+
@import "node_modules/bootswatch/flatly/variables.less";
3+
@import "node_modules/font-awesome/less/font-awesome.less";
4+
@import url(http://fonts.googleapis.com/css?family=ABeeZee);
5+
16
/* @group Colours */
27

38
@ThemeAlt: #c9c9c9;
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"name": "django-rest-framework-docs",
3+
"version": "0.0.1",
4+
"description": "Document Web APIs made with Django Rest Framework",
5+
"main": "index.js",
6+
"scripts": {
7+
"build-font-awesome": "cp -r node_modules/font-awesome/fonts .",
8+
"build-bootstrap-fonts": "cp -r node_modules/bootstrap/fonts .",
9+
"build-less": "lessc --clean-css less/style.less css/style.css",
10+
"watch-less": "watch 'npm run build-less' less/",
11+
"build": "npm run build-font-awesome && npm run build-bootstrap-fonts && npm run build-less",
12+
"start": "npm run build && npm run watch-less",
13+
"test": "echo \"Error: no test specified\" && exit 1"
14+
},
15+
"repository": {
16+
"type": "git",
17+
"url": "git+https://github.com/ekonstantinidis/django-rest-framework-docs.git"
18+
},
19+
"keywords": [
20+
"django",
21+
"rest",
22+
"framework",
23+
"docs",
24+
"jekyll"
25+
],
26+
"author": "Emmanouil Konstantinidis",
27+
"license": "SEE LICENSE IN LICENSE",
28+
"bugs": {
29+
"url": "https://github.com/ekonstantinidis/django-rest-framework-docs/issues"
30+
},
31+
"homepage": "https://www.drfdocs.com/",
32+
"dependencies": {
33+
"bootstrap": "=3.3.6",
34+
"bootswatch": "=3.3.6",
35+
"font-awesome": "=4.5.0"
36+
},
37+
"devDependencies": {
38+
"less": "=2.5.3",
39+
"less-plugin-clean-css": "=1.5.1",
40+
"watch": "=0.16.0"
41+
}
42+
}

rest_framework_docs/templates/rest_framework_docs/base.html

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% load staticfiles %}
1+
{% load static from staticfiles %}
22

33
<!DOCTYPE html>
44
<html>
@@ -9,15 +9,8 @@
99

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

12-
<!-- Bootstrap & Flatly -->
13-
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.5/flatly/bootstrap.min.css" rel="stylesheet">
14-
<!-- Font Awesome -->
15-
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet">
1612
<!-- Custom Style -->
17-
<link rel="stylesheet/less" type="text/css" href="{% static "less/style.less" %}" />
18-
19-
<!-- LESS CSS -->
20-
<script src="//cdnjs.cloudflare.com/ajax/libs/less.js/2.5.3/less.min.js"></script>
13+
<link rel="stylesheet" href="{% static "css/style.css" %}">
2114
</head>
2215

2316
<body>

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@
2020
'License :: OSI Approved :: BSD License',
2121
'Operating System :: OS Independent',
2222
'Programming Language :: Python',
23+
'Programming Language :: Python :: 2.7',
2324
'Programming Language :: Python :: 3',
2425
'Programming Language :: Python :: 3.4',
25-
'Programming Language :: Python :: 3.5',
26+
'Programming Language :: Python :: 3.5'
2627
],
2728
)

0 commit comments

Comments
 (0)