Mirco
Via pastebin
Diego
https://pastebin.com/7Gz5VALt
Diego
https://pastebin.com/pVUwyubV
Diego
models and serializer
Mirco
And what's the problem ?
Diego
When the user signup, userprofile is not being created, it shows null values on the view
Diego
like that
Diego
https://pastebin.com/GW0PQHJe
Daro
is there anything like a formset of formsets in django???
Gil
What about formset of formset?
Siddu
Please anyone suggest me how to implement websockets in django rest framework?
Tobi
Hi, does someone know how to write a one time signal, I mean, the code inside the signal is run only one time, example when a specific attribute of the model is modify for the first time
Kushal
In viewset, how to create POST API?
cj
Thank you. Checked the documentation and fixed the issue
cool... that's the first thing everyone should do first: read the documentation of the things they are using. 😉
Anonymous
When the user signup, userprofile is not being created, it shows null values on the view
For signals to work, First, you need to import the signals in apps.py ready function.
Anonymous
Second, you need to specify that app config in settings INSTALLED_APPS variable or set default_app_config to app config in inti.py file
Anonymous
https://pastebin.com/NsLjdyTi
Anonymous
apps.py file
after that in settings.py file under INSTALLED_APPS add <appname>.apps.<Appname>Config instead of just <appname>
Sheshadri
I have 2 models, User and UserProfile, and 2 serializers (Signup and UserInfoSerializer)
what you need is writable nested serializers, you don't need signals for this, take a look at https://www.django-rest-framework.org/api-guide/relations/#writable-nested-serializers
Tobi
Write the signals only for create, not for update.
Batman Danilo I'm using post_save I've think of that, but the code I want to run will not run on the object creation, here is how I want it to work, I have a model with a FileField, this Field can be blank when the object is created but, but when someone upload a file for the first time on that field, only the first time, I want to send an email
Sari
I want to ask again, what can if I make it like this If formset1.as_valid () and formset2.as_valid () and formset 3.as_valid (): Because there are 3 formset that I want to make in 1 form
Harshit
Hello everyone, I am using embed tag to display pdf, images, videos from /media/document/ folder, the problem is image is displaying properly but while displaying pdf and videos its showing 127.0.0.1 refused to connect. Help me solving thos error..
Harshit
This*
Dhruva
I am using the django rest auth framework for sending mails but in the mail I am getting HTML tags insted of content How to resolve that
Anonymous
Hey, I am working with Django rest framework for back end and react for front end, I want to define my own method for User model which I can call in react using axios
Anonymous
I m using viewsets
Mirco
Method of what ?
Anonymous
Like requestprofile. ....so before adding the user to database it should go to admin and if the admin accepts only then it should be added to database
Mirco
Like requestprofile. ....so before adding the user to database it should go to admin and if the admin accepts only then it should be added to database
why don't you use the is_active of the User model ? you can limit the authentication until is_active is False
Gio
hey everyone, any Django developer available for a full time remote job? PM me for more details
Dhruva
How to capture latitude and longitude of user
Dhruva
To be captured
maroong
How do we increase website speed like dev.to with Django
Gil
I'm searching for advice to better work with Django templates for the frontend. What is the best practice to work with a frontend team, and do tests? I'm thinking abou to put a url like /frontendtest/xxxx and link views with false data like do with py tests ?
Bradypodion
maroong
Lazy loading + frontend angular
Wow, I was thinking only Django could do it
Gil
Duplicating your urls maybe?
The problem is that I'm managing a DJango project, and I have frontends in my team, but they don't talk nothing about backend nor managying all of project. I need to serve to them a facility to do tests and manipuling all templates ( basically css+html)
Bradypodion
Wow, I was thinking only Django could do it
A man used to tell me: ‘your problem is that you think too much!’
Bradypodion
Np, hope I’ve been helpful
Anonymous
Hello, good morning. Do you have a link to ruby or ruby on rails group on telegram?
saran
Hii friends.. I need some recommendations. Any better options for datatables in django. I need good alternatives than datatables. With pagination, search and export functionality. Anyone suggest me one
saran
Choose what you prefer frontend side, it's not something related to Django Try to think in a decoupled way
Not front end. From server side. Using datatables for bulk data is not good I think. It gets stuck in future.
saran
it exists pagination from backend side to speed up bulk data
Can you please mention the package name. Django restframe work datatables?
Mirco
https://github.com/izimobil/django-rest-framework-datatables just got the first google result
Kushal
pastebin.com/WqMXPSdJ
Kushal
I got error
Shihasz
pastebin.com/WqMXPSdJ
You have not defined view
Kushal
Where to define view sir
Shihasz
Mirco
Where to define view sir
it's the basic, don't code by copy and pasting
Aneesh
Does any one know how to set 2 lookup_fields
Govind
Hi Everyone, I'm getting below error how to solve this.
Govind
views.Profile_pic didn't return an HttpResponse object. It returned None instead
Govind
Please help me.
Mirco
share code
Mirco
via sharing tool
Gil
views.Profile_pic didn't return an HttpResponse object. It returned None instead
REview your return function Profile_pic DJango is waiting for a HttResponse object, and you are giving to him a None. Easy to solve. Review the funciton/method
Mirco
what don't you understand about share via sharing tool ?
Govind
Ok,
Govind
Sorry
saran
https://github.com/izimobil/django-rest-framework-datatables just got the first google result
Already integrated this one. I would like to anyone other ones with export or print functionality.
Alex
Hi guys I have read about django-tenant-schemas and so far I couldn't find a properly way to create user programatically, I have read about django signals, I've found out the tenant_schemas.signals, but still didnt put it to work, Is there anybody who did it already?
Alex
thx