WhiteDevil
I will use the Web-UI only for reviewing retrieving values from the DB
WhiteDevil
But I need to execute the script from the Web UI
WhiteDevil
Is that possible ? Can someone guide me ?
Anonymous
Anonymous
Hello everyone
I am begginer in django. I am trying to build app by referring "django project.com". I have done all operation but i am not getting the questions in that form. In admin.py i have already mentioned "admin.site.register(question)". After doing that part of questions is not visible to me. Please help me to figureout where i did wrong.
I am referring this link for practice. And also doing the same project which is present in that site.
https://docs.djangoproject.com/en/3.0/intro/tutorial02/
Roman
Hi guys I am doing the query by the property of foreign key and this is not working have no idea why
Roman
filter(pulled_from_database=False,campaign__is_running=True)
Mirco
Mirco
Roman
campaign__is_running=True
Roman
It's not Fk
Roman
Like it's but it's the property of it
Hari
Hi
Can any one help here to save logs to database
ㅤㅤㅤ
Migrate qiling
Mikhail
can you provide your urls.py?
Mikhail
show home function from views pls
Mikhail
u can show it fully, but then pin it as a file, or use smth like https://www.codepile.net/
Anonymous
With django how can i use an iframe to open camera module
Dishant
hi i am getting this error while deploying my django site to heroku a=can anyone help me I have made Procfile and requirements.txt and procfile has: web: gunicorn django_project.wsgi --log-file -
Building source:
remote:
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/python.tgz
remote: More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to myblogspot.
remote:
Aditya
Dishant
Yeah I checked but it tells to add Procfile but I have added it
Davit
https://davit.tech/django-jupyter-notebook/
How to use Django shell in Jupyter Notebook
Michael
Hello a quick Django question is it possible to exclude the password field or at the very least make the password field on sign-up not required when using Django or django-allauth
Mohamed
Mirco
Mohamed
Mohamed
Yes I tried, same error bro
Shihasz
Mohamed
Why don't you create a manual form, get username and store it in model and when they login, you can query the table and if result come you can redirect?
Mohamed
https://www.google.com/url?sa=t&source=web&rct=j&url=http://django-authtools.readthedocs.io/en/latest/how-to/invitation-email.html&ved=2ahUKEwjv8buPvfToAhV5zjgGHeQUCwgQFjAAegQIARAB&usg=AOvVaw1FgsZwkXyXMpOltv9SxZ8x&cshid=1587299090017
Mohamed
There in Django documentation with example, good luck bro
Michael
Mirco
Shihasz
Michael
Shihasz
Also there is a method set_unusable_password() , u may read docs on that topic
Michael
Shihasz
Michael
Onur
Hello,
I cannot get CSRF Token from cookies. It gives CSRF Token error when I try to make post on password_change endpoint. Somehow user cannot login I guess so change_password endpoint redirects me again to login endpoint. I am using knox token for authentication and custom login view. I use django auth's password_change view.
Here is my models, serializers, views, settings and urls. Any help would be appreciated. https://del.dog/jyvypelyme
Onur
-when I try password_change endpoint in browsable API; it redirects to login page and does nothing. However knox token for the user is created.
-when I try the endpoint in Postman it gives CSRF token error since I cannot get the CSRF token
Anonymous
Guys I just deploy my django app on heroku it was running there perfectly but after 2 hours of later my all blogs images are hidden from there, I don't know what happening plzz help me
Anonymous
Anonymous
sm
Anonymous
How to do that
https://cloudinary.com/documentation/django_integration
Anonymous
you can use other services if you want. but cloudinary has a sdk for django and they offer free tier
sagir
Can anyone tell me how to get one single field from model..
Mirco
sagir
Model.objects.values()? Should I pass anything in ().?
Mirco
sagir
OK thanks
Mirco
Doragonsureiyā
OK thanks
You're welcome! 😊
sagir
Hey I am using values ()
But when I am rendering this to my template it showing me all the objects. I need only that where I will click
Mirco
Mirco
You need to specify the fields you wanna get otherwise it will show you all fields
Much more clear ?
sagir
Look..I have two functions are there.. In first function I am using all() with truncatewords and in second function I am using values (). So whenever I will run the server all data will come from my first function with truncatewords and every card has View button to view more..so problem is that, if i am clicking on the first card them instead of showing data of first card it's showing the data of all the cards..
Anonymous
Anonymous
Or get_object_or_404
sagir
Mirco
Study ListView and DetailView
Mirco
6 lines of code more or less and you have what you need
Onur
Sheshadri
Anonymous
Onur
I am getting usertoken and passing it to cookies already. However, when I am making a post on “/password_change/“ it returns a CSRF forbidden response. This lead me to try getting csrftoken in the front-end. However I cannot reach csrftoken on that side. Django returns csrftoken to browser when I log in on my React.js page but it comes inconsistantly. That is, I cannot see cookies always in the cookie table of browser. Thanks you!!
Asaduzzaman
I would like to learn django professionly.
Bheeshma
Mirco
Sheshadri
Sheshadri
Or take a look at the above codebase how he is achieving change_password and replicate the code in your serializer, but I would recommend using this module as it does many more useful things
M3FoOoS
When I put csrf in the form and request url, code is generated, but how can I verify this code before entering the function and how to generate a generation before the render html process,
When the page requested, we see header csrf not matching the random code in the template