Zum Inhalt springen

rasenganIT

Mitglieder
  • Gesamte Inhalte

    75
  • Benutzer seit

  • Letzter Besuch

  • Tagessiege

    1

Alle Inhalte von rasenganIT

  1. Noch eine Frage: Leetcode Aufgaben (siehe Bild), die Lösung habe ich von ChatGPT und auf Leetcode ist sie richtig aber wenn ich mir das Resultat ausgeben lasse dann kommt da als ID: 2 und 3 statt wie auf Leetcode 2 und 4. Nach meinem Verständnis kann die Funktion nicht richtig sein.. Wieso ist das richtig?
  2. Mein Fehler :), danke. Bin 2 Uhr wach geworden und dachte ich lerne mal SQL und war total verwirrt. PS: Mache eine Umschulung
  3. Ich dachte der SQL Befehl würde die zwei Tabellen joinen wo die CustomerID die selbe ist, sprich 2. Wieso werden in der Ausgabe auch die anderen Zeilen ausgegeben wenn nur "Ana Trujilo..." diese Vorgabe erfüllt?
  4. Das war die Lösung "Beachte, dass es keinen Raum zwischen product und = gibt, um sicherzustellen, dass das {% with %}-Tag korrekt interpretiert wird." Ich danke dir
  5. {% include "store/base.html" %} {% load static %} {% block content %} <main class="pt-5"> <div class="container"> <h1 class="h5"> Warenkorb </h1> <hr> {% for item in cart %} {% with product = item.product %} <br> <div class="row mb-4 border product-item"> { <div class="col-md-3 col-lg-2 order-md-first bg-light"> <img class="img-fluid mx-auto d-block" width="200px" alt="Responsive image" src="{{product.image.url}}"> <!-- Product image --> </div> <div class="col-md-9 col-lg-10 ps-md-3 ps-lg-10"> <a href="" class="text-decoration-none text-reset"> <!-- Product get absolute url --> <h1 class="h5 pt-2"> {{product.title}}<!-- Product title --> </h1> </a> <div class="border"> <div class="col border-bottom"> <div class="row p-3"> <div class="col-6"> Produkt </div> <div class="col-6 text-end"><span class="h6 fw-bold">€ {{product.price}}<!-- Product price --> </span></div> </div> </div> <div class="col"> <div class="row p-3"> <div class="col-12"> <label for="select">Anzahl</label> &nbsp; <select id=""> <option selected> {{item.qty}} </option> <option value="">1</option> <option value="">2</option> <option value="">3</option> <option value="">4</option> </select> <br> <br> <button type="button" id="update-button" class="btn btn-primary btn-sm update-button"> Aktualisieren </button> &nbsp; <button type="button" id="delete-button" class="btn btn-danger btn-sm delete-button"> Löschen </button> </div> </div> </div> </div> </div> </div> {% endwith %} {% endfor %} <div class="col-12 text-end"> <div class="h6 fw-bold"> Gesamtsumme: € <div id="total" class="d-inline-flex"> <!-- cart.get_total --> </div></div> </div> </div> </main> {% endblock %} Hallo , ich versuche gerade mit Django eine Ecommerce Webseite zu programmieren und bekommen diesen Fehler. Kann mir jemand weiterhelfen?

Fachinformatiker.de, 2024 by SE Internet Services

fidelogo_small.png

Schicke uns eine Nachricht!

Fachinformatiker.de ist die größte IT-Community
rund um Ausbildung, Job, Weiterbildung für IT-Fachkräfte.

Fachinformatiker.de App

Download on the App Store
Get it on Google Play

Kontakt

Hier werben?
Oder sende eine E-Mail an

Social media u. feeds

Jobboard für Fachinformatiker und IT-Fachkräfte

×
×
  • Neu erstellen...