slyapustin / django-classified

Django Classified
https://github.com/slyapustin/django-classified-demo
MIT License
171 stars 77 forks source link

URLs in item description field are unclickable text #66

Open damascene opened 1 year ago

damascene commented 1 year ago

When I post a URL in my item description field it just appear as an unclickable text. Would be useful to have them as clickable links, maybe with non indexing flag?

Possibly make this as an option in the Admin page

damascene commented 1 year ago

I was able to modify it by adding urlize to line 55 in item_detail.html template:

        {{ object.description|linebreaks }}

to

        {{ object.description|linebreaks|urlize }}

https://github.com/slyapustin/django-classified/blob/master/django_classified/templates/django_classified/item_detail.html#L55

But not sure how to make it an option in Admin.