Anonymous
Hi Guys, I have a query. I am trying to add placeholder on my django form password field. But it's not allowing. I have tried different things, if placeholder applied then the instructions that mentioned for the good password gets invisible. I want both password instructions as well as place holder. Don't know how to achieve it. If you have any link or knowledge about this issue. Please share with me.
St
Hai all
𒂵𒐊𒍝𒊏
any one can help me How i join my Protected with pyment System of mastercard
St
Any one help me to solve this pls
SHAKEEL
I am using usercreateform
I don't know this is right way or not.... You can directly edit the main file... Go to django.contrib.auth.forms.UserCreationForm , in that u will find widgets for 'password1' 'password2' Inside attrs you can add placeholder
Anonymous
I don't know this is right way or not.... You can directly edit the main file... Go to django.contrib.auth.forms.UserCreationForm , in that u will find widgets for 'password1' 'password2' Inside attrs you can add placeholder
I did that but didn't work as I want. If I will add this then it will show placeholder, but the instructions gets hide. Also I have tried to add widget in meta class but no luck.
Anonymous
Instructions like: your password must contain at least 8 character
SHAKEEL
Open C:\python\lib\site-packages\django\contrib\auth\forms.py.... Find UserCreationForm In that you'll find "password1 and password2" In that password1 and password2 u will find attrs in widget Add placeholder
Anonymous
I have a user-group that has those permissions only:
Anonymous
To create data from the tables
Anonymous
but not to create users
Anonymous
but it is still creating
Anonymous
Idk why
Anonymous
from django.shortcuts import render, get_object_or_404 from .models import Post from django.template.response import TemplateResponse def post_list(request): return render(request, 'blog/post/list.html', {'posts': Post.published.all()})
Anonymous
{% extends "blog/base.html" %} {% block title %}My Blog{% endblock %} {% block content %} <h1>My blog</h1> {% for post in posts %} <h2> <a href="{{ post.get_absolute_url }}"> {{ post.title }} </a> </h2> <p class = "date"> Published {{ post.publish }} by {{ post.author }} </p> {{ post.body|truncatewords:30|linebreaks }} {% endfor %} {% endblock %}
Anonymous
why is this html not displaning objects
Morteza
why is this html not displaning objects
check your context, maybe a typo
Anonymous
check your context, maybe a typo
i have checked everything for hours my models.py is okay, is there any changes on djangos version 3.1.7 i dont know about?
Wall-E
Hi group I have problems implementing channels and redis, I need some help please 😢. Based on channels tutorials I execute this code but it fails: import channels.layer from asgiref.sync import async_to_sync channel_layer = channels.layers.get_channel_layer () async_to_sync (channel_layer.send)('test', {'sms':'hello'}) But: async_to_sync (channel_layer.receive)('test') Error: ReplayError: ERR unknown command 'EVAL' In channels_redis\core.py Line 359: await connection.eval (cleanup_script, keys = [], args = [channel, backup_queue]) Thanks
Rahul
Hi group, I have two list of string data one from form POST and other with data from database. Now I am checking each corresponding item from list for equlity and this work on my laptop in development mode but when I had pushed the code on aws ec2 then code not showing equal items as equal and sometime 500 error popup but after refresh error goes.
Shreehari
how can i filter serializermethod field in modelviewset?
Anonymous
hi can anyone let me know , how it is possible to implement authentication authorization in django viewsets rest framework for custom users
A
can anyone help with this issue: https://stackoverflow.com/questions/66344709/display-value-in-django-template-every-time-for-loop-runs
Anonymous
If any github code or any link you guys can refer.
A
either u do the loop in the template or use JavaScript + ajax
I can't use the loop in template since I want to make a table every time a for loop ends so I don't see that's possible
sainath
Can anyone say me , how can I earn by web development. Give me some idea
Ghorz
Can anyone say me , how can I earn by web development. Give me some idea
Join coding forums, give as much help as you can. You'll gain recognition
λ reo
Can anyone say me , how can I earn by web development. Give me some idea
It's all about your enthusiasm. I wanna share my learning roadmap. 1. Find a technology/subject. 2. Research it. 3. If it's going to be worth the time spent, do it, if not, find another technology/subject
Afzal
Hi everyone. I hope you are doing well. Currently I'm developing a corporate website and used 'django-ckeditor', 'django-filebrowser' packages to make filemanager in admin panel, But now the client wants in the website to be able to create folders, sort and manage files in the admin panel. Just like in CMS websites. Can anyone suggest some solutions for this? Or some libraries, packages for this?
Михаил
Hello. Help me, I am inserting html tags into the forgot password email template "password_reset_email", but the tags are displayed as text in mail.
Hemraj
Hi someone can help me to update data I am accessing data with ID and i am able access other user data with id. How can i prevent that
Anonymous
I am a beginner to Django. I have some doubts during the learning process. from django.contrib.auth import get_user_model Doubt: Is get_user_model a module? I looked at django/contrib/auth path and didnt find it.
Anonymous
From django.contrib.auth.models import User
User is the class defined inside models.py file. Am i right?
Hello
There are any way to reduce the db requests in django , i have a lot of requests how can I reduce it ? There are a better why to get a models objects data ?
If you have some data which is common for most of the users, Then you can use redis to store that data This will make ur reqs faster and reduce significant db hits
Hemraj
User is the class defined inside models.py file. Am i right?
Follow django tutorial from official site
Hemraj
How to prevent other user data with id when I update data
Erfan
Hey everyone! Has anybody ever used generatetoken in emails link to identify a specific user?
Doragonsureiyā
Hey everyone! Has anybody ever used generatetoken in emails link to identify a specific user?
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 ~80,000 people here, the probability that someone will help is pretty high. How to ask smart questions: http://catb.org/~esr/faqs/smart-questions.html
faran
hi guys. I am using simplejwt with django rest framework and in simplejwt there is an app named blacklist token that make a field in database named "Outstanding Tokens" whenever a user attempt login a new object will store in this field. now the problem is : when I want to delete the user object I will get error. it says that I am not allowed to delete the user because the outstanding token field is foreign key to the user and I can not delete the outstanding token object so I cant delete the user object either . I dont know what to do . anyone have experience , or anything informational that can help?
عــمــر
Or models.CASCADE If you want to delete the object
faran
Or models.CASCADE If you want to delete the object
problem is that it dont let me to delete it even with admin panel and superuser. I cant modify it in anyway.
JL
Hello everybody., Im having a problem inserting a dataframe with 50 k rows into a Oracle table with bulk_create. The performance Is very poor (more tan 10 minutes inserting), do you have any suggenstions of what could i do to improve this? Thank you a lot!
Anonymous
Hi! I have a problem... I have model Company, which has two fields owner and general_balance these has a one-to-one relationship with Owner and GeneralBalance model... Each model has its own serializer, but CompanySerializer must include the serializer of Owner and GeneralBalance, so far so good, the problem appears when I try to send post, put request because I cannot modify nested objects... Does someone have any idea to solve this problem?
Anonymous
Thanks!
Anonymous
Here I'm talking about Django restframework
Alikhanov Jakhongir
Hi everyone! I have built auction project using Django channels(websocket) , redis. It is working fine in local! But when i try to set up in production version websocket can't connect to my back-end. Django+Docker-Compose, Nginx, Channels, Redis, Daphne Can anyone help me out?
Anonymous
Hello Guys, can we store the image path directly in db for an ImageField manually, as the path get stored in database when we save an imagefield wiz varchar.
Anonymous
If i have an image path, can i store it into db field with raw sql query, or by opening that file by that path and and then store it. Please help
Shubham
How can we take enquiry id(enquiry as foreign key for registration table)to registration table in smart erp project in django....please help
Alikhanov Jakhongir
paste compose?
Alex what you think i am doing wrong?
Doragonsureiyā
Alex what you think i am doing wrong?
To share code or error tracebacks, be considerate and use an online pasting service - here is a list of suggested sites: - https://del.dog - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you post a wall of text message (many lines), delete it quick or you may get a warn strike.
Alikhanov Jakhongir
https://del.dog/finunestuc here is the code!
Tech
Can any one please share me the django chat with notification and active user source code please
Anonymous
Can anyone help me with an error related to opencv
Anonymous
It is saying unable to grab frame
Mirco
why doing this evil stuff ?
Mirco
of your Django website ?
Mirco
just use https://ngrok.com to expose your localhost to the public
Mirco
and you can check it on your phone even if Django is running on your laptop
Mirco
yes
Mirco
much better than trying to run Django on android emulator
Mirco
I've shared with you its website, open it and follow instructions
العارف
Hello everyone. I am trying to establish a virtualenv for a django project And whenever I try to run this command : virtualenv my_env This import error is displayed on the screen: ImportError: cannot import name 'PowerShellActivator' from 'virtualenv.activation.powershell' (unknown location) This is the first time happened to me, and before everything was working fine, Also I searched on the web but I couldn't find something can someone find out what is wrong about this ? Thanks.
amrsunja
https://dpaste.org/3Rbj Why is the AddForm not displayed? It looks like everything is correct but django doesn't want to display it? Help very much I ask for 2 days I have been fighting with him
Harsh
dm me if you are from india
Mirco
internet
ken
hi everyone, how do you manage too much parameters on the index page, I mean every time someone hits the home page, you don't need to query the database or open/close files over and over, e.tc., how do we create an observer type intent