# Finding the Django Templates files?

**URL:** <https://forum.djangoproject.com/t/finding-the-django-templates-files/12344>\
**Category:** Templates & Frontend\
**Created:** [February 25, 2022, 1:12pm UTC](https://forum.djangoproject.com/t/finding-the-django-templates-files/12344 "2022-02-25T13:12:38Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![qvisty](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/qvisty/32/4818_2.png) [@qvisty](https://forum.djangoproject.com/u/qvisty)\
**Post date:** [February 25, 2022, 1:12pm UTC](https://forum.djangoproject.com/t/finding-the-django-templates-files/12344/1 "2022-02-25T13:12:39Z")

</div>

I am looking to overwrite the generic deleteview template. Maybe cope the code and change it a bit for myself.

I looked around in the source code (I read somewhere that would be the right way to learn) and ended up here:

`https://github.com/django/django/blob/main/django/template/backends/django.py`

There is no reference to a real template file there, only code.

Can someone point me in the better direction. Where are the original templates stored?

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [February 25, 2022, 1:30pm UTC](https://forum.djangoproject.com/t/finding-the-django-templates-files/12344/2 "2022-02-25T13:30:58Z")

</div>

There are no “generic templates” for the generic CBVs. All the edit CBVs can generate a default template name, but it’s up to you to build the template itself.

---

<div class="post-metadata">

**Author:** ![qvisty](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/qvisty/32/4818_2.png) [@qvisty](https://forum.djangoproject.com/u/qvisty)\
**Post date:** [February 25, 2022, 5:21pm UTC](https://forum.djangoproject.com/t/finding-the-django-templates-files/12344/3 "2022-02-25T17:21:20Z")

</div>

> [@KenWhitesell](#):
>
> There are no “generic templates” for the generic CBVs

That makes sense now. No wonder they were hard to find 😃  
Is there a best practice for how to implement them “quick, safe and easy”? (thinking about model.as\_view() or the like)

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [February 25, 2022, 5:36pm UTC](https://forum.djangoproject.com/t/finding-the-django-templates-files/12344/4 "2022-02-25T17:36:14Z")

</div>

It depends upon which view you’re talking about - the standard DeleteView deletes a single object, so the template could be something as simple as `Are you sure you want to delete {{ object.id }}?` with a submit button. You could also use a ModelForm with the fields as readonly.

Create and Update views are easily implemented using a ModelForm.

In these cases you can then use `{{ form.as_p }}` (or whatever) in the template to render that form.

So in the “trivial” case, it’s less about the template and more about the form.

---

<div class="post-metadata">

**Author:** ![qvisty](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/qvisty/32/4818_2.png) [@qvisty](https://forum.djangoproject.com/u/qvisty)\
**Post date:** [April 22, 2023, 9:36pm UTC](https://forum.djangoproject.com/t/finding-the-django-templates-files/12344/5 "2023-04-22T21:36:11Z")

</div>

I think on a related note I will try this one out: [https://github.com/carltongibson/neapolitan](https://github.com/carltongibson/neapolitan)
