# Update individuals in website

**URL:** <https://gramps.discourse.group/t/update-individuals-in-website/1760>\
**Category:** Development\
**Tags:** websolutions\
**Created:** [August 21, 2021, 9:11pm UTC](https://gramps.discourse.group/t/update-individuals-in-website/1760 "2021-08-21T21:11:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![garfy](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@garfy](https://gramps.discourse.group/u/garfy)\
**Post date:** [August 21, 2021, 9:11pm UTC](https://gramps.discourse.group/t/update-individuals-in-website/1760/1 "2021-08-21T21:11:51Z")

</div>

I’ve added images to the birth, death and mariage gallery and added the number of the certificate in description of the corresponding birth, death and mariage section. To get a good overview of what certicate I’m missing I want to edit gramps\plugins\webreport\person.py but I always get errors when I want to open the website part in Gramps. Probably because I’m trying to access another object.  
Can anyone help me with this one please? I’m not very familiar with Python and the objects in Gramps …  
What I want to accomplish is when I open individuals.html I get 3 extra columns with an icon when the certificate is added in the gallery with as alt-text the certificatenumber I added in the description.

---

<div class="post-metadata">

**Author:** ![SNoiraud](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/snoiraud/32/72_2.png) [@SNoiraud](https://gramps.discourse.group/u/SNoiraud)\
**Post date:** [August 23, 2021, 7:39am UTC](https://gramps.discourse.group/t/update-individuals-in-website/1760/2 "2021-08-23T07:39:38Z")

</div>

What kind of error do you get ?

---

<div class="post-metadata">

**Author:** ![garfy](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@garfy](https://gramps.discourse.group/u/garfy)\
**Post date:** [August 23, 2021, 6:02pm UTC](https://gramps.discourse.group/t/update-individuals-in-website/1760/3 "2021-08-23T18:02:34Z")

</div>

No errors for now but I don’t get any mediapaths. This is what I’ve added so far:  
photolist = self.person.get\_media\_list()  
if photolist:  
photo\_handle = photolist[0].get\_reference\_handle()  
photo = self.r\_db.get\_media\_from\_handle(photo\_handle)  
fullpath = media\_path\_full(self.r\_db, photo.get\_path())  
tcell = fullpath  
else:  
tcell = "&nbsp;"  
samerow = True  
trow += Html(“td”, class\_=“ColumnName”,  
inline=samerow) + tcell

I’m trying to get the filepaths of the media so I can check if it contains a certain string but first step is to get the filepaths and that does not work for now 🙂  
It fills my tcell with &nbsp; for now.

---

<div class="post-metadata">

**Author:** ![garfy](https://avatars.discourse-cdn.com/v4/letter/g/c57346/32.png) [@garfy](https://gramps.discourse.group/u/garfy)\
**Post date:** [August 23, 2021, 9:28pm UTC](https://gramps.discourse.group/t/update-individuals-in-website/1760/4 "2021-08-23T21:28:50Z")

</div>

Ok, I get something … whatever I put: photo.get\_description, photo.get\_path, … I always get the date of death

```
                for photo_ref in self.person.get_media_list():
                    photo = self.r_db.get_media_from_handle(photo_ref.ref)
                    if photo:
                        #media_list += event.get_media_list()
                        fullpath = media_path_full(self.r_db, photo.get_path())
                        tcell = fullpath
                    else:
                        tcell = "&nbsp;"
                samerow = True
                trow += Html("td", class_="ColumnName",
                         inline=samerow) + tcell
```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [September 23, 2021, 1:43am UTC](https://gramps.discourse.group/t/update-individuals-in-website/1760/5 "2021-09-23T01:43:11Z")

</div>

Closed on September 23, 2021, 1:43am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
