Henry Joshua
How do you convert base64 image to string in Django rest framework can somebody please answer this question or is there any other way to upload image from a client side i.e react to Django in a format that can also be read by service like clodinary, please and please don't just ignore this message if you have any ideas share dem it might give me a lead
Sherlock
author = models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.CASCADE) i'm new to django can anyone plz explain this line mainly settings.AUTH_USER_MODEL
Sherlock
author = models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.CASCADE) i'm new to django can anyone plz explain this line mainly settings.AUTH_USER_MODEL
Karthick
function AbstractBaseUser.get_username at 0x000001A3AD9EB8B0
Karthick
i want to print the store the user name but i getting like object
Karthick
ValueError: Cannot assign "<function AbstractBaseUser.get_username at 0x000001F4AD0AB8B0>": "CartItem.user" must be a "User" instance.
Neeraj
author = models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.CASCADE) i'm new to django can anyone plz explain this line mainly settings.AUTH_USER_MODEL
This is for foreignkey using custom user model. One user model is that provide django default, but if you you want to add more filed in existing model then the custom user model concept execute. In this concept first need to define your custom user model and define the extra field this model and in last tell to django that you are using custom user model, for this you need to define the model name in setting.py and now use this model everywhere you want. In this line same thing done. Here the model name import which is define in setting.py file
Neeraj
okk brother, understood some of it👍,
😊 If any confusion tell me.
Sherlock
Neeraj
DM me
May be any library exists. ¡¡¡
Optimus
May be any library exists. ¡¡¡
you can create your custom class for base64 and call that class in main serializer class
Anonymous
Hi there Media urls not working when debug is false
Optimus
Anonymous
Anonymous
there is a backend only
Optimus
there is a backend only
dm me the response
Optimus
may be try to set x_frame_option
coder
def update(self, request, *args, **kwargs): instance = self.get_object() data = request.data news = Newspaper.objects.get(newspaper=data["newspaper_of"]) instance.newspaper_of.add(news) instance.name = data('name') instance.ac_no = data('ac_no') instance.address = data('address') instance.telephone = data('telephone') instance.email = data('email') instance.note = data('note') instance.delivary_charge = data('delivary_charge') instance.status = data('status') instance.save() serializer = ConsumerSerializer(instance) return Response(serializer.data)
Hofdee
Is django monolithic?
Bobosher
Is django monolithic?
Basically, yes.
منتظر
Do you recommend someone who start learning Django to Quit ? And learn something else like JavaScript for web development?
Haris
We are building a Buy and sell online asset kind application, Should we use Flask for Rest APIs or Django-Rest-Framework as we want to implement Online payments, notifications, blogs etc. for the same?
S
How to update and save many to many fields, without using for loop, can anyone suggest? Thanks in advance
Anonymous
When I print User.objects.last() it returns username how can I got object instead of username?????
Вин Король Саксов
When I print User.objects.last() it returns username how can I got object instead of username?????
Because when you print object is calls str, make instance = User.objects.last(), and this will be an instance of User class
Anonymous
Hi all anyone have django signals study material/links can u please let me know
Hofdee
Basically, yes.
Ohh, any example of microservice frameworks.
Anonymous
Hello everyone one I am doing work on project and I want to add one live video chat Please guide me for things are use in video chat
Hofdee
Pavel
Hi! We mostly successfully converted our MySQL db to PostgreSQL. Major problem - we lost all indexes :( Is there are way to show django all syncdb SQL statements for all models? We just need to re-run all index creation operations
Optimus
Hi all anyone have django signals study material/links can u please let me know
check in Official documentation only all mention there
Anon
Hello people I am having an issue with developing an approach to create dashboards Can anyone help?
Anon
I have already posted the query on stackoverflow, but it seems like people are not liking the question. Hence, I thought of asking here.
yusof
Hey guys Does any one know about custom ordering filter? I used Filter.OrderingFilter But my manager said we need custom ordering
Optimus
Hey guys Does any one know about custom ordering filter? I used Filter.OrderingFilter But my manager said we need custom ordering
then add an extra field "order" in your model , define order for each object and then do ordering queryset filter
yusof
then add an extra field "order" in your model , define order for each object and then do ordering queryset filter
I used ordering_fields but thats not enough I should you queryset filter Do you have any example? Thanks❤
Anonymous
Looking for django rest framework course. Kindly dm if anyone is here to teach
Hafizh
Hello everyone, i want to ask, how to upload files to google drive with django? I don't understand this. Thank you
TheDoc
Hello teams !
TheDoc
Django Ninja or Django Rest Framework ?
Mirco
Django Ninja or Django Rest Framework ?
Ninja is very promising but I'd still go for DRF
Anonymous
anyone knw how to show calendar month wise in django template
Christof
@Poolitzer?
Shuvam
Dendi Inc. https://dendisoftware.com/ is looking for experienced Django developers. Remote position. (Work anywhere) Mail your CV to contact@alstonia.io with subject "Dendi Job Application" to apply. 20-25 INR per annum 4 week of paid leaves Ps: much have extensive python/Django experience..
Anonymous
Hello guys. I have an issue. I'm following the book "Two scoops of Django 3.x" and in the 3rd and 5th chapter they show the next structure for the project: |config |-settings/ |-__init__.py |-base.py #settings for all stages |-local.py |-production.py |-stagin.py |-test.py |-__init__.py |-asgi.py |-urls.py |-wsgi.py |-Project |-app1/ |-app2/ |-app3/ |-static/ |-templates/ |-manage.py |-gitignore Well, my problem is that when I'm setting the installed apps on Django settings, using the base.py it throws me this error: ImproperlyConfigured: Canno5 import 'app1' Check that Project.app1.apps.App1Config.name is correct What should i do? Is the layout incorrect?
Manuel
How can I iterate a list with différents types of objects inside for example pc objects and communication objects
Anonymous
Yeah, but I don't know why that throws me that error. And I tried with Project.app1.apps.App1Config but nothing
Nurhonov
Hello everyone. Is it true that MVC is becoming unpopular?
Anonymous
Well, I fixed it, only needed to change the name in the apps.py. If you want to know about this is where I took the solution https://stackoverflow.com/questions/46177499/django-cant-import-module-check-that-module-appconfig-name-is-correct
Anonymous
I'm sorry, What do you mean with server? If I'm understanding I'm doing dev on my local machine and deploy the app in Heroku
Anonymous
I'm using Parrot OS
Anonymous
What about you?
Anonymous
Oh, Maybe someday I'll try it!
Prasta
I almost misread it as paramex
Anonymous
Hello. I was deploying django react in ec2 aws with nginx. The problem is wirh nginx the takes time with first load. While in development server in ec2 all is okay
Anonymous
Can anyone how to speedup with nginx
Mohammad
Can anyone how to speedup with nginx
What do you mean from "Speedup"? In case you want to setup load balancing using NginX, simply Google for NginX reverse proxy setup instructions. otherwise please clarify what you exactly want.
Doragonsureiyā
Read this please: http://catb.org/~esr/faqs/smart-questions.html#intro
Horlarwumhe
Paste your code.
Optimus
inside your 1st html page include your 2nd page {%include "2nd.html"%}
𝙰𝚕𝚒 シ
Hello everyone!👋 I have a celery task that sets some fields of a specific db record. When the background processing finishes, I set other fields of that record in a view function. What's the best practice for doing this? I want to set the fields in an atomic manner, so when a problem occurs in the middle of this operation, I want to rollback the whole operation. Thanks in advance
Anonymous
hey guys what does mean 'is_vaild' ?