Nested django templates

This seems like a pretty basic thing to do but although I've been using Django for around a year, I've never run into this scenario yet. In a lot of templating/web frameworks, template inheritance...

Text inside the table cell improperly aligned

I'm using xhtml2pdf (former pisa, or is it vice versa? :)) to generate PDF from the django template. The template is rendered ok, but PDF I get from that template is corrupted in a very weird...

Django: TemplateDoesNotExist at / home.html in my project

I can not understand why django can't search 'home.html' my project name is lucifer here's my tree of projects │   ├── lucifer │   │   ├── __init__.py │   │  ...

How do I get a files absolute path after being uploaded in Django?

I want to upload a file to my database and after it is uploaded import it and eventually export the data into my database. I have the uploading working just fine but I'm not sure how to get the...

'django.template.context_processors.request' issue with django-tables2 and django-admin-tools

I'm having an issue when trying to render a PDF through xhtml2pdf in Django(1.10.4) when using django-admin-tools(0.8.0) & django-tables2(1.5) together. I've done enough reading to understand the...

Django: Implementing a Form within a generic DetailView

After working through several google search result pages, I am still desperately stuck at the same problem. I am trying to implement a comment field underneath a blog post. I am thankful for any...

Django Filter with Pagination

I'm attempting to follow the following tutorial for pagination with django filters, but the tutorial seems to be missing something, and i'm unable to get the pagination to show using the function...

Issues printing Django email to console

I am not sure what is wrong with my logic, but when I submit a form, it renders the Httpresponse in the browser, but doesn't post the email to the console. I want the view function to be able to...

TypeError: get() takes 2 positional arguments but 3 were given

I am trying to get an input to appear on my page, and have been following Max Goodridge's walkthrough ep.45, but seem to have gotten myself stuck on this particular section. If anyone could assist...

django form drop-down choices are displayed "objects" instead of string representation of the model __str__

In my django form I am using a method to filter the drop down options to the ones that are related to the logged-in user. After the implementation the displayed values changed to objects rather...

Django/django-tables2 html table on row click to edit form

sorry this post may be messy not sure how do explain what I am looking for very well but here goes nothing. I have a Django App and using django-table2 to print a data model to a table, the next...

How to make a topic public to all users in django?

There is problem I am creating a project, where you can make topics, that can be private or public to unauthenticated users. In every topic, you can then make several entries, applying to that...

Django form not submitting or providing error messages

When I submit my form, it doesn't post the form data and just reloads the form. It was working beforehand but I'm not sure what I've changed that doesn't make it work anymore. Posting the data...

How to you put a checkbox in a django.contrib.auth.forms UserCreationForm

I have multiple fields in my Django UserCreationForm including the already included username, password 1, and password 2. I have also added and email field. I am unable to add a checkbox. from...

Custom tags (templatetags) not loading

I'm trying to create a template tag so I can find out which group the current user belongs to. I have the same set up in another project but that one is working, but this one does not. This is...

TypeError: post() got an unexpected keyword argument

I am trying to create a simple blog where I can communicate with the users directly. Each user will have a blog post each month posted by the Admin, and they can comment on it to communicate. The...

UndefinedError: 'url_for' is undefined; while using Jinja2 in Django

I'm trying to use Jinja2 templating language with Django. While trying to render a template I got the error "jinja2.exceptions.UndefinedError: 'url_for' is undefined". 'url_for()' works absolutely...

Django: 404 Error Appears While Trying to Use Slug in URLs

I am a beginner in Django. Right now, I am learning the framework by building an app, called PhoneReview. It will store reviews related to the latest mobile phone. It will also display phone...

Reverse for 'new_entry' with arguments '('',)' not found. 1 pattern(s) tried: ['new_entry/(?P<topic_id>[0-9]+)/$']

I'm new learning Django and I want a study tracker web app with Django. The error came up when I was creating the function and template for new entries - this will allow a user write a detailed...

Django adds square brackets and quotes to charfield input

recently I encountered a rather weird problem with my Django forms. I am currently working on my todo list project. Everything works fine, except that whenever I add a new task, its title seems to...

Django Wagtail TableBlock not displaying correctly

I'm new to django and programming and I've been trying to use Wagtail for my website. I am currently stuck with the 'TableBlock' I managed to set up the model and the block correctly but when the...

How can save session of shopping cart data after logout, so the user can find them when login again in Django?

I am working on e-commerce website using Django, I'm working on the shopping cart it's implemented using sessions and it's currently working fine, except one problem when the authenticated user...

Django 3.1 TemplateNotFound Exception when Template is Present

I am trying to work towards deploying my application and have done most of my work on Windows. However now that I have moved it over to AWS it does not work anymore. Before anyone links other...

TemplateDoesNotExist at /users/register/ bootstrap5/uni_form.html

I am building a registration form for my django project, and for styling it I am using crispy forms. But, when I run my server and go to my registration page, I see this error: Internal Server...

How to solve NoReverseMatch, no arguments not found? (Django)

Edit: I was able to achieve the desired behavior, by modifying view.py as follows urlpatterns = [ path("", views.index, name="index"), path("wiki/<str:entry>", views.entry, name="entry"), ...

django AttributeError 'WSGIRequest' object has no attribute 'get'

//id can't found error point, and didn't search solutions AttributeError at /product/3 'WSGIRequest' object has no attribute 'get' Request Method: GET Request...

__init__() takes 1 positional argument but 2 were given type error

I am currently using Django and python to create a web app to take meter readings for my company. I am receiving this error (Title) and I don't know what is causing it. I have Urls.py: urlpatterns...

Can't figure out why I'm getting `Reverse for 'app_list' with keyword arguments '{'app_label': ''}' not found` in a django project

The project has 2 apps - accounts (very basic custom users) and portal. myproject/myproject/urls.py: from django.contrib import admin from django import urls from portal import admin as...

Fixing a type error for xhtm2pdf in a Django Project

I am trying to generate a PDF for my Django Project. I have used pip install xhtml2pdf The PDF was generate with plain text but when I added style in the pdf.html I got this Exception...

Django error , Broken pipe from ('127.0.0.1', 33609)

I am creating django project and got this error. Broken pipe from ('127.0.0.1', 33609). What I've been trying to do is that I created table using auth_user table (default user authentication table...