from django.conf.urls import *

urlpatterns = patterns('',
    
    (r'^video/(?P<videoid>.*)$', 'signbank.video.views.video'),
    (r'^upload/', 'signbank.video.views.addvideo'),
    (r'^delete/(?P<videoid>.*)$', 'signbank.video.views.deletevideo'),
    (r'^poster/(?P<videoid>.*)$', 'signbank.video.views.poster'),
    (r'^iframe/(?P<videoid>.*)$', 'signbank.video.views.iframe'),
)



from django.conf.urls import *

urlpatterns = patterns('',
    
    (r'^video/(?P<videoid>\d+)$', 'signbank.video.views.video'),
    (r'^upload/', 'signbank.video.views.addvideo'),
    (r'^delete/(?P<videoid>\d+)$', 'signbank.video.views.deletevideo'),
    (r'^poster/(?P<videoid>\d+)$', 'signbank.video.views.poster'),
    (r'^iframe/(?P<videoid>\d+)$', 'signbank.video.views.iframe'),
)



Use more explicit pattern for video id in URL to prevent matching trailing slash.
Use more explicit pattern for video id in URL to prevent matching trailing slash.

  from django.conf.urls import *
  
  urlpatterns = patterns('',
      
-     (r'^video/(?P<videoid>.*)$', 'signbank.video.views.video'),
+     (r'^video/(?P<videoid>\d+)$', 'signbank.video.views.video'),
      (r'^upload/', 'signbank.video.views.addvideo'),
-     (r'^delete/(?P<videoid>.*)$', 'signbank.video.views.deletevideo'),
+     (r'^delete/(?P<videoid>\d+)$', 'signbank.video.views.deletevideo'),
-     (r'^poster/(?P<videoid>.*)$', 'signbank.video.views.poster'),
+     (r'^poster/(?P<videoid>\d+)$', 'signbank.video.views.poster'),
-     (r'^iframe/(?P<videoid>.*)$', 'signbank.video.views.iframe'),
+     (r'^iframe/(?P<videoid>\d+)$', 'signbank.video.views.iframe'),
  )
  
  
  
Use more explicit pattern for video id in URL to prevent matching trailing slash.
## Code Before:
from django.conf.urls import *

urlpatterns = patterns('',
    
    (r'^video/(?P<videoid>.*)$', 'signbank.video.views.video'),
    (r'^upload/', 'signbank.video.views.addvideo'),
    (r'^delete/(?P<videoid>.*)$', 'signbank.video.views.deletevideo'),
    (r'^poster/(?P<videoid>.*)$', 'signbank.video.views.poster'),
    (r'^iframe/(?P<videoid>.*)$', 'signbank.video.views.iframe'),
)



## Instruction:
Use more explicit pattern for video id in URL to prevent matching trailing slash.
## Code After:
from django.conf.urls import *

urlpatterns = patterns('',
    
    (r'^video/(?P<videoid>\d+)$', 'signbank.video.views.video'),
    (r'^upload/', 'signbank.video.views.addvideo'),
    (r'^delete/(?P<videoid>\d+)$', 'signbank.video.views.deletevideo'),
    (r'^poster/(?P<videoid>\d+)$', 'signbank.video.views.poster'),
    (r'^iframe/(?P<videoid>\d+)$', 'signbank.video.views.iframe'),
)


