# Using Django

**URL:** https://forum.djangoproject.com/c/users/6.md

[Latest](https://forum.djangoproject.com/latest.md) · [Categories](https://forum.djangoproject.com/categories.md) · [Tags](https://forum.djangoproject.com/tags.md)

---

## [Welcome to Using Django](https://forum.djangoproject.com/t/welcome-to-using-django/14)

<div class="topic-metadata">

**Author:** [@andrewgodwin](https://forum.djangoproject.com/u/andrewgodwin)\
**Replies:** 0\
**Last updated:** [September 8, 2019, 6:44pm UTC](https://forum.djangoproject.com/t/welcome-to-using-django/14 "2019-09-08T18:44:41Z")

</div>

For discussions about using Django, building sites and projects. If you instead want to ask about working on Django itself as a codebase, and contributing features or bugfixes, please use the Django Internals category. …

---

## [Django encryption usage](https://forum.djangoproject.com/t/django-encryption-usage/46166)

<div class="topic-metadata">

**Author:** [@tomislavm021](https://forum.djangoproject.com/u/tomislavm021)\
**Replies:** 1\
**Last updated:** [October 9, 2026, 3:51pm UTC](https://forum.djangoproject.com/t/django-encryption-usage/46166 "2026-10-09T15:51:50Z")

</div>

Can anyone tell me where can i learn about encription in Django? I am referring to entering some data like passwords and usernames, saving it, then later being able to see that data. Thank you

---

## [Dynamically extend serializer field list in Django REST fw](https://forum.djangoproject.com/t/dynamically-extend-serializer-field-list-in-django-rest-fw/9156)

<div class="topic-metadata">

**Author:** [@samul-1](https://forum.djangoproject.com/u/samul-1)\
**Replies:** 3\
**Last updated:** [October 9, 2026, 12:18pm UTC](https://forum.djangoproject.com/t/dynamically-extend-serializer-field-list-in-django-rest-fw/9156 "2026-10-09T12:18:14Z")

</div>

I’d like to have a model serializer in which some fields are only displayed if the request.user in the serializer context is a staff member. I know I could override the \_\_init\_\_ method and do something like: def \_\_…

---

## [App organization - complex form layout multiple sites](https://forum.djangoproject.com/t/app-organization-complex-form-layout-multiple-sites/46158)

<div class="topic-metadata">

**Author:** [@Krisselack](https://forum.djangoproject.com/u/Krisselack)\
**Replies:** 2\
**Last updated:** [October 8, 2026, 7:41pm UTC](https://forum.djangoproject.com/t/app-organization-complex-form-layout-multiple-sites/46158 "2026-10-08T19:41:07Z")

</div>

I am creating a data entry app and started with one site, mainly numerical data having quite complex forms. I rely on Django-Admin for the site manager to edit reference data and review/change entered data in case someth…

---

## [Django New Project Structure/Name](https://forum.djangoproject.com/t/django-new-project-structure-name/9987)

<div class="topic-metadata">

**Author:** [@wsvincent](https://forum.djangoproject.com/u/wsvincent)\
**Replies:** 26\
**Last updated:** [October 8, 2026, 6:57pm UTC](https://forum.djangoproject.com/t/django-new-project-structure-name/9987 "2026-10-08T18:57:29Z")

</div>

I’m curious how the community is naming new Django projects these days. In the past, in my books I recommended something like books\_project or blog\_project as the name to keep it clear vs apps. A while back I switched t…

---

## [Customizing django modelform select dropdown](https://forum.djangoproject.com/t/customizing-django-modelform-select-dropdown/46159)

<div class="topic-metadata">

**Author:** [@momospix-creator](https://forum.djangoproject.com/u/momospix-creator)\
**Replies:** 6\
**Last updated:** [October 8, 2026, 4:24pm UTC](https://forum.djangoproject.com/t/customizing-django-modelform-select-dropdown/46159 "2026-10-08T16:24:03Z")

</div>

I am working on a parcel delivery app here is the model: here is the rendered page which does not tell a deliveryagent anything about the task at hand. i will prefer to render this dropdown like this: …

---

## [Official Django Skills for LLMs](https://forum.djangoproject.com/t/official-django-skills-for-llms/45563)

<div class="topic-metadata">

**Author:** [@wsvincent](https://forum.djangoproject.com/u/wsvincent)\
**Replies:** 23\
**Last updated:** [October 3, 2026, 3:41pm UTC](https://forum.djangoproject.com/t/official-django-skills-for-llms/45563 "2026-10-03T15:41:02Z")

</div>

FastAPI now has official skills for usage with an LLM. I’m not advocating that Django do that right now, but I do think having a public discussion/sharing of these is useful both within the community and for newcomers wh…

---

## [Delay in Django vulns being flagged due to missing GHSA metadata](https://forum.djangoproject.com/t/delay-in-django-vulns-being-flagged-due-to-missing-ghsa-metadata/46123)

<div class="topic-metadata">

**Author:** [@sparrowt](https://forum.djangoproject.com/u/sparrowt)\
**Replies:** 4\
**Last updated:** [October 2, 2026, 3:26pm UTC](https://forum.djangoproject.com/t/delay-in-django-vulns-being-flagged-due-to-missing-ghsa-metadata/46123 "2026-10-02T15:26:02Z")

</div>

When a new Django security vulnerability is published, it sometimes takes a long time before downstream tools such as Grype or Trivy actually flag the CVE/GHSA. For example these 2 vulnerabilities were published on 4th …

---

## [How we found 2 seconds of hidden latency in our Django app using eBPF](https://forum.djangoproject.com/t/how-we-found-2-seconds-of-hidden-latency-in-our-django-app-using-ebpf/46114)

<div class="topic-metadata">

**Author:** [@deepanshu406](https://forum.djangoproject.com/u/deepanshu406)\
**Replies:** 1\
**Last updated:** [October 1, 2026, 9:42pm UTC](https://forum.djangoproject.com/t/how-we-found-2-seconds-of-hidden-latency-in-our-django-app-using-ebpf/46114 "2026-10-01T21:42:27Z")

</div>

We run Django + gunicorn + DRF in production. Our P95 API latency was around 5 seconds but OpenTelemetry could only explain about 3 seconds. The remaining 2 seconds were completely unaccounted for. No slow queries, no sl…

---

## [Django SECRET\_KEY tutorial](https://forum.djangoproject.com/t/django-secret-key-tutorial/46117)

<div class="topic-metadata">

**Author:** [@wsvincent](https://forum.djangoproject.com/u/wsvincent)\
**Replies:** 0\
**Last updated:** [October 1, 2026, 12:57pm UTC](https://forum.djangoproject.com/t/django-secret-key-tutorial/46117 "2026-10-01T12:57:42Z")

</div>

Hi everyone, I wrote up a new tutorial on SECRET\_KEY, why it matters, how to generate a new one, and general best practices. I hope it’s helpful.

---

## [Django-anymail + SendGrid](https://forum.djangoproject.com/t/django-anymail-sendgrid/46109)

<div class="topic-metadata">

**Author:** [@wsvincent](https://forum.djangoproject.com/u/wsvincent)\
**Replies:** 1\
**Last updated:** [October 1, 2026, 11:38am UTC](https://forum.djangoproject.com/t/django-anymail-sendgrid/46109 "2026-10-01T11:38:02Z")

</div>

It is frustrating that SendGrid can’t properly respond to the django-anymail team, who do wonderful work that I have relied on for years. I’ve reached out to some higher-ups at Twilio to see if they can resolve this, but…

---

## [TextChoices in Meta class for constraints](https://forum.djangoproject.com/t/textchoices-in-meta-class-for-constraints/46099)

<div class="topic-metadata">

**Author:** [@StephanieAG](https://forum.djangoproject.com/u/StephanieAG)\
**Replies:** 0\
**Last updated:** [September 29, 2026, 3:50pm UTC](https://forum.djangoproject.com/t/textchoices-in-meta-class-for-constraints/46099 "2026-09-29T15:50:15Z")

</div>

I had a similar problem as this question on StackOverflow where I was getting a NameError that the ModelName wasn’t defined when I tried to migrate the changes after adding a TextChoices class and CheckConstraint within M…

---

## [Can django-lifecycle replace SQL Triggers ?](https://forum.djangoproject.com/t/can-django-lifecycle-replace-sql-triggers/46088)

<div class="topic-metadata">

**Author:** [@anjanesh](https://forum.djangoproject.com/u/anjanesh)\
**Replies:** 1\
**Last updated:** [September 29, 2026, 11:28am UTC](https://forum.djangoproject.com/t/can-django-lifecycle-replace-sql-triggers/46088 "2026-09-29T11:28:04Z")

</div>

I came across django-lifecycle. Can this also replace SQL Triggers ? Or is this mainly good for the common use-case of sending email(s) when a row gets updated ?

---

## [removing db\_collection from a field](https://forum.djangoproject.com/t/removing-db-collection-from-a-field/43589)

<div class="topic-metadata">

**Author:** [@nitzanco](https://forum.djangoproject.com/u/nitzanco)\
**Replies:** 1\
**Last updated:** [September 29, 2026, 3:48am UTC](https://forum.djangoproject.com/t/removing-db-collection-from-a-field/43589 "2026-09-29T03:48:32Z")

</div>

I had a field with db\_collection=”case\_insensitive”. i removed it from the “email” field definition on the model and generated the migration to AlterField. It seems like the db still had the collection on that field thou…

---

## [wired behavior after update from 3.2.25 to 4.2.14](https://forum.djangoproject.com/t/wired-behavior-after-update-from-3-2-25-to-4-2-14/33155)

<div class="topic-metadata">

**Author:** [@oreitan](https://forum.djangoproject.com/u/oreitan)\
**Replies:** 1\
**Last updated:** [September 29, 2026, 3:42am UTC](https://forum.djangoproject.com/t/wired-behavior-after-update-from-3-2-25-to-4-2-14/33155 "2026-09-29T03:42:05Z")

</div>

after I update from ver 3.2.25 to 4.2.14 I can’t run my server locally with any error. I found the line of code that ‘’ of the problem class ApiConfig(AppConfig): name = “api” def ready(self): from api.scheduler.…

---

## [Automatically add image thumbnail](https://forum.djangoproject.com/t/automatically-add-image-thumbnail/10970)

<div class="topic-metadata">

**Author:** [@TommyQuality](https://forum.djangoproject.com/u/TommyQuality)\
**Replies:** 4\
**Last updated:** [September 27, 2026, 11:47am UTC](https://forum.djangoproject.com/t/automatically-add-image-thumbnail/10970 "2026-09-27T11:47:47Z")

</div>

Hi, Is there anyway to add a image thumbnail to a page automatically? I was thinking that the app could automatically download the image from a site if the url was entered? If there is nothing out there that does this.…

---

## [channels existing site now disconnects/timeout](https://forum.djangoproject.com/t/channels-existing-site-now-disconnects-timeout/46073)

<div class="topic-metadata">

**Author:** [@CarlFK](https://forum.djangoproject.com/u/CarlFK)\
**Replies:** 7\
**Last updated:** [September 27, 2026, 1:46am UTC](https://forum.djangoproject.com/t/channels-existing-site-now-disconnects-timeout/46073 "2026-09-27T01:46:54Z")

</div>

Some code that was working is now less working after a server rebuild, so new packages but same python and relevant configs. WS works, but now it disconnects if it is idle for a few seconds. I am guessing this is a clu…

---

## [Removing \`null=True\` from \`GeneratedField\` should be a SQL no-op](https://forum.djangoproject.com/t/removing-null-true-from-generatedfield-should-be-a-sql-no-op/45954)

<div class="topic-metadata">

**Author:** [@mportesdev](https://forum.djangoproject.com/u/mportesdev)\
**Replies:** 3\
**Last updated:** [September 21, 2026, 8:39pm UTC](https://forum.djangoproject.com/t/removing-null-true-from-generatedfield-should-be-a-sql-no-op/45954 "2026-09-21T20:39:37Z")

</div>

As of Django 6.1, having a GeneratedField declared with an explicit null=True causes the warning (fields.W225) null has no effect on GeneratedField. Consider the following minimal example: class NumericPrefix(models.Fu…

---

## [AttributeError: 'ManyToManyField' object has no attribute '\_m2m\_reverse\_name\_cache'. Did you mean: 'm2m\_reverse\_name'?](https://forum.djangoproject.com/t/attributeerror-manytomanyfield-object-has-no-attribute-m2m-reverse-name-cache-did-you-mean-m2m-reverse-name/46045)

<div class="topic-metadata">

**Author:** [@HimejoshiHeart](https://forum.djangoproject.com/u/HimejoshiHeart)\
**Replies:** 3\
**Last updated:** [September 20, 2026, 12:46am UTC](https://forum.djangoproject.com/t/attributeerror-manytomanyfield-object-has-no-attribute-m2m-reverse-name-cache-did-you-mean-m2m-reverse-name/46045 "2026-09-20T00:46:17Z")

</div>

currentmon.altforms.add(MonSpecies.objects.get(name=da,basepack=newpack)) ^ running throws up a AttributeError: 'ManyToManyField' object has no attribute '\_m2m\_reverse\_name\_cache'…

---

## [Best practice for intercepting error responses in Django and DRF](https://forum.djangoproject.com/t/best-practice-for-intercepting-error-responses-in-django-and-drf/29734)

<div class="topic-metadata">

**Author:** [@BarbaBillios](https://forum.djangoproject.com/u/BarbaBillios)\
**Replies:** 1\
**Last updated:** [September 18, 2026, 8:59pm UTC](https://forum.djangoproject.com/t/best-practice-for-intercepting-error-responses-in-django-and-drf/29734 "2026-09-18T20:59:14Z")

</div>

I have a Django app that uses the Django Rest Framework. Errors may occur on the Django side, like integrity errors in the database. The default error response will be something like: { "details": { "email": "user…

---

## [Fetch and count all records in M2M join table](https://forum.djangoproject.com/t/fetch-and-count-all-records-in-m2m-join-table/45967)

<div class="topic-metadata">

**Author:** [@IgorArnaut](https://forum.djangoproject.com/u/IgorArnaut)\
**Replies:** 10\
**Last updated:** [September 17, 2026, 2:53pm UTC](https://forum.djangoproject.com/t/fetch-and-count-all-records-in-m2m-join-table/45967 "2026-09-17T14:53:34Z")

</div>

I have two tables that are in M2M relationship. I have not created explicit model for the join table. class CustomUser(AbstractUser): class Meta: app\_label = "users" db\_table = "users" class Listing…

---

## [Issue with parallel test runner on Python 3.14](https://forum.djangoproject.com/t/issue-with-parallel-test-runner-on-python-3-14/45958)

<div class="topic-metadata">

**Author:** [@cuu508](https://forum.djangoproject.com/u/cuu508)\
**Replies:** 3\
**Last updated:** [September 14, 2026, 10:51am UTC](https://forum.djangoproject.com/t/issue-with-parallel-test-runner-on-python-3-14/45958 "2026-09-14T10:51:32Z")

</div>

I’m not sure if I’ve hit a bug or I’m holding it wrong. In my project I use a custom test runner which overrides a few Django settings (adds MD5 password hasher to PASSWORD\_HASHERS for speed, stuff like that). The test …

---

## [How to make forms support PUT or DELETE method?](https://forum.djangoproject.com/t/how-to-make-forms-support-put-or-delete-method/45946)

<div class="topic-metadata">

**Author:** [@IgorArnaut](https://forum.djangoproject.com/u/IgorArnaut)\
**Replies:** 5\
**Last updated:** [September 9, 2026, 10:11am UTC](https://forum.djangoproject.com/t/how-to-make-forms-support-put-or-delete-method/45946 "2026-09-09T10:11:14Z")

</div>

I know that Django supports GET and POST methods in forms, but how can I make some forms use PUT or DELETE methods? For example, this form which redirects to listing-delete view. templates\\partials\\listings\\detail\\head…

---

## [Search functionality for a set of 3 tables or more](https://forum.djangoproject.com/t/search-functionality-for-a-set-of-3-tables-or-more/45942)

<div class="topic-metadata">

**Author:** [@anjanesh](https://forum.djangoproject.com/u/anjanesh)\
**Replies:** 1\
**Last updated:** [September 8, 2026, 10:57pm UTC](https://forum.djangoproject.com/t/search-functionality-for-a-set-of-3-tables-or-more/45942 "2026-09-08T22:57:12Z")

</div>

I have a couple of models in a simple django app : class Product(models.Model): type = models.CharField( max\_length=10, choices=TypeOfComputer.choices, ) title = models.CharFiel…

---

## [(Solved) Is this a bug or am I missing something: SuspiciousFileOperation -\> Detected path traversal attempt in](https://forum.djangoproject.com/t/solved-is-this-a-bug-or-am-i-missing-something-suspiciousfileoperation-detected-path-traversal-attempt-in/45943)

<div class="topic-metadata">

**Author:** [@2old4it](https://forum.djangoproject.com/u/2old4it)\
**Replies:** 4\
**Last updated:** [September 8, 2026, 2:20pm UTC](https://forum.djangoproject.com/t/solved-is-this-a-bug-or-am-i-missing-something-suspiciousfileoperation-detected-path-traversal-attempt-in/45943 "2026-09-08T14:20:32Z")

</div>

Hello all, I have a problem with relative paths while storing files. Snipped from settings.py if DEBUG: MEDIA\_ROOT = BASE\_DIR / "../data/" I like to keep all uploaded files outside my source directory, even in DE…

---

## [Passing a list to a DTL tag](https://forum.djangoproject.com/t/passing-a-list-to-a-dtl-tag/45945)

<div class="topic-metadata">

**Author:** [@IgorArnaut](https://forum.djangoproject.com/u/IgorArnaut)\
**Replies:** 1\
**Last updated:** [September 4, 2026, 3:57pm UTC](https://forum.djangoproject.com/t/passing-a-list-to-a-dtl-tag/45945 "2026-09-04T15:57:11Z")

</div>

I was attempting to pass a list of request parameter names into a custom tag, so that I could retain GET parameters from one form when submitting the other form. Form 1. \<form class="border border-secondary-subtle roun…

---

## [Accessing move\_in\_date field within form causes KeyError](https://forum.djangoproject.com/t/accessing-move-in-date-field-within-form-causes-keyerror/45939)

<div class="topic-metadata">

**Author:** [@IgorArnaut](https://forum.djangoproject.com/u/IgorArnaut)\
**Replies:** 3\
**Last updated:** [September 8, 2026, 10:04am UTC](https://forum.djangoproject.com/t/accessing-move-in-date-field-within-form-causes-keyerror/45939 "2026-09-08T10:04:26Z")

</div>

Model Terms has a field named move\_in\_date. listings/models.py: class Terms(models.Model): move\_in\_date = models.DateField(auto\_now\_add=True) deposit = models.BooleanField() for\_students = models.BooleanFie…

---

## [django SRID conflict between django and mysql](https://forum.djangoproject.com/t/django-srid-conflict-between-django-and-mysql/40544)

<div class="topic-metadata">

**Author:** [@momenkittaneh](https://forum.djangoproject.com/u/momenkittaneh)\
**Replies:** 2\
**Last updated:** [September 5, 2026, 7:32am UTC](https://forum.djangoproject.com/t/django-srid-conflict-between-django-and-mysql/40544 "2026-09-05T07:32:54Z")

</div>

hi, i have this issue after updating srid on my mysql database from srid 0 to srid 3857 when i save new entry this exception occured Exception Type: OperationalError Exception Value: (3643, “The SRID of the ge…

---

## [RasterField with SRID=None: Don't force transform](https://forum.djangoproject.com/t/rasterfield-with-srid-none-dont-force-transform/28745)

<div class="topic-metadata">

**Author:** [@PhilippBuehler](https://forum.djangoproject.com/u/PhilippBuehler)\
**Replies:** 1\
**Last updated:** [September 4, 2026, 6:44pm UTC](https://forum.djangoproject.com/t/rasterfield-with-srid-none-dont-force-transform/28745 "2026-09-04T18:44:38Z")

</div>

When using the Django Geospatial API together with Postgis Raster, I tried setting the SRID of RasterField to None, which seems to work: rast = django.contrib.gis.db.models.RasterField(srid=None) But then adding a Rast…

---

## [template tag "with" list variable](https://forum.djangoproject.com/t/template-tag-with-list-variable/38000)

<div class="topic-metadata">

**Author:** [@htao](https://forum.djangoproject.com/u/htao)\
**Replies:** 5\
**Last updated:** [January 16, 2025, 9:01pm UTC](https://forum.djangoproject.com/t/template-tag-with-list-variable/38000 "2025-01-16T21:01:52Z")

</div>

I’m looking to use the django template tag like this: {% with items=\['item1', 'item2', 'item3'\] %} \<ul\> {% for item in items %} \<li\>{{ item }}\</li\> {% endfor %} \</ul\> {% endwith %} But Django can’t seem…

[Next page](https://forum.djangoproject.com/c/users/6.md?page=1)
