.bj
TemplateDoesNotExist at /book/ include/header.html Request Method: GET Request URL: http://127.0.0.1:8000/book/ Django Version: 4.1.1 Exception Type: TemplateDoesNotExist Exception Value: include/header.html Exception Location: C:\Users\montazeri.pc\AppData\Local\Programs\Python\Python310\lib\site-packages\django\template\backends\django.py, line 85, in reraise Raised during: book.views.list_book Python Executable: C:\Users\montazeri.pc\AppData\Local\Programs\Python\Python310\python.exe Python Version: 3.10.7
Charly
I don't understand why this line gives an error
Where is located the header template?
.bj
Where is located the header template?
I wrote the correct address
Charly
I wrote the correct address
I didn't asked that
.bj
I didn't asked that
merci , Problem solved, thank you
Nikita
Using ajax on submit?
I fixed it $.ajax({ type: "post", url: form.attr('action'), data: { art: ${art}, csrfmiddlewaretoken: $("input[name=csrfmiddlewaretoken]").val() }, success: function (response)
S.F.
Hi ... I customized the user model of django and make all steps It works but there are problem when I delete any user from cpanel It give me exception " no such table : app_customeuser_groups"
SiMrAn KuLsHrEsThA.
How to fetch image from database in django
The Inspired
SiMrAn KuLsHrEsThA.
Actualy will not shw
P
Made migrations and are tables done by syncdb?
P
Then it will show
Ak
Hi .how can I allow space in username of User model
Ak
I tried to add custom validator but it's not working
Divyesh
Hello, how can add bluck of user for using admin side
silvio
Hello, I can post a problem of Django?
silvio
I can use pastebin?
Andrew
Hi guys quick qn, I have a django app on Heroku. Currently users can submit their media it’s public access by the route no problem. But I wanna make a feature for them to submit their report cards their media need to be private, only access by admin, and no file path access too. Any idea how to do this? Any hint will be great!
Andrew
Basically wanna block their media from any access besides coming from the site. All private is also OK then I can auth some of the routes. How to make a media folder private and only view on site?
Andrew
Any hint will be great! Thanks in advance
Teo
you can create some view for file similar to flask send_from_directory function, in django you can do this with HttpResponse and File Response with additioal headers, so you can control routes, so only users who have permission can access the file. You can save files in table with foreign key with user id. For example: https://zetcode.com/django/fileresponse/
Tchondo
Hello can any one help i'am deploying django app on railway and fail of this error in log "error: docker build failed"
Doragonsureiyā
Hello can any one help i'am deploying django app on railway and fail of this error in log "error: docker build failed"
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
JAHIR
Html/css important to learn in order to become django dev?
The Inspired
Html/css important to learn in order to become django dev?
If you plan on learning only Django REST Framework, then no... if you want to learn only Django, then yes, some basic knowledge is required.
▄︻デռǟɦօʍ══━一
Vaibhav
Is it possible to learn DRF with learning django?
I mean why would you want that... It is possible but learning django is.important
The Inspired
Is it possible to learn DRF with learning django?
actually, no... you can probably skip the 'templates' part from Django, but apart from that, you need to know everything else...
The Inspired
After all, DRF is based on Django.
The Inspired
well...
The Inspired
it actually depends on the job requirements...
The Inspired
I would recommend learning a front end javascript framework also along with Django and a Database also, since that would prime you to be a full stack developer which has more potential nowadays.
Abd Al Rhman
But isn't knowing one tool like django and mastering it to the fullest is better than knowing few of many things?
▄︻デռǟɦօʍ══━一
how can i connect django with mongodb
Doragonsureiyā
how can i connect django with mongodb
Do you want to use Django with MongoDB? Then you shouldn't Please read this article: https://daniel.feldroy.com/when-to-use-mongodb-with-django.html
The Inspired
But isn't knowing one tool like django and mastering it to the fullest is better than knowing few of many things?
That is also good but only after you get a job... but if you dont have a job yet, I think its good to know a little bit about everything
JAHIR
don't ask offtopic questions here
Not asking about off topic
The Inspired
I want to be back end dev. So what other thing need to learn with django and DRF
A database... it can be either a SQL database like MySQL, PoatgreSQL or a NoSQL database like MongoDB... you also need to learn DSA.
The Inspired
Also, having knowledge about APIs is good... particularly REST APIs, a little bit of Postman
▄︻デռǟɦօʍ══━一
is using sqlite database on my django web secure?
-𝐟𝐚𝐫𝐡𝐚𝐝『𝟙𝟡:𝟝𝟘』
▄︻デռǟɦօʍ══━一
For public projects, no
what is the secure database to use for the public projects?
-𝐟𝐚𝐫𝐡𝐚𝐝『𝟙𝟡:𝟝𝟘』
what is the secure database to use for the public projects?
Mysql - postgress I dont know about no sqls
▄︻デռǟɦօʍ══━一
▄︻デռǟɦօʍ══━一
thanks
-𝐟𝐚𝐫𝐡𝐚𝐝『𝟙𝟡:𝟝𝟘』
thanks
Your welcome
▄︻デռǟɦօʍ══━一
how can i deploy mongodb using the local storage not the cloud hat gives 512mb i want it to use the local storage and i want it to host on a server with cpanel?
Bagaudin
Hi I'm use Django in my projects
◄█▓▒░ ♦ᴄʀᴇᴀᴛoʀ♦ ░▒▓█►
https://pastebin.com/fYSndXe0 Hii, here the function deleteRoom works properly, but when the first function leave () that could not call the deleteRoom What is the error here?
Mihail
Hi! Can anybody say any more good resolutions of this problem? https://stackoverflow.com/questions/19908086/django-use-custom-methods-for-queryset-values
Anonymous
Can we build rest api with django?
Doragonsureiyā
Can we build rest api with django?
Are you looking for Django REST Framework documentation? Here you have it: https://www.django-rest-framework.org/
Ali
Greetings guys, Hope you are all well. I am trying to use AWS S3 bucket to serve static and media files. I've created an IAM user with programmatic access and I am using django-storages and boto3 to configure my app and connect it to AWS. I am able to upload the static files to S3 by running the command: python manage.py collectstatic. Yet, I am getting an error of 403 forbidden when I am loading my pages. I am wondering, and correct me if I am wrong, that this is not policies/access problem since, as I mentioned, I am able to upload to S3 from my django app. Any advice please?
Я R
Hello everyone Please, help with a problem ) Have a question about how to link a user to his data. I have a website for publishing articles where there is also registration and authorization, but I want each user to have editing and deletion rights only for his articles, and other users could only read his articles. To register and authorize a user, I used the UserRegisterForm and UserLoginForm forms. I need to link a user to his articles in models.py and view.py
Bruno
Salute to everyone hope yall great someone can help me to dockerize my django app with nginx and gunicorn?
Shiv chary
Hello to everyone In my Django project I have to verify the user given email is correct or not, to verify that i have to sent OTP to mail and i will Verify it ,can anyone suggest me how to do, iam beginner. Thanks in advance
Azeez
Hello to everyone In my Django project I have to verify the user given email is correct or not, to verify that i have to sent OTP to mail and i will Verify it ,can anyone suggest me how to do, iam beginner. Thanks in advance
You can use django signal, upon successful saving the user's data, then you can listen to a post save signal which can then be used to generate the OTP (randomly generated digits) and then send to the email. The digit can be saved in another table dedicated for OTP (each user entry can be deleted upon successful verification)