Shivam
Does anyone tell about how to draw pie chart in django
cj
Bheeshma
How can i edit django admin front-end
Doragonsureiyā
How can i edit django admin front-end
Step 1: Open a browser
Step 2: Write down https://google.com or https://duck.com and press Enter
Step 3: In the search box write down the same words you asked here
Step 4: Read the firsts results
Bheeshma
Jesus
how can I try catch stuff in Django? I am using try: except Exception as e: print(e) but it hasnt got any effect
cj
cj
LOL
what is funny? are you banned from using Google?
Jesus
https://pastebin.com/Y66028Ed
Jesus
im trying to save all the errors in the DB while in production
cj
https://pastebin.com/Y66028Ed
task_obj = EssayTemplate.objects.filter(
id=taskId, auth_user_id=request.user
)
will never raise an exception 🤷🏻♂️ unless request.user raises one, but it won't
Jesus
ohh yeah make sense, because itself its actually working, maybe im using that try except in a wrong place
cj
cj
and your code should be:
try:
task_obj = EssayTemplate.objects.get(
id=taskId, auth_user_id=request.user
)
except EssayTemplate.DoesNotExist as e:
print("==========")
print(e)
Jesus
yeahh got it now
cj
or even better, use the get_object_or_404(...) shortcut
Jesus
is there anyway to get the traceback using Exception?
cj
Jesus
the thing is to save errors during production
cj
Shivam
cj
so any solution for that problem ?
first, you don't have any problem, you didn't show anything to be considered a problem.
second, I already told you that what you want to do is a front-end thing, nothing related to Django.
now go away
Jesus
much
Jesus
i just found out about Sentry, have anyone used it, is it worth it?
cj
Jesus
i had a look to it and apparently that community version is not available. however, there is a developer free version, which is nice to play around with it firstly
Jesus
thank you again
Paul
Hi, using django rest framework,
for get_serializer_class trying to send
request = self.get_renderer_context().get('request')
and check for user permissions with request.user
for get_serializer_class raising error NoneType.
any suggestions?
for get_queryset working fine
in docs i saw:
def get_serializer_class(self):
if self.request.user.is_staff
this case also not working
Paul
i've managed by checking inside action method, but wondering maybe someone faced same problem
Anonymous
Please anyone who can help with a way to override django allauth views
Sheshadri
Paul
i'm using permissions from django.auth.contrib.models
standart Permission model.
Sheshadri
You can always override it in your viewset.
Paul
needed to validate if request.user.has_perm and return different serializers
Paul
working fine on querysets, interesting why request.user is None for get_serializer_class
Sheshadri
It says it's only available for genericapiview, are.you using that ?
Paul
Paul
CreateModelMixin provides a .create(request, *args, **kwargs) method
and for get_queryset() request.user working fine
Anonymous
Nikhil
Damron
Hello!
Had anyone used amocrm with django?
Is it hard?
Doragonsureiyā
Hello!
Had anyone used amocrm with django?
Is it hard?
Please don't ask meta questions like:
"Any user of $x here?"
"Anyone used technology $y?"
"Hello I need help on $z"
Just ask about your problem directly! With 56k+ people the probability that someone will help is pretty high.
Also please read: http://catb.org/~esr/faqs/smart-questions.html
Alexandros
I am looking for the django rest framework way to implement creation of related objects in one request
Alexandros
if my json contains the parent object and a list of child objects it will only create the parent object which makes sense
Alexandros
however I would like all objects (parent and related child objects) to be validate and created on the same request
Mirco
I think by sharing your models it will help us to help u
cj
cj
Alexandros
I'll take a look at this, I think I skimmed over it already but at least now I know this is what I'm looking for
Ghorz
hey guys, I've been off django for a while,
sometimes ago, some dudes here ask regularly for CUSTOM USER MODEL AND AUTHENTICATION SYSTEM.
I spend today building a django app to solve that.
My release Django CustomUser Model is a custom user model integrated with django allauth and bootstrap google-like login/signup template.
https://pypi.org/project/Django-CustomUser-Model/
try it out and be sure to report bugs so I can fix them.
Thanks.
Mirco
Ghorz
Kushal
Two users which must add by admin
Can anyone help me
Anonymous
establish Foriegnkey relationship between employee and owner with on_delete=models.CASCADE. It'll work
Rushikesh
Hi guys,
I am try to verify user email address as soon as he signs up on my account using token authentication in Django.
I have created a token and send a mail to user which has a link in it.
So I need you help in verifying this link coz this link has the token.
Can anyone please help, Thank You in advance
Rushikesh
Hello rishi1,
please activate your account here :-
http://localhost:8000/Signup/17805f77b9d1ed3f462cec0d32ec1c171cc78a23
Thank You
Above is a sample mail send to a user when he signs up
Rushikesh
Now how should I verify his email address ?
Anonymous
Something similar from the projects during the flood?
syam
yes @h4iderAli
Anonymous
yes @h4iderAli
Ill check out the links after electricity is back
Paul
Anonymous
hi
what's the difference between csrf_token and csrf_exempt?????????
R
Please, help me to fix error
error: NameError: name 'self' is not defined
class-based view: https://pastebin.com/F4Kgfqyz (error throws in 7th line)
Dhruva
How to have uuid and the password for the password reset how can I check ?!
Goutham
Is that possible to create a chained or dependent dropdown list in django rest framework
Piyush
Hey devlopers please help
In my code driver details are updating but user details are not updating. here is my code
https://pastebin.com/dB5azx1j
Gil
Govind
Gil
Mirco