Ticket #14675: contrib-apps-docs.diff

File contrib-apps-docs.diff, 4.7 KB (added by Pablo Fernandez, 14 years ago)

Explicitly included functions from urls.default in documentation for contrib apps.

  • docs/ref/contrib/admin/index.txt

    diff --git a/docs/ref/contrib/admin/index.txt b/docs/ref/contrib/admin/index.txt
    index ac517e8..e6e5d57 100644
    a b In this example, we register the default ``AdminSite`` instance  
    14721472``django.contrib.admin.site`` at the URL ``/admin/`` ::
    14731473
    14741474    # urls.py
    1475     from django.conf.urls.defaults import *
     1475    from django.conf.urls.defaults import patterns, url, include
    14761476    from django.contrib import admin
    14771477
    14781478    admin.autodiscover()
    In this example, we register the ``AdminSite`` instance  
    14881488``myproject.admin.admin_site`` at the URL ``/myadmin/`` ::
    14891489
    14901490    # urls.py
    1491     from django.conf.urls.defaults import *
     1491    from django.conf.urls.defaults import patterns, url, include
    14921492    from myproject.admin import admin_site
    14931493
    14941494    urlpatterns = patterns('',
    separate versions of the admin site -- using the ``AdminSite`` instances  
    15161516respectively::
    15171517
    15181518    # urls.py
    1519     from django.conf.urls.defaults import *
     1519    from django.conf.urls.defaults import patterns, url, include
    15201520    from myproject.admin import basic_site, advanced_site
    15211521
    15221522    urlpatterns = patterns('',
  • docs/ref/contrib/comments/example.txt

    diff --git a/docs/ref/contrib/comments/example.txt b/docs/ref/contrib/comments/example.txt
    index 424bdb1..98094c8 100644
    a b enable it in your project's ``urls.py``:  
    140140
    141141.. code-block:: python
    142142
    143   from django.conf.urls.defaults import *
     143  from django.conf.urls.defaults import patterns, url, include
    144144  from django.contrib.comments.feeds import LatestCommentFeed
    145145
    146146  feeds = {
  • docs/ref/contrib/formtools/form-wizard.txt

    diff --git a/docs/ref/contrib/formtools/form-wizard.txt b/docs/ref/contrib/formtools/form-wizard.txt
    index 370fbdc..e42c648 100644
    a b deploy the new :class:`FormWizard` object a URL in ``urls.py``. The  
    192192wizard takes a list of your :class:`~django.forms.Form` objects as
    193193arguments when you instantiate the Wizard::
    194194
    195     from django.conf.urls.defaults import *
     195    from django.conf.urls.defaults import patterns, url, include
    196196    from testapp.forms import ContactForm1, ContactForm2, ContactWizard
    197197
    198198    urlpatterns = patterns('',
  • docs/ref/contrib/gis/tutorial.txt

    diff --git a/docs/ref/contrib/gis/tutorial.txt b/docs/ref/contrib/gis/tutorial.txt
    index 9deeb78..4c1f8df 100644
    a b Let's dive in again -- create a file called ``admin.py`` inside the  
    702702Next, edit your ``urls.py`` in the ``geodjango`` project folder to look
    703703as follows::
    704704
    705     from django.conf.urls.defaults import *
     705    from django.conf.urls.defaults import patterns, url, include
    706706    from django.contrib.gis import admin
    707707
    708708    admin.autodiscover()
  • docs/ref/contrib/sitemaps.txt

    diff --git a/docs/ref/contrib/sitemaps.txt b/docs/ref/contrib/sitemaps.txt
    index b58b55c..74cfbf9 100644
    a b Example  
    241241
    242242Here's an example of a :doc:`URLconf </topics/http/urls>` using both::
    243243
    244     from django.conf.urls.defaults import *
     244    from django.conf.urls.defaults import patterns, url, include
    245245    from django.contrib.sitemaps import FlatPageSitemap, GenericSitemap
    246246    from blog.models import Entry
    247247
  • docs/ref/contrib/syndication.txt

    diff --git a/docs/ref/contrib/syndication.txt b/docs/ref/contrib/syndication.txt
    index 04f14b5..5400346 100644
    a b latest five news items::  
    8080To connect a URL to this feed, put an instance of the Feed object in
    8181your :doc:`URLconf </topics/http/urls>`. For example::
    8282
    83     from django.conf.urls.defaults import *
     83    from django.conf.urls.defaults import patterns, url, include
    8484    from myproject.feeds import LatestEntriesFeed
    8585
    8686    urlpatterns = patterns('',
    Here's a full example::  
    327327
    328328And the accompanying URLconf::
    329329
    330     from django.conf.urls.defaults import *
     330    from django.conf.urls.defaults import patterns, url, include
    331331    from myproject.feeds import RssSiteNewsFeed, AtomSiteNewsFeed
    332332
    333333    urlpatterns = patterns('',
  • docs/ref/models/instances.txt

    diff --git a/docs/ref/models/instances.txt b/docs/ref/models/instances.txt
    index 88fd4e1..7fbccf5 100644
    a b reference the name rather than the view function. A named URL  
    506506pattern is defined by replacing the pattern tuple by a call to
    507507the ``url`` function)::
    508508
    509     from django.conf.urls.defaults import *
     509    from django.conf.urls.defaults import patterns, url, include
    510510
    511511    url(r'^people/(\d+)/$',
    512512        'django.views.generic.list_detail.object_detail',
Back to Top