~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to docs/howto/static-files.txt

  • Committer: Bazaar Package Importer
  • Author(s): Jamie Strandboge
  • Date: 2010-10-12 11:34:35 UTC
  • mfrom: (1.2.7 upstream)
  • mto: This revision was merged to the branch mainline in revision 30.
  • Revision ID: james.westby@ubuntu.com-20101012113435-9lnsrh0i3mxozbt0
Tags: upstream-1.2.3
ImportĀ upstreamĀ versionĀ 1.2.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.. _howto-static-files:
2
 
 
3
1
=========================
4
2
How to serve static files
5
3
=========================
42
40
 
43
41
.. function:: def serve(request, path, document_root, show_indexes=False)
44
42
 
45
 
To use it, just put this in your :ref:`URLconf <topics-http-urls>`::
 
43
To use it, just put this in your :doc:`URLconf </topics/http/urls>`::
46
44
 
47
45
    (r'^site_media/(?P<path>.*)$', 'django.views.static.serve',
48
46
            {'document_root': '/path/to/media'}),
71
69
 
72
70
    STATIC_DOC_ROOT = '/path/to/media'
73
71
 
74
 
...we could write the above :ref:`URLconf <topics-http-urls>` entry as::
 
72
...we could write the above :doc:`URLconf </topics/http/urls>` entry as::
75
73
 
76
74
    from django.conf import settings
77
75
    ...