Mirco
Just a little tip, you can use breakpoint() as shortcut for pdb
Kushal
Thank you sir
Kushal
And share also the view
https://dpaste.com/6CC394QUK
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
Mirco
Could you give me one example sir
You don't to pass that list of numbers
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
Roman
Where you wanna release your build ?
I have the server, Nginx and Gunicorn set up. I want to automate the buld using github actions but can not configure it properly
Roman
Where you wanna release your build ?
Would you guide me a bit if you know how this should work in theory and I will do the rest please
Mirco
Would you guide me a bit if you know how this should work in theory and I will do the rest please
I don't how's your production environment For example by using Docker the release step just push new image into the registry and this will trigger a new release on your infrastructure
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
Andrej
Can anyone suggest me basic django project?
Ideas for beginner projects: https://www.instagram.com/p/CC3gZnmgRie/?igshid=1cvg5mjqugazg
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?
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?
Mirco
hi guy's in django-channels why we convert async method to sync?
Because Django core is not async You need to wait the next release in a month 🤙🏼
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
Mirco
Use ajax
Or Javascript's Fetch APIs
Anonymous
I want like the search
Mirco
I want like the search
There are lots of examples on internet, just look for them to study
Anonymous
Okkk
Anonymous
Use ajax
Thank you
Ansab
Which is the best payment gateway in kuwait???!
Anonymous
Thank you
My pleasure
Doragonsureiyā
Which is the best payment gateway in kuwait???!
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Mirco
is this about core async support for django?
Django 3.1 will add the support for middleware, views and so on But there's still some job to be done so from 3.1 and above
Future
that's a pretty good news
Anonymous
It's high time they did this.
Mirco
that's a pretty good news
Yeah, Andrew Godwin has made a great job by starting this big change
Anonymous
Yeah, Andrew Godwin has made a great job by starting this big change
He needs a lot of accolades for this. The thought and effort is indeed commendable
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
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..
Jamil
just follow some tutorials bro online, search up creating movie players using django or django rest framework
Jamil
With flutter or ReactNative
yes, you will have to learn a frontend too