Questions tagged [django]

Django is an open-source server-side web application framework written in Python. It is designed to reduce the effort required to create complex data-driven websites and web applications, with a special focus on less code, no-redundancy and being more explicit than implicit.

Filter by
Sorted by
Tagged with
0 votes
0 answers
12 views

Doctor Appointment Booking Using Django Forms

I am new to Django. I was trying to built a basic Dentist website which can be used by Patients for booking appointment, as a practice project. The problem I am facing is that I am unable to show ...
Apoorva Singh Baghel's user avatar
0 votes
0 answers
7 views

Bokeh YearsTicker and still month on the ticker sometimes

I am using Bokeh for some charts in a Django project. For instance: [![This one is fine, showing YYYY on the x axis.][1] However, when I restrict the period of time to display (thanks to a ...
RichardW's user avatar
0 votes
0 answers
8 views

python-redsys Redirect the user-agent with post method

i use python-redsys : https://pypi.org/project/python-redsys/ I'm stuck at the step 4. Communication step This is my view : @login_required def redsys_start(request): secret_key = DS_SECRET_KEY ...
Ahima's user avatar
  • 41
0 votes
1 answer
12 views

staticfiles directory is managed but still it is showing error as "GET /static/css/style.css HTTP/1.1" 404 1798 while executing the program! and why?

I have been used staticfile in the project, STATICFILES_DIR = [ BASE_DIR / 'static', ] which contains css and image folders! and connected the css file, *style.css *,to the html page! <!...
Nizam PMNA's user avatar
0 votes
0 answers
8 views

App Localization for date and file upload

I've got an issue with app localization where parts of the forms (picking the date and updating files) are in native language instead of english. I've tried various changing/adding various lines in ...
Urek's user avatar
  • 25
0 votes
0 answers
8 views

django-oauth-toolkit error: Unable to parse query string

I'm trying to access the /o/authorize/ domain with the following parameters: I'm redirected to login at an admin portal and once I successfully login, I get this: "Error: invalid_request. Unable ...
code writer 3000's user avatar
0 votes
0 answers
14 views

Django and Okta Login

I have been following the guide on "https://pypi.org/project/django-okta-auth/" to integrate and app on to okta, but for some reason on the login screen after I enter the credentials , it ...
yellow claw's user avatar
0 votes
0 answers
7 views

ckeditor in django has chenged to TextField

I was using postgresql and then I had to change my db to mysql . after changing all RichTextUploadingFields changed to TextFields in django admin ! How can I fix this ? also I try this code in ...
Alireza javanpour's user avatar
0 votes
0 answers
9 views

how to increase css file speed on django website.?

I have build website in Django it's working good but when trying to website speed test tell me css file loading I have already minify the file but show the same error.
shyam rathod's user avatar
0 votes
0 answers
11 views

while trying to implement a Django chat app using channels after implement daphne and channels and set up ASGI the server dindt running in ASGI

[asgi.py file[installed apps[after tring to fect the url it showing not fount ](https://i.stack.imgur.com/Z01ia.png)](https://i.stack.imgur.com/VwIlL.png)](https://i.stack.imgur.com/HdXwJ.png) [after ...
Yedhu Krishnan's user avatar
1 vote
1 answer
15 views

How can I combine two fields into one in django by using serializers

Is it possible to combine two fields, for example, age_from and age_to to key named age and dictionary value. Like this: age : { from: 18, to: null } My models: # models.py class Banner(...
rowsen's user avatar
  • 75
-3 votes
0 answers
28 views

python django - How to make my project work on vercel.com [closed]

I log in to my Vercel account and use Github (project site https://github.com/TomTomThomas780/learning-log) and make it on Vercel. But it is always a 404 and I don't know why. Website: https://...
Thomas's user avatar
  • 1
0 votes
0 answers
20 views

Django server not accessible when run through docker-compose: connection reset by peer

I have a docker image which runs django. Docker-compose is like this: services: www: image: my-www-image ports: - "80:80" If I docker exec -ti bash into this container and ...
spraff's user avatar
  • 32.4k
0 votes
0 answers
20 views

Ajax form not passing Product Id and Product Title to cart

I'm following Zander from Very Academy Ecommerce tutorial series and reached the part where we use Ajax to submit form data of the product to the cart. I've managed to pass the quantity and the price ...
Arnold Schwarzkopf's user avatar
1 vote
1 answer
16 views

How to allow characters other than letters, numbers, underscores or hyphens in a Django SlugField

Wikipedia slugs sometimes contain characters other than letters, numbers, underscores or hyphens such as apostrophes or commas. For example Martha's_Vineyard In my Django app I am storing Wikipedia ...
paulf's user avatar
  • 11
0 votes
1 answer
31 views

Why is docker compose failing with " ERROR [internal] load metadata for docker.io/library/python:3.11.6-alpine3.18 "?

I'm new to docker, trying to build a website by following a online course but i was struck with this error in the beginning itself FROM python:3.9-alpine3.13 LABEL maintainer="rohitgajula" ...
Rohit Gajula's user avatar
1 vote
1 answer
22 views

Telling a queryset what is its result so that it does not have to query the database

(Disclaimer: I'm not sure if this is just a stupid question) On my flow, I already have the object I need from the database but I need it in the form of a Queryset to be used later (on annotations and ...
José Pedro Duarte's user avatar
0 votes
0 answers
10 views

How to make minify compress static file on django website

I have make new website on django link is here https://civiqochemicals.com/ When i m test website on google PageSpeed Insights it show me slow website and error on css js and images file. How to fix .....
shyam rathod's user avatar
1 vote
2 answers
31 views

DJANGO: path searched will not match URL patterns

I am new to Django following a tutorial, but cannot get past this error message from Django. I am typing in the file path exactly, but it will not work. Here is the website URLs .py: from django....
elgulfsurfer's user avatar
0 votes
0 answers
25 views

Django let a view be seen once a time

I'm new at Django and I would like to make a view available just once per time (I think they're called sessions) Basically, if someone request a page, the page can be access only if nobody is on that ...
NicoCaldo's user avatar
  • 1,205
0 votes
0 answers
26 views

Working on a django project, webpage loads fine but datas are not fetching from PostgreSQL database

I'm working on a django project and using PostgreSQL for database and when I run my webapp, it runs fine but it won't load up the datas from the database. Here are settings.py, models.py, views.py and ...
HP Luwang's user avatar
0 votes
2 answers
24 views

Django how to make dinamycally OR queries with ORM

Here is my SQL Query all_or_conditions = [] if request.GET.get('filter_phone'): all_or_conditions.append("phone='"+request.GET.get('filter_phone')+"'") if request.GET.get('...
Yuretz's user avatar
  • 51
0 votes
0 answers
18 views

Django query spanning multiple relationships with indirection

My question is about querying objects spanning across multiple relationships, with a twist. I don't know how to translate what seems like a simple SQL query into its equivalent in Django. Here's a cut ...
ptrico's user avatar
  • 1,049
0 votes
0 answers
6 views

Django Multi-Tenancy

How can i create a tenant_superuser in the schema which is not public? raise SchemaError(tenants.tenant_users.tenants.models.SchemaError:Schema must be public for UserProfileManager user creation I ...
Temba sherpa's user avatar
0 votes
0 answers
21 views

Django testing views - getting error - DiscoverRunner.run_tests() takes 2 positional arguments but 3 were given

I use Django framework to create basic web application. I started to write tests for my views. I followed the django documentation and fixed some issues along the way. But now I am stuck - I don't ...
Pavel Petr's user avatar
0 votes
0 answers
16 views

Django: how to add creator of model instance (custom user) in FK field by default?

My model, where I wanna add creator of instance in author field by default from django.db import models from users.models import CustomUser from django_ckeditor_5.fields import CKEditor5Field class ...
Bte Deni's user avatar
0 votes
1 answer
25 views

Static files not loading using nginx, docker and django

I'm trying to load static files using nginx and gunicorn, it works when i go to http://0.0.0.0/static/css/base.css static hosted via nginx, but doesn't when i add django port http://0.0.0.0:8000/...
Reboot's user avatar
  • 7
-1 votes
0 answers
20 views

While trying to open Django web socket is showing Chat socket closed unexpectedly error

channel layer is communicate wit the redus but when try to open websocket_urlpatterns = [ url(r'^ws/chat/(?P<room_name>[^/]+)/$', consumers.ChatConsumer), ] it shows not fount and Chat ...
Yedhu Krishnan's user avatar
0 votes
0 answers
11 views

Django App Not Reflecting the Changes in Files

I have a droplet on Digitalocean that runs Django. Whenever I make any changes on urls.py or views.py, I need to reboot the server in order to apply those changes in production. Is there any ...
Vijay Prajapati's user avatar
-1 votes
0 answers
12 views

Can i add debit card details to billibg information details on heroku? [closed]

I have not credit card and i want to deploy a django app but requires payment method verification and this can done only done by credit card payment method on heroku so what i can do? I trie to add ...
Sachin Sen's user avatar
0 votes
0 answers
15 views

Creating a test Django environment from the existing production Django project

I've developed a Django project which is in production and used by a small team daily. Now I want to make some changes in UI, since there is no test environment, I tried creating a similar base and ...
Mahesh's user avatar
  • 49
0 votes
0 answers
29 views

increase the waiting time for response from server before returning the server time error with django and kubernetes

I am using Kubernetes and Google Cloud to host my web application and was looking for a way to increase the time for waiting for the server response before returning the error Internal server error ...
ladhari's user avatar
  • 505
0 votes
0 answers
10 views

Django single choice field with choice of programming language category and quantity of possible answers

I would like to create a single choice quiz in Django. The question creator must: the possibility to add as many answers' fields as possible with a plus + or arrows up-down be capable of marking ...
Davidcopperfield's user avatar
0 votes
0 answers
16 views

Dynamically creating models in django to be used in a unit test

I am attempting to create a test model in a unit test so that I can test associated behavior. Django documentation and related questions here on SO, both indicate that I should use the isolate_apps ...
jhc's user avatar
  • 1,739
-2 votes
0 answers
11 views

from django.template import Template will this command into conda give me a folder inside my main one? [closed]

from django.template import Template in my class we are trying to create a folder inside our main folder, but I have no idea how to it. will from django.template import Template give a new folder ...
Yolanys Aranda's user avatar
0 votes
1 answer
23 views

Only default home page is working when deploying in PythonAnywhere

error message I deployed my Django webapp in PythonAnywhere. Despite following every step, my webapp is displaying only 1 page. As soon as i click on a link to go to other pages, the webapp stops ...
Prasant Kumar Pradhan's user avatar
0 votes
0 answers
20 views

Update and save model data from a view function in Django

I am looking to create an automation strategy for data validation via the Django Admin. My Idea is to save transaction data in my Admin panel then later query the database for validation. I am still ...
Raymond's user avatar
  • 11
0 votes
0 answers
8 views

Django - Unable to get a ClearableInputField to have the "multiple: True" to work

I am trying to allow my users to select multiple files when uploading file(s). I am trying to allow the field on the forms.py file to have this functionality with the "multiple" property. ...
Aaron's user avatar
  • 1
0 votes
0 answers
13 views

Django Quiz- multiple question, saving to database failed, failed to convey programming language category field onto the screen

I neither can get the multi question form saved nor can I save the data in the database. The is one field for programming language category lacking. I would like to get the questions assigned to ...
Davidcopperfield's user avatar
0 votes
0 answers
19 views

Django Rest Framework- retrieving listing updating deleting

I have this class for create and update cuorse content How I convert or wite API view form this view class ContentCreateUpdateView(TemplateResponseMixin, View): module = None model = None ...
Jecop Obad's user avatar
0 votes
0 answers
13 views

Django backend cannot access Cookies

Hey I'm trying to access my jwt token in my cookies to do authorization in my backend. But when trying to access my cookie from the request I receive an empty dict. The cookie is created like this in ...
david backx's user avatar
0 votes
1 answer
21 views

Django - How to extend a template from within an app correctly

I am working on a Udemy class to get back into Django development, and this class has me doing the templates folder differently than I am used to. This is the current directory for my file structure ...
dr_jack3l's user avatar
1 vote
1 answer
33 views

Virtual environment not activating in visual studio code windows 11

While enabling virtual environment in vscode i am getting this error it i also get same error without using python environment manager extension & : File C:\Users\mudit\vscode\python django ...
MUDIT DAHRA's user avatar
0 votes
0 answers
10 views

Is there a way to test if all my reverse() calls in Django Views resolve?

I use reverse('route_name') in my views for redirection. If I do any refactoring of the urls, be it renaming the routes, moving some routes to other urls.py file or something similar, I will have to ...
Levara's user avatar
  • 1,068
0 votes
0 answers
20 views

Accessing images using URL from a server with restrictions in React

I'm working on a web application using React for the front end and Django for the backend, where I need to display images from a server that has access restrictions in place. These restrictions ...
Mustang's user avatar
0 votes
0 answers
10 views

Static files are not loading in Django project in replit

I am working on a project using Python-Django in repl.it. When I set DEBUG=True in settings.py, the static files are loading fine but when DEBUG is set to False (DEBUG=False), the static files are not ...
Harivamshi Diddiga's user avatar
1 vote
1 answer
23 views

NoReverseMatch at / Django e python

I'm trying to creat a new app but I am getting this error 'NoReverseMatch at' This is my project urls.py urlpatterns = [ path('', include('app_infos_gerais.urls') ) ] settings.py INSTALLED_APPS = ...
Scarlet's user avatar
  • 11
-3 votes
0 answers
23 views

Не могу выставить правильную временную зону в Django [closed]

Я в самом начале изучения Django. Извиняюсь за глупы вопрос) Создал проект в самом начале не указал временную зону, добавил записи в базу данных и провел миграции. Как правильно исправить временную ...
vladBro's user avatar
0 votes
0 answers
17 views

celery task received but not executed (eventlet, django)

I faced a problem that when running celery with eventlet and remote database (Redis) tasks come but are not executed, before that I used gevent and it worked correctly with both local and remote ...
xZartsust's user avatar
  • 115
0 votes
1 answer
23 views

Text is going out of the container and it's appearing in just one line and goes out of the page

I am trying to add some texts to my project-details section using a rich text uploading field in Django admin. There it should be in a paragraph as I have added them in my Django admin project ...
Yusuf Khan's user avatar

1
2 3 4 5
6193