Python Forum
Displaying search results
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Displaying search results
#31
(Jun-16-2020, 08:36 PM)card51shor Wrote:
(Jun-16-2020, 08:01 PM)ndc85430 Wrote: That example shows you how to use a variable in a template and how to pass a value for that variable to render_template for it to be substituted in the right place. The code sample you copied above shows you how to loop over a variable and generate HTML for each of the items in it. Surely you can go one step further and think about how to put the two together?


Then show us what you've tried. We can't see your screen, so it's impossible to help you.

Thanks a lot. I really think you're trying to help me.

The other people are just trying to scold me and make me feel dumb - which I already know I'm dumber than you guys that's why I'm here asking for help. Linking me to a site doesn't really help me I keep saying it.

U don't have to show me the answer - u can tell me on here. Showing me an example doesn't help me - I'm sorry it just doesn't help me. I tried. I look at code for hours. Then I try to apply it to my code and I'm stuck.

But once I get going then I start figuring stuff out.

When I hit the wall and I'm constantly told to keep looking at other code - it just makes it worse. I'm sorry. I'm trying.

And I can't show you the things I did since I changed the code to what I have now.

I assure you I've looked at pages and pages of code and read everything there is to say.

It's not clear.

Quote:That example shows you how to use a variable in a template and how to pass a value for that variable to render_template for it to be substituted in the right place. The code sample you copied above shows you how to loop over a variable and generate HTML for each of the items in it. Surely you can go one step further and think about how to put the two together?


OK so I guess i'll just study this website. If that's all I've got.

I'm open to anyone trying to help me though.

(Jun-16-2020, 04:26 PM)pyzyx3qwerty Wrote: Seriously @card51shor? You refuse to solve a problem when we give you such big clues. We link you to sites if necessary - you have to understand there always is a reason behind what someone posts.
You just keep shouting and arguing without trying anything at all, and you remain stubborn and refuse to listen. We always help you - you just aren't taking your time to read and understand the post correctly. The same thing happened in this thread of yours too.
I have to say, I'm surprised the thread hasn't been locked yet. You call people lazy, and yet you don't do anything on your own except asking people for the answer.
Quote:This forum is focused on education. It exists to help people learn Python. We don’t exist to solve others’ problems, although that tends to be a happy byproduct of education. You should keep this in mind when writing replies.
What's the use of becoming a programmer when you just ask people to solve your problems? We will help you, but we won't always solve the answers for you.
This is the homework section in the forum - we don't give answers here.
And also, just because everyone gives you bad rating doesn't mean u do the same to a moderator - they would have done it for a reason
Hope this changes your attitude and the perception towards the members in the forum who help you

Let's just assume I've looked at numerous code examples and I still can't figure it out.

Then what?

Am I just too dumb for Python?

Or can you guys help me beyond links?
Reply
#32
No one's too dumb for python - just take your time going through the links, and you'll be able to understand the problem.
pyzyx3qwerty
"The greatest glory in living lies not in never falling, but in rising every time we fall." - Nelson Mandela
Need help on the forum? Visit help @ python forum
For learning more and more about python, visit Python docs
Reply
#33
(Jun-17-2020, 02:01 AM)pyzyx3qwerty Wrote: No one's too dumb for python - just take your time going through the links, and you'll be able to understand the problem.

well i've gone through the links already and I still don't get it.
Reply
#34
If you made code changes, then you need to start showing us what you have. Surely you can just try things again? How are we supposed to help you become unstuck if we can't see what you're trying?

This might be too much for you right now if you're already struggling with this, but you could consider using version control (e.g. Git or Mercurial) to keep track of your changes.
Reply
#35
I made changes but I'm back to using this since I know it works to some extent. I need to figure out a way to make b print out onto the screen for the user to see. I see the methods u showed. It's looking thru an array and printing each one with an html tag around it.

However I don't know how to apply that to my code.

@app.route("/search", methods=["GET", "POST"])
def search():
    search = request.form.get("search")
    search1 = search + '%'
    b = db.execute("SELECT * FROM books WHERE author LIKE :search OR isbn LIKE :search OR title LIKE :search LIMIT 10", {'search': search1}).fetchall()
    print(b)
    return render_template("search.html")
Reply
#36
That's not really helpful, because we're just back to where we were at the beginning. We need to see what you're trying regarding templates, otherwise how are we supposed to get anywhere?
Reply
#37
ok i guess i[ll just figure it out on my own. Thanks.
Reply
#38
If you want us to help you, why won't you just show us what you're trying?! I don't understand how to help unless I see the code.
Reply
#39
Because I deleted it - it didn't work. Do you want me to try again? I already was frustrated with it but I'll give it my best shot might take me a bit.
Reply
#40
Well, yes. How else do you imagine we're going to get anywhere? Again, it's impossible to help without seeing the concrete problem, because we just end up having to guess and make assumptions.

Have you ever used version control before?
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020