Skip to content

Commit

Permalink
some more friendly errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hjwp committed Nov 15, 2011
1 parent f9f26d1 commit 14f29f7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mysite/polls/forms.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
from django import forms

class PollVoteForm(object):
pass
4 changes: 4 additions & 0 deletions mysite/polls/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
class TestAllPollsView(TestCase):

def test_root_url_shows_links_to_all_polls(self):
self.fail("todo: delete this line and proceed with the test") #hint: urls.py

# set up some polls
poll1 = Poll(question='6 times 7', pub_date='2001-01-01')
poll1.save()
Expand Down Expand Up @@ -40,6 +42,8 @@ def test_root_url_shows_links_to_all_polls(self):
class TestSinglePollView(TestCase):

def test_page_shows_poll_title_and_no_votes_message(self):
self.fail("todo: delete this line and proceed with the test") #hint: urls.py

# set up two polls, to check the right one gets used
poll1 = Poll(question='6 times 7', pub_date='2001-01-01')
poll1.save()
Expand Down
2 changes: 2 additions & 0 deletions mysite/urls.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from django.conf.urls.defaults import *
from django.contrib import admin
from mysite.polls import views as polls_views

admin.autodiscover()

urlpatterns = patterns('',
(r'^$', polls_views.polls),
(r'^admin/', include(admin.site.urls)),
)

0 comments on commit 14f29f7

Please sign in to comment.