Taku
I want to keep sender as default
Taku
Iam building a chat box
Taku
def sendmessage(request): if request.method=='POST': form = MessageForm(request.POST,request.user) if form.is_valid(): form.fields['sender'].initial =request.user form.save() print("yes") else: form=MessageForm() return render(request,'chat/message.html',{'form':form}
Taku
form.fields['sender'].initial =request.user
Taku
why its not working
Aditya
Try request.user.username
Taku
Ok bro
Baggy ️️
Anyone used mailjet for email subscription
Avi
Django-social
let me check this out
Swedel
I have a base.html with the following code: <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Base</title> </head> <body> {% block contetnt %}{% endblock %} </body> and index.html: {% extends 'base.html' %} {% block content %} <h1>this is a Index </h1> {% endblock %}
Avi
bro spelling mistake
Avi
in base.html
Avi
you have written
Avi
{% block contetnt %}
Swedel
😅😅😅😅
Swedel
got it
Avi
lol man😂😂😂😂
Swedel
😂my bad
Avi
its ok
Beekaaash
Any one help me to deploy Django project in heroku?
Rohan
Can we send an email to verified user using allauth?
Jouravar
Ffff
Rohan
Ajitesh
Tq
What actually you want in chat box?
Taku
Didn't work
Aditya
Ninja
Bro I tried
Try self.request.user.username
Rajesh
Can we send an email to verified user using allauth?
Bro i am also strucking that same place.
Rohan
Bro i am also strucking that same place.
@ibragdzh helped me to figure that issue, ping me i will share that with u
Bayishbro
python manage.py makemigrations
Bayishbro
'Expected', client.SERVICE_ACCOUNT) ValueError: ('Unexpected credentials type', None, 'Expected', 'service_account')
Bayishbro
What might be the problem?
Raffaele
Why Google adsense is taking so much time to approve my website?
Root
Can we send an email to verified user using allauth?
While registering or normally sending mail to user via django admin panel
Sameeran
Hey people, I recently started writing a series of Medium Blogs for Django developers who already have experience using Django. I wanted to tackle the issue that I believe all Django Devs face... There's a huge gap between where tutorials leave you and where the industry expects you to be. I have tried filling that gap... Your inputs would mean a lot to me... --- The Django Rest Framework is our primary backend framework here at Caronex Labs. We have spent years exploring it. So we decided to share this experience. For us, the hardest part about learning Django was the gap between what tutorials teach you and what the industry expects from you. We are here to fill that gap. Check us out at Medium. The link is in our bio. . . . . . . #djangorestframework #django #restapi #backend #python #webdevelopment #blog #medium #developer #coding #computerscience https://www.instagram.com/p/CCQruIZB5jJ/?igshid=1xf5xu8ai4mhb
Shubham
Anyone has hosted django project on aws?
Shubham
I need guidance in deploying the project on aws ec2
Beekaaash
I'm trying to deploy by using simple is better than complex blog but it does not work
Beekaaash
Sure
Beekaaash
Why not
Shubham
"how to deploy django project on aws ec2" Searched this on youtube and saw the part 1 tutorial of "Shobi P P" And was able to deploy the project but how do I setup the static & media paths?
Shubham
Since those we have to do manual setup
Shivam
Hi I am learning django and was trying out mongodb as database. I am not getting how do I store array of objects. Could use your help. Thanks 😊
Anonymous
Hey
Anonymous
I am making a file sharing website so I am taking few inputs so one of them is a password for that perticular file what I want is whenever a user tries to download that file it should ask for that password but I am getting stuck at views.py
Anonymous
My views.py is fresh
Nikki
Any book or document to work on chat app using django channels
Ujjwal
Actually I wish to make something which tells us the corona cases in my DISTRICT .. Using django ... .. I know basic django ... I do not know django rest framework .. . Could anyone plz help me what shud things I know to make such thing mentioned above ???
Ujjwal
??
iiiiiiπoW
Hi I am trying mutiprocessor I tried this. But my function is not being called.. def proces_add(request): emp=Employee.objects.get(EmployeeId=request.data.get("Emp")) result = { 'Status': success, 'Message': 'process called', 'Employee': emp.EmployeeId } p = Process(target=proce_new, args=(emp.EmployeeId,)) p.start() return Response(result, status=status.HTTP_200_OK) def proce_new(emp): try: device = Device.objects.all() for val in device: div = val.Device.DeviceCode sync = Synchronization( Device=div, SyncType=1 ) sync.save() except Exception as ex: logging.getLogger("error_logger").exception(repr(ex))
Bayishbro
django+heroku+dropbox uploading an image to the service works well, but when downloading back the same image [Errno 2] No such file or directory: 'uploads/test.png' code urlImage = SomeModel.objects.get(id=1) img = open(urlImage.image.name, 'rb') return FileResponse(img) how can I solve the error?
Bayishbro
class SomeModel(models.Model): image= models.FileField(upload_to='media', blank=True)
Bayishbro
any variant
Abhiram
I have doubt in django , Wen i use render function to use template (html pages) i am getting error - page not found. How to slove tat... But wen use http response just for hello word. It's working properly. Hello word will display in my local host.
Abhiram
Sometimes i will get error module not found.
Anonymous
Where do you started learning django
Abhiram
Recently from 3months.
Abhiram
Sorry
Abhiram
YouTube
Abhiram
From youtube
Abhiram
and from udemy...
Abhiram
Plz can anyone help me?
KD
Plz can anyone help me?
What kind of help do you need man.?
Ayy
Plz can anyone help me?
It's difficult to help without seeing the code. Firstly check the error line in the stack trace, ensure the filepath is correct
deadspy
HELP ME : How can I make a chat bot means how to take input from views.py to the html ?