walkasjesus / walkasjesus_framework

This is the Jesus Commandments Application which is build in a Python Framework
GNU General Public License v3.0
1 stars 0 forks source link

Add model to get specific bible text on other pages #23

Closed walkasjesus closed 5 years ago

walkasjesus commented 5 years ago

On the vision page, we collect some bible references. Now I just typed the bible verses manually. It would be better if I can use a variable, which calls the bible_api to get the bible verse in the selected translation and language. If we do this in a model, we can do this more often in the website.

Ikbengeenrobot commented 5 years ago

I built something that works like this:

john_3_16 = BibleReference(selected_bible, BibleBooks.John, 3, 16)

and then sent it to the template, for example like:

return render(request, 'commandments/detail.html', {'john_3_16': john_3_16,

and display it on the page like:

{{ john_3_16.text }}

walkasjesus commented 5 years ago

Wow, very awesome! Thank you!