Blackscorche
Like the version the video you watched use
Blackscorche
Александр
I won't give up
Decent answer.
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
Александр
It's hard, I mean programming on street, but I never gave up
Programming is hard. But it's even harder to break the person who writes "I won't 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
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
23.6.666
Use ALLOWED_HOSTS=['*']
ı tried but it still same
David H
ı tried but it still same
So the error comes from another side
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
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'), ]
23.6.666
error code same Not Found The requested resource was not found on this server.
23.6.666
What resources?
ı dont know
Muflone
ı dont know
What page are you loading?
23.6.666
hello inside templates inside home.html
23.6.666
Missing comma after the view
oh thanks but same error again .....
Muflone
oh thanks but same error again .....
What page are you loading from the browser?
23.6.666
this page
Hadi
oh thanks but same error again .....
put comma after views.home
23.6.666
http://127.0.0.1:8000/
23.6.666
Why do you hvae that ALLOWED_HOSTS?
ı dont know what should ı do ?
23.6.666
put comma after views.home
after they said ı put
Charly
http://127.0.0.1:8000/
And thats the issue, ALLOWED_HOSTS doesn't have 127.0.0.1:8000
Charly
ı dont know what should ı do ?
Why did you have these values?
23.6.666
Show the fixed urls
okay okay wait
Hadi
after they said ı put
path(''", views.home, name='home'),
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
The app hello is not used
23.6.666
The app hello is not used
how can ı add hello/templates/hello/home.html
Muflone
how can ı add hello/templates/hello/home.html
On what url you want the hello application be shown?
Muflone
yes
Incorrect answer
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
like this 127.0.0.1:8000 is for home.html ı wanna this
Then add path('', include('hello.urls')) to the main urls.py
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
23.6.666
No
how is that
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