kopia lustrzana https://github.com/wagtail/wagtail
Removed patterns() from docs
rodzic
bd292add61
commit
53659b35b9
|
@ -26,11 +26,11 @@ Then, in urls.py, you need to add a link to the ``wagtail.contrib.wagtailsitemap
|
|||
|
||||
from wagtail.contrib.wagtailsitemaps.views import sitemap
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = [
|
||||
...
|
||||
|
||||
url('^sitemap\.xml$', sitemap),
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
You should now be able to browse to "/sitemap.xml" and see the sitemap working. By default, all published pages in your website will be added to the site map.
|
||||
|
|
|
@ -262,7 +262,7 @@ URL Patterns
|
|||
from wagtail.wagtaildocs import urls as wagtaildocs_urls
|
||||
from wagtail.wagtailsearch import urls as wagtailsearch_urls
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = [
|
||||
url(r'^django-admin/', include(admin.site.urls)),
|
||||
|
||||
url(r'^admin/', include(wagtailadmin_urls)),
|
||||
|
@ -275,7 +275,7 @@ URL Patterns
|
|||
# For anything not caught by a more specific rule above, hand over to
|
||||
# Wagtail's serving mechanism
|
||||
url(r'', include(wagtail_urls)),
|
||||
)
|
||||
]
|
||||
|
||||
This block of code for your project's ``urls.py`` does a few things:
|
||||
|
||||
|
|
|
@ -17,13 +17,11 @@ Add an entry in your URLs configuration for ``wagtail.wagtailimages.urls``:
|
|||
from wagtail.wagtailimages import urls as wagtailimages_urls
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
urlpatterns = [
|
||||
...
|
||||
|
||||
url(r'^images/', include(wagtailimages_urls)),
|
||||
|
||||
...
|
||||
)
|
||||
]
|
||||
|
||||
|
||||
Generating URLs for images
|
||||
|
|
Ładowanie…
Reference in New Issue