Html – display information using django tags
I am writing a site on Django, the purpose of this site is to create a test to assess students' knowledge I need help with outputting options for answers to a question I keep the questions in a list and…
I am writing a site on Django, the purpose of this site is to create a test to assess students' knowledge I need help with outputting options for answers to a question I keep the questions in a list and…
I am building a very simple application which includes one page where a user submits a list of zip codes and then is returned a file with zip codes in a certain radius of the original list. My problem is…
I have a button that I want to send two requests to the server when clicking. The setup is like this: <button id="add-item" hx-get="some-url" hx-trigger="click" hx-target="#item-form" hx-swap="beforeend" type="button">Add item</button> <br> <div hx-get="some-other-url" hx-trigger="from: #add-item" hx-swap="beforeend"> </div> I have tried using…
I have a Django backend in which I have pasted build directory of react project (after running npm run build). I see a bunch of web pages of react project opening when opened through code, i.e. <Link className='dropdown-item' to='/customer/dashboard'>Dashboard</Link> opens…
Essentially I need to pass a few variables into the same HTML page in Django, yet I can only seem to register one. Here is the View for the variable I want to use: @login_required def dtasks_24(request): usern = str(request.user)…
The button should be a small vertical rectangle and the top width should stick out a little. It should also be white before pressing and crimson after pressing. And when the pointer goes over this button, the text "Add" and…
When a user logs in, I want to see their profile picture if they have one; if not, the default profile picture should be displayed. Here is my view.py def header(request): if request.session.has_key('id'): user_id = request.session['id'] user = registertb.objects.get(id=user_id) return…
I've a question, I am a Django developer, in my program I want to write a JavaScript file that when we click a button, the script file create a new form. The javaScript file: function noid(){ console.log("on"); const mydiv =…
Suppose that I have the following code, <p>aaa<a>bbb</a>ccc</p> the rendered web page will be like this However, when the text "aaa", "bbb", "ccc" becomes pretty long, I want to split this single line into multiple lines for readability, like <p>…
I want to get a report by chart from my model but I can't figured out how to pass data from a dictionary to chart using chart.js? here is my model: class Book(models.Model): number = models.CharField(_("number"), max_length=255) title = models.CharField(_("title"),…