Results not showing in public link but available in backend

First of all, I am entirely new to Anvil and python as well.

I made this project which outputs the title, the text and the link of a website in google colab.

I would now like to make a web-based application from it for personal use only.

In the backend I am seeing the results from colab, but it’s not working when I run this from the public or private link.

I think it may have to do something with the repeating_panel.

This is how everything looks like so far…

Does anybody know what the issue could be or guide me in the right direction?

by the way, this is the public link: https://icky-unequaled-leg.anvil.app

Welcome to the Forum!

Not directly related, but when you have a Question (or Answer!), it belongs in the Q&A section. Q&A has a template to help you ask your questions well. (Though you’ve done a pretty good job of that already!)

Show & Tell is mainly for things that work, and you want to show them off and tell the world about them.

For your question, the data will simply display, by default, when you have no repeating panel, or an empty repeating panel, that has no data bindings.

items is an internal property of the containing Data Grid, and should not be set in the Repeating Panel itself. In fact, in my Repeating Panels, nothing is bound to the panel itself.

Instead, I populate my Repeating Panel with display-widgets, one per columns I’ve defined in my Data Grid. Then, for each widget, I bind its text or other attribute to the appropriate column value. This gives me a choice of how I want that column value to be displayed and interacted with.

Have a look at the examples in the tutorials, or the documentation, to see how this works.

1 Like

Great advice, thanks @p.colbert !!

Yep, will write in Q&A in future, thanks mate!

@rohi Can you post a clone link to your app so I can take a look at what might be happening?

@brooke Yeah sure. Here it is: Anvil | Login

I removed the bindings but it still didn’t work.
Not sure whats happening…

In your screenshot, you show binding the repeating panel’s items property to three different things. You should never have multiple bindings for the same property. That’s the same as having three different assignment statements to the same variable, only the last will have any effect.

You should remove all the data bindings, and set the repeating panel’s items property in code after you do your server call. You’ve tried that, but gotten the assignment backwards. You want to change the items property, so it goes on the left of the equals sign, not the right.

self.repeating_panel.items = results

Oh, and after that you’ll still need something inside your repeating panel row template if you want to see anything. As Phil said, put display widgets in there and use data binding on them to display individual columns.

1 Like

Thanks to all of you. With your help I finally managed to get it working. Much appreciated!!! :raised_hands: :raised_hands:

Here is an image showing how I used Label - Display Text as display widgets.

And then I bound each one of them to one of the columns. In my case the output was the following:

[{‘title’: ‘Home | NZ Digital government’, ‘link’: ‘https://www.digital.govt.nz/’, ‘text’: ‘Digital.govt.nz is your guide to information and tools to support digital transformation across government.’}]

So, I used 3 Labels, 1 for title, 1 for link, 1 for text.

Sweet as.

Thanks a bunch guys!!

1 Like