Esempio n. 1
0
from django.conf.urls import patterns, url

from guestbook.views import GuestbookListView


urlpatterns = patterns('',
    url(r'^$', GuestbookListView.as_view(), name='guestbook_list'),
)
Esempio n. 2
0
 def test_adds_form_to_context(self):
     request = RequestFactory().get(reverse("guestbook_list"))
     view = GuestbookListView.as_view()
     resp = view(request)
     self.assertTrue("form" in resp.context_data)