Denis
Please I need your help on this https://del.dog/esudabasta
You didn't pass post object into your render
Mirco
Anonymous
Study what context in Django views is
Please I forgot to add it to the code However I passed it to template
Anonymous
Share the correct code
https://del.dog/esudabasta
Mirco
https://del.dog/esudabasta
Make snippet a property It's a method and you cannot call it inside the template
Anonymous
Make snippet a property It's a method and you cannot call it inside the template
Please I’ve done as you said but I’m still having difficulty rendering it. I tried to return only the first 40 characters. But still doesn’t work def snippet(self): return self.body[0:40]
Anonymous
You did not make it a property
Please I made it I’m sorry for bothering you so much https://del.dog/esudabasta
Anonymous
And what's the problem this time ?
When I load it in the template It doesn’t work..
Mirco
What you try to do in that property, Django has already a built in filter for it
Mirco
https://docs.djangoproject.com/en/3.1/ref/templates/builtins/#truncatewords
Doragonsureiyā
Thank you very very much
You're welcome! 😊
AA
Hi, everyone. Can any of you help me figure out my issues with heroku. I've recently made small project with django and wanted to deploy it to heroku. Deployment was succesfull, but when I open it, it says "application error ..."
AA
See logs
I wanted to show the logs here, but sharing media is prohibited
AA
and many more...
AA
https://del.dog/ofenumonal.txt
AA
https://del.dog/ofenumonal.txt
here are the logs guys. I really hope you can help me to figure out my issues))
Mirco
here are the logs guys. I really hope you can help me to figure out my issues))
Easy, you miss whitenoise module on Heroku You need to specify it inside requirements.txt file
AA
Easy, you miss whitenoise module on Heroku You need to specify it inside requirements.txt file
Django==2.1 django-crispy-forms==1.7.2 django-sendgrid-v5==0.9.0 future==0.18.2 gevent==20.9.0 greenlet==1.0a1 gunicorn==19.9.0 psycopg2-binary==2.8.6 pypi==2.1 python-http-client==3.3.1 pytz==2020.4 sendgrid==6.4.7 starkbank-ecdsa==1.1.0 whitenoise==5.2.0 zope.event==4.5.0 zope.interface==5.2.0
AA
so what to do next?
William
Hello I’m new to django anyone who can help
William
Is there like books or anything you can share
Axror
Hey guys, i can send email to @mail.ru, @hi2.in whose domens aren't gmail, but unfortunately can't send to gmail.com emails
Axror
Hey guys, i can send email to @mail.ru, @hi2.in whose domens aren't gmail, but unfortunately can't send to gmail.com emails
EMAIL_BACKEND = ‘django.core.mail.backends.smtp.EmailBackend’ EMAIL_HOST = ‘smtp.gmail.com’ EMAIL_USE_TLS = True EMAIL_PORT = 587 EMAIL_HOST_USER = ‘your_account@gmail.com’ EMAIL_HOST_PASSWORD = ‘your account’s password’
Axror
This is the configuration for django email settings
Axror
Is there anyone who can help, please :)
Fazil
why I am still getting csrf token missing if I am using csrf exempt on view? I am using fetch() to POST request
Anonymous
I have student registration form in Django project documentation Can anyone help me
Anonymous
To prepare resume in that project Can you help me
moshe
To prepare resume in that project Can you help me
What do you mean? what do you want to do exactly?
Anonymous
I am a fresher to prepare resume that purpose I won't documents
moshe
First, we need to understand your problem to be able to help, so please, explain your problem better so we can help
Sid
How to make synopsis file of django project. Anyone can help?
Fazil
It is on the right view
AA
https://stackoverflow.com/questions/63009237/heroku-logs-tail-modulenotfounderror-no-module-named-whitenoise-on-the
AA
https://stackoverflow.com/questions/63009237/heroku-logs-tail-modulenotfounderror-no-module-named-whitenoise-on-the
Have anyone had the same problem? Please can you help if you already faced that problem. Nobody answered here in stackoverflow
Nick
Static and media files not working when DEBUG= false
Nick
Can anyone help ?
No Name 😎🙍‍♂
Yes
Which?
Nick
Apache2
Anonymous
Any one tell me best tutorial in Django in YouTube
Mirco
so what to do next?
Check if the file is in the proper location where Heroku expects so follow strictly its documentation The log is clear, if you know python you know what to do If you don't know what to do, go back studying python
Mirco
Static and media files not working when DEBUG= false
Obviously if you read Django documentation you should know the reason why
Anonymous
I have deloyed the project in pythonanywhere,when i am trying to login with correct username and password in pythonanywhere website it showing the not an user Only in Pythonanywhere website its showing like that, but in console server it’s working
Anonymous
It shows what ?
Not an user
Mirco
Not an user
And what does it show ? Showing a user has not so much meaning
RaHa
Hi, is anyone here doing Android programming?
Doragonsureiyā
Hi, is anyone here doing Android programming?
looks like you need an offtopic group, please continue this conversation at @pythonofftopic
Anonymous
And what does it show ? Showing a user has not so much meaning
I m unable to login to admin with correct username and password i
Mirco
I m unable to login to admin with correct username and password i
Did you create the user with those credentials ? Locally the database is different from the one you use after your deploy
Axror
Sorry guys how to deploy pythonanywhere? By hardcoding?
Axror
I mean it is easy to deploy on Herokuu by using Git
Mirco
Yeah i have created in bash console by pythonanywhere
What are we taking about ? Login inside admin panel or into your app ?
Anonymous
Admin panel
Axror
You must use git.
Yeah, I know, is it also possible on pythonanywhere too?
Axror
Thank you both
Anonymous
hello family how are you? happy New Year. please ! can someone send me the code for programming an internet watch tool
Anonymous
Yup
We are discussing about admin panel
Mirco
We are discussing about admin panel
So did u run the createsuperuser in the PA bash ? But you still see credentials error ?
Anonymous
I have done that many times
Anonymous
But still same errors Like not an staff account
Anonymous
But still same errors Like not an staff account
Have you created a customer user?