diff options
| author | Tom Christie | 2012-10-30 14:32:31 +0000 |
|---|---|---|
| committer | Tom Christie | 2012-10-30 14:32:31 +0000 |
| commit | 9b30dab4f772f67a626e176dc4fae0a3ef9c2c81 (patch) | |
| tree | ca138abf4792f58ffa28684f784f201ee1eef6d7 /docs/howto/setup.rst | |
| parent | 7e5b1501b5cede61a9391fb1a751d2ebcdb37031 (diff) | |
| parent | 4e7805cb24d73e7f706318b5e5a27e3f9ba39d14 (diff) | |
| download | django-rest-framework-9b30dab4f772f67a626e176dc4fae0a3ef9c2c81.tar.bz2 | |
Merge branch 'restframework2' into rest-framework-2-merge2.0.0
Conflicts:
.gitignore
.travis.yml
AUTHORS
README.rst
djangorestframework/mixins.py
djangorestframework/renderers.py
djangorestframework/resources.py
djangorestframework/serializer.py
djangorestframework/templates/djangorestframework/base.html
djangorestframework/templates/djangorestframework/login.html
djangorestframework/templatetags/add_query_param.py
djangorestframework/tests/accept.py
djangorestframework/tests/authentication.py
djangorestframework/tests/content.py
djangorestframework/tests/reverse.py
djangorestframework/tests/serializer.py
djangorestframework/views.py
docs/examples.rst
docs/examples/blogpost.rst
docs/examples/modelviews.rst
docs/examples/objectstore.rst
docs/examples/permissions.rst
docs/examples/pygments.rst
docs/examples/views.rst
docs/howto/alternativeframeworks.rst
docs/howto/mixin.rst
docs/howto/reverse.rst
docs/howto/usingurllib2.rst
docs/index.rst
docs/topics/release-notes.md
examples/sandbox/views.py
rest_framework/__init__.py
rest_framework/compat.py
rest_framework/utils/breadcrumbs.py
setup.py
Diffstat (limited to 'docs/howto/setup.rst')
| -rw-r--r-- | docs/howto/setup.rst | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/docs/howto/setup.rst b/docs/howto/setup.rst deleted file mode 100644 index f0127060..00000000 --- a/docs/howto/setup.rst +++ /dev/null @@ -1,73 +0,0 @@ -.. _setup: - -Setup -===== - -Templates ---------- - -Django REST framework uses a few templates for the HTML and plain text -documenting renderers. You'll need to ensure ``TEMPLATE_LOADERS`` setting -contains ``'django.template.loaders.app_directories.Loader'``. -This will already be the case by default. - -You may customize the templates by creating a new template called -``djangorestframework/api.html`` in your project, which should extend -``djangorestframework/base.html`` and override the appropriate -block tags. For example:: - - {% extends "djangorestframework/base.html" %} - - {% block title %}My API{% endblock %} - - {% block branding %} - <h1 id="site-name">My API</h1> - {% endblock %} - - -Styling -------- - -Django REST framework requires `django.contrib.staticfiles`_ to serve it's css. -If you're using Django 1.2 you'll need to use the seperate -`django-staticfiles`_ package instead. - -You can override the styling by creating a file in your top-level static -directory named ``djangorestframework/css/style.css`` - - -Markdown --------- - -`Python markdown`_ is not required but comes recommended. - -If markdown is installed your :class:`.Resource` descriptions can include -`markdown formatting`_ which will be rendered by the self-documenting API. - -YAML ----- - -YAML support is optional, and requires `PyYAML`_. - - -Login / Logout --------------- - -Django REST framework includes login and logout views that are needed if -you're using the self-documenting API. - -Make sure you include the following in your `urlconf`:: - - from django.conf.urls.defaults import patterns, url - - urlpatterns = patterns('', - ... - url(r'^restframework', include('djangorestframework.urls', namespace='djangorestframework')) - ) - -.. _django.contrib.staticfiles: https://docs.djangoproject.com/en/dev/ref/contrib/staticfiles/ -.. _django-staticfiles: http://pypi.python.org/pypi/django-staticfiles/ -.. _URLObject: http://pypi.python.org/pypi/URLObject/ -.. _Python markdown: http://www.freewisdom.org/projects/python-markdown/ -.. _markdown formatting: http://daringfireball.net/projects/markdown/syntax -.. _PyYAML: http://pypi.python.org/pypi/PyYAML
\ No newline at end of file |
