#Message is not displaying

34 messages ยท Page 1 of 1 (latest)

tardy cave
#

home.html:

<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bootstrap demo</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-SgOJa3DmI69IUzQ2PVdRZhwQ+dy64/BUtbMJw1MZ8t5HZApcHrRKUc4W0kG879m7" crossorigin="anonymous">
  </head>
  <body>
    <h1>Hello, world!</h1>
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.5/dist/js/bootstrap.bundle.min.js" integrity="sha384-k6d4wzSIapyDyv1kpU366/PK5hCdSbCRGRCMv+eplOQJWyd1fbcAu9OCUj5zNLiq" crossorigin="anonymous"></script>
  </body>
</html>

 urls: ```
from django.urls import path
from . import views

urlpatterns = [
    path("", views.home, name="home")
]```

from django.contrib import admin
from django.urls import path, include

urlpatterns = [
path('admin/', admin.site.urls),
path("", include("classes1.urls"))
]Views:
def home(request):
return render(request, "home.html")```

Settings:```
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]


Hello world is not displayed on the page
wind pollen
#

What is displayed?

tardy cave
wind pollen
#

Make sure you've actually saved your changes to every urls.py file.

tardy cave
#

It is my first time making project in vs code

#

I used pycharm before

wind pollen
#

The migrations will be for various Django apps like auth, sessions, etc.

#

I'm asking if you've actually saved (File > Save, or Ctrl/Cmd-S) your changes to files

#

The most common reason people have this exact request is because they haven't actually saved the file.

tardy cave
#

@wind pollen yeah i did

#

I dont know what is the issue

wind pollen
#

What does ROOT_URLCONF point to in your settings?

tardy cave
#

@wind pollen "classes.urls"

wind pollen
#

And what's in classes/urls.py?

tardy cave
#

@wind pollen from django.contrib import admin
from django.urls import path, include

urlpatterns = [
path('admin/', admin.site.urls),
path("", include("classes1.urls"))
]

wind pollen
#

And that file is definitely saved?

tardy cave
#

Yep

wind pollen
#

And presumably you have a classes1/urls.py (where classes1 is an app?)

tardy cave
#

@wind pollen yes

wind pollen
#

You don't need to @ me every time ๐Ÿ˜‰

#

And what's in that file? And it's definitely saved?

tardy cave
#

Wait

#

I clicked on save all

#

Now something happened

#

Let me see

#

Lmao

#

Working now

#

Sorry

#

My first time using vs code
It was working without saving every time in pycharm

wind pollen
#

"They're definitely saved?"
"Yes!"
"are you sure?"
"Yes!"
...
Narrator: They weren't saved.

tardy cave
#

Anyway, thank you for your help

wind pollen
#

I despise auto-saving, and the generation of developers growing up thinking it's the only way ๐Ÿ˜†