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

Django: Duplicate action when I press Follow or Unfollow button

I am doing CS50w project4 problem, so I have to build a Social Media app. This problem has a part where in the profile of the user a follow and unfollow button has to be available. My problem is when ...
Antonio Garcia's user avatar
0 votes
0 answers
6 views

Trouble Activating Conda Environment in Dockerized Django Application

I'm working on Dockerizing a Django application with a Conda environment, but I'm encountering issues. The issue is that when I run docker compose up my Django application does not start properly and ...
mantunes's user avatar
0 votes
0 answers
22 views

<select> returning empty if the value isn't edited

So, I am working on an ticket system using Html, Css, JavaScript and Django, and I needed an field that changed depending on another field, after some searching I found a good JavaScript ...
Yukki's user avatar
  • 11
0 votes
0 answers
11 views

I have a problem with annotate. I want to add a subset counter column, but it doesn't get added

class ProductGroupInstanceInlineAdmin(admin.TabularInline): model=ProductGroup @admin.register(ProductGroup) class ProductGroupAdmin(admin.ModelAdmin): list_display=('group_title','is_active'...
user22989530's user avatar
0 votes
0 answers
15 views

How to upload a file larger than 32MB from django admin panel hosted in Cloud Run?

Problem I need to upload zip files with a size of ~800MB to a GCP Cloud Storage bucket using Django's admin panel. My Django API is hosted in Cloud Run, and I just found out Cloud Run has a request ...
Nicholas Kemp's user avatar
0 votes
0 answers
6 views

Django // contact form connect to gmail

I would to know if someone has a good tuto about that, cause i find anything about that. I got only old tutos and google change his security about apps and when i create a special password for my app, ...
Mael Micout's user avatar
0 votes
1 answer
12 views

How can I filter an annotated query set

I have the code below that returns an aggregate of authors that have a book and the total amount of authors. This works well, but I want to get the count of authors that have a particular type of book ...
Tife's user avatar
  • 31
0 votes
0 answers
11 views

language changed in django project but django-modeltranslation do not change

i used django-modeltranslation, the issue is when the language change, it does not affect and just one language shown, even than language was changed in the cookies these are my codes: class ...
Ali's user avatar
  • 1
0 votes
0 answers
10 views

How can I display data from one page onto another page in django

So I am creating an expense tracking and budgeting app, and I have an idea that I want to implement. So I created a page (or app in Django) called "Budgets" and what I want to see when I ...
RAzOR's user avatar
  • 1
0 votes
0 answers
7 views

Unable to Terminate Django 2.1 Project Running on Ubuntu 20.04.2 LTS with NGINX, UWSGI, and Celery

I have a test project (a 'zombie' project) on the same server as the production version of my app. Both projects use Celery for background tasks, but they share the same RabbitMQ port. I noticed that ...
samuelSGDev's user avatar
0 votes
0 answers
9 views

dj-rest-auth, django-allauth, mongodb authentication

i want to integrate user authentication in my django projet, i'm using dj-rest-auth, django-allauth and my db is mongodb but when i execute python manage.py migrate i get this error: File "/Users/...
Dride's user avatar
  • 37
2 votes
1 answer
35 views

Django (DRF) ORM - Simple left join with reverse relation

I am trying to select data from my postgreSQL database using Django 3.2.9 and DRF 3.12.4. Here are my models : class Headpiece(ValidatedModelbase): class Types(models.TextChoices): POWDER =...
Julien Haensler's user avatar
0 votes
0 answers
7 views

Gofiber + Django - Template Recursion Issue

So I am generating a folder structure that uses accordion from bootstrap. This is working as intended for 1 level of depth. As soon as I want to go into 2+ levels of depth it does not work as intended....
Liam Gomez's user avatar
0 votes
0 answers
8 views

How can I post data to django import_export

I would like to test the import function from import_export django. When I run my test the code says I provide no dataset (None) even though I do provide a proper CSV file. Thus, my assertions (...
Nickle Sydney's user avatar
0 votes
1 answer
20 views

In multiple selected data, how do you ask for the delete confirmation - Python, Django, HTML?

I want to select certain data and delete it from a code that has a check box. I can remove it, but I am unable to request a message of confirmation. Here is my view.py code. def expens(request): ...
SmileOwsky's user avatar
0 votes
1 answer
26 views

Change div text from select dataset

I want the selected dataset to appear at the beginning and then the selected ones to appear in the div.I don't know Java. I try someting like this. not work :(. Div : id='from' dataset : data-fiyat=''...
ZeQ's user avatar
  • 51
0 votes
1 answer
15 views

How do I stop CKEditor from stripping out Adsense Ads <ins> tag in my Django admin backend?

I have implemented a standard CKEditor configuration on my Django site's admin backend. The default CKEDITOR_CONFIGS in settings.py is: CKEDITOR_CONFIGS = { 'default': { 'allowedContent': ...
kingx26's user avatar
  • 25
0 votes
0 answers
11 views

Problem with query optimization in Django admin

I came across the fact that when I try to open the object creation window FriendlyMatch, it takes a lot of time. About 2 minutes. Through the django debug toolbar I found out that there were 4300 SQL ...
Niolum's user avatar
  • 1
-5 votes
0 answers
17 views

Handling File Uploads in Django: How Can I Improve Security and User Experience?

`I'm currently working on a Django web application, and I need to implement a file upload feature. While the basic functionality is clear, I want to ensure that the file upload process is both secure ...
Rajsv Mahendra's user avatar
0 votes
0 answers
26 views

DJANGO, update button is not working in frontend but in admin panel, i can change the status

When i click the update button, it should change the remarks/status of the submitted file in submission, however i dont know why it is working in my frontend but it works in my django admin panel. ...
Newbie's user avatar
  • 1
0 votes
0 answers
26 views

Django Compare passwords with Bcrypt

I have a problem with bcrypt... How I compare the String saved in the db with the String from the user input this: >>> import bcrypt >>> salt = bcrypt.gensalt() >>> hashed = ...
nepko's user avatar
  • 19
0 votes
1 answer
17 views

How to find duplicate FK entries in Django using query

I have a GeneralLedger that is comprised of JournalLineItems and AccountsPayableLineItems. When either a JournalLineItem or AccountsPayableLineItem gets stored, I save it in the GeneralLedger as a ...
ViaTech's user avatar
  • 2,223
0 votes
0 answers
7 views

Can I use `JWTStatelessUserAuthentication` instead of `JWTAuthentication` in my Django project, even without multiple applications?

I'm currently working on a Django project, and I'm exploring the use of authentication mechanisms provided by Simple-JWT. In the documentation, I noticed the option of using ...
Anu's user avatar
  • 1
0 votes
0 answers
16 views

Limiting choices in django dynamically (call-back function?)

I am relatively new to Django and this is my first question on Stackoverflow. So pleas bear with me if not ideally formulated. My Problem: I have a Model Animal with two fields that are ForeignKey ...
Stephan's user avatar
0 votes
0 answers
12 views

Django channels login connection already closed

I'm trying to login user after registering where my app is using django channels in combination with Strawberry. class RegisterUserMutation(DjangoCreateMutation): def create_user(self, data, ...
S.D.'s user avatar
  • 2,569
0 votes
0 answers
12 views

Iterating through form-data with nested keys in Django Rest Framework

I'm working on a project using Django Rest Framework, where I need to create a company by sending relevant documents through form-data. When I print the data received, it looks like this: { "...
Rohan Abraham's user avatar
0 votes
0 answers
19 views

Django celery cron job is not calling back the tasks

I'm trying to run celery cron job after every 30 second but its not working. Tried every possible solution, mentioned the beat command in my docker-compose.yaml command field under celery_worker but ...
mobeen ali's user avatar
0 votes
1 answer
49 views

TypeError at / Insertdetails() missing 1 required positional argument: 'request' - Django

I am getting the following error in a Django project TypeError at / Insertdetails() missing 1 required positional argument: 'request' Request Method: POST Request URL: http://127.0.0.1:8000/ ...
Kitty's user avatar
  • 19
0 votes
1 answer
11 views

Django JSONField filter on complex JSON document with list of object

I work with Django 3.2 and MariaDB. I have an Product Model with an product_settings field (typed as JSONField ). With a queryset I want to retrieve all products with a type of deposit equals to ...
Samuel Dauzon's user avatar
0 votes
0 answers
13 views

Many-to-many communication of a model in Django with itself

How can I create a customer table in the database using Django models so that the desired customers can be linked together, with the following conditions? The client may not be related to any other ...
MRJ's user avatar
  • 1
0 votes
1 answer
19 views

Django, How to access request data in include template

In my Django project, I have some templates that includes in base template using {% include %} tag. How do I access request data in this included template? How do I access context variables in this ...
Pycm's user avatar
  • 23
0 votes
0 answers
23 views

How to retry failed tasks in celery chunks or celery starmap

I would like to know how to configure these tasks correctly so that the failed tasks can be retried. One thing I have noted is if one of the tasks in the chunk fails, the whole chunk (I assume ...
Eric O.'s user avatar
  • 503
-3 votes
0 answers
40 views

Please tell me how to implement views.py of audio recording app [closed]

I want to create a recording app using Django. As a beginner, I'm not sure what kind of processing to write in views.py though I read many information about pyaudio, librosa etc... The desired ...
Kotaro Kobu's user avatar
0 votes
1 answer
56 views

Static files not loading in pythonanywhere [closed]

I am going to run my project on the pythonanywhere site and I did all the work, but the static files are not loaded. I'm developing a website with Django. My static files are located in the ...
Elyas Shavikloo's user avatar
0 votes
0 answers
35 views

How to login to Django views from React?

Currently I am facing an issue where I can sign in from react accurately but my django session is not updated based on whether I login or logout from react. What I am expecting is that when I sign in ...
David's user avatar
  • 1
0 votes
0 answers
24 views

Store foreign key as eccrypted and fetch be decrypt

I am implementing a user management system using django ORM. It is said to store the Password in a different table named "user_password" and encrypt the the foreign key "id" of &...
Mahir Mahbub's user avatar
0 votes
3 answers
41 views

Getting this Error PermissionError: [Errno 13] Permission denied: '/app/manage.py' in Docker

I am encountering a PermissionError when trying to run the docker compose run command for creating a Django project. The error message is as follows :- docker compose run --rm app sh -c "django-...
Mohit Mishra's user avatar
-2 votes
0 answers
58 views

DJANGO Models based on MYSQL tables... :(

I have been working a bit with DJANGO, and I've encountered a somewhat serious issue. I'll start by saying that I'm trying to connect my MYSQL database to DJANGO, but when creating the models in ...
ed.cetacean's user avatar
0 votes
1 answer
33 views

I am creating a Django budgeting website and my changing status is not working

view-bills-admin.html {% extends "base/room_home.html" %} {% block content %} <div class="container d-flex align-items-center justify-content-center" style="min-height: ...
Newbie's user avatar
  • 1
0 votes
1 answer
33 views

Django load static tag not showing image

Tried viewing image on my browers but all i can see is the image placeholder. Here is the template code: <!DOCTYPE html> <html lang="en"> <head> <meta charset="...
Ayodele Martins Abiwo's user avatar
1 vote
1 answer
36 views

AddPage function in django making a new page but not redirecting to it - NoReverseMatch error

I'm trying to create a function that will make a new entry in a wikipedia website. So far the code I have will make the entry (i.e. if you go through the form to make the page, it will show up in the ...
Eve's user avatar
  • 11
0 votes
1 answer
15 views

Django Form(Formset) is not working - id is missing?

My template form does not save the objects. here is my view: class FeatureDeliveryEditView( LoginRequiredMixin, PermissionRequiredMixin, SingleObjectMixin, FormView ): permission_required = &...
gomez_'s user avatar
  • 123
0 votes
0 answers
25 views

How to make django not send a `Content-Disposition` header?

I am trying to serve a static svg file on my local Django server. The file is quite large so I don't want to put it directly into my HTML. It shows This XML file does not appear to have any style ...
RandomCoder368's user avatar
0 votes
1 answer
19 views

Wagtail, change allowed extensions for WagtailImageField

I'm trying to add extra extensions wagtail.images.fields.WagtailImageField How it can be done? I've tried https://docs.wagtail.org/en/stable/reference/settings.html#wagtailimages-extensions , but ...
Headmaster's user avatar
  • 2,058
0 votes
1 answer
23 views

Dynamic data for test with model_bakery

How to orginize dynamic data for a test using model_bakery? route_application_requester = Recipe( ApplicationRequester, form_applicant=cycle(FormChoices.values), inn=gen_inn, ) I need ...
Salivanch's user avatar
-5 votes
0 answers
35 views

Am having errors anytime i want to carry out an installation with pip, i cant even install virtual environment [closed]

Been trying to carry out installations with pip but have been having errors, with virtual environment it keeps showing me could not find a version that satisfied the requirement vitualenv. I tried ...
Preciousrita's user avatar
0 votes
0 answers
19 views

I am trying to build a social app, where users can post, join groups, add groups etc. but im stuck with an error

I am trying to make a user to be able to see the group details whenever they click on the group name from the group lists, just like facebook. but the slug isn't working i am getting this error.** ...
Davidson counted's user avatar
0 votes
0 answers
19 views

How can I change the header color and language in django-import-export?

I have a resource to export class RequestResource(resources.ModelResource): class Meta: model = Request fields = ("service__name","user_name","user_address&...
Aidar's user avatar
  • 41
0 votes
0 answers
36 views

django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query') in my remote web app

I have been working on a django chatting application. The link to the site is https://aniconnect.org so you can check it out if you want to see the error in action. So I am using django-channels for ...
Fuzz Ashes's user avatar
0 votes
0 answers
28 views

Recursive Query with Django-CTE

I have a Tree model that i need to prefetch all the childs and user of the comments all at once: class AnalysisComment(MPTTModel, TimeStampMixin): parent = TreeForeignKey( "self",...
Bad Boy's user avatar
  • 91

1
2 3 4 5
6207