Mongodb – Django url issue while calling in Postman
I am creating CRUD operation in Django, REST API and Mongo DB. I have done the basic CRUD code. When I try to call the api in postman, I am not getting any responses. In the pycharm, I am seeing…
I am creating CRUD operation in Django, REST API and Mongo DB. I have done the basic CRUD code. When I try to call the api in postman, I am not getting any responses. In the pycharm, I am seeing…
I have a cookiecutter django template project working fine with a local postgres database. (https://cookiecutter-django.readthedocs.io/en/latest/) I've copied the git repository and recreated the docker images on a new host to run in production, but I would like to export/copy my…
I am making a Django website. In it I am trying to access a variable in view.py file in an external static JS file linked to my template. I tried using the syntax var is_empty = "{{is_empty}}", but it didn't…
i have an image slider which does not show anything if the image does not have active class on it as it slides through a list of images. {% for v in m.value.images %}<div class="carousel-item active"> <div class="container"> <div class="carousel-caption">…
The main problem is that there is no separation between my two divs when I use the typical css trick of using the float: left;, float: left; and clear:both; . However, it sets the divs right next to each other…
I'm trying to connect my Django Project with a RDS instance with Postgre engine It's a free tier option The instance is running normally with no problems I've set my Inbound Rule to allow Postgre connection with my IP DATABASES…
I am trying to start django project using MySQL and Docker to containerize it. But get an error. Here is it's traceback: testcasebooks-backend-1 | Traceback (most recent call last): testcasebooks-backend-1 | File "/usr/local/lib/python3.11/site-packages/django/db/backends/base/base.py", line 289, in ensure_connection testcasebooks-backend-1 | self.connect()…
I have a Django template that generates a HTML 'card-like' element for each model instance. Each instance (ie 'post') have a button, when on click, I would like to update a value within that SAME instance. I have been able…
I have a Django project that runs in a Docker container. Locally when I have updated the project to include changes to the model, I have run python manage.py makemigrations and python manage.py migrate within the docker container. In particular,…
When a user logs in, I want to see their profile picture if they have one; if not, the default profile picture should be displayed. Here is my view.py def header(request): if request.session.has_key('id'): user_id = request.session['id'] user = registertb.objects.get(id=user_id) return…