title: Reverse for 'event_detail' with arguments '('',)' and keyword arguments '{}' not found. 1 pattern(s) tried: ['events/(?P<id>\\d+)/$']
body: <p>I'm following this tutorial <a href="http://slash4.net/blog/learn-django-in-4-hours" rel="nofollow">http://slash4.net/blog/learn-django-in-4-hours</a>, and i get this Error NoReverseMatch at /   ,when i run <a href="http://localhost:8000/" rel="nofollow">http://localhost:8000/</a></p>
  
  <p>urls.py</p>
  
  <pre><code>urlpatterns = [
      url(r'^admin/', include(admin.site.urls)),
      url(r'^$', 'events.views.home', name='home'),
      url(r'^events/$', 'events.views.list', name='event_list'),
      url(r'^events/(?P&lt;id&gt;\d+)/$', 'events.views.detail', name='event_detail'),
  
      url(r'^register/$', 'events.views.register', name='register'),
      url(r'^login/$', auth_view.login, name='login', kwargs={'template_name': 'users/login.html'}),
      url(r'^logout/$', auth_view.logout, name='logout', kwargs={'next_page': '/'}),
  
      url(r'^events/join/(?P&lt;event_id&gt;\d+)/$', 'events.views.join', name='event_join'),
      url(r'^events/cancel/(?P&lt;event_id&gt;\d+)/$', 'events.views.cancel', name='event_cancel'),
      url(r'^user_event/(?P&lt;user_id&gt;\d+)/$', 'events.views.user_event', name='user_event')
  ]
  </code></pre>
  
  <p>in the templates, Error during template rendering, error at line 55.</p>
  
  <p>this is line 55: </p>
  
  <pre><code>&lt;h4&gt;&lt;a href="{% url 'event_detail' event_id %}"&gt;{{ event.title }}&lt;/a&gt;&lt;/h4&gt;
  </code></pre>
  
  <p>views.py</p>
  
  <pre><code>from  datetime import datetime
  from django.shortcuts import render
  
  from django.contrib.auth.forms import UserCreationForm
  from django.http import HttpResponseRedirect
  
  from django.contrib.auth.decorators import login_required
  from django.core.urlresolvers import reverse
  
  from django.contrib.auth.models import User
  
  from .models import Event
  
  def home(request):
      try:
          event = Event.objects.filter(date__gt=datetime.now()).order_by('date')[:1][0]
      except:
          event = []
      return render(request, 'events/home.html', {'event': event})
  
  def list(request):
      event_list = Event.objects.all().order_by('date');
      return render(request, 'events/list.html', {'event_list': event_list})
  
  def detail(request, id):
     event = Event.objects.get(id=id)
     joined = event.guest.filter(id=request.user.id)
     return render(request, 'events/detail.html', {'event': event, 'joined': joined})
  
  def register(request):
      if request.method == 'POST':
         form = UserCreationForm(request.POST)
         if form.is_valid():
             new_user = form.save()
             return HttpResponseRedirect("/")
      else:
         form = UserCreationForm()
      return render(request, "users/register.html", {
     'form': form,
      })
  
  @login_required
  def join(request, event_id):
      try:
          # already joined
          event = Event.objects.get(id=event_id, guest=request.user)
          message = "You have already joined this event"
      except Event.DoesNotExist as e:
          # Event exist but joined
          try:
              event = Event.objects.get(id=event_id)
              event.guest.add(request.user)
              event.save()
              message = "You have joined this event"
          except Event.DoesNotExist as e:
              message = "Error on event joining"
  
      url = "%s?msg=%s" % (reverse('event_detail', args=[event_id]), message)
      return HttpResponseRedirect(url)
  
  @login_required
  def cancel(request, event_id):
      try:
          event = Event.objects.get(id=event_id, guest=request.user)
          event.guest.remove(request.user)
          event.save()
          message = "Your request not to attend has been saved"
      except Event.DoesNotExist as e:
              message = "Error on cancelling your attedance on event"
  
      url = "%s?msg=%s" % (reverse('event_detail', args=[event_id]), message)
      return HttpResponseRedirect(url)
  
  def user_event(request, user_id):
      event_list = Event.objects.filter(guest__id=user_id)
      user = User.objects.get(id=user_id)
  
      try:
          event_list = Event.objects.filter(guest__id=user_id)
          user = User.objects.get(id=user_id)
      except:
          event_list = []
          user = {}
  
      print(event_list)
  
      return render(request, 'events/user_event.html', {'event_list':    event_list, 'user': user})
  </code></pre>
  
  <p>thanks for ur support</p>