Anonymous
?
Doragonsureiyā
has anyone tried to do webstreaming with django!
Please don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello I need help on $z" Just ask about your problem directly! With 51k+ people the probability that someone will help is pretty high. Also please read: http://catb.org/~esr/faqs/smart-questions.html
Anonymous
anyone used technology "webstreaming with django using javascript WebRTC"?
Doragonsureiyā
anyone used technology "webstreaming with django using javascript WebRTC"?
Please don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello I need help on $z" Just ask about your problem directly! With 51k+ people the probability that someone will help is pretty high. Also please read: http://catb.org/~esr/faqs/smart-questions.html
Anonymous
!meta
what meta?
Mirco
what meta?
Click the link and read please
Anonymous
this group for following rules or helping others?
Anonymous
is this*
Mirco
If you follow group rules , someone will help you otherwise you won't have any help and you will be banned
Anonymous
i asked the way mentioned in the message?
Anonymous
whats wrong!?
Mirco
It's too much generic, ask directly the issue you have and if anyone had experience, you will get a suggestion/solution
Alex
Or at least will direct you to where you could find the answer. (Direct link for good SO post or what ever)
Anonymous
Actually i want to make a web app with django for real time video processing but i dont know how to send the video stream captured with javascript to django backend!
Anonymous
I found a solution by using webRTC, but i dont know how to use it!
Anonymous
so if someone can help me with that?
Anonymous
i have done a prototype with opencv-python, but now i wish to integrate that with django to make a web app!
Alex
I have never worked with webRTC protocol, but as I understand it is like websockets with persistent async connection. I would advice you to use the latest django 3 and namely its feature - channels.
professor
questions = Question.objects.all().order_by('?')[:5].first() how can I avoid getting repeating questions?
Rohan
Make it a constraint?
Alex
i have done a prototype with opencv-python, but now i wish to integrate that with django to make a web app!
nvm. It seems they dont support it yet https://github.com/django/channels/issues/38
professor
Why you slicing five and then picking first?
I basically do this because I have a poll of questions , but I will pick up max of 5 random questions from the poll , but displayed one per stage
Anonymous
Alright Thanks, i would try something else!
Alex
questions = Question.objects.all().order_by('?')[:5].first() how can I avoid getting repeating questions?
How do they repeat them self? By id? It doesnt look like you have joins in your query. Or there are some specific fields you want? https://docs.djangoproject.com/en/3.0/ref/models/querysets/#django.db.models.query.QuerySet.distinct
professor
look at this
professor
>>> pick_random() <Question: What is the meaning of life?> >>> pick_random() <Question: helllo> >>> pick_random() <Question: helllo> >>> pick_random() <Question: What is the meaning of life?> >>> pick_random() <Question: What is the meaning of life?> >>> pick_random() <Question: What is the meaning of life?> >>> pick_random() <Question: What is the meaning of life?> >>> pick_random() <Question: What is the meaning of life?> >>> pick_random() <Question: helllo> >>>
professor
I only have 2 questions
Alex
Alright Thanks, i would try something else!
The problem is that django implements old fashion way of handling web-requests with multiple workers. The idea is that such a worker, ideally, handles requests in less than a second or just a few and then returens to its pool. But for tasks like you asked you need a backend that can handle longliving requests. If you are still interested in python I suggest you to look at its async infrastracture.
professor
sqliite
Alex
sqliite
I dont have an sqlite instance for testing. Does the way with dictinct(*fields) work for you?
professor
let me check for example if I want to add a field timer to check the question expire in 1 minute
professor
how can I add o chekc this in restful?
Alex
how can I add o chekc this in restful?
Do you mean django rest framework?
professor
yes
Metalcode
Does anyone here knws geolocation using geodjango in django..
Alex
yes
Hm, you need a way to remember when a question was created. It goes to the model. And the check you will have to implement in your view, depending on how you declare it.
professor
the time to expire temporarily for the next one
Metalcode
Does anyone here knws geolocation using geodjango in django..
Seriously no one here can help me out with geodjango..
Alex
the time to expire temporarily for the next one
I think you could just periodicly poll from a browser the value of the field. Or you could use smt like celery in case you want smt to do on the backend side.
Alex
so you mean doing it via js instead of serve side
depending on what you want to do.
Alex
> you could use smt like celery in case you want smt to do on the backend side.
professor
depending on what you want to do.
https://stackoverflow.com/questions/59830397/how-can-i-have-a-timer-in-our-poll-question-django
Alex
https://stackoverflow.com/questions/59830397/how-can-i-have-a-timer-in-our-poll-question-django
In any case you will have to periodically poll your backend if the time has gone.
Alex
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setInterval
Alex
you can set up a function for it with setInterval
professor
in this case , how can I check the time?
Sari
Morning ... I want to ask for help, please reference for PDF django for each report id, because I have successfully made a pdf for all reports, now I want to make a pdf based only on the selected report id. Thanks
Sari
How to get report id?
I made the 'Laporan_Umum' model, all data entered in this database, inside there is a report id, na when I want to print to pdf based only on that id
Ivan
Is there doc or video to implement partner model. I want to register partners that handle only own content in Django Admin. Is it possible ?
Anonymous
I want to change date format of models.DateField
Anonymous
Can anyone tell me how to do thar
Михаил
Use datetime util to format or set your format in django settings
Михаил
Also you can display your format right in template
Metalcode
No one want to ans my question..
Anonymous
https://learn-neural-networks.com/convolutional-neural-networks/
Swapnil
form.as_p instead of p which are others tags we can write here
S
Is anybody know that how to connect django with react ??
m0nte cr1st0
Hello. Can help me with drf pls? https://stackoverflow.com/questions/59839135/how-can-get-query-params-from-axios-request-in-get-field-method
Saw
Please who can help me to make Ajax request with Django.
Vidu
fix the template name using main/home.html
it didn't work.. and I found the issue... even I had created a app called 'main', it wasn't in the settings file under installed apps. Then, I just add the app name and now it works... INSTALLED_APPS = [ 'main', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', ]
Alexandr
Hi! Has anyone worked with SOAP? I need to receive SOAP messages, but idk how to do that in DRF view. I tried djangorestframework-xml, but request still returns 415 HTTP error
Alexandr
Ok, solved: Just override media_type = 'application/xml' for media_type = "text/xml;charset=UTF-8"
web
HI .. i am begginer in django .. I am doing a dejang app to desplay the student degrees n details page
web
from django.urls import path from.import views urlpatterns = [ path('',views.home, name="home_path"), path('degree_detial/<int:student_id>/',views.detial, name='detial_path'),
web
models.py class Student(models.Model): first_name = models.CharField(max_length=20) last_name = models.CharField(max_length=20) age = models.IntegerField() date_birth = models.DateTimeField() def str(self): return self.first_name + ' ' + self.last_name class Degree(models.Model): student_degree = models.IntegerField(default=15) student = models.ForeignKey(Student, on_delete=models.CASCADE, related_name='degrees') def str(self): return 'This degree:{} belong to the student:{}.'.format(self.student_degree,self.student)
web
ok
web
Before ask, google it first
i did that 'google' but not get my solve for my problem !
Александр
Hello everyone use <nav class=“nav by-dark> and on the page I can see thin line above text(at the start of the table ). Are bootstrap include some fast solution to hide this line ?