Your STATIC setup (14:40 and later) didn't work for me. The css did not get loaded. I decided to put all static files in a separate directory 'static_dev' and set STATICFILES_DIRS = (os.path.join(BASE_DIR, 'ems/static_dev'),)
@arminbwagner6 жыл бұрын
In development (DEBUG=true).
@hardcode53945 жыл бұрын
@@HardikPatelN respected Hardik sir, can u plz help. My index.html page is not displayed. My folder set up is--- ems- ems->base.html, poll->index.html poll employee
@vivek46345 жыл бұрын
I like your videos very much. And the real-time errors happening and you fixing it is very useful for the viewers because the same errors happens to most of us.
@chennakeshavareddy34744 жыл бұрын
i have one doubt
@vivek46345 жыл бұрын
Hi, why do we need to use {% static 'css/custom.css' %} to link the CSS file? Normally, we just use href="css/custom.css" to link it with the HTML file right?
@vivek46345 жыл бұрын
@@HardikPatelN Thank you very much for explaining.
@jitendrachhipa5686 жыл бұрын
this is the error i am getting can you help me out in this Page not found (404) Request Method: GET Request URL: 127.0.0.1:8000/polls/ Using the URLconf defined in ems.urls, Django tried these URL patterns, in this order: admin/ polls/ [name='polls_list'] The current path, polls/, 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.
@jitendrachhipa5686 жыл бұрын
ems\urls.py from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('polls', include('poll.urls')), ] ems\poll\urls.py from django.urls import path from poll.views import index urlpatterns = [ path('', index, name ='polls_list'), ]
@MrAntoAnish5 жыл бұрын
Could you tell me which extension are you using for django in vscode
@MrAntoAnish5 жыл бұрын
@@HardikPatelN When you typed render , it showed the syntax for render, it doesnt do the same in my case
@nagadurgabattula50016 жыл бұрын
Very nice Explanation Sir...And please provide the github link..
@edip_c6 жыл бұрын
Thanks a lot for your efforts, I 've been watching few other tutorials, none of them shared useful tricks that you share in this series. One the interesting conventions you used was to locate the template folder in project subfolder(really useful for other static pages and keep everything in the same place). In that case; what if I want to create a link to static page(our services, team etc); how should we structure it? would I need a views.py (in the same folder with templates folder) to reference from urls.py? how would I import views from this views.py within urls.py? Thanks a lot!
@edip_c6 жыл бұрын
@@HardikPatelN Thanks a lot! All the best.
@ravishankarbirajdar40726 жыл бұрын
I want gitfile of project
@nagadurgabattula50016 жыл бұрын
Very nice Explanation Sir...And please provide the github link..