Add imports to snippets/urls.py example

`snippets/urls.py` requires format_suffix_patterns and views. As-is, the final urls.py example gives the following error:
```
NameError at /snippets
name 'format_suffix_patterns' is not defined
```

I have only added two imports from earlier in the tutorial and adjusted the explanatory text.
```
from rest_framework.urlpatterns import format_suffix_patterns
from snippets import views
```
This commit is contained in:
Kyle P. Johnson 2015-03-14 13:28:57 -04:00
parent 57ec1655dc
commit 55a48f812a

View File

@ -107,6 +107,9 @@ If we're going to have a hyperlinked API, we need to make sure we name our URL p
After adding all those names into our URLconf, our final `snippets/urls.py` file should look something like this:
from django.conf.urls import url, include
from rest_framework.urlpatterns import format_suffix_patterns
from snippets import views
# API endpoints
urlpatterns = format_suffix_patterns([