I want my url to accept 0 or more digits(positive or negative integers), I mean it should match '/','/0',...,'/9' as well as '/-9','/-88' etc.
This is the regex I am using ^([-]?[0-9]*)/$ . It works for all urls except '/', what is the problem with this regex?
EDIT:
This is my urlpatterns in urls.py in project directory:
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'',include('basecalendar.urls'), name='date'),
]
and this is urlpattern for basecalendar
urlpatterns=[
url(r'^([-]?[0-9]*)/$',views.get_date),
]
urls.pyfile. May be you have assigned another view for/url.