Doragonsureiyā
How to stream videos in django from server ?
Step 1: Open a browser Step 2: Write down https://google.com or https://duck.com and press Enter Step 3: In the search box write down the same words you asked here Step 4: Read the firsts results
Doragonsureiyā
I can't send the bug report here because sending files is limited
To share code or error tracebacks please use an online pasting service, here is a list of suggested sites: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com
Anonymous
Hi guys, I am having 500 error while deploying to heroku. Have you ever faced such an issue?
Anonymous
https://stackoverflow.com/questions/60491594/server-error-500-in-django-deploying-on-heroky-when-debug-false
Dhruva
How can I get the view count on the same page having 2 different blogs uploaded.The problem that occurs is that I m trying to capture session of viewcount such that if the same person is reading that blog that it doesn't do view count.But on the contrary if the same person has not read that the other blog on same page that it should do increment .?!
Damron
oh, sry, that's working on DEBUG)
Damron
How does ur urls.py file look?
Damron
I remember when was moving to enterprise my proj I added lines: if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Damron
maybe it will be helpful)
Anonymous
hello guys ı need help
Anonymous
ı cant get object or 404 from my model
Anonymous
this model
Pavel
People please share your experience, who forms the naming by nesting for class selectors in html. I would like to adhere to some methodology, but again, everyone writes differently. Can someone tell me the Golden mean?)
Pavel
For example this structure: <section> <div> <h1></h1> <p></p> <a href="#"></a> </div> <div> <div> <h1></h1> <p></p> </div> <div> <h1></h1> <p></p> </div> </div> </section>
raven
Does anybody have any good source of django channels?
Pavel
Romila
How to create folders in folder using key in S3 bucket for storing file
477
Good day guys, I am new to using Django and my Supervisor wants to to build a website for Car rental system with all the feature using Django. Can someone give me directions on where to start? Have been searching online for days but couldn’t find anything on Django but other programming languages
Anonymous
On password_change_form.html I used {{form.new_passwor1}} and {{form.new_passwor2}} for the input fields what about in password_reset_confirm.html
477
Okay thank you
Dhanrz
I'm planing on making a web application for a MCQ quiz Whr should I start Requirements: log in authentication And data base
Dhruva
Please help me out
Krunal
Hi everyone, I am facing problem in ManyToMany relationship remove query. Please help me. Below is the link of my code HTTPS://pastebin.com/GWse01Hy
Shery
you want to remove all of them?
Krunal
Yes but for user which I have select
Shery
you can use 'clear()' instead of 'remove()' I guess
Krunal
It's not removing
Anonymous
I m working on location based django project but I m confused with that part a lot . So can anyone tell me how should I proceed to have a thorough understanding and if possible send appropriate links.
Shery
It's not removing
name.UserUrlMapping_set.clear()
Krunal
you can use 'clear()' instead of 'remove()' I guess
It's executed but not removing relationship
Krunal
name.UserUrlMapping_set.clear()
Let me check. Will update you if not working
Krunal
name.UserUrlMapping_set.clear()
It's giving error that UserMaster has no attribute UserUrlMapping
Shery
uh.. let me share you a some links, i cant test the code by myself but in some of this links you will find the answer :) https://stackoverflow.com/questions/6333068/django-removing-object-from-manytomany-relationship and https://docs.djangoproject.com/en/dev/ref/models/relations/#django.db.models.fields.related.RelatedManager.clear
Shery
im going to sleep right now, but if you can't find the solution dm tomorrow, goodbye!
Anonymous
If someone know do reply
Ярик
guys, who know how to write a get_or_update method for ContractItems model in this inlineformset CreateView? https://dpaste.org/aBPv
DMH-FL
Can we create Django project on idle or jupyter/colab?
Mirco
because you don't read rules and don't use code sharing tool
Doragonsureiyā
Read the rules before any activity: @PythonRules
Doragonsureiyā
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
DMH-FL
no
Only pycharm?
వ్లాదమిర్ పుతిన్
Богдан
How write something like that? from django.contrib.auth import get_user_model User = get_user_model() if User.is_superuser: urlpatterns = [ path('', admin.site.urls), ]
Богдан
check superuser in urls.py
cj
check superuser in urls.py
don't do that, you'd better check for authorizations at views level
Богдан
don't do that, you'd better check for authorizations at views level
yes, but I have a lot of views and I have to show only for superuser
Богдан
may I realize it in urls.py?
cj
auth things should be done at views level, you can't do things while defining urls
cj
https://docs.djangoproject.com/en/dev/topics/http/urls/
Богдан
thanks
Богдан
so I have to rewrite all views, right?
cj
so I have to rewrite all views, right?
just add ~2 lines to check the auth you need
George
I have to build a new website from scratch in django. I think i need some tips.
George
Like how to scale and stuff
Anonymous
so I have to rewrite all views, right?
Then you should create your own Class Based View, inherit from a Generic Class Based View and change this behavior once. IF you are using method based views you may use a decorator to check user or verify the request.user inside your method scope.
Mikhail
so I have to rewrite all views, right?
you can declare this condition in html. If (superuser)
Anonymous
you can declare this condition in html. If (superuser)
But he would get 200 OK instead of 403 Forbidden as http status code.
Mikhail
He needs to show the super user a special page. where is 403 from?
SG
Hi i need you guys help
SG
I am making a project on djando
SG
And i use ajax
SG
I make a ajax call with post method to view and want to render the response of view on html page
SG
I got response also on inspect elements tools but it can't render on html pages