cj
some one ban me in @Python
done... you're banned... so sad you won't be able to read this message now 🤷🏻‍♂️
Anonymous
Ahh grammatical error can lead to what, oof
Ghorz
done... you're banned... so sad you won't be able to read this message now 🤷🏻‍♂️
🤦‍♂🤦‍♂🤦‍♂🤦‍♂🤦‍♂🤦‍♂ Semanctical error
cj
🤦‍♂🤦‍♂🤦‍♂🤦‍♂🤦‍♂🤦‍♂ Semanctical error
🤷🏻‍♂️ not my fault, even he was asking for that (to be banned) from earlier
Lugano
Hi I wanted to restrict something which could be only accessed by a user who is authenicated and at the same time a superuser. How can i achieve that?
Lugano
Yah i read, i found out about loginrequiredmixin which doesn't doesnt check for superuser
cj
Yah i read, i found out about loginrequiredmixin which doesn't doesnt check for superuser
LoginRequiredMixin check for authenticated users... then you have to ask request.user.is_superuser inside your view
cj
or even better, make your own mixing for that
cj
Am using cbv
yes, use what I told you
Lugano
☝🏻
from django.contrib.auth.mixins import UserPassesTestMixin class MyView(UserPassesTestMixin, View): def test_func(self): return self.request.user.is_authenicated and self.request.user.is_superuser Is this okay? :|
Alex
Its being used more than once
Mean, that check in other views?
Lugano
Yah
Alex
Yah
Then better to actually implement that idea with mixins
Lugano
I don know hw
Alex
Give me a hint :(
Ok, here is your hint - the source code of LoginRequiredMixin https://ccbv.co.uk/projects/Django/3.0/django.contrib.auth.mixins/LoginRequiredMixin/ Then try to implement is_superuser check by this template as separate Mixin
Ujjwal
Can I call myself a backend guy to put in the resume if I am not making any api . What I am doing as a django deveoper .I am using views urls models doing tasks related to backend . And rendering information thru templates static files Jinja and all that instead of making. A rest api ..?? Will that be good to call myself a backemd guy ??
Ujjwal
yes... I do the same things with django and I present myself as back-end developer when I have interviews with recruiters (just I also work with REST APIs, but using Django is completely working on the back-end)
So even if I don't know django rest framwork or is not using in the project still I can be called as bakcend develooer and can even write in resume as well ?
cj
So even if I don't know django rest framwork or is not using in the project still I can be called as bakcend develooer and can even write in resume as well ?
again... using DJANGO itself is completely working on the back-end... Django doesn't have anything to do with front-end things
Ujjwal
Ok thanx
cj
If I am not disturbing you I have a doubt related to it ..what about full stack ??
you should know some JS libraries/frameworks if you want to call yourself full-stack
Suresh
Any one provide project
Krunal
How to protect Django source code while deploy on client server?
cj
How to protect Django source code while deploy on client server?
don't give access to the server to your client 🤷🏻‍♂️
Harsha [M]
+Private git
Anonymous
Hiiii I'm started learning django from scratch Can anyone guide me how to move further
Anonymous
Can anyone tell me how to do reset password
Pratiksha
Hiiii I'm started learning django from scratch Can anyone guide me how to move further
If u want to get a hands-on-experience , you can watch Corey Schafer's videos on youtube in which he has taught how to build a django app from scratch
Anonymous
Can anyone tell me how to do reset password
In this part i am not getting any emails
Anonymous
From django
Pratiksha
for that we have to understand basics otherwise it goes above your head.
Obviously, basics are needed, but his explanations are very good
Tush
Obviously, basics are needed, but his explanations are very good
hey i want to learn Data structure with implement of python can you suggest some site or anything?
Pratiksha
In this part i am not getting any emails
U can through this https://youtu.be/-tyBEsHSv7w
my
Please tell how to create custom field in signup for for a user. Here error shown like unknown filed(s) (firstname, lastname, ect) specified for user
Rushikesh
What can I use to schedule tasks in django on windows .???
Rushikesh
Is schedule module work in django ?? For task scheduling??
Anurag
Yes I am using it
Sadra
What can I use to schedule tasks in django on windows .???
Broker: Celery Task Queue: RabbitMQ, redis
Rushikesh
What you are using APscdular /schedule module??
Anonymous
How to get diffrence between two datetime in django? My field data type is datetime
Anonymous
Is there anyway i can serve react through django static pages?
Anonymous
Yes
How can i?
Ghorz
You have two options, include react differently in template with script src
Ghorz
Or write a full blown django api
Ghorz
Create react separately and call with api
Anonymous
Or write a full blown django api
This didn't work for me on some features like session auth due to those same site cookies stuff
Anonymous
Do your research well
I did and came across something like pkce but it seems like overkill for my project
Ghorz
Yes
Sadra
How to get diffrence between two datetime in django? My field data type is datetime
There are two ways. You can convert both datetimes to days. Solve the equation date1-date2 and finally, convert the result to the year-month-day. Otherwise, you can use the operation that are available for datetime equations.
Anonymous
Yes
Oh ty lemme check 🙂
Yuvi
How to slove this error Student_profile matching query doest not exist
Rushikesh
APScheduler
I am getting module not found error although I installed 'django-apschedular' and added to my installed apps.?
Abdulvoxid Dadamirzayev
I have forgotten my username and password for admin site .... How should I do
cj
I have forgotten my username and password for admin site .... How should I do
use ./manage.py resetpassword <username> command... go to the database to check the username 🤷🏻‍♂️
cj
In terminal?
of course
Claudio
Hi, can someone give me a good tutorial to connect Django to mssql? Is it possible??? Thanks
Abdulvoxid Dadamirzayev
of course
Bro that's not work
cj
Bro that's not work
I'm not your bro... and yes, the command is changepassword, not resetpassword... try again with: ./manage.py changepassword <user> you should read manage.py commands yourself to realize that 🤷🏻‍♂️
Sagar
I want to learn about channel in Django please suggest me tutorial for it
cj
I want to learn about channel in Django please suggest me tutorial for it
read its own documentation, they have a tutorial on it
Black_J08
{% if user.is_authenticated %} is not working for me