You will now create the front page of your web application, as follows:
- Go to the directory containing the Django wildlife web application and add the following lines to the urls.py file under chp09/wildlife/wildlife:
from django.conf.urls import patterns, include, url from django.conf import settings from sightings.views import get_geojson, home from django.contrib import admin admin.autodiscover() urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^geojson/', get_geojson), url(r'^$', home), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # media files
- Open the views.py file under chp09/wildlife/sightings and add the following code. The home view will return the home page of your application, ...