Category "django-templates"

Django 404 error-page not found, how can I solve this problem?

My project is named main, and when I runserver I get this error.Anybody have any clue how to fix this error. Page not found (404) Request Method: GET Request UR

Color the cell of a table depending on the value using javascript

I am trying to color cells of an HTML table (which is automatically generated by Python and Django) depending on cells' content. Here is my table. I would like

How to get foreign key detailed values based on id in html template in django

In Models.py class Interview(models.Model): Current_Date = models.DateField(auto_now_add=True ) User = models.ForeignKey(User,

How to force a page-break on weasyprint?

I wonder if its possible to create a force break that splits the table rows? I think weasyprint does this in a sense but I want to break the rows in to specific

Dropdown select multiple with HTMX

I am using Django and I am passing some values to views.py via HTMX So Frist I have a dropdown list with multiple choices <select class="custom-select mb

CSS not applied to the HTML page (Django)

index.html I have changed {% static "/main/css/index.css" %} to {% static "main/css/index.css" %} {% extends 'main/base.html' %} {% load static %} <

css and other assets not loading for my django webapp

CSS, JS, fonts, images and other assets are not being loaded into my django app index.html. All the assets for the app are present inside the application app in

How do I add my html navbar into another html file in django

I am still very new to Django and I want to add the HTML for a navigation bar and its respective CSS into my base HTML file. Here is what I did up till now: in

How do I add my html navbar into another html file in django

I am still very new to Django and I want to add the HTML for a navigation bar and its respective CSS into my base HTML file. Here is what I did up till now: in

Why don't my CSS static files work in Django when I pass an optional parameter to the view?

I am making an application in Django, where I have a main (index) page displaying a number of objects styled with CSS. The CSS is in a static file. When I do no

Styles not loading in Django

I have a site that needs some custom styles in Django and I can't get the static file to load. I have a static folder inside my main folder - The one where mana

Reverse for 'Profile' with no arguments not found

I'm trying to add user Profile in my django project. i was trying to access user post into the user Profile but its throws an error like this: Reverse for 'Pro

Django AuthenticationForm is not validating and not storing information in database

So basically I'm trying to do a simple login system using Django AuthenticationForm and LoginView. The form takes the user input and when the login button is pr

How can I delete a request.session variable inside the Django HTML template?

Code: {% if request.session.message %} <div class="alert alert-warning alert-dismissible fade show" role="alert"> <i class="bi bi-check2-circle">

Static file doesn't exist and html-file doesn't work properly

output: 'static' in the STATICFILES_DIRS setting does not exist. I've tried os.path.join(BASE_DIR, '/static'), but it is doesn't work. I didn't have this probl

custom static files not loading in django project

I have a django project where I have kept all the static files in a project level static directory. I have included STATIC_URL = "/static/" STATIC_ROOT = os.pat

the css in my django project is not working

Please help me out. I don't get any errors in my css file or in finding it, but still the style i would like is not shown. my css file body { background-color

file extentions in Django

I have created a file upload website where I want to allow users to upload files in pdf, ppt, doc, txt, and zip format. I am using the HTML form to upload files

Not all files called with django static appear

I have index.html file in template file and I have js, css, image, files in my static file. I am writing the codes correctly, but the site does not appear prope

Django Not Found: /assets/js/main.js How Can I Solve this?

This is the error I am facing Not Found: /assets/vendor/venobox/venobox.css Not Found: /assets/vendor/boxicons/css/boxicons.min.css Not Found: /assets/vendor/ow