/admin/ not working im django (visual Studio Code)

Can Anybody help me out with my problem i am getting
Page not found (404)

Request Method:GETRequest URL:

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


about [name=‘about’]

afterlogin [name=‘afterlogin’]

The current path, admin/ , 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.
while in my setting.py

  1. urlpatterns = [
  2. path(‘admin/’,admin.site.urls),
  3. path("", include(“btreapp.urls”)),
  4. ]
    i even checked the following - all seems ok in setting files

The admin is enabled in the default project template used by [ startproject ]

If you’re not using the default project template, here are the requirements:

Add 'django.contrib.admin' and its dependencies - [ django.contrib.auth ], [ django.contrib.messages ], and [ django.contrib.sessions ] - to your [ INSTALLED_APPS ]
Configure a [ DjangoTemplates ] backend in your [ TEMPLATES ] setting with django.contrib.auth.context_processors.auth and django.contrib.messages.context_processors.messages in the 'context_processors' option of [ OPTIONS ]

If you’ve customized the [ MIDDLEWARE ] setting, [ django.contrib.auth.middleware.AuthenticationMiddleware ] and [ django.contrib.messages.middleware.MessageMiddleware ] must be included.

[Hook the admin’s URLs into your URLconf]

The urlpatterns belongs in your app’s urls.py file, not in settings.py

Please post your ROOT_URLCONF setting from your settings.py, and then your urls.py file.

Also, when posting output that you’re copying from another source (such as source code or terminal output), please enclose it between lines of only three backtick - ` characters. (Make sure you use the backtick and not the apostrophe - '.) This means you’ll have a line that is only ```, followed by the lines you’re pasting in, followed by another line that is only ```.


hello thank you so much i will keep that in mind.
in settings.py is
ROOT_URLCONF = 'app.urls'
my app’s url.py is

     from app import views

    urlpatterns = [
        path('', views.login, name="login"),
        path('afterlogin', views.afterlogin, name="afterlogin"),
       ] ```
i hope i have learned how to write