Arbeit
how (if its possible) can i add buttons to the browsable api (two buttons for extra actions in my viewset)? what i think about is two extra buttons next to the red delete button and the blue options button that take the action name. i'm using django rest framework and the browsable api. i have a view with two extra actions in my viewset, that can be used with POST to save and resume something: - "resume": POST /lab/{id}/resume - "save": POST /lab/{id}/save
Arbeit
a look into the browsable api showed me that i can implement get_extra_action_url_map, but than the call is GET and not POST
Arbeit
I think you are looking for endpoints
what do you mean with endpoints?
Randy
Does anyone have an example of using select2 or select3 with Choicefield?
Enigma
yes
tnx❤️
Doragonsureiyā
tnx❤️
You're welcome! 😊
Randy
did you solve your yesterday problem?
How do I specify the css class for count_type? https://dpaste.org/nhZA
Zey
Can we generate pdf using Django
Sopan
Maset
How can we set default media_storage as FTP server storage?
Zey
Yes...many ways to do
Tell me then and actually that pdf will contain some user details so details will come from database
Doragonsureiyā
Tell me then and actually that pdf will contain some user details so details will come from database
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 first results
Harsh
Anyone know of best resource to learn advance django topics?
cj
Anyone know of best resource to learn advance django topics?
read the documentation, they have an "advanced" part
Harsh
Any other resources other than that
Enigma
is here anyone who used Payeer api in djngo?
Doragonsureiyā
is here anyone who used Payeer api in djngo?
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 ~90,000 people here, the probability that someone will help is pretty high. How to ask smart questions: http://catb.org/~esr/faqs/smart-questions.html
Deepanshu
How can we set default media_storage as FTP server storage?
just create a pre-signed link and set it as the alternative
Deepanshu
hi guys
In which line exactly you are getting error??
Deepanshu
In which line exactly you are getting error??
In this line: carro = Carro(request)#crear el carrito you are passing only request but u need to pass self as well
Anonymous
How get data from model object specific data
Anonymous
For suppose I three think model
Anonymous
To_city, from_weight and weight
Anonymous
In hrml I wrote get method, get from model, get not render from view
Anonymous
If any know suggest me
Anonymous
Can anyone please tell me how to load my barcode as a image to a pdf after I generate with python-barcode.
Anonymous
I would appreciate it, I am stuck after a lot of searching
Luis
Can anyone please tell me how to load my barcode as a image to a pdf after I generate with python-barcode.
Some time ago I have some issues trying to include images to a PDF file. The solution I found was adding the image as base64 to the html I was rendering to pdf file.
Anonymous
Yes i did that but it isn't rendering
Anonymous
When i debug my image as a b64 comes with b'.....'
Anonymous
And i thinks the b' is the problem
Anonymous
But by geting it as a image[1:len(image)] it doesn't remove the b'
Inuk
When i debug my image as a b64 comes with b'.....'
it's a bytes object, if it's just b64 digits then you can say x = x.decode('ascii') to turn it into a string type, but i doubt this will solve any problem you have
Anonymous
Just did it one min ago, but thank you very much
Anonymous
It worked tho 😋
Inuk
huh, epic
Jon
Does anyone know how to resolve 'Request' object is not callable?
😇ANGELO™️🎧
Does anyone know how to resolve 'Request' object is not callable?
What's the message you see? Make sure you imported it rightly with no typos
Anonymous
Hi
Anonymous
How can I submit a code for someone to help me understand the logic?
Anonymous
Here I think it does not allow to send code.
Inuk
Here I think it does not allow to send code.
use a paste service, like nekobin
Anonymous
https://nekobin.com/movimacoxa
Anonymous
https://nekobin.com/manedizama
Anonymous
The first link is view.py and the second is forms.py
Salima
Hi...please I need help implementing social media login with jwt...can anyone help?
Agent Q
I did search but not found the proper answer
Dude, I already shared you the answer. Use reportlabs
Ninu
It shows no database file found when I drag my db. Sqlite to db browser why? Also db sqlite have a blue question mark on it can anyone help me to fix this 🙏🙏🙏
Maset
https://github.com/jschneier/django-storages/blob/master/storages/backends/ftp.py I have use above module for django default storage(FTP storage) The files are uploading and can be edited and deleted But the files like images, videos are not displayed on website Anyone knows whether to specify something else like our ftp Storage details somewhere to display these?
Rushabh
Hey is that anyone working with django watermark.?
Anonymous
Hello guys. Help Please for "Role based permission for use djoser library" Let you send related articles or books Thanks
Idk
onclick('submit')... event.preventDefault
Yes this was the issue. Thanks 👍
وحید
Hi there . i reposte my problem from django users maling list. please help me . code is as follows: models.Classroom table have just one record. # THREAD 1 school_classrooms = models.Classroom.objects.select_for_update().all() with transaction.atomic(): list(school_classrooms) time.sleep(10) # THREAD 2 classroom = models.Classroom.objects.first() classroom.name = 'somename' classroom.save() thread 1 starts. then thread 2 starts to update the only Classroom record but because the record locked by table 1 , is will wait 10 seconds . then thread 1 releases the lock so thread 2 starts to update and exits with no error. surprisingly thread 2 didn't do anything at all and the Classroom record does not updated . How is is possible and how to solve that ? please help. thanks database: Postgres in docker / latest version django: django 3 disclaimer: thread 1 performed with a postman request to my api and thread 2 performed by django shell.
Rocky
In django.... I have navbar.html file... In that I am making dynamic navbar ... So I am getting error can anybody help me.... Error is when I am writing code in anchor tag ...error getting tag start is not closed....
Mr
TemplateSyntaxError at /movie/1/ Invalid block tag on line 21: 'favourite'. Did you forget to register or load this tag? Request Method: GET Request URL: http://127.0.0.1:8000/movie/1/ Django Version: 3.1.7 Exception Type: TemplateSyntaxError Exception Value: Invalid block tag on line 21: 'favourite'. Did you forget to register or load this tag?
Mr
can anyone help me with this error
mhamed
Hi
mhamed
Iam use django class based views but in detail pages i have error page not found why this error or anyone get the same error
mhamed
1min
mhamed
Views. Py from django.views.generic.detail import DetailView class TaskDetail(DetailView): model = Task
mhamed
Urls. Py from .views import TaskList, TaskDetail path('task/<int:pk>/', TaskDetail.as_view(), name='task'),
mhamed
And i have in my templates Task_detail. Html
Enigma
Views. Py from django.views.generic.detail import DetailView class TaskDetail(DetailView): model = Task
in class base view you should get query by using "get_queryset" function like this :