shashikant
hey guys what does mean 'is_vaild' ?
This is a method to check whether the data you are getting from request are in correct or not. It does lots of task for you.
Farzin
I have a dynamic drop down menu, codes are in a separate JS file, now I want to loop through the returned context data from view and show them in my drop down, how can I do this? https://gist.github.com/farzinh/66a764eb4ff6b35e204f51e31cacf519
Anonymous
how can i add edited time on models?
Anonymous
if i edit my posts it discribs last time
Anonymous
not now
Jishnu
how can i add edited time on models?
Add a datetime field with an option of auto_now = True
Jishnu
Yeah like updated_at = models.DateTimeField(auto_now=True)
ꜱᴇʏᴇᴅ ʜᴀꜱᴀɴ
Is anyone to explain shortly about "render_partial"? What is it supposed to do exactly?
Pr
Is there any app for pycharm so that we can get suggestions while typing html code
Bhashkar
Hey Guys. Should we use django groups or role_id in user table to manage multiple users?
yasmina
Hey How can i access request in model function?
Pr
Use CNTRL + SPACE
Thanks yusof
Pratik
Hello, I have a flow where answers a few questions and then signs up to the platform, so at the time of signup I send the answer to questions and the credentials that the user sets, I am using the library called dj-rest-auth for this which internally uses django-allauth, this works fine when I am using email, password authentication but I am struggling to implement the same flow in the social login flow? Any idea how can that be achieved?
shashikant
Hey How can i access request in model function?
Basically you accept the request as a function argument . To get the data from request,you can type request.data. If this doesn't help,do share more details
Anonymous
Is this syntax supported in django or python a ? "Something" : "something else"
Anonymous
Coz me I have been using the python one of something if a else something else
Anonymous
Something like display how many time this page displayed bro
Are you trying every time it is opened or every unique visitor. I have two options for you, one which is sessions or remembering and saving the accessing browser so that next time it is accessed, there is no change in your counts otherwise use session variables
Sherlock
can anyone please tell why my css is not loading ? my text are colliding with one another🙏
Sherlock
i'm new to django and development🙏
𝕯aniel
Do u load static?
Sherlock
𝕯aniel
{% load static %}
𝕯aniel
after in css link put {% static ''}
Sherlock
{% load static %}
plz check dm
𝕯aniel
Do u insert path in settings?
Saikat
User startic file root
Saikat
*Static And add static in urls ...see in Google
Anonymous
Anyone doing interesting projects??
The
Friends How do i store post api json dara in django Like i got data and its a dictionary And nodel have fields for each key And i just have send to dictionary to model and it will save
The
I seached bit but i dont want to assign dictionary values to each model field while creating model object
Jitendra Kumar
How to image size validation?
Jitendra Kumar
At the time of upload image
hi
How can we read and write .900 files which are used in tally erp using python ?
Optimus
How to image size validation?
create custom method and add into file field of model
Suleman
hi guyz!... i need some suggestion, which laptop is best to purchase within range of 50k to 70k. any recommendations?
Anonymous
Scaling dynos... ! ! Couldn't find that app.
Anonymous
hey guys how can i fix it
Lohith
how to create simple website Django+python..help me out
Suleman
you can follow tutorials online
Anil
I think you need to ssh access as well to deploy django and celery because of run some command
Anil
Or you follow this link to deploy https://www.a2hosting.com/kb/developer-corner/python/installing-and-configuring-django-on-linux-shared-hosting
Rocky
Friends is Django 1.5 exp person will get calls
unknown
for 2022 batch
Optimus
for what purpose ?
yusof
Hey guys does anyone know how can i write documentation for my api with swagger?
Sai
You also need broker like redis or
Rocky
{%Extends 'your html '%}
Abdulaziz
hello driver = Group.objects.filter(name='Driver').count() I am getting 1 always can you help me?
AK
can any help me in signals i want to perform arithmetic operations through post_save for example if i order something it automatically subtract from stock what i just ordered
AK
i did but it says there is no attribute name quantity in stock
AK
i dont know code is note pasting here
Вин Король Саксов
inner_qs = Post.objects.all() qs = Post.objects.exclude(reportpost_set_post__in=inner_qs), this is unoptimized, so better create is reported field at Post, to make your queries faster
Вин Король Саксов
Also, you can try Post.objects.filter(reportpost_set=None), but I dont know if that would work
rtg
witch method can i use in view to get id passed from url? (path('AddAdditionalInstallationInfo/<int:id>/')
Anonymous
witch method can i use in view to get id passed from url? (path('AddAdditionalInstallationInfo/<int:id>/')
if the path call is something like this path('AddAdditionalInstallationInfo/<int:id>/', view_name, name="name of url"), then the id will be passed to the view as a parameter. so just put an id argument in your view parameters.
rtg
witch method can i use to get id parameter in CreateView?
Anonymous
just put an id argument variable in your view parameters python def view(request, id): pass
Anonymous
how can i get this parameter in view?
here https://stackoverflow.com/questions/15754122/url-parameters-and-logic-in-django-class-based-views-templateview
Anonymous
summary: self.kwargs[''id"]
Mr
Hello team! Please Need help to add QR code on pdf receipt. Thank
Anonymous
No, because it is not part of django syntax
Optimus
Hello team! Please Need help to add QR code on pdf receipt. Thank
install python qrcode , read the pdf content and use it the qrcode package
Вин Король Саксов
So make it
Jitendra Kumar
How to set expired date for 1 year in models.py ?
yusof
Hey guys i have a custom filter class (FilterSet) and i want that when user send me 1 show the post which is for 1 month ago