Mysterious Kid
Binamra
pip-20.2.2
ok do you use virtual environment for python?
Mysterious Kid
Ive made a project in django before....
Mysterious Kid
I just wanted to retouch it..
Mysterious Kid
It's been 4-5 months.....
Mysterious Kid
Django issue solved...
Mysterious Kid
Sorry....it was my mistake
Mysterious Kid
I didn't checked whether the installation was successful or not...
Mysterious Kid
Thanks..
Mysterious Kid
That's it for...now...
DD
Hello Recently I am working for my final year project and I found an idea about it Is it possible to implement an application that can analys sentiment based on data stored in database in django ? For example If user searches for product It can find the perfect product based on sentiment analysis of that product reviews by past users from database but not from dataset
Manish
Definitely possible @dhmehta2456
Anonymous
Hi, I need some help in django rest apis
Anonymous
As I have different types of users...so using modal permissions I want to restrict the user to perform get , put, post, delete methods in view
Anonymous
Have any one used modal permissions in django rest apis?
Yash
Have any one used modal permissions in django rest apis?
https://www.django-rest-framework.org/tutorial/4-authentication-and-permissions/
Anonymous
I'm facing one error. Details are in the link. Please help me out ..... https://stackoverflow.com/q/63423157/12311454
Binamra
Hi, I was creating blog site in Django. I was showing all the comments with post.commments.all as I added related name of post in comment model as comments with one to one field. That was working since I upgraded Django to latest version. I do not know why that is not working. Can anyone tell me if that is Django bug or they removed that feature in django
Anonymous
When I changed my database some fields are missing even after migration
Дауран
oh ok.
Ok I wait as you have free time , you can do it
Binamra
Ok I wait as you have free time , you can do it
https://www.github.com/binamracode/my-simple-blog I have not completed it but you can test. Be sure to install all modules of requirements.txt and use postgres sql or any other sql but do not use sqlite
Anonymous
And what about models.py?
The same as it was before
Binamra
Why is your base template in the root templates dir?
because I use base template in my other apps too so to avoid confusion I added in root templates
Binamra
Bad design, not reusable app
but how it is unreusable?
Muflone
but how it is unreusable?
You cannot get the Blog application alone and insert into another project as the base template is not included
Binamra
You cannot get the Blog application alone and insert into another project as the base template is not included
I have just used it for learning. I will do that later. By the way PyCharm automatically creates templates folder in root so I added there
Binamra
The same
but it creates for me
Muflone
I think you created the first app in the root directory
Binamra
I think you created the first app in the root directory
you can see: https://postimg.cc/R3NDggRR
Muflone
Is it empty?
Binamra
Is it empty?
yes template folder is empty. I just created project to show you
Muflone
Lol templates with no application to apply templates to
Muflone
The same with django-admin startproject test3?
Binamra
The same with django-admin startproject test3?
I used PyCharm to create django project
Muflone
Well it seems a bug, check with django-admin if it's a Pycharm or Django bug
Binamra
Well it seems a bug, check with django-admin if it's a Pycharm or Django bug
when I create with Django-admin it do not create templates folder in root but when I create with PyCharm it automatically adds
ᴹᵃᵏˢᵃᵗ
When I changed my database some fields are missing even after migration
What means some fields are missing. Is it models.py fields or what? As for me when I tried to migrate my models , it migrating to the database perfectly. Do you mean you've changed database fields directly or what?
Muflone
can anyone tell me if it is Django bug or not
It's a Pycharm bug. Django admin is the standard Django way to create a new project
Muflone
ok
Do you use Windows?
Muflone
ya
There's also a tiny typo. Blog application and blog template folder That won't run when you'll deploy to a linux server
Muflone
It would try to search templates/Blog directory
Binamra
What's the issue?
when I was using post.comments.all in post_detail.html it was working but when I upgraded Django version today it did not work
Binamra
What is the error message?
no any error message comes
Fuad
no any error message comes
Like try to get the error message in django shell or use some logic like forms
Binamra
What are the two versions used?
well I do not know previous but I am recently using latest version
Muflone
well I do not know previous but I am recently using latest version
Spotted another issue then: No git (+ no django version in requirements.txt) 😜
Binamra
Spotted another issue then: No git (+ no django version in requirements.txt) 😜
old version is Django 3.0.8 I recently watched requirements.txt But what you mean by no git
Fuad
wait I am going to again try old version
Use this method, in your post detail view add a line like: comments = post.comments Then u will see the error in debug page
Muflone
old version is Django 3.0.8 I recently watched requirements.txt But what you mean by no git
Compare the working version (from requirements) from git history with the actually broken version
Binamra
Error at / Incorrect padding What is this error
Muflone
Error at / Incorrect padding What is this error
It doesn't seem a Django error Check the error line
Binamra
Error at / Incorrect padding What is this error
I deupgraded Django to 3.0.8 then it comes