I followed official django documentation for image field.I am able to store the image in the database but when I try to display it in browser I am getting 404 e
Problem: {% extends 'base.html' %} {% block title %} Dashboard {% endblock %} {% block pagetitle %} becomes {% extends 'base.html' %} {% block title %} Dashboa
I have tried to deployed my django application several times on Heroku and then i finally succeeded . It is working fine on localhost ,however, when i use the l
This is my update view which I'm using to get pre-populated form. Although this is also not working. def update(request, id): item = get_object_or_404(Book
I want to make a field mandatory but the *required in red color is coming below the field name which i want just beside to field name here is the HTML code &l
I would like my django application to serve a list of any model's fields (this will help the GUI build itself). Imagine the classes (ignore the fact that all f
I did pagination in my django projet. Everything works just perfect, but my urls looks terrible, like host:8000/?page=1 How to create nice urls like host
Using migrations, I need to add a new field (a foreign key) to a model. I know it can be done with: migrations.AddField( model_name='MyModel',
In a Django project, I have a custom user model that adds one extra field: class User(AbstractUser): company = models.ForeignKey(Company, null=True, blank
hopefully this is clear. I am trying to put together a view that takes care of what happens when a user places a bid on an active listing on the auction site I
Is it possible to override values inside a Model? I am getting 'MyModel' object does not support item assignment. my_model = MyModel.objects.get(id=1) print my
I finally (think) installed successfully PostgreSQL and also de psycopg2 (I use Windows). Btw, is some way to check it's working properly? Well, the thing now
I started looking into websockets and I would liek to implement realtime communication between web-client (Angular 13) and Python app. As backend I used Django
I'm trying to make a pair of nav pills to choose between a graphical and a tabular output for a set of data and I can't seem to figure out how to grab the value
I was struggling with installing dependencies for an external library (the requirements were already fulfilled) when I read that I should check if the install p
In Python, there are two ways to use if and else: either for Boolean flow control, in which case it is used with colons and indentation, or as an expression on
I am still new with serving my Django static/media files to Google cloud storage. It's working now but I am not sure if this is right or is this enough already,
In my project, I created a app: the website_chat/views.py code: async_mode = 'eventlet' import os from django.http import HttpResponse import socketio ba
I am new to Django, I had placed the static files in the project level static folder and even in multiple applications inside the app/static/app directory. Ever
EDIT: I added the path to django-admin.py to my system path (C:\Users\me\Downloads\Django-1.5.1\django\bin) but even after this when I try to run django-admin.p