Natsu
User
Hey guys, is there any way to pass context data to javascript?
User
I want to pass a query list to frontend and paginate it using frontend are there any resource which would help me, any help is appreciated, thanks
Mp
Mp
Or api
Hiku
Guys someone help me
how to make automatic sequence number in table?
Dasa
I have a url like http://localhost:8000/new?param=some-value which generates a form to POST
How do I get the value of param in my views.py?
self.request.GET["param"] is an empty string
Mirco
Dasa
but its empty :/ Do I need to make any changes at urls.py?
Maruf
class CustomUser(AbstractUser):
user_type_choices = ((1, "Admin"), (2, "Staff"), (3, "Merchant"), (4, "Customer"))
user_type = models.CharField(max_length=255, choices=user_type_choices, default=1)
class AdminUser(models.Model):
profile_pic = models.FileField()
auth_user_id = models.OneToOneField(CustomUser, on_delete=models.CASCADE)
created_at = models.DateTimeField(auto_now_add=True)
class StaffUser(models.Model):
profile_pic = models.FileField()
auth_user_id = models.OneToOneField(CustomUser, on_delete=models.CASCADE)
created_at = models.DateTimeField(auto_now_add=True)
Maruf
class CustomUser(AbstractUser):
user_type_choices = ((1, "Admin"), (2, "Staff"), (3, "Merchant"), (4, "Customer"))
user_type = models.CharField(max_length=255, choices=user_type_choices, default=1)
class AdminUser(models.Model):
profile_pic = models.FileField()
auth_user_id = models.OneToOneField(CustomUser, on_delete=models.CASCADE)
created_at = models.DateTimeField(auto_now_add=True)
class StaffUser(models.Model):
profile_pic = models.FileField()
auth_user_id = models.OneToOneField(CustomUser, on_delete=models.CASCADE)
created_at = models.DateTimeField(auto_now_add=True)
how to output api from this models and how to write code serializers and views?
Arezoo
Hi how can I delete image from cloudinary in django(I have the url in database)
Monday
Exception Type: NoReverseMatch at /
Exception Value: Reverse for 'detail_view' with arguments '('',)' not found. 1 pattern(s) tried: ['blog/(?P<id>[0-9]+)/$']
Mandar
Monday
any help
Mirco
Mandar
Dasa
self.kwargs is empty
Mirco
Dasa
@LSR
Anyone can tell me what can i add domain name in vps hosting
Godwin
How to render ManyToManyFields dynamic content for a specific user, I've tried {{ user.course }}
It retuns None
KENNEDY
user.course.all
Sparrow
Hi all, any idea how I can style Django ModelForm with my custom styles??
Anonymous
𝓶𝓸𝓱𝓪𝓶𝓶𝓪𝓭
Hello everybody .
How to use selected object fields in foreignkey? 🌹
𝓶𝓸𝓱𝓪𝓶𝓶𝓪𝓭
For example I select a product that this name is a1
I want to use of a1.price and ...
Saurabh
Can anyone tell me please how can I work with large dataset actually it is taking much time with DRF
Amor
Hi guys, I'm using saml to login as SSO but getting the error like "WSGIRequest object has no attribute session" could any one help me to solve this
Shilpy
Can anyone tell why postgreSQL is preferred for Django over other databases?
Khalid
Full support for Django
Shilpy
Like what extra functionalities it provides which others don't
cj
Like what extra functionalities it provides which others don't
read here:
https://docs.djangoproject.com/en/3.1/ref/contrib/postgres/
PostgreSQL has a number of features which are not shared by the other databases Django supports. This optional module contains model fields and form fields for a number of PostgreSQL specific data types.
Shilpy
cj
Okay
apart of that, PotsgreSQL is way much better, not matter if you plan to use it with django or not, PotgreSQL has a better SQL implementation and his engine is way more faster and optimized than ever —but that's offtopic for this group—
Shilpy
Ok thanks
Muhammadamin
guys how do I filter this is children = serializers.ListSerializer(read_only=True, child=RecursiveField()) please help me!!!!
Не выходи из комнаты.
Hi. How can I get size of file stored on s3 bucket?
`
class MediaFile(Media):
s3_file = GenericFileField(tag="s3-tag", null=True, blank=True, max_length=300)
William
William
Doragonsureiyā
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- https://del.dog
- https://dpaste.org
- https://linkode.org
- https://hastebin.com
- https://bin.kv2.dev
If you posted a wall of text, go back and delete it.
Doragonsureiyā
Check out these amazing topics:
https://github.com/topics
Shilpy
Arlegil
Hi Guys
I want To know do how To write complex queries (combine at least 3 tables) with django???
From now, for two tables,I know.
Thanks for response.
Vaibhav
A
Can anyone help me out with django project ? I need help in data addition in database and deletion part .
Ngeene
Shilpy
Ngeene
Anonymous
Mohaali
Hello, I was wondering if you finish building a website using django how will you be able to sell it to some customers without showing the code. Or is it possible?
Doragonsureiyā
Mohaali
Anonymous
Hello, I am using multiprocessing module in django to perform a task. It's working fine with single process. But it is unable to handle multiple processes at the same time.
So how can I run multiple processes simultaneously.
S
Hey quick question!!
After .update () how to get “number of effected row “??
Mirco
S
Anyway to get to know?? I need it in my use case. I am clueless now
Mirco
Mirco
it's not a feature of the ORM right now
from update u get only matched rows, but not the real updated ones
S
Hmm.. Ok
Thanks.
S
S
S
Thanks much appreciated
Mirco
Doragonsureiyā
Arlegil
Using fks
Thanks.
Do you means Foreign keys?