title: How can I list all the nodes in my database?
body: <p>I'm trying to create a simple model <code>Node</code> and a simple web page that shows all of my nodes in a list. But it seems not working and everytime I change the code I got a new error. So I gave up and came to here.This is what I did:
  I created a Node model:</p>
  
  <pre><code>class Node(models.Model):
      ID = models.DecimalField(max_digits=9, decimal_places=6)
      nb_solenoid = models.DecimalField(max_digits=9, decimal_places=6, null=True, blank=True)
      connexion = models.CharField(max_length=255)
  
      def get_absolute_url(self):
          return reverse("node:index", kwargs={"id": self.id})
  </code></pre>
  
  <p>with this form:</p>
  
  <pre><code>class NodeForm(forms.ModelForm):
  ID = forms.DecimalField(initial=0)
  nb_solenoid = forms.DecimalField(initial=1)
  connexion = forms.CharField(required=False,
                              widget=forms.Textarea(
                                    attrs={
                                        "placeholder": "type of connexion"
                                    }))
      class Meta:
          model = Node
          fields = [
              'ID',
              'nb_solenoid',
              'connexion'
          ]
  </code></pre>
  
  <p>And this is my views.py:</p>
  
  <pre><code>def index(request):
      queryset = Node.objects.all()
      context = {
          "object_list": queryset
      }
      return render(request, "node/index.html", context)
  </code></pre>
  
  <p>This is my code in urls.py:</p>
  
  <pre><code>urlpatterns = [path('', views.index, name='index')]
  </code></pre>
  
  <p>When I call this url: <code>http://localhost:8000/node</code> I get this error now:</p>
  
  <pre><code>NoReverseMatch at /node
  Reverse for 'index' with keyword arguments '{'id': 1}' not found. 1 pattern(s) tried: ['node$']
  </code></pre>
  
  <p>What is a NoReverseMatch error and how do I fix my problem? Let me say that I'm a Django beginner developer.
  Thank you.</p>