Django tourist attractions challenge

So I just finished the tourist attractions challenge but I have a doubt concerning the variable statename it is displayed like this in the

from django.shortcuts import render

# This is the dictionary for all the attractions
attractions = [
  { 'attraction_name' : 'Niagra Falls', 'state' : 'New York'},
  { 'attraction_name' : 'Grand Canyon National Park', 'state' : 'Arizona'},
  { 'attraction_name' : 'Mall of America', 'state' : 'Minnesota'},
  { 'attraction_name' : 'Mount Rushmore', 'state' : 'South Dakota'},
  { 'attraction_name' : 'Times Square', 'state' : 'New York'},
  { 'attraction_name' : 'Walt Disney World', 'state' : 'Florida'}

def home(request):
  # The context is all of the variables we want passed into the template.
  context = {"attractions" : attractions}
  return render(request, 'tourist_attractions/home.html', context)

def details(request, statename):
  # We replace the dash with a space for later ease of use. The dash is there because of the slugify filter.
  context = {"attractions" : attractions, "statename" : statename.replace("-", " ")}
  return render(request, 'tourist_attractions/details.html', context)

But what exactly is that variable? Cuz I can see that attractions is a list of dictionaries, for example. I think I’m missing something here.

I have the same doubt. I don’t understand how Python / Django convert “state” to “statename”.
Could someone explain this?

My thoughts exactly! But i looked in all the files and realised that ‘statename’ is actually a field name declared when defining the model for state.

class State(models.Model):
stateName = models.CharField(max_length=50, verbose_name=“State Name”)