Commit ee8ab283 by Tom Christie

Style tweaks

parent 49f87cfb
...@@ -10,8 +10,18 @@ def api_view(http_method_names): ...@@ -10,8 +10,18 @@ def api_view(http_method_names):
def decorator(func): def decorator(func):
class WrappedAPIView(APIView): WrappedAPIView = type(
pass 'WrappedAPIView',
(APIView,),
{'__doc__': func.__doc__}
)
# Note, the above allows us to set the docstring.
# It is the equivelent of:
#
# class WrappedAPIView(APIView):
# pass
# WrappedAPIView.__doc__ = func.doc <--- Not possible to do this
allowed_methods = set(http_method_names) | set(('options',)) allowed_methods = set(http_method_names) | set(('options',))
WrappedAPIView.http_method_names = [method.lower() for method in allowed_methods] WrappedAPIView.http_method_names = [method.lower() for method in allowed_methods]
......
...@@ -59,6 +59,7 @@ pre { ...@@ -59,6 +59,7 @@ pre {
.page-header { .page-header {
border-bottom: none; border-bottom: none;
padding-bottom: 0px; padding-bottom: 0px;
margin-bottom: 20px;
} }
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
<div class="content-main"> <div class="content-main">
<div class="page-header"><h1>{{ name }}</h1></div> <div class="page-header"><h1>{{ name }}</h1></div>
<p class="resource-description">{{ description }}</p> {{ description }}
<div class="request-info"> <div class="request-info">
<pre class="prettyprint"><b>{{ request.method }}</b> {{ request.get_full_path }}</pre> <pre class="prettyprint"><b>{{ request.method }}</b> {{ request.get_full_path }}</pre>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment