135201
You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython
This is the correct code
for i in range(1, 6):
for j in range(1, i + 1):
print(j, end=" ")
print()
looks like you need an offtopic group, please delete the off-topic message(s) and continue this conversation at @pythonofftopic
Читать полностью…
I need a algorithm that solves constraint problems, rooms, teachers
Читать полностью…
made migrations, migrated, checked data base, there are objects with IDs, but this keeps coming up
Читать полностью…
how can I get over this goddamn "NoReverseMatch at /" error in django?
views.py
from django.shortcuts import render
from .models import Topic
def index(request):
"""The home page for learning log"""
return render(request, 'learning_logs/index.html')
def topic(request, topic_id):
topic = Topic.objects.get(id=topic_id)
entries = topic.entry_set.order_by("-date_added")
context = {"topic": topic, "entries":entries}
return render(request, "learning_logs/topics.html", context)
"""Define URL patterns for learning_logs."""
from django.urls import path
from . import views
app_name = 'learning_logs'
urlpatterns = [
# Home page
path('', views.index, name='index'),
path('topics/<int:topic_id>/', views.topic, name="topics")
]
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<p>
<a href="{% url 'learning_logs:index' %}">Learning Log</a> -
<a href="{% url 'learning_logs:topic' topic_id %}">Topics</a>
</p>
{% block content %}{% endblock content %}
</body>
</html>
<!DOCTYPE html>Читать полностью…
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Topics</title>
</head>
<body>
{% extends 'learning_logs/base.html' %}
{% block content %}
<p>Topic: {{ topic.text }}</p>
<p>Entries:</p>
<ul>
{% for entry in entries %}
<li>
<a href="{% url 'learning_logs:topic' topic.id %}">
{{ topic.text }}
</a>
</li>
{% empty %}
<li>There are no entries for this topic yet.</li>
{% endfor %}
</ul>
{% endblock content %}
</body>
</html>
I need a Python programmer to fix a script for posting tweets.
Читать полностью…
This is not a Python specific question, please delete your offtopic message, move to @PythonOfftopic and ask there.
Читать полностью…
Hi everyone, is there anyone to suggest which way is best to fix scheduling problems like school class
Читать полностью…
Using torch.compile raises the can't find triton installment issue any fix to this problem?
Читать полностью…
Which means chatGPT-written code is even harder for computers to understand
Читать полностью…
These are called Constraint Satisfaction Problems, and there are many ways to solve them I'd say backtracking is one of the common options but read more here: https://en.wikipedia.org/wiki/Constraint_satisfaction_problem
Читать полностью…
when I replace topic.id with a number like 1, it works just fine
<a href="{% url 'learning_logs:topic' topic.id %}"> <!-- doesnt work -->
<a href="{% url 'learning_logs:topic' 1 %}"> <!-- works -->
Reverse for 'topics' with arguments '('',)' not found. 1 pattern(s) tried: ['topics/(?P<topic_id>[0-9]+)/\\Z']
Django Version: 5.2.7
Читать полностью…
Rules in our groups are strictly enforced. It is strongly recommended to read our rules before engaging in any other activity!
Читать полностью…
This conversation has taken a direction I'm not comfortable with.
Читать полностью…
make terminal based tick-toc game.
my first project was to find given number is prime no.,
then prime factorization of a number
Show the full error, did you searched about htis error in google?
Читать полностью…
The error is not full so hard to say what's exactly the issue
Читать полностью…
Hi everyone. May be someone faced with an issue. I have fastapi application and uv and cannot install asyncpg using this tool. Firstly I got C++ 14.0+ build tools but now I'm getting
check.warn(importable)Читать полностью…
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.44.35207\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
hint: This usually indicates a problem with the package or the build environment.
help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking and syncing.
because those are compiled, and Python is interpreted
Читать полностью…