from django.conf.urls.defaults import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from mittun.views import IndexView, AboutView admin.autodiscover() urlpatterns = patterns( '', url(r'^$', IndexView.as_view()), url(r'^index/?$', IndexView.as_view(), name="index"), url(r'^about/?$', AboutView.as_view(), name="about"), url(r'^admin/', include(admin.site.urls)), url(r'^sponsors/?$', include('mittun.sponsors.urls')), ) urlpatterns += staticfiles_urlpatterns()
from django.conf.urls.defaults import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from mittun.views import IndexView, AboutView admin.autodiscover() urlpatterns = patterns( "", url(r"^$", IndexView.as_view()), url(r"^index/?$", IndexView.as_view(), name="index"), url(r"^about/?$", AboutView.as_view(), name="about"), url(r"^admin/", include(admin.site.urls)), url(r"^bootstrap/?$", include("events.urls")), ) urlpatterns += staticfiles_urlpatterns()
def test_index_view_should_use_index_template(self): response = IndexView.as_view()(self.request) self.assertTrue('index.html' in response.template_name)
def test_should_get_the_index_and_get_a_200_status_code(self): response = IndexView.as_view()(self.request) self.assertEqual(response.status_code, 200)
from django.conf.urls.defaults import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from mittun.views import IndexView, AboutView admin.autodiscover() urlpatterns = patterns('', url(r'^$', IndexView.as_view()), url(r'^index/?$', IndexView.as_view(), name="index"), url(r'^about/?$', AboutView.as_view(), name="about"), url(r'^admin/', include(admin.site.urls)), url(r'^sponsors/?$', include('mittun.sponsors.urls')), ) urlpatterns += staticfiles_urlpatterns()