Hi everyone,
I have started to learn Django framework and I am using Python Crash Course by Eric Matthes as a reference book. I wanted to make sth slightly different than what the book shows but also I have been following mainly the book's steps. I am trying to make a web site where users can register their board games and borrow them.
I am having a problem when I want to make a user return a board game. I created a form and assign a button that would call the return function. But the page cannot be rendered and here is the error I get. https://bit.ly/3YLUeEU I believe the page isn't being rendered because I am using the form inside the loop and for some reason return_loan doesn't get a proper loan.id
I have also tried to take my form outside the loop and assign buttons, this time the page was rendered but I couldn't make the buttons get dynamically the proper id for the loan that would be returned.
Here are the requirements for my django project:
asgiref==3.5.2
beautifulsoup4==4.11.1
Django==4.1.4
django-bootstrap4==22.3
soupsieve==2.3.2.post1
sqlparse==0.4.3
My views.py : https://pastebin.com/RfnpS4yj
My urls.py : https://pastebin.com/8K6Lw63C
my_loans.html: https://pastebin.com/7q6iLUet
my_loans.html: https://pastebin.com/HvsvGrNP - Here the page is rendered but I couldn't find a way to get dynamically an id for my loan.
Here is also my github repository for my project. https://github.com/urasayanoglu/board_game_club
I haven't committed and pushed the changes I share above with the pastebin links. So those are not in the repostitory yet.
I' have been reading the documentation about forms for integrating the bootstrap 4 for django (https://bit.ly/3WFIvWE) and also django documentation for forms but I couldn't get the solution by myself.
I'd appreciate if you guys could guide me to the right direction.
Thanks in advance,
Uras
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.