pass non-english letters in urls django 3.1

I have a website showing some news. Some of the article’s names are not in English language and they are Persian. If I click on the title of a news, it should show the details of that news.When I test it on local host, it works fine. But on the real host I get internal server (500) error. Does anyone know how should I pass Persian names in the url?

I use Django version 3.1.

This is the model of News app:

class News(models.Model):

    name = models.CharField(max_length = 500, default="-")

This is the url:

    path('details/<word>/', views.news_details, name="news_details"),

It is the template:

{% for i in news %}
<a href="{% url 'news_details' %}"><img class="img-full" style="width: 390px; height:300px;" src="{{i.picurl}}" alt=""></a>

{% endfor %}

and it is

def news_details(request,word):

    news = News.objects.get(name = word)

    return render(request, 'front/news_details.html',{'news':news})

Having the error traceback would help a lot debugging this.