I have tried two different style of views: Function-based and class-based. I have two functions in my views.py and i don’t know how to call both of them under single same url. I have seen suggestions to combine both functions into one but it still doesn’t work. Tried get() from class-based view an…
Tag: html
How to click a button on a website by finding its id
When I run the code, the website loads up fine but then it won’t click on the button- an error appears saying the element is not interacterble. What do I need to do to click the button? I am relatively new to this and would be grateful for any help. I have already tried finding it by id and tag.
How to display hidden html elements using BeautifulSoup?
I’m trying to scrape video from the website. I can find the video link using Chrome DevTools. But when I use BeautifulSoup to get the video link. The link is hidden. Please help modify the code below to get the video link. There is the screenshot of the Chrome DevTools. Basically, I need the ‘src&…
How to show more objects in my html with django (queries)
I want to show more queries within my html page but it only shows a single object. I do not know how to add more This is in mysql, html, django1.11 and python 2.7.15 views.py i need add object mapa and competencias. The object alumno i dont have problem Answer User filter instead of get. Because, get returns …
Django stops with “generator raised StopIteration” when html form allows for file upload
My setup is Windows 10, Python 3.7, Apache 2.4/mod_wsgi. When I add this enctype=”multipart/form-data” in my form (just by adding this attribute, only — no files are attached to the form) I get this error when submitting: My Django code is this: And this is full traceback: Any ideas what is …
Why doesn’t Flask app enter GET method but does enter POST methods?
I apologize, this has to be a duplicate but I haven’t found anything that’s helped, so I imagine it must be an import or syntax issue? Also, I’m on crash course levels of Python and HTML here, and it’s finals week, so bear with me. I’m working on a homework assignment that specif…
Selenium – can’t find visible element until HTML is inspected?
I am currently using Selenium for a webcrawling application, and after several successful modules, the following situation left me stuck: I’m trying to locate an element of the class “menu” with the text “Reports” that is located inside a frame named “frame_applic”. P…
Beautiful Soup Nested Tag Search
I am trying to write a python program that will count the words on a web page. I use Beautiful Soup 4 to scrape the page but I have difficulties accessing nested HTML tags (for example: <p class=”hello”> inside <div>). Every time I try finding such tag using page.findAll() (page is Bea…
generating drop down list of users in database using wtforms and sqlalchemy
I am trying to generate a drop down list of all the users in my database so I can assign admins later that can edit their information. I keep getting the following error from my template: views.py forms.py models.py mobility_add_users.html More of the error readback I’m still new to this so please go ea…
How can I run a Python script in HTML?
Currently I have some Python files which connect to an SQLite database for user inputs and then perform some calculations which set the output of the program. I’m new to Python web programming and I want to know: What is the best method to use Python on the web? Example: I want to run my Python files wh…