Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
how to fix moduleNotfoundErreor on deplying Django app to Heroku?
I have been trying to deploy my django project on heroku but Heroku is not tracking my project app name as presented in the Procfile. Honestly django_profile_viewer is the excact name of the project that has my settings file... #My procfile web: gunicorn django_profile_viewer.wsgi:application --log-file - --log-level debug python manage.py collectstatic --noinput manage.py migrate #Heroku logs 2022-02-13T10:46:43.042362+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1030, in _gcd_import 2022-02-13T10:46:43.042362+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 1007, in _find_and_load 2022-02-13T10:46:43.042363+00:00 app[web.1]: File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked 2022-02-13T10:46:43.042363+00:00 app[web.1]: ModuleNotFoundError: No module named 'django_profile_viewer' 2022-02-13T10:46:43.042446+00:00 app[web.1]: [2022-02-13 10:46:43 +0000] [10] [INFO] Worker exiting (pid: 10) 2022-02-13T10:46:43.054936+00:00 app[web.1]: [2022-02-13 10:46:43 +0000] [4] [WARNING] Worker with pid 10 was terminated due to signal 15 2022-02-13T10:46:43.154082+00:00 app[web.1]: [2022-02-13 10:46:43 +0000] [4] [INFO] Shutting down: Master 2022-02-13T10:46:43.154125+00:00 app[web.1]: [2022-02-13 10:46:43 +0000] [4] [INFO] Reason: Worker failed to boot. 2022-02-13T10:46:43.344541+00:00 heroku[web.1]: Process exited with status 3 2022-02-13T10:46:43.459875+00:00 heroku[web.1]: State changed from starting to crashed 2022-02-13T10:52:53.470088+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=profile-viewer-app.herokuapp.com request_id=430d2f5f-4ba3-4780-8cf8-ce1990237951 fwd="197.239.4.35" dyno= connect= service= status=503 bytes= protocol=https 2022-02-13T10:52:59.973950+00:00 heroku[web.1]: State changed from crashed to starting 2022-02-13T10:53:04.200202+00:00 heroku[web.1]: Starting process with command `gunicorn django_profile_viewer.wsgi:application --log-file - --log-level debug` 2022-02-13T10:53:05.838609+00:00 heroku[web.1]: Process exited with status 3 2022-02-13T10:53:05.951233+00:00 … -
"FIELD_ENCRYPTION_KEY must be defined in settings" - encrypted_model_fields error
Python 3.8.10 Django 4.0.2 django-encrypted-model-fields: 0.6.1 I am using encrypted_model_fields to encrypt a model field. The field I am encrypting is a password used to access a user account for another app via an api. According to the docs I need to import the module and then wrap the model field as follows: Models.py from encrypted_model_fields.fields import EncryptedCharField account_password = EncryptedCharField(models.CharField(max_length=20, blank=True)) In addition to that I need to add a FIELD_ENCRYPTION_KEY to settings.py, which I have done, as per the docs. Settings.py FIELD_ENCRYPTION_KEY = os.environ.get('FIELD_ENCRYPTION_KEY') I have also added 'encrypted_model_fields' to installed apps in settings.py and the encryption key to .env, which is in place of the placeholder below..env: export FIELD_ENCRYPTION_KEY=my_encryption_key_place_holder When I run makemigrations I receive the following error: django.core.exceptions.ImproperlyConfigured: FIELD_ENCRYPTION_KEY must be defined in settings I have defined it - so why is it not found? -
Does anyone know how to use Django and Brownie libraries together (python)?
Does anyone know how to use Django and Brownie libraries together (python)? Thanks for any information. -
Django: background image it does not appear after Generating a PDF from HTML in my Django project
Hi people there i want to set a background image for my printout pdf , I have already rendered it from html to pdf. I have tried much solutions but it doesn't work with me to set a background (It doesn't appear); Here are my tries: First Try: go to models.py: and write this method: def image_as_base64(image_file, format='png'): if not os.path.isfile(image_file): return None encoded_string = '' with open(image_file, 'rb') as img_f: encoded_string = base64.b64encode(img_f.read()) return 'data:image/%s;base64,%s' % (format, encoded_string) then go to the class of the model that am working with and write this method : with specifying on the path of the image: Here is the code: class Formulaires(models.Model): def get_cover_base64(self): return image_as_base64('/home/diva/.virtualenvs/django-projects/example/static/img/background.png') then I have go to the template.html and call the method "get_cover_base64" that contain the path on the tag "div" from the body (background-image:) <body style="font-size: 12px; "> <div id="divid" style="padding: 0.01rem; background-image: "{{ post.get_cover_base64 }}";" class="container"> PS: 2nd try: i have tried storing online my image - background and call with url and also it doesn't work ; here is the code: <body style="font-size: 12px; background-image: url('https://....');> 3rd try: using the staic files <body style="font-size: 12px; background-image: url('{% static "img/background.png"%}');> --> it doesn't work with … -
Django 4.0.2 | Python 3.9.7 | TypeError: __init__() missing 1 required positional argument: 'get_response'
I wrote a custom authentication and added a csrf check middleware in the authentication process. I am calling the below function in the authentication function. def enforce_csrf(self, request): """ Enforce CSRF validation """ check = CSRFCheck() check.process_request(request) reason = check.process_view(request, None, (), {}) if reason: # CSRF failed, bail with explicit error message raise PermissionDenied('CSRF Failed: %s' % reason) The CSRFCheck() function is a custom middleware and it looks like this. class CSRFCheck(CsrfViewMiddleware): def _reject(self, request, reason): return reason Now when I am trying to process the request, which requires authentication, I am getting the error: TypeError: init() missing 1 required positional argument: 'get_response' the same code is working perfectly in Django 3.2 Now, as far as I was able to debug, the CSRFCheck function is expecting a get_response method which I don't know where it is coming from. -
Run Django server as a daemon process when start/reboot the GCP virtual machine
I'm connecting to GCP virtual machine through ssh-key in visual studio code. I've created a Django API and want to start the server as a daemon process when I start the virtual machine. I've created a script file run_script.sh cd /home/s4cuser/poc_system python3 manage.py runserver 0.0.0.0:8000 where s4cuser is the user and poc_system is my django project folder I've created a crontab file and added @reboot <path to run_script.sh> at the bottom of crontab file. But when I reboot the virtual machine and check whether process got started or not by typing below command, nothing comes. ps aux | grep manage.py What could be the reason for it? -
How to know which conditions gives error in mongodb query then able to error handling
I'm use pymongo and django. In my case I want know which one of my conditions in find or find_one or find_one_and_update mongo query returns false. for example, we have this document: { { "key": 1, "name": "my_name" }, { "key": 2, "uesrname": "username" } } and need to find a document with key =2 and name have the field name query = collention.find_one( {"key":2,"name":{$exists:true}} ) The above query gives us an empty dictionary. I tried using explain() but in find_one I got an error 'NoneType' object has no attribute 'explain' and in find({...}).explain() it does not specify which condition is wrong. Now, how could I error handling ?? -
Django - Implement and test cache busting
It looks like I'm facing cache issues with my application so I would like to implement this cache busting feature as it was recommended to me. The context: my application is already in a production server (alpha version) and as this is an evolution of the ground settings, I would like to take this opportunity to train myself to prepare, test and deliver such technical updates. I'll take the opportunity to better understand static files management. Currently, the js and css files are not properly propagated and my production app still uses older versions, so I need to enforce a server cache refresh. As I'm not comfortable at all with all of this stuff and static files management, I would like to double check the process and understand how I could test it before pushing to production. How to proceed As far as I understand, what I have to do is to change my settings file and add the following line: STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage' I'm wondering if I need to change anything else. Here are my current settings about static files management: STATIC_URL = "/static/" STATIC_ROOT = os.path.join(BASE_DIR, "static/") STATICFILES_DIRS = [] I've mainly seen several approaches for STATICFILES_DIRS (either … -
Unable to install web3 despite having microsoft build tools
I used cmd pip install web3, but it is not working -
Timeout issue in django with nginx and gunicorn
I have few rest API,s in django that take more then one minute to get Data. Because there are more then 20 million records in database. But It show time out after one minute . How to increase timeout ?. I have searched the internet and made changes in Nginx and Gunicorn accordingly but It still show time out after one minute when i hit the API with postman. Nginx Config file - location / { proxy_set_header Host $http_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; proxy_pass http://unix:/home/neeraj/run/gunicorn.sock; proxy_connect_timeout 500; proxy_read_timeout 500s; } Gunicorn.service file - ExecStart=/home/neeraj/cashvenv/bin/gunicorn --error-logfile /home/neeraj/run/gerror.log --workers 3 --timeout 500 --bind unix:/home/neeraj/run/gunicorn.sock Cash.wsgi:application Please help me out with this. -
Change quantity of product in django ecommerce website? DJANGO
It's not giving an error. The quantity is being changed only in the first product, even if when I press arrow of second product, the quantity of first product is being changed. cart.js var changeQ = document.getElementsByClassName('increase') for (i = 0; i < changeQ.length; i++) { changeQ[i].addEventListener('click', function(){ var productId = this.dataset.product var action = this.dataset.action console.log('productId:', productId, 'Action:', action) if (action == 'plus'){ Increase(productId, action) } else if(action=='minus'){ Decrease(productId, action) } }) } function Increase(productId,action){ console.log('Increase') var quantity = Number(document.getElementById("quantity").value); quantity = quantity+1; document.getElementById("quantity").value = quantity; console.log(quantity); } function Decrease(productId,action){ var quantity = Number(document.getElementById("quantity").value); console.log('Decrease') quantity = quantity-1; document.getElementById("quantity").value=quantity; } template <div class="counter"> <div class="arrow-up increase" id="arrow-up" data-product="{{item.product.id}}" data-action="plus" ><i class="fa fa-arrow-up"></i></div> <div class="quantity"><input type="number" id="quantity" value="1"></div> <div class="arrow-down increase" id="arrow-down" data-product="{{item.product.id}}" data-action="minus"><i class="fa fa-arrow-down"></i></div> </div> It's in Django. So what can I do to indicate the specific product. Can someone help me to solve this problem, please! -
Django form submit through Javascript returns empty fields
I have a form in my HTML document for which I suggest a few examples on how to fill it. The user can click on one of these examples and it will call a javascript function that pre-fill and submits the form. The submit function works correctly but it returns empty fields. Do you have any idea why? My HTML: form has 5 fields (amount, category, title, expiration, priority), 4 examples: <form method="POST" id="myform"> {% csrf_token %} <label for="amount" class="form-label h6 mb-0 text-dark font-weight-bold" style="width: 120px;">Target amount</label> <input name="amount" id="amount" placeholder="0" style="width: 200px;"> <input type="hidden" name="category" id="category"> <input type="hidden" name="title" id="title" value=""> <input type="hidden" name="expiration" id="expiration"> <input type="hidden" name="priority" id="priority"> <div class="goals-template align-items-center text-center mb-4"> <a class="template" onclick="FormSubmit(this)"><img class="template-item" src="{% static 'img/undraw_emergency2.svg' %}">Emergency Fund</a> <a class="template" onclick="FormSubmit(this)"><img class="template-item" src="{% static 'img/undraw_car2.svg' %}">New car</a> <a class="template" onclick="FormSubmit(this)"><img class="template-item" src="{% static 'img/undraw_house2.svg' %}">House</a> <a class="template" onclick="FormSubmit(this)"><img class="template-item" src="{% static 'img/undraw_wishlist2.svg' %}">Wishlist</a> <button type="submit" class="d-none" id="Go">Save goal</button> </div> </form> My JS: function FormSubmit(e) { var myform = document.getElementById("myform"); document.getElementById('category').value = 'RETIREMENT'; document.getElementById('title').value = '10'; document.getElementById('amount').value = 10; document.getElementById('expiration').value = '2022-12-31'; document.getElementById('priority').value = 'NEED'; getCookie('csrftoken'); var hiddenField1 = document.createElement("input"); hiddenField1.setAttribute("type", "hidden"); hiddenField1.setAttribute("name", 'csrfmiddlewaretoken'); hiddenField1.setAttribute("value", getCookie('csrftoken')); myform.appendChild(hiddenField1); myform.submit(); } The response in my console: -
Django Rest framework foreign key problem
I have this problem insert or update on table "Auth_user_org" violates foreign key constraint "Auth_user_org_user_id_id_465bfad2_fk_auth_user_id" DETAIL: Key (user_id_id)=(1) is not present in table "auth_user". this is my model.py class User(models.Model): id = models.AutoField(primary_key=True) FirstName = models.CharField(max_length=100) LastName = models.CharField(max_length=100) mail = models.CharField(max_length=100) def __str__(self): return str(self.id) class Organization(models.Model): id = models.AutoField(primary_key=True) name = models.CharField(default='0000000',max_length=100) type = models.CharField(default='0000000',max_length=20) def __str__(self): return str(self.name) class User_org(models.Model): id = models.AutoField(primary_key=True) user_id = models.ForeignKey(User,default=1,related_name='UserInfo', on_delete=models.CASCADE) organization_id = models.ForeignKey(Organization,related_name='orginfo',on_delete=models.CASCADE) def __str__(self): return str(self.user_id) can not add in User_org ,user_id and organization_id. what is solution? -
Django response Expected a `Response`, `HttpResponse` or `HttpStreamingResponse` to be returned from the view, but received a `<class 'NoneType'>`
my model has attributes fields as file and the person who uploaded it ,in my case i would want to show the error no file found on my website front end when there is no data in model but instead it is taking me to this error i have implemented my code like this @api_view(('GET',)) def template_view(request): data = Mymodel.objects.first() try: if data: response = HttpResponse( data.file, content_type='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, ' 'application/vnd.ms-excel', ) return response except FileNotFoundError: raise ValueError('No file found') -
Django verify user through email
What the best way to verify user in Django through sending code/token in message to user email?? Perhaps there are basic Django method to do it? I added TOKEN field in user model, but it didn't seem right to me. Give me please some directions or a piece of code. Thanks a lot. -
Django: save pdf from view to model (reportlab)
Is it possible in Django to save a pdf from a view to a model (while downloading it at the same time)? So far, these steps work already: the pdf is displayed in a new tab and I can download it the model instance is created (but empty) What dows not work: the created model instances do not have a filepath and there is no pdf file saved anywhere on the server My code: Models from django.db import models class TestModel(models.Model): def pdf_upload_path(instance, filename): return f'utility_bills/{instance.created_date.strftime("%Y-%m-%d")}_test_{filename}' created_date = models.DateTimeField( auto_now=False, auto_now_add=True, null=True, blank=True, ) pdf = models.FileField(upload_to=pdf_upload_path, blank=True) Views import io from django.core.files.base import ContentFile from django.http import FileResponse from reportlab.platypus import SimpleDocTemplate, Paragraph from .models import (TestModel) ## Create PDF ## def utility_pdf(request): # General Setup pdf_buffer = io.BytesIO() my_doc = SimpleDocTemplate(pdf_buffer) sample_style_sheet = getSampleStyleSheet() # Instantiate flowables flowables = [] test = Paragraph("Test", sample_style_sheet['BodyText']) # Append flowables and build doc flowables.append(test) my_doc.build(flowables) # create and save pdf pdf_buffer.seek(0) pdf = pdf_buffer.getvalue() file_data = ContentFile(pdf) pdf = TestModel(pdf=file_data) pdf.save() response = FileResponse(pdf_buffer, filename="some_file.pdf") return response -
Django- IndentationError
Hello everyone I am new to django please help me to solve error,I am using termux for it and Acoder for editing code In my django urls.py code In urls.py In termux error showing like this Error message of indentation in urls.py -
How to get to database at localhost from Django in Docker container
I have a django in a docker container that must access a postgres database at my localhost. The Dockerfile works fine when accessing the database residing at an external host, but it can't find the database at my host. It is a well known problem and there is a lot of documentation, but it doesn't work in my case. It all focuses on which internet address I transmit to the HOST key in the database driver dictioonary in the django settings.py: print('***', os.environ['POSTGRES_DB'], os.environ['POSTGRES_USER'], os.environ['POSTGRES_HOST'], os.environ['POSTGRES_PORT']) DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', # os.environ['ENGINE'], 'NAME': 'demo', 'USER': os.environ['POSTGRES_USER'], 'PASSWORD': os.environ['POSTGRES_PASSWORD'], 'HOST': os.environ['POSTGRES_HOST'], } } And running the Dockerfile: docker build -t dd . docker run --name demo -p 8000:8000 --rm dd When POSTGRES_HOST points to my external server 192.168.178.100 it works great. When running python manage.py runserver it finds the host and the database. The server starts and waits for commands. When pointing to 127.0.0.1 it fails (which actually is great too: the container really isolates). django.db.utils.OperationalError: could not connect to server: Connection refused Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432? But as I can connect to my server, I should be … -
Model Manager; TypeError: isinstance() arg 2 must be a type or tuple of types
I'm trying to test a method within a custom model manager by_week(). Upon debugging it, I've come across an issue of trying to query all objects within the method with profile.questions.all() and self.model.objects.all() where self.model is the Question model. Yet both raise the following error: *** TypeError: isinstance() arg 2 must be a type or tuple of types. Why is this error being raised? As background info: I created test data by creating instances through the admin interface and dumped everything in the database into a JSON file. models.py class QuestionSearchManager(Manager): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def by_week(self, profile): # today = datetime.date.today() # weekago = today - datetime.timedelta(days=7) questions = self.model.objects.all() user_tags = profile.questions.all() x = self.model.objects.filter( tags__name__in=user_tags ) return x class Post(Model): body = TextField() date = DateField(default=datetime.date.today) comment = ForeignKey('Comment', on_delete=CASCADE, null=True) profile = ForeignKey( 'authors.Profile', on_delete=SET_NULL, null=True, related_name='%(class)ss', related_query_name="%(class)s" ) score = GenericRelation( 'Vote', related_query_name="%(class)s" ) class Meta: abstract = True class Question(Post): title = CharField(max_length=75) tags = ManyToManyField( 'Tag', related_name="questions", related_query_name="question" ) objects = Manager() postings = QuestionSearchManager() python manage.py shell >>> from authors.models import Profile >>> p = Profile.objects.get(id=2) >>> p.questions.all() <QuerySet [<Question: Question object (13)>]> >>> from posts.models import Question >>> Question.objects.all() … -
Django Celery apply_async callback is not working
I have a code like this @shared_task def add(a, b): return a + b @shared_task def add_completed(a, b): return a+b when i run in my shell python manage.py shell >>> from test import add, add_completed >>> add.apply_async((2,3), link=add.s(10)) the result for this in my celery result backend Task Positional Arguments: "(5, 10)" Result Data: 15 Task Positional Arguments: "(2, 3)" Result Data: 5 but if I modify the code a little bit >>> from test import add, add_completed >>> add.apply_async((2,3), link=add_completed.s(10)) the result for this in my celery result backend Task Positional Arguments: "(2, 3)" Result Data: {"exc_type": "TypeError", "exc_message": ["add_completed() takes 0 positional arguments but 2 was given"], "exc_module": "builtins"} Traceback: Traceback (most recent call last): File "/home/ubuntu/src/lib/python3.6/site-packages/celery/app/trace.py", line 505, in trace_task priority=task_priority File "/home/ubuntu/src/lib/python3.6/site-packages/celery/canvas.py", line 219, in apply_async return _apply(args, kwargs, **options) File "/home/ubuntu/src/lib/python3.6/site-packages/celery/app/task.py", line 537, in apply_async check_arguments(*(args or ()), **(kwargs or {})) TypeError: add_completed() takes 0 positional arguments but 2 were given any reason why is it givng error, and how to fix? -
Django - How to set ForeignKey to a model that itself has a one-to-one relationship to User?
Here's my class: from django.db import models from django.contrib.auth.models import User class CredsKeychain(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) def __str__(self) -> str: return f"{self.user.username}'s credentials" class CredKey(models.Model): keychain = models.ForeignKey(CredsKeychain, on_delete=models.CASCADE) tag = models.CharField(max_length=100) username = models.CharField(max_length=100) enc_password = models.CharField(max_length=100) last_used_successfully = models.DateTimeField(default=None) def __str__(self) -> str: return f"{self.keychain.user.username}'s credentials for {self.tag} [{self.username}]" I'm trying to have the relationship set up such that each user has a CredsKeychain that has multiple CredKey objects. I'm having a hard time trying to reference CredsKeychain from CredKey. I can directly link the user, via: keychain = models.ForeignKey(User, on_delete=models.CASCADE) But that's not what I need. I actually need to have a ForeignKey relationship to the CredsKeychain that has a one-to-one relationship with the current user (who submits the page in Django admin). When I try to migrate this model (in its current state), I get the error: It is impossible to add a non-nullable field 'keychain' to credkey without specifying a default. This is because the database needs something to populate existing rows. Please select a fix: Provide a one-off default now (will be set on all existing rows with a null value for this column) Quit and manually define a default value in models.py. … -
How to update react side State automatically on making a change from backend
We are using Django rest API with JWT as backend and we have a user model with some roles like a user Can Trade or not, that being passed through the userData as a payload stored in localStorage and on that basis, we can work around with the UI. But if the user logged in on the react side, And Admin decides to change his permission e:g Like changes to ineligible for Trade. then for now user can interact with client-side making unsuccessful requests until he presses logout which clears the localStorage. And the user gets a login with updated token and user permissions. In short, changing the permissions of the user doesn't change the UI behaviour instantly. So there are a bunch of I have seen like changing the ACCESS_TOKEN_LIFETIME, REFRESH_TOKEN_LIFETIME to a certain level. But is there any way to set up Django and react in a way that after making a change from the admin side automatically update the react UI near to real-time? -
How do I get all the elements with a specific ID from an SQLite table using Django?
I'm a beginner in SQLite, and I need to know how do I select all the elements from an SQLite table and put them in a list. Here's what I tried: <select name="users" id="users"> {% for user_reg in db.user_registration_models %} {% if user.is_authenticated %} <option value="/all_users/{{ user_reg.id }}">{{ user_reg.username }}</option> {% endif %} {% endfor %} </select> Thanks in advance for your answers! -
Django: How to calculate the average duration/timedelta per date?
I have the following QuerySet: {'duration': datetime.timedelta(seconds=212), 'date': datetime.datetime(2022, 1, 17, 0, 0, tzinfo=<UTC>), 'count': 1} {'duration': datetime.timedelta(seconds=9), 'date': datetime.datetime(2022, 1, 17, 0, 0, tzinfo=<UTC>), 'count': 1} {'duration': datetime.timedelta(seconds=19), 'date': datetime.datetime(2022, 1, 17, 0, 0, tzinfo=<UTC>), 'count': 1} {'duration': datetime.timedelta(seconds=20), 'date': datetime.datetime(2022, 1, 17, 0, 0, tzinfo=<UTC>), 'count': 1} {'duration': datetime.timedelta(days=2, seconds=4681), 'date': datetime.datetime(2022, 2, 7, 0, 0, tzinfo=<UTC>), 'count': 1} {'duration': datetime.timedelta(seconds=1114), 'date': datetime.datetime(2022, 2, 7, 0, 0, tzinfo=<UTC>), 'count': 1} {'duration': datetime.timedelta(seconds=1683), 'date': datetime.datetime(2022, 2, 7, 0, 0, tzinfo=<UTC>), 'count': 1} and would like to calculate the average duration for each date, so for the above QS I'd get the following result: Duration Date 65 2022/01/17 60,092.67 2022/02/07 I tried to apply the Count function over the date so I can then divide the duration over the day's total, as following: qs.annotate(week_total=Count('date')) but it didn't work as the date itself is an aggregate and I get this error: FieldError: Cannot compute Count('date'): 'date' is an aggregate So after many attempts I'm out of ideas to try and I'd appreciate any tips. -
Django 404 error-page not found & No CSS renders
New-ish coder and first time stack overflow poster. I've made a django project with 3 pages. Sometimes no pages are found, sometimes the index page loads without 404 error but I can't link to other pages and the css files I've pointed it to doesn't render. Errors I'm getting is: 404 error I have slept on the problem, looked up file formats to make sure my project and app url.py is correct. added app to settings. imported correct classes. I have also tried clearing my browser data on chrome and using a different browser. If anyone could take a look at my small project on github that would be amazing. https://github.com/Connell-L/portfolio_website is the link or if anyone wants me to post code files on codepen or something I'm more than happy to do it.