text: """
  Definition of urls for python_webapp_django.
  """
  
  from datetime import datetime
  from django.conf.urls import url
  from django.conf.urls import include
  import django.contrib.auth.views
  
  import app.forms
  import app.views
  
  # Uncomment the next lines to enable the admin:
  # from django.conf.urls import include
  # from django.contrib import admin
  # admin.autodiscover()
  from django.conf import settings
  from django.conf.urls.static import static
  
  urlpatterns = [
      # Examples:
      url(r'^$', app.views.home, name='home'),
      url(r'^contact$', app.views.contact, name='contact'),
      url(r'^about', app.views.about, name='about'),
      url('api-auth/',include('rest_framework.urls')),
      url('api/',include('app.api.urls')),
      url(r'^login/$',
          django.contrib.auth.views.LoginView,
          {
              'template_name': 'app/login.html',
              'authentication_form': app.forms.BootstrapAuthenticationForm,
              'extra_context':
              {
                  'title': 'Log in',
                  'year': datetime.now().year,
              }
          },
          name='login'),
      url(r'^logout$',
          django.contrib.auth.views.LogoutView,
          {
              'next_page': '/',
          },
          name='logout'),
  
      # Uncomment the admin/doc line below to enable admin documentation:
      # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
  
      # Uncomment the next line to enable the admin:
      # url(r'^admin/', include(admin.site.urls)),
  ]
  if settings.DEBUG:
          urlpatterns += static(settings.MEDIA_URL,
                                document_root=settings.MEDIA_ROOT)
  