Blackscorche
Like the version the video you watched use
PyDanny21
Blackscorche
Александр
PyDanny21
Yh
PyDanny21
It's hard, I mean programming on street, but I never gave up
PyDanny21
And I'm not ready to give up
Александр
Tell me please
Александр
For the cart, do you need to create a model in the db or can you just use a class?
Александр
Александр
And if there is a model, then the cart will be stored in the database on the site, and not in the session, as I understand it?
23.6.666
DEBUG = False
ALLOWED_HOSTS = ['192.168.2.168', '127.0.0.1']
when ı do this for setup django my web site say that no found how can ı fix this problem
23.6.666
ı wanna do debug equal false
23.6.666
please help me ı am begginer for django
Muflone
23.6.666
ı know ı also write on chatgpt this error code but i cant find
23.6.666
error code : Not Found
The requested resource was not found on this server.
Muflone
Chatgpt is for stupids, not meaningful
ⓝⓞⓥⓘⓝ
Muflone
Muflone
23.6.666
David H
It could be that your server config is not okay or something like that
23.6.666
https://stackoverflow.com/questions/62888816/django-not-found-the-requested-resource-was-not-found-on-this-server
ı will try this in 5 minutes
Christina
Christina
https://stackoverflow.com/questions/54504142/how-to-set-django-allowed-hosts
23.6.666
ı am crying it is still not working ı will share my codes
23.6.666
hello is my app on django
it is urls.py
from django.contrib import admin
from django.urls import path
from hello import views
urlpatterns = [
path('admin/', admin.site.urls),
path('',views.home name='home'),
path('order',views.order name='order'),
]
Muflone
23.6.666
error code same Not Found
The requested resource was not found on this server.
Charly
Muflone
23.6.666
23.6.666
23.6.666
hello inside templates inside home.html
Muflone
23.6.666
this page
Charly
Hadi
23.6.666
http://127.0.0.1:8000/
23.6.666
23.6.666
Muflone
23.6.666
23.6.666
Charly
23.6.666
ı added this
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ALLOWED_HOSTS = ['192.168.2.168', '127.0.0.1',' 127.0.0.1:8000']
# Application definition
INSTALLED_APPS = [
'hello',
'newyear',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]
and terminal error code 404 179
23.6.666
please help me
Muflone
Show the urls.py from the folder containing the settings.py
23.6.666
main urls.py
23.6.666
from django.contrib import admin
from django.urls import path,include
urlpatterns = [
path('admin/', admin.site.urls),
path('newyear', include("newyear.urls"))
]
Muflone
Muflone
The app hello is not used
23.6.666
Muflone
Doragonsureiyā
23.6.666
like this 127.0.0.1:8000 is for home.html ı wanna this
23.6.666
when ı open my web site it should be home.html
and ı open 127.0.0.1:8000/order.html == order.html
Muflone
23.6.666
OMG İT İS WORKİNG
23.6.666
main page ı can see hello.html
Muflone
Re-read the tutorial part for the urls.py
23.6.666
now when ı wanna put order.html on 127.0.0.1:8000/order
path ('order' , include('order.urls'))
is that right
Muflone
23.6.666
23.6.666
Muflone
how is that
I will not help in that
You have to study how the routes work, I gave you an example, copy pasting code from others will damage your career
Muflone
https://t.me/django/255499
23.6.666