MIME type error with css file and load static showing in plain text - Django on PyCharm IDE

Ok great, I have added a non secret key like suggested. I was wondering when to make the change - at what point.

Anyways, now when I runserver it outputs the following at that URL:


# Page not found (404)

|Request Method:|GET|
| --- | --- |
|Request URL:|http://127.0.0.1:8000/|

Using the URLconf defined in `YouTrade1.urls`, Django tried these URL patterns, in this order:

1. admin/
2. YouTrade1_App/templates/YouTrade1/YT_Creators.html [name='home1']
3. ^static/(?P<path>.*)$

The empty path didn’t match any of these.

You’re seeing this error because you have `DEBUG = True` in your Django settings file. Change that to `False`, and Django will display a standard 404 page.

Here’s the terminal mex:

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
March 14, 2024 - 16:29:36
Django version 5.0.3, using settings 'YouTrade1.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.

Not Found: /
[14/Mar/2024 16:29:40] "GET / HTTP/1.1" 404 2353

Is this of any help?

What do you think is causing this error?

(What useful information do you think the error is giving you?)

So it’s clear there is something that is not found. Now what could it be? The URL could be an option, but how to fix? Isn’t it referenced correctly already in my urls.py?

Is it?

You’re trying to reference:

Which is a blank URL.

Do you have a blank url defined in your urls.py file?

Why is an empty URL necessary?

Because you’re trying to access it.

If you didn’t try to access a blank url, you wouldn’t need to define one.

So that would resolve all issues? :thinking:
Plus, how do I define an empty URL hahah

I don’t know what “that” you’re referring to, but I doubt any one item is going to resolve all possible issues. It may fix this one.

How do you think you might?

If you haven’t worked your way through the Official Django Tutorial, now’s a good time to do that.

If you have, then you might want to review it and walk through it again.

Forget about my previous, I found a part of the solution, I needed an empty view reference, why is that the case though?
Now it loads the CSS file, but the input I gave in there are not reflected on my server :thinking: - my image in the CSS file still doesn’t show up as a background…
You can find it in Mod_v2.0

Since it appears that you have resolved the original issue, it may be worth opening up a new topic for this new problem.

If you do, please provide a complete description of the issue with all the appropriate details.

Okok, that was very helpful, thanks for the patience! :pray: