Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
ADD to CART in DJANGO doesn't work in ecommerce website
I am following a tutorial of an ecommerce website in django and python. I have a problem with add to cart option. My code is the same as in a tutorial but it doesn't work. This is a github from a tutorial: [https://github.com/flatplanet/Django-Ecommerce] And I got this error: NoReverseMatch at /product/1 Reverse for 'cart_add' not found. 'cart_add' is not a valid view function or pattern name. Request Method: GET Request URL: http://127.0.0.1:8000/product/1 Django Version: 5.1 Exception Type: NoReverseMatch Exception Value: Reverse for 'cart_add' not found. 'cart_add' is not a valid view function or pattern name. Exception Location: C:\Users\Agata\PycharmProjects\ecom_pilates_shop\venv\DJANGO\Lib\site-packages\django\urls\resolvers.py, line 831, in _reverse_with_prefix Raised during: store.views.product Python Version: 3.11.2 I have tried to do some changes with chat gpt but nothing helps... This is my code: views: import json from django.shortcuts import render, get_object_or_404 from .cart import Cart # from store.models import Product # from django.apps import apps from django.http import JsonResponse from django.contrib import messages from ..store.models import Product # model = apps.get_model('store', 'Product') def cart_summary(request): # Get the cart cart = Cart(request) cart_products = cart.get_prods quantities = cart.get_quants totals = cart.cart_total() return render(request, "cart_summary.html", {"cart_products": cart_products, "quantities": quantities, "totals": totals}) def cart_add(request): # Get the cart cart = Cart(request) … -
Django + Nginx + Gunicorn site not working on Safari Browser
I made a website for a small business. Everything works fine on Chrome, Edge, etc. but on Safari it just pops out a Welcome to nginx! default message. I've configured the SSL with Certbot. Here's the configuration on nginx: listen 80; server_name ccomputercenter.com www.ccomputercenter.com; location /static/ { alias /home/cristi/SiteCMR/cmr_project/staticfiles/; } location /media/ { alias /home/cristi/SiteCMR/cmr_project/media/; } location / { proxy_pass http://unix:/home/cristi/SiteCMR/cmr_project/gunicorn.sock; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/ccomputercenter.com/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/ccomputercenter.com/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } server { if ($host = www.ccomputercenter.com) { return 301 https://$host$request_uri; } # managed by Certbot if ($host = ccomputercenter.com) { return 301 https://$host$request_uri; } # managed by Certbot listen 80; server_name ccomputercenter.com www.ccomputercenter.com; return 404; # managed by Certbot }``` I've read some other articles but I can't seem to find any exact information for this. Thank you all ! -
How can I hide the total count in changelist_view (Django admin)?
I want to hide the total displayed in changelist_view, as in the following image. Django admin screen I searched but couldn't find any way through admin customization. I know I can modify the template, but I wouldn't like to do it. Is this possible without changing the templates? -
Django-static-sitemaps errorTypeError: 'type' object is not iterable?
When using to generate a sitemap, I encountered a error when running the command. What is the cause of this error and how can I resolve it?django-static-sitemapsTypeError: 'type' object is not iterablepython manage.py refresh_sitemap **views.py** from django.contrib import sitemaps from . import models class WebSitemaps(sitemaps.Sitemap): changefreq = "weekly" priority = 0.5 def items(self): return models.ArticleModel.objects.all() def location(self, obj): return f"/{obj.aid}.html" **settings.py** STATICSITEMAPS_ROOT_SITEMAP = 'index.sitemaps.WebSitemaps'``` **urls.py** urlpatterns = [ re_path('^sitemap-baidu/', include('static_sitemaps.urls')), ] enter image description here -
Configuring Django and MinIO using HTTPS on same server
I have set up MinIO as my Django app object storage and integrate the functionality of this module on my the same server. I followed the instruction in django-minio-backend, but I got the below error. urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='subdomain.domain.org', port=9000): Max retries exceeded with url: /django-backend-dev-public (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)'))) A few contextual issues for the setup environment: The server runs Ubuntu 22.04 LTS operating system. the MinIO version is 2024-08-03T04-33-23Z. The Django version is 5.0.6 The MinIO setup worked perfectly when I had set it up to use unsecured connections (http), and Django running was running on the server unsecured. The Django web app could be able to upload files and images to MinIO server without any issue. The error started when I updated the MinIO setup to work using secured connections only. On the WebUI, the server loads using https perfectly (i.e. I can log onto the console using https://subdomain.domain.org:9000) The secure setup is done through linking the MinIO to the SSL certificate folder on the server (/opt/minio/certs) that contains both the public.crt and private.key The relevant lines for MinIO setup for my Django web-app in my settings.py are … -
Forbidden access to deployed Django website
I have deployed my django website, following Cirey Schafer tutorial (Python Django Tutorial: Deploying Your Application (Option #1) - Deploy to a Linux Server). But I have an error and I'm not sure why. I runned this: sudo tail -f /var/log/apache2/error.log error Current thread 0x00007f603fccb780 (most recent call first): <no Python frame> [Thu Aug 15 13:12:35.962154 2024] [wsgi:warn] [pid 72344:tid 140051363968896] (13)Permission denied: mod_wsgi (pid=72344): Unable to stat Python home /home/m_user/django_site/venv. Python interpreter may not be able to be initialized correctly. Verify the supplied path and access permissions for whole of the path. Python path configuration: PYTHONHOME = '/home/m_user/django_site/venv' PYTHONPATH = (not set) program name = 'python3' isolated = 0 environment = 1 user site = 1 import site = 1 sys._base_executable = '/usr/bin/python3' sys.base_prefix = '/home/m_user/django_site/venv' sys.base_exec_prefix = '/home/m_user/django_site/venv' sys.platlibdir = 'lib' sys.executable = '/usr/bin/python3' sys.prefix = '/home/m_user/django_site/venv' sys.exec_prefix = '/home/m_user/django_site/venv' sys.path = [ '/home/m_user/django_site/venv/lib/python310.zip', '/home/m_user/django_site/venv/lib/python3.10', '/home/m_user/django_site/venv/lib/python3.10/lib-dynload', ] Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding Python runtime state: core initialized ModuleNotFoundError: No module named 'encodings' I get this when I run this ls -la total 40 drwxr-x--- 6 m_user m_user 4096 Aug 14 23:07 . drwxr-xr-x 3 root root 4096 Aug 14 … -
Can you safely update a Django AppConfig.label?
I'm in the process of merging two Django projects however they have conflicting app names. For example, the conflicting app names are customer, order, and product which are categorized into ecommerce and wholesale subdirectories. project ├── manage.py ├── apps │ └── ecommerce │ └── customer │ └── order │ └── product └── wholesale │ └── customer │ └── order │ └── product It's clearly stated in the docs for AppConfig.label that changing the label after migrations have been applied will cause breaking changes. I've tried creating an empty migration to manually rename the table then update the Model Meta app_label option however that seems to cause breaking changes as well. migrations.AlterModelOptions( name='Product', options={'app_label': 'wholesale_product'}, ), migrations.AlterModelTable( name='Product', table='wholesale_product_product', ), I feel like it should be easy to just rename the table. What's the best way to solve the name conflicts? Is there a way to do it without having to rename the apps and moving the models? -
Disable Django admin buttons after click
Is there any easy way in Django change forms to disable buttons after submit. I want to prevent users from submitting the form twice at the same instant! -
Mysql CHARSET is set to utf8mb4, but insert emoji always raise Error 1366
First, check database CHARSET: MariaDB [outdoors]> show create database outdoors; | outdoors | CREATE DATABASE outdoors /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci */ | Then check the table CHARSET: MariaDB [outdoors]> show create table backend_comment; | backend_comment | CREATE TABLE backend_comment ( id bigint(20) NOT NULL AUTO_INCREMENT, geo varchar(10) DEFAULT NULL, content varchar(250) NOT NULL, img varchar(100) DEFAULT NULL, comment_id int(11) DEFAULT NULL, create_time datetime(6) NOT NULL, notify_id bigint(20) NOT NULL, to_id int(11) DEFAULT NULL, user_id int(11) NOT NULL, PRIMARY KEY (id), KEY backend_comment_notify_id_61aef760_fk_backend_notify_id (notify_id), KEY backend_comment_to_id_4dd23479_fk_auth_user_id (to_id), KEY backend_comment_user_id_1ab394ea_fk_auth_user_id (user_id), CONSTRAINT backend_comment_notify_id_61aef760_fk_backend_notify_id FOREIGN KEY (notify_id) REFERENCES backend_notify (id), CONSTRAINT backend_comment_to_id_4dd23479_fk_auth_user_id FOREIGN KEY (to_id) REFERENCES auth_user (id), CONSTRAINT backend_comment_user_id_1ab394ea_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci | Test insert emoji content: MariaDB [outdoors]> insert into backend_comment (id, content, notify_id, user_id, create_time) values (1, 'insert emoji test 😊 ', 1, 1, NOW()); ERROR 1366 (22007): Incorrect string value: '\xF0\x9F\x98\x8A' for column outdoors.backend_comment.content at row 1 So what's the problem? help me please 😂 More information: Server version: 10.11.8-MariaDB-0ubuntu0.24.04.1 Ubuntu 24.04 -
'Invalid filter: 'length_is' Error in Django Template – How to Fix?
I’m encountering a TemplateSyntaxError in my Django project when rendering a template. The error message I’m seeing is: TemplateSyntaxError at /admin/dashboard/program/add/ Invalid filter: 'length_is' Django Version: 5.1 Python Version: 3.12.4 Error Location: This error appears in a Django template at line 22 of the fieldset.html file. {% for line in fieldset %} {% for field in line %} {{ field.field.label|capfirst }} {% if field.field.field.required %} * {% endif %} What I Tried: Checked for Custom Filters: I reviewed my project and its installed packages to verify if there is a custom filter named length_is. I found that no such custom filter is defined in my project. Verified Django Installation: I ensured that Django is correctly installed and up-to-date with version 5.1. Reviewed Template Code: I carefully examined the template code that causes the error. I found that line.fields|length_is:'1' is used, but the length_is filter is not a standard Django filter. Searched for Package Bugs: I searched through documentation and bug reports related to django-jazzmin to see if there is any mention of the length_is filter issue, but I could not find relevant information. What I Expected: I expected to find either: Documentation or a reference indicating that length_is is a … -
JS / Jquery - Dynamically set text value to a Django form choicefield
I have this choicefield in a django form : forms.py sales_documents_description_1 = forms.ChoiceField(required=False, choices=list(models_products.objects.values_list( 'id_product','product_denomination')), widget=forms.Select(attrs={'id': 'sales_documents_editable_select_description_1','style': 'width:200px','onchange': 'populate_selected_product(this.id,this.value)'})) In my template, how do I set this choicefield value by specifiying the text argument (NOT THE VALUE) I tried with this : Template.html $('#sales_documents_description_1').filter(function() {return $(this).text() == 'Neumann U87';}).prop('selected', true); But it's not working. Any JS or JQuery solution will be ok for me. Thanks -
Filtrer les données d'un select à partir d'un autre select
Bonjour. Je suis entrain de développer une petite application de gestion scolaire en Django. Sur mon formulaire j'ai 3 drop-down : un pour afficher la liste des filières, un autre pour afficher la liste de classe selon la filière sélectionnée et un autre pour afficher la liste des élèves inscrits dans la classe sélectionnée précédemment dans la liste des classes affichées selon la filière choisie. Aidez-moi avec le code pour résoudre ce problème. Je travaille en Django 5. J'ai besoin d'avoir des filtres sur mes modèles Classe et Eleve pour y arriver mais je ne sais pas comment procéder. -
TemplateSyntaxError after Adding Django Admin Theme using Jazzmin Module
I've added a Django admin panel theme to my project using the django-jazzmin module. It works fine initially, but when I try to access certain options in the admin panel (like "Users" or "Profile"), I encounter the following error: TemplateSyntaxError at /admin/booking/bookedseat/53/change/ Invalid filter: 'length_is' and this is my html code <div class="form-group{% if line.fields|length_is:'1' and line.errors %} errors{% endif %}{% if not line.has_visible_field %} hidden{% endif %}{% for field in line %}{% if field.field.name %} field-{{ field.field.name }}{% endif %}{% endfor %}"> From what I've read online, it seems like the theme might be deprecated or not fully compatible with Django 5, but I'm not entirely sure. I'm currently stuck and not sure how to resolve this issue. Has anyone else faced this problem? Any advice on how to fix this template error or suggestions for alternative themes that work well with Django 5? Details: Django version: 4.2 Jazzmin version: django-jazzmin-3.0.0 Thanks in advance for any help! Questions: Has anyone encountered this issue with Jazzmin on Django 5? Is there a known fix or workaround to resolve this length_is filter error while still using Jazzmin? Would downgrading Django or making adjustments to the Jazzmin templates be a viable solution? -
GitHub Actions not picking-up errors on Django doctests
I just realized that failure of my doctests was not raising error during testing run through GitHub Actions. How to ensure that failing doctests would trigger failure of the GitHub Actions testing? Example of a doctest as I'm defining them so far: from django.test import SimpleTestCase import doctest class DocStrings_Tests(SimpleTestCase): def test_docstrings(self): from cubes import color_coding doctest.testmod(color_coding) and here is the simplified workflow I'm using for testing: name: Project testing on: [pull_request, push] # activates the workflow when there is a push or pull request jobs: run_project_testing: runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: tests: ["cubes", "users", "games"] steps: - name: Run Tests - ${{ matrix.tests }} run: | pip install coverage coverage run -p manage.py test ${{ matrix.tests }} -
django RelatedManager return None in template
I am trying to access related data in Templates But I only get None. models from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver class Product(models.Model): title = models.CharField(max_length=50) description = models.TextField() price = models.PositiveBigIntegerField() discount = models.PositiveBigIntegerField(default=0) inventory = models.PositiveBigIntegerField(default=1) last_update = models.DateTimeField(auto_now_add=True) def __str__(self) -> str: return self.title class Image(models.Model): image = models.ImageField() product = models.ForeignKey(to=Product,on_delete=models.CASCADE) class Cart(models.Model): STATUS = [ (0,"pending payment"), (1,"paid") ] status = models.SmallIntegerField(choices=STATUS,default=0) user = models.ForeignKey(to=User,on_delete=models.CASCADE) created = models.DateTimeField(auto_now=True) def __str__(self) -> str: return f"{self.user} - {self.status}" @receiver(post_save,sender=Cart) def cart_post_save(sender, instance, created, *args, **kwargs): if created and instance.status == 1 : Cart.objects.create(user=instance.user) class Order(models.Model): product = models.ForeignKey(to=Product,on_delete=models.CASCADE) count = models.PositiveIntegerField(default=0) cart = models.ForeignKey(to=Cart,on_delete=models.CASCADE) def __str__(self) -> str: return f"{self.product}" views from django.views import generic from . import models from django.http import JsonResponse,HttpResponseBadRequest,HttpResponse class ProductsList(generic.ListView): """return list of all products and template name is prudoct_list.html""" model = models.Product paginate_by = 30 def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) return context class ProductsDetail(generic.DetailView): """return a product and template name is prudoct_detail.html""" model = models.Product def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) return context base.html {% load static %} <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>online-shop</title> … -
'utf-8' codec can't decode byte 0xff in position 0: invalid start byte [Djanago Rest Framework]
Issue: When uploading data with an image, the following issue occurs if some PrimaryKeyRelatedField is missing or the field ID is not valid. If I don't upload any image file, then expected output field validation issues arise. Encountered Issue: If I send some missing or invalid data with image files, the following issue occurs. However, the expected result was a validation issue. Validation Issue [expected output]: The API shows the following output if I don't send any image file, which is the expected output. { "status": false, "errors": { "service_cost_details": [ "This field is required." ], "photo": [ "No file was submitted." ], "citizenship_front": [ "No file was submitted." ], "citizenship_back": [ "No file was submitted." ], "province": [ "Invalid pk \"75242546\" - object does not exist." ] }, "results": { "house_number": "420", "old_membership_number": "", "first_name": "test", "middle_name": "test", "last_name": "456", "email": "user@example.com", "phone_number": "9895655644", "address": "madhyabindu", "date_of_birth": "2024-08-15", "gender": "Male", "pan_number": "420", "family_member_count": "4", "citizenship_number": "56551", "citizenship_issue_district": "1", "province": "75242546", "district": "2", "municipality": "3", "ward": "4", "tol": null } } My model Looks like: class ConsumerDetails(CreatorModifierInfo): gender_select = (("Male", "Male"), ("Female", "Female"), ("Other", "Other")) id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=True, db_index=True) office = models.ForeignKey(Office, null=True, blank=True, on_delete=models.SET_NULL) service_cost_details = models.ForeignKey(ServiceCostDetails, … -
Running another method in a View after a form is saved using CBVs - DJANGO
I am trying to run another method after a form is saved: The method inc_rec gets the id field created from the class based view once saved Once form is saved: I want to retrieve all records in the table Checklist Iterate through each of the rows and add the records to the All_Inspection table and updating the company id. I am a bit stuck - as I have tried using signals, and I have tried to override, but somewhere there is a gap. Help appreciated - Thanks in advance. class ParishCreateView(LoginRequiredMixin, CreateView): model = Company fields = ['str_Company_Name', 'str_City','str_post_code'] #success_url = '/' def form_valid(self, form): print('form_valid') form.instance.author = self.request.user return super().form_valid(form) def inc_rec(self): Checklist = Checklist.objects.all() id = self.request.id for rec in Checklist: new_rec=All_Inspection(str_status=rec.str_status, str_check=rec.str_check, str_comment='',company_id=id) new_rec.save() I am expecting new records to be added into ALL_Inspection table once the form is saved with the new created item. -
Django All-auth return account inactive at the first social login
I have the local account that status is_active = False. Now I would like to set the account activation status True automatically if users login by their social account. At my code, I have the Django Allauth hook to set the user is_active to True class CustomAccountAdapter(DefaultSocialAccountAdapter): def pre_social_login(self, request, sociallogin): email = sociallogin.email_addresses[0] user = User.objects.get(email=email) user.is_active = True user.save() However, at the first time login, it's always tells me that the account is not active. When login at the second time, users can login as expected, I'm still not figure out why is this happening. please help me with this, thank you. -
Is there a way to connect users from different projects?
My admin dashboard users are in mongodb in authentication server(expressjs ts) but my apps users are in postgresql in another server(Django). I have made once service that is used to create events. but the problem is I want to know who created the event. as the event can be created by both admin users and app users. I am currently using jwt with same secret in both servers and using bearer token to authenticate the user. So far it's working as I am storing the id and name of users in event model. here the id of admin will be from mongodb and id of app user will be from postgresql. Is there a correct way to do this? -
Trigger Function Not Inserting All Records in data_sync_datahistory Table with application_name = 'dibpos_offline'
I'm working on a PostgreSQL trigger function to log changes to a data_sync_datahistory table whenever there's an INSERT or UPDATE operation on other tables. The trigger is set up to only log these changes when the application_name is set to 'dibpos_offline'. However, I'm encountering an issue where some records are not being inserted into the data_sync_datahistory table when multiple records are inserted into the database. Here is my trigger function: IF current_setting('application_name') = 'dibpos_offline' THEN IF TG_OP = 'INSERT' THEN INSERT INTO data_sync_datahistory (created, modified, data, source, table_name) VALUES (CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ROW_TO_JSON(NEW), 'local', TG_TABLE_NAME); ELSIF TG_OP = 'UPDATE' THEN INSERT INTO data_sync_datahistory (created, modified, data, source, table_name) VALUES (CURRENT_TIMESTAMP, CURRENT_TIMESTAMP, ROW_TO_JSON(NEW), 'local', TG_TABLE_NAME); END IF; END IF; RETURN NEW; And here is the relevant part of my database configuration: DATABASES = { 'default': { 'NAME': os.environ.get('DB_NAME', "postgres") if os.environ.get("DB_HOST", None) else os.path.join(Path.home(), 'dibpos.sqlite3'), 'USER': os.environ.get('DB_USER', "postgres"), 'PASSWORD': os.environ.get('DB_PASSWORD', '1234'), 'HOST': os.environ.get('DB_HOST', ''), 'PORT': os.environ.get('DB_PORT', 5432), 'CONN_MAX_AGE': None, 'CONN_HEALTH_CHECK': True, 'OPTIONS': { 'options': '-c application_name=dibpos_offline' }, } } Problem: When multiple records are inserted into the database, some of them are not being logged into the data_sync_datahistory table. The trigger function seems to be missing some records. Questions: Could the issue … -
Define commonly used form fields in Django
I have an app where there are some search forms on different pages. One commonly used form field would be 'show x items', where x can be 10, 20 or 50. I would also like a field 'Sort by' with some standard values. I have used Django model mixins earlier, e.g. CreateTimestampMixin, which standardizes the column name 'create_ts' in my models, and I want to have something similar in my forms now. Note: These are just forms, not model forms. Is there a way that I can do it? Or must I only define a new field type that derives from forms.ChoiceField, plugin my choice values, and then in each form define this field? -
Nothing happens when you try to start the django server. Writes only to the Python terminal
Nothing happens when you try to start the django server. Writes only to the Python terminal. I work in the VS code editor I was checking Check the path to the interpreter. I checked the Python version. I run it in the folder where it is located manage.py -
Django - can't use different id an value with choicefield's list while using jQuery Editable Select
In Django I'm using a ChoiceField: forms.py class forms_sales_documents(forms.ModelForm): sales_documents_description_1 = forms.ChoiceField(required=False, choices=list(models_products.objects.values_list( 'id_product','product_denomination')), widget=forms.Select(attrs={'id': 'sales_documents_editable_select_description_1','style': 'width:200px','onchange': 'populate_selected_product(this.id,this.value)'})) I'm using JQuery-Editable-select https://github.com/indrimuska/jquery-editable-select to create searchable selecboxes but when I do, it becomes impossible to dissociate the ChoiceField value from the label. They have to be the same like models_products.objects.values_list( 'id_product','id_product')) you can"t do something like models_products.objects.values_list( 'id_product','product_denomination')) otherwise the form won't save and raise the error : Select a valid choice. That choice is not one of the available choices Anybody to help me on this ? -
DigitalOcean IP is sending me to a random website
I am setting up a Django website on DigitalOcean. I've been following along a tutorial and in my settings folder I set my ALLOWED_HOSTS equal to the ipv4 that DigitalOcean provided when I set up the droplet for the project. However when I run python3 manage.py runserver using the provided ip address it sends me over to https://unforgettableweddingaustralia.com/. I'm thinking that DigitalOcean provided me with an IP address already in use but I'm not sure. Any advice or ideas would be greatly appreciated. -
Error 500 on the Heroku server, when locally everything is fine
I made an django app from the "Python Crush Course" book and when I try to login or register in my django app on heroku server, I have an error 500 on webpage and error 200 on logs. However, when I register or login locally I don't have any issues. Here are the heroku logs: 2024-08-02T22:17:13.267743+00:00 heroku\[web.1\]: State changed from starting to up 2024-08-03T22:34:20.389130+00:00 heroku\[router\]: at=info method=GET path="/" host=fierce-brook-34882-87d6631e0056.herokuapp.com request_id=34b832f3-b190-4bc2-88ac-576c6dd59905 fwd="80.107.58.61" dyno=web.1 connect=0ms service=137ms status=200 bytes=2493 protocol=https 2024-08-03T22:34:20.389210+00:00 app\[web.1\]: - - \[03/Aug/2024:22:34:20 +0000\] "GET / HTTP/1.1" 200 2197 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" 2024-08-03T22:34:20.729350+00:00 app\[web.1\]: 10.1.62.231 - - \[03/Aug/2024:22:34:20 +0000\] "GET /favicon.ico HTTP/1.1" 404 1862 "https://fierce-brook-34882-87d6631e0056.herokuapp.com/" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" 2024-08-03T22:34:20.729672+00:00 heroku\[router\]: at=info method=GET path="/favicon.ico" host=fierce-brook-34882-87d6631e0056.herokuapp.com request_id=ba080178-f0ef-4d0c-8745-0556273710f1 fwd="80.107.58.61" dyno=web.1 connect=0ms service=28ms status=404 bytes=2165 protocol=https 2024-08-03T22:34:26.884713+00:00 app\[web.1\]: 10.1.94.152 - - \[03/Aug/2024:22:34:26 +0000\] "GET /users/login/ HTTP/1.1" 200 2715 "https://fierce-brook-34882-87d6631e0056.herokuapp.com/" "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0" Here are the localhosts logs: [arch@archlinux dj_proj]$ python3 manage.py runserver Performing system checks... System check identified no issues (0 silenced). August 14, 2024 - 19:36:06 Django version 5.1, using settings 'learning_log.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. [14/Aug/2024 19:36:09] "GET / HTTP/1.1" 200 2197 [14/Aug/2024 19:36:28] …