axi
Nasib
I want deleteconfirm in same page
Nasib
In templates
Nasib
Anyone can help
Anonymous
Лиза
Hi! 👋🏻 Do I need to use prefetch related for m2m field If I need only IDs without any extra data?
Yulian
Kim
Can i create form for to models?
Doragonsureiyā
Kim
Charly
👑 Dharmzeey
Hello, please I am working on a project, all the users will be created by the admin, so the admin will be the one to generate username and password. I am using usercreationform of forms.py which I render on the html for the user registration.
I want to use the uuid.uuid4 to generate unique passwords, What I want to accomplish is that the password field should be handled by views.py and should be ignored on the html page.
I tried using the exclude fields on the forms.py but it didn't work and I have checked different solutions online but didn't get any solution
Please I need a way out
Tush_de
Has anyone worked on permissions for more than 3 different users and have access to only the content they add??
I need help
Fivi
what do you want to do ?
Tush_de
what do you want to do ?
So let's say I have a user tender, when I create multiple tender users I am unable to restrict access to only what each independent user added
~:$
Tush_de
👑 Dharmzeey
~:$
True
Is it possible to have OTP with JWT, and how?
~:$
Enock
am having issues with register form. Am using AUTH_USER_MODEL where I have extended my AbstractBaseUSer.. Now the problem is that it seem I cant have the user loaded
True
Both are different things.
JWT is a thing but not OTP, OTP is concept and I'm just wondering if there is way to impiliment it on JWT auth
Sergey
Hi guys how can i use some kind of list serilizer with different childrens?
~:$
Maxim
just open editor and write the code
Luis
Post your code on pastebin and show us the error
Anonymous
This is just a simple Todo list
Anonymous
No one will help you code this get your hand dirty and drop and error you encounter here
Charles
Hello friends. I have a class (generic.GenericAPIAView)
That returns the list of uploaded document
When I try paginate by it does not work..
How can I paginate my list...
Please assist
PR
How can i set template to django admin panel?
Charles
Gud
Any tutorial available to use Django with kotlin?
vld
Hi all.
Can you tell me how I can add cart payment functionality to the online store on Django?
Has anyone done something like this?
~:$
Sravya
Bro how can i count the no of votes in my online voting system project
dazedPirate
Sravya
cj
Which data bro
you're the one developing the "Voting System"... you should know the data you're collecting and you should know how to process that data
¯\_(ツ)_/¯
we don't read minds here —and we don't solve homework either—
👑 Dharmzeey
Some to assist me
Have you checked the drf docs
There is a section that explains pagination
Tazhutin
I want to filter model User by group in dropbox in admin panel form, i mean in dropbox there are only user from group clients
id = models.ForeignKey(User.objects.filter(groups__name="clients" ... ... ...
I've tried that way but got an error
django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.
i need only users from group clients, not all users
How can i do it?
Hunter
Am getting Attribute Error, and I have define that module or function.
Please someone help.
AttributeError: module 'B_Test_App.views' has no attribute 'newPage'
'B_Test_App.views.py' File :
def newPage(request):
temp = loader.get_template('new_1.html')
return HttpResponse(temp.render())
'B_Test_App.urls.py' File :
from . import views
urlpatterns = [
path('', views.index),
# path('newPage/', views.newPage),
path('newPage/', views.newPage, name='newPage'),
]
Mihir
Anyone have working multiple select checkbox with searching facilities, i tried select2 and few, which are not working
Adam
Can you please tell me how I can change the field of a linked model by sending a patch request from the serializer? The code that does not work right now. I'm trying to change username and the response comes back:
{
{ "username": [
"The object with username=Ara123 does not exist."
]
}
http://linkode.org/#ZuJqfsNwGnIx3TSroaNqp1
Pythonero
šяıяαм〘CID〙
PS D:\Project> python -m pip install Pillow
Requirement already satisfied: Pillow in c:\users\my pc\appdata\local\programs\python\python310\lib\site-packages (9.2.0)
PS D:\Project> python .\manage.py makemigrations manager
SystemCheckError: System check identified some issues:
ERRORS:
manager.participants.image: (fields.E210) Cannot use ImageField because Pillow is not installed.
HINT: Get Pillow at https://pypi.org/project/Pillow/ or run command "python -m pip install Pillow".
manager.participants.symbol: (fields.E210) Cannot use ImageField because Pillow is not installed.
HINT: Get Pillow at https://pypi.org/project/Pillow/ or run command "python -m pip install Pillow".
bro i am unable to use pillows any solution
vld
User
User
šяıяαм〘CID〙
cj
User
Tried bro
Do you have any domain policies (like applocker)? I've been struggling with that for a long time
JavaScript
While learning django I have not used virtual environment....is it ok?? Is this even required??
User
Adorilson
JavaScript
Adorilson
🙁.
To use virtual environment is a good practice. Do it.
Charly
Or don't do it, if you work alone you can have any bad practices and no one will care.
Arina
I'm using the templater and I'm passing the markup as text. How can I make the browser understand the markup, even if it's text?
thanks
cj
JavaScript
xdd
Hi everyone, how i can decode jwt token to receive user_id?
Finjp
Finjp
And then you can ur data from the request body.
But before authentication, if you try to print username from request you room get AnonymousUser
Soo ...
Finjp
You will get*
xdd
Authenticate the token
Look here mate i have this code ( token = request.headers['Authorization'].split(' ')[1]), and with it i can receive token, that i put in headers, how i can decode it to receive user id.
xdd
I tried to use this(user_json = json.loads(base64.b64decode(token.split(".")[1]))
user_id = user_json['id']), but i get this error(binascii.Error: Incorrect padding
)
Abhie
How can I use lbph face recognition in my project
Charly
Jay
TypeError: User() got unexpected keyword arguments: 'is_staff', 'is_active'
Jay
while creating a superuser
Mahkam
Jay
class User(AbstractBaseUser, PermissionsMixin):
TYPE = (
("social", "social"),
("custom", "custom"),
)
username = None
email = models.EmailField(unique=True, blank=True)
mobile = models.IntegerField()
address = models.TextField()
profile_pic = models.ImageField(null=True, blank=True, default="profiel.jpg")
signup_type = models.CharField(max_length=200, null=True, choices=TYPE, blank=True, default="social")
created_at = models.DateTimeField(auto_now_add=True, null=True)
updated_at = models.DateTimeField(auto_now_add=True, null=True)
created_by = models.CharField(max_length=250, null=True, blank=True)
updated_by = models.CharField(max_length=250, null=True, blank=True)
objects = UserManager()
USERNAME_FIELD = "email"
REQUIRED_FIELDS = []
Doragonsureiyā
class User(AbstractBaseUser, PermissionsMixin):
TYPE = (
("social", "social"),
("custom", "custom"),
)
username = None
email = models.EmailField(unique=True, blank=True)
mobile = models.IntegerField()
address = models.TextField()
profile_pic = models.ImageField(null=True, blank=True, default="profiel.jpg")
signup_type = models.CharField(max_length=200, null=True, choices=TYPE, blank=True, default="social")
created_at = models.DateTimeField(auto_now_add=True, null=True)
updated_at = models.DateTimeField(auto_now_add=True, null=True)
created_by = models.CharField(max_length=250, null=True, blank=True)
updated_by = models.CharField(max_length=250, null=True, blank=True)
objects = UserManager()
USERNAME_FIELD = "email"
REQUIRED_FIELDS = []
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like:
- 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.
Jay
https://dpaste.org/G2F1t