I am a complete newbie to django I am trying to create an app that has 3 views and 3 html pages. the tutorials I have followed so far have not shown any errors however for this one I am getting the error
while _is_wrapper(func):
^^^^^^^^^^^^^^^^^
File "C:\Users\botan\AppData\Local\Programs\Python\Python312\Lib\inspect.py", line 768, in _is_wrapper return hasattr(f, '__wrapped__') and not stop(f)
^^^^^^^
RecursionError: maximum recursion depth exceeded
C:\Users\botan\Desktop\project\myproject>
I have tried to google this error however the only answer I seem to get is that it has something to do with an iterating code that I cannot find? I posted some of my code below for some reason also the os is not accesed
import os
from django.shortcuts import render
def home(request):
return render(request, 'myproject/home.html')
def deck(request):
# Your deck view logic goes here
return render(request, 'myproject/deck.html', {'decks': {'Deck1': 10, 'Deck2': 15}})
def card(request):
# Your card view logic goes here
return render(request, 'myproject/card.html', {'card': {'word': 'Example', 'definition': 'A sample definition'}})
# myproject/views.py
import os
from django.shortcuts import render
def home(request):
return render(request, 'myproject/home.html')
def deck(request):
# Your deck view logic goes here
return render(request, 'myproject/deck.html', {'decks': {'Deck1': 10, 'Deck2': 15}})
def card(request):
# Your card view logic goes here
return render(request, 'myproject/card.html', {'card': {'word': 'Example', 'definition': 'A sample definition'}})
and here are the html pages
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Card</title>
<link rel="stylesheet" href="{% static 'myproject/css/styles.css' %}">
</head>
<body>
<!-- Your card page content goes here -->
<h1 class="main-heading">Card Page</h1>
<div class="card-details">
<p>{{ card.word }} - {{ card.definition }}</p>
<!-- Add other card details as needed -->
</div>
</body>
</html>
!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Home</title>
<link rel="stylesheet" href="{% static 'myproject/css/styles.css' %}">
</head>
<body>
<!-- Your home page content goes here -->
<h1 class="main-heading">Welcome to the Home Page</h1>
</body>
</html>