Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey
Filter by
Sorted by
Tagged with
1 vote
1 answer
49 views

I'm trying to add a row to my model, but it keeps coming back with: django.db.utils.ProgrammingError: relation "qmgr_def_rules" does not exist LINE 1: SELECT 1 AS "a" FROM "...
charlopa24's user avatar
1 vote
1 answer
33 views

In my django project admin I have an Order model. I display a bunch of information in the change page with the help of custom inlines. As I use a lot of related models, I want to prefetch/select the ...
Martin Faucheux's user avatar
Advice
0 votes
0 replies
18 views

Django's http response.py library provides an Http404 class that can be used to raise a "not found" exception which returns a 404 along with the following JSON payload: {"detail":&...
jpro's user avatar
  • 364
-1 votes
0 answers
43 views

So I'm building a webhook functionality for a particular Django model, as in I trigger the webhooks for 2 events. One is for creation and one for modification, as in I wanna trigger them everytime an ...
Kushagra Kaushik's user avatar
0 votes
1 answer
56 views

I'm somehow unable to make the field required, setting null and blank to True has no effect. # models.py from django.db import models class ExampleModel(models.Model): text_field = models....
jjk's user avatar
  • 601
-4 votes
0 answers
66 views

I am trying to handle multi-level menu with AlpineJS. Is it posible to insert single <ul> (or </li>) in the code below? <template x-if="item.has_children"> <!-- ...
alex's user avatar
  • 103
1 vote
0 answers
85 views

I’m encountering an issue when running Celery with PgBouncer and PostgreSQL after enabling idle connection timeouts. My stack includes: Django (served via Tornado) Celery (workers + beat) ...
anhvo's user avatar
  • 45
1 vote
1 answer
90 views

Demo of the Project The Problem I am attempting to deploy a Django portfolio project to Render. While the project runs perfectly on my local machine using python manage.py runserver, the deployment ...
Foreman-B's user avatar
2 votes
0 answers
81 views

I'm trying to install OWASP PyGoat, and then create a secure version of it. I followed method 2 on the repository's site (https://github.com/adeyosemanputra/pygoat?tab=readme-ov-file#method-2), but ...
Steven Adams's user avatar
0 votes
1 answer
67 views

In settings.py, I've added: if os.environ.get("MOUNT_MEDIA"): MEDIA_ROOT = "/app/media" print("Using Railway mounted volume for MEDIA_ROOT") else: MEDIA_ROOT =...
Jubayer Ahammad's user avatar
-1 votes
0 answers
81 views

I want the column foo (TextField, 2500 chars) to have a width of 30% in the Django admin view. However, whatever I try, the columns widths remain equal (50% / 50%). td.field-foo {width: 30%;} has no ...
jjk's user avatar
  • 601
0 votes
1 answer
87 views

I want to change some css in static/admin/css/base.css After attempting some changes on base.css without any effect, I now fail to understand the static-file concept at all. As a matter of fact I can ...
jjk's user avatar
  • 601
2 votes
1 answer
62 views

I am trying to get the label attached to the relevant interger for the choice field. Although the API returns the interger, I cannot seem to be able to return the actual label value. This is the ...
PhilM's user avatar
  • 437
0 votes
0 answers
77 views

These are my django models (only the FK s are written) class SellerBuyable(TimeStampMixin, GBSoftDeleteModel): seller = models.ForeignKey(Seller,related_name="seller_buyables",on_delete=...
Mohammad's user avatar
  • 144
0 votes
1 answer
65 views

I'm unable to mock timezone.now in the model's created field. The test fails due unmocked/current datetime. I tried patch('django.utils.timezone.now') to no avail. # app/models.py from django.utils ...
jjk's user avatar
  • 601

15 30 50 per page
1
2 3 4 5
20769