Skip to content

Commit 75c4da9

Browse files
author
Emmanouil Konstantinidis
committed
Init View
1 parent 75a8527 commit 75c4da9

File tree

5 files changed

+31
-1
lines changed

5 files changed

+31
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# drf-docs [![Build Status](https://travis-ci.com/ekonstantinidis/drf-docs.svg?token=9QR4ewbqbkEmHps6q5sq&branch=master)](https://travis-ci.com/ekonstantinidis/drf-docs)
2-
Documentation for Web APIs made with Django Rest Framewor.
2+
Documentation for Web APIs made with Django Rest Framework.
33

44

55
### Prerequisites
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>DRF Docs</title>
6+
</head>
7+
<body>
8+
<h1>Django Rest Frameworks Docs</h1>
9+
10+
</body>
11+
</html>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{% extends "drfdocs/base.html" %}

drfdocs/urls.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from django.conf.urls import url
2+
from drfrocs.views import DRFDocsView
3+
4+
urlpatterns = [
5+
# Url to view the API Docs
6+
url(r'^docs/$', DRFDocsView.as_view(), name='drfdocs'),
7+
]

drfdocs/views.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from django.views.generic.base import TemplateView
2+
3+
4+
class DRFDocsView(TemplateView):
5+
6+
template_name = "drfdocs/home.html"
7+
8+
def get_context_data(self, **kwargs):
9+
context = super(DRFDocsView, self).get_context_data(**kwargs)
10+
context['example'] = True
11+
return context

0 commit comments

Comments
 (0)