Mirco
!paste
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.
maroong
Azizbek Xushnazarov
https://dpaste.org/gWno
I added custom field to serializer
but when i fetch() in javascript. the field is not coming
Azizbek Xushnazarov
coder
unable to "PUT" and update date got error "StringRelatedField.to_internal_value() must be implemented for field . If you do not need to support write operations you probably want to subclass ReadOnlyField instead."
Mirco
or better create a property inside the model for that creator_name
Azizbek Xushnazarov
Azizbek Xushnazarov
Azizbek Xushnazarov
ЕаsуWау
Has anyone worked with Flask / Django? Something needs to be done, write me
Eng. Mohamed
Hi all,
I have some conflict here
When integrating Django & vue.js using :
1- django-core-headrs
2- django-webpack-loader
What is the difference between them ?
Which is better and why ?
ꜱᴇʏᴇᴅ ʜᴀꜱᴀɴ
Hi everyone
this is my url:
path('blog', ArticleList.as_view()),
path('<slug:slug>/', article_detail, name='article_detail')
now, I use {% url 'article_detail' %} in my html, but i receive erro.
<a class="btn btn-primary" href="{% url 'article_detail' %}">Read More</a>
this is error:
NoReverseMatch at /blog
Reverse for 'article_detail' with no arguments not found. 1 pattern(s) tried: ['(?P<slug>[-a-zA-Z0-9_]+)/$']
could you help me please?
Mirco
Fatih
How can i Create style.css my href didnt find
Eng. Mohamed
dolly
Anyone good in django?
dolly
I need help there is a error in project
dolly
Anyone good in django
5P34R
ask your question if anyone knows they will help you
Umar
How can I implement post views in Django model?
Jerome
ꜱᴇʏᴇᴅ ʜᴀꜱᴀɴ
Alex
hi there, I need some help, please
I have 3 models:
class User:
...
class Wallet:
users = ManyToMany(User, related_name='wallets')
class Cover
wallet = ForeignKey(Wallet, related_name='covers')
How can I rewrite this queries:
wallet = user.wallets.filter(...).first()
covers_count = Cover.objects.filter(wallet=wallet, ...).count()
in one query for DRF queryset? I need to do ordering through covers_count
Eng. Mohamed
Alex
Eng. Mohamed
Wallet returning list
Covers_count returing number
What you are aiming to do
Alex
I have UserView with UserSerailizer in DRF which contains field 'covers_count', I need to implement order ASC/DESC with 'covers_count'
Mirco
Mirco
from django.db.models import Count
covers_count = Cover.objects.filter(wallet=wallet, ...).annotate(c=Count('id')).order_by('c')
based on the code u have shared above
Alex
and how it annotate in UserView?
Ivan Kalinin
Can celery recieve tasks but don't execute it because of i work on windows?
Hamed
Hi
Why my variable pass in template and dont show any things ??
And wen i inspect didnt show my code source??
𝕯aniel
𝕯aniel
You can't render data in html?
𝕯aniel
So, show me please your views.py file
Hamed
Hamed
I cant understand :(
Hamed
You think is simple like hellow word
𝕯aniel
Send me message
𝕯aniel
To direct
coder
E. Ghislain Makolle
Good evening, I'm new
I have read the code of conduct so I hope this message will not be frowned upon 😅
I ran into a problem while following a tutorial on using Django and despite my research I found similar cases but without concrete answers, so I would like to know if anyone could help me here please 🙏🏽
ADI
i am facing the error model from Exception Value:
table Blogapp_blog has no column named user_id (models)
class Blog(models.Model):
title = models.CharField(max_length=180)
content = models.CharField(max_length=800)
Categery = models.ForeignKey(Categery,on_delete=models.CASCADE)
user = models.ForeignKey(User,on_delete=models.CASCADE)
baner_image = models.ImageField()
created_at = models.DateField(auto_now_add=True)
update_at = models.DateTimeField(auto_now_add=True)
i am using blog site project plese solve the error
Hamid
ADI
S I put it
Akshat
coder
class ConsumerSerializer(serializers.ModelSerializer):
newspaper_of = NewspaperSerializer(many=True)
newspaper_of=serializers.StringRelatedField(many=True)
# newspaper_of = serializers.ReadOnlyField()
class Meta:
model = Consumer
fields = ['id', 'name', 'ac_no','newspaper_of','address','telephone','email','note','delivary_charge','status']
# depth = 1
coder
yusof
Karthick
I want add the User name into new model so I use User.username but I got <django.db.models.query_utils.DeferredAttribute object at 0x0000020D3C456400>
ֆ33ʏ377
can django-celery disable job automatically except for one-off tasks ?
Firdavs
NOT NULL constraint failed how i solve it, please help me
Anonymous
Alberto
Hi, I have some issues daemonizing celery for my Django project, maybe someone can help me fix this:
https://stackoverflow.com/questions/68471472/errors-on-celery-daemon-startup
Jai
I had been trying to implement low level caching in a django view, only to realise I can't access it from another view. Is there a way I could set the cache in a view and access it from another?
Thanks in advance.
ֆ33ʏ377
ֆ33ʏ377
Anonymous
Hello
LookupError: No installed app with label 'admin'
Any one knows about this error please help me
ֆ33ʏ377
Anonymous
Work on Channels
Anonymous
I am making a video chat
Anonymous
Anonymous
Already added
Anonymous
INSTALLED_APPS