1. Owen Nelson
  2. django-trawler

Commits

Owen Nelson  committed 4f916b0

hopefully fixes #4 by matching ids that are longer than 1 digit

  • Participants
  • Parent commits 34d6415
  • Branches default

Comments (0)

Files changed (2)

File src/trawler/tests.py

View file
  • Ignore whitespace
         # note: we pass the 2nd arg to satisfy the open-ended regex
         self.c.get(reverse('link_hits', args=(self.target_pk, 'baz.html',)))
         self.assertTrue(Target.objects.get(pk=self.target_pk).link_followed)
+
+class EmailTests(TestCase):
+
+    def setUp(self):
+        pass
+
+    def tearDown(self):
+        pass

File src/trawler/urls.py

View file
  • Ignore whitespace
 
 
 urlpatterns = patterns('trawler.views',
-    url(r'l/(?P<target_id>\d)/(.*)$', 'link_hits',
+    url(r'l/(?P<target_id>\d+)/(.*)$', 'link_hits',
         name='link_hits'),
-    url(r'i/(?P<target_id>\d)/(.*)$', 'img_hits',
+    url(r'i/(?P<target_id>\d+)/(.*)$', 'img_hits',
         name='img_hits'),
-    url(r'campaign/(?P<pk>\d)/$',
+    url(r'campaign/(?P<pk>\d+)/$',
         CampaignDetailView.as_view(), name='campaign_detail')
 )