Mirco
Just a little tip, you can use breakpoint() as shortcut for pdb
Kushal
Thank you sir
Mirco
https://dpaste.com/6CC394QUK
I told you above, you are passing a list of numbers without any sense
Your view expects an office before filtering so you need to create the office e pass that office pk
Into the view you need to use that pk to get the office from the model
Kushal
Mirco
You need to create the office into the setUp
Mirco
And then pass the office.pk
Kushal
Okay sir..i got it noelw
Kushal
Now*
Tony
Hello guys
Is there a way you can communicate to anyone that visits your website in Django.
The person who visits your website shouldn't necessary be a registered user in your database.
Thanks
Mirco
Chyngyz
Hey everyone. I want to build regex for /analytics/?date_from=2020-07-20&date_to=2020-07-21
How I can do this in re_path? what kind of regex I should use?
I tried date_from=(?P<date_from>[0-9]{4})/$date_to=(?P<date_to>[0-9]{4})/$ but it doesn't take ? at the beginning and & character at the middle
Jack
Anonymous
Yeah
👑 King👑
I need some help with a Django project
Doragonsureiyā
I need some help with a Django project
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 a very high amount of people here the probability that someone will help is pretty high.
Also please read: http://catb.org/~esr/faqs/smart-questions.html
Dmitrii
Hello! I have a model to store articles. This model has an HTML field to store article's content. This field contains tags and encoded images. I need to realise full text search using standart PostgreSQL mechanisms. Also it should use trigrams. I've already realised it, but it works quite slow cause inserted in an article's content images have big sizes. So, I decided to make an additional field to store a content of an article with no tags and images. (clean it using striptags function on the level of app) It seems this solution works very well, but now I have anothe issue.) I need to sync values of the fields somehow. When I change the content I need to remove tags and change cleaned content field as well. It seems signals should be helpfull in that case but they don't work when I use update() method on model's manager. Could you reccomend smth to achieve this goal more elegant?
Ghorz
Anonymous
hi guy's
in django-channels why we convert async method to sync?
Dmitrii
Ghorz
Yep. TinyMCE
If so, it should be literally stressfree, the images are referenced not stored in the field
Ghorz
Besides using fieldname__icontains should yield result
Dmitrii
Besides using fieldname__icontains should yield result
There are different types of content. Article is only an example. And I need to have a rating across them according to a search request. Also I need to use trigrams to correct simple mistakes. So, I think FTS of PostgreSQL is well-enough for that case in my opinion.
Dmitrii
If so, it should be literally stressfree, the images are referenced not stored in the field
Hm. I could check it again. the size of the field on the database-level for different entries is 1Mb and more. If save the same content to another field after the work of striptags function then the size is drammatically smaller. I decided the images are inside the content. Maybe they are encoded somehow. Need to check it. Anyway I need to have a way to extract the pure text from the field and to save it to another field when the model is changed. Any recommendations?
Jamil
What does the assert keyword mean, I am familiar with testing with assertequals but not assert, found it in BaseSerializer class
Muflone
Jamil
thanks
Jamil
I have a overriden create class in my serializer, and I have had to override it due to having a custom user model. When using CreateApiView, post is mapped to the create function which comes from the createmodelmixin. In here, the request data is put into a serializer, validated and saved. My question is: when is the overriden create function in my serializer called, is it called when serializer.save() is called in the createmodelmixin?
Jamil
i just cant quite seem to find out where the create function is called from the createmodelmixin
Jamil
is save() function mapped to the create function inside of my serializer class
Shreehari
Hi,
Im working on a project, where there will be 3 types of users - admin(superuser), sub admin and normal user.
From scalability point of view should i create separate model for each user or single user model should be enough?
Anonymous
Hai,
I am working on project and i am beginer,
I have challenge that .. data should return in table without refreshing page .. on change event ...
Anonymous
Any help is appreciated
Anonymous
Mirco
Use ajax
Or Javascript's Fetch APIs
Anonymous
I want like the search
Anonymous
Okkk
Anonymous
Anonymous
Anonymous
Ansab
Which is the best payment gateway in kuwait???!
Anonymous
Mirco
Future
Future
that's a pretty good news
Anonymous
Anonymous
It's high time they did this.
Mr
I wanna create a videp player with python...support dual audio, video quality can subtitle
Mr
Its possible in python....
If yes then how can we create this
Anonymous
Yes it's possible, but not with python alone
Anonymous
You would need some JavaScript aswell
Mr
Can you explain me in detail
Mr
Please
Mr
Step wise step
Jamil
you need to build a frontend
Jamil
and then build a backend via using django rest framework or you can use django itself
Jamil
there must be some tutorials online
Jamil
u can go and search for them
Anonymous
Jamil
You would need some JavaScript aswell
he is correct, maybe you dont need to learn a framework, but you will have to know javascript if you want to use an api(the more modern way with django rest framework)
Anonymous
Create the backend with python, then use a frontend library like react to create the video, dual audio n the rest. Integrate both with django-rest-framework, leveraging on the API endpoints
Jamil
maybe not react
Jamil
vue,js is easier to learn
Jamil
but not sure if it supports
Mr
I create a android movie application...
But i have some issue in dual audio....
I wanna create a video player in this player paste my movie link and that link upload in my movie admin panel ...when anyone play movie show my video player
Jamil
no idea what your trying to say..
Anonymous
Jamil
just follow some tutorials bro online, search up creating movie players using django or django rest framework