Please help. How can I get the name/string representation of the objects in my admin. I am seeing object (1), object (2)

I am working on the Django tutorial by W3 Schools. I have got up to where I customize the 404 page. I wanted to add images to the member details page. So I went to the tutorial by Code with Stein to see how he added images to his Item page. I have added the MEDIA_URL, and the MEDIA_ROOT. When I go to my dashboard I am able to upload the image. But when I try to refresh so I see the names of the objects I get a Server Error (500).
my models.py file

from django.db import models

class Member(models.Model):
    firstname = models.CharField(max_length=255)
    lastname = models.CharField(max_length=255)
    phone = models.IntegerField(null=True)
    joined_date = models.DateField(null=True)
    image = models.ImageField(upload_to='member_images', blank=True, null=True)

    def __str__(self):
        return self.name

the views.py file

# from django.shortcuts import render
from django.http import HttpResponse
from django.template import loader
from .models import Member

def members(request):
    mymembers = Member.objects.all().values()
    template = loader.get_template('all_members.html')
    # template = loader.get_template('myfirst.html')
    # return HttpResponse("Hello world. Say 'Congratulations' to Zack Amata!!")
    context = {
        'mymembers': mymembers,
    }
    return HttpResponse(template.render(context, request))

def details(request, id):
    mymember = Member.objects.get(id=id)
    template = loader.get_template('details.html')
    context = {
        'mymember': mymember,
    }
    return HttpResponse(template.render(context, request))

def main(request):
    template = loader.get_template('main.html')
    return HttpResponse(template.render())

the static section of the settings.py file

# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/5.1/howto/static-files/

STATIC_URL = 'static/'
MEDIA_URL = 'media/'
MEDIA_ROOT = BASE_DIR / 'media'

Please don’t. Stop immediately and move on to another source. There are too many good resources for you to be spending time using it.

I have encountered multiple issues (here and elsewhere) with people trying to learn from it and getting all sorts of mistaken ideas.

Check out the Education section of the Awesome Django page to find the best known materials.

Thank you very much. Could you please suggest a source where I could learn how to build a blog with images and the ability to comment on posts. If that is in order.

Okay will check Awesome Django

In your Member model, you have a __str__ method that’s trying to return self.name, but there’s no name field in your model.

from django.db import models

class Member(models.Model):
    firstname = models.CharField(max_length=255)
    lastname = models.CharField(max_length=255)
    phone = models.IntegerField(null=True)
    joined_date = models.DateField(null=True)
    image = models.ImageField(upload_to='member_images', blank=True, null=True)

    def __str__(self):
        return f"{self.firstname} {self.lastname}"

Thank you very much. I really appreciate.