I have a Django Admin setup where a Marketing user should only be allowed to view Clients and Therapists. However, even after removing all permissions related to UserIncomeSupportDocument, the Marketing user can still see the model in the Django Admin …
My recent project is a AI Gym trainer app and I am in charge of the back-end. The project purpose is to let user get an AI Gym trainer who guide them daily with personalized suggestions. The main AI tasks …
This import in urls.py gives me an error from drf_nested_routers import DefaultRouter as NestedDefaultRouter Import "drf_nested_routers" could not be resolved however the drf_nested_routers it is installed venv as in inside my requirements.txt file
I have a problem where I need a deeply nested model. I have a model named Theme (it's called something else), and in theme I can have many Types. In a Type I can have many or none SubTypes. In …
Acconts/models.py class UserX(AbstractBaseUser, PermissionsMixin): username = models.CharField(max_length=255, unique=True) is_staff = models.BooleanField(default=False) is_superuser = models.BooleanField(default=False) is_activ = models.BooleanField(default=True) is_verified = models.BooleanField(default=False) # user_follower= models.ManyToManyField("self", through="friends.Follower", related_name="folowers_user", symmetrical=False) objects = ManageUserX() USERNAME_FIELD = 'username' save_p = models.ManyToManyField(through='posts.SavePosts',to='posts.Posts', related_name='save', blank=True, null=True, default = …
I want to build a website with Vue/Vite as frontend and Django as a backend. When my frontend needs to get data from the backend I currently do something like this (which works perfectly fine): const response = …
I'm getting a bunch of logs like this: [2025-11-29 16:13:15,731] def group(self, tasks, result, group_id, partial_args, add_to_parent=0): return 1 [2025-11-29 16:13:15,732] def xmap(task, it): return 1 [2025-11-29 16:13:15,732] def backend_cleanup(): return 1 I don't need these logs. It's useless …
This is my first time here asking for help!!!, My name is Pedro, is a pleasure to be here. So. I made a system to help the company with a task work, and hopefully, be noticed to work with the …
I need to filter a variable between two models using a foreign key. models.py class Vuelo(models.Model): fecha_de_vuelo = models.CharField(max_length=50) ....... class Novedad(models.Model): fecha_de_vuelo_novedad = models.ForeignKey(Vuelo, on_delete=models.CASCADE, related_name="fecha_de_vuelo_novedad", null=True, editable=False) comandante_novedad = ...... view.py def buscar_reporte_demoras(request): …
I need to filter a variable between two models using a foreign key. models.py class Vuelo(models.Model): fecha_de_vuelo = models.CharField(max_length=50) ....... class Novedad(models.Model): fecha_de_vuelo_novedad = models.ForeignKey(Vuelo, on_delete=models.CASCADE, related_name="fecha_de_vuelo_novedad", null=True, editable=False) comandante_novedad = ...... view.py def buscar_reporte_demoras(request): if request.method == "GET": …
I'm trying to integrate paystack into my django E-commerce but I keep getting this error, ❌ Order creation error: [WinError 10061] No connection could be made because the target machine actively refused it, when i try to checkout. Can anyone …
I am working on a practice project for a P.A.Y.E system. My layout template, home page template, navbar template are located at project level. While my registration template is at app level in my django project. I wrote code in …
I'm building a molecule properties displaying website using django and sqlite. The database takes a numpy array and stores it as a BLOB. Currently, it just outputs the numpy array back out when asked for it. I'd like it to …
I’m trying to measure the exact time spent in each stage of my API request flow — starting from the browser, through Nginx, into Django, then the database, and back out through Django and Nginx to the client. Essentially, I …
I get the data from the server with fetch API it contains html, when i click on load more posts button it should load the html at the bottom of the page we got from the server, but it also …
I’m building a small “newsroom” application where Django handles the backend (API, authentication, admin) and Vue 3 handles the frontend UI. I’m still fairly new to combining Django with a modern JavaScript framework, and I’m running into questions about the …
Hi everyone I am trying to upload a application using Nginx, Gunicorn, Django application run fine in development environment but for production it does not serves static files. I tried hard but failed to find any solution so I am …
I’m having a problem and I can’t find a solution. I have deployed a Django backend and a React frontend using Docker. I’m using Traefik as a reverse proxy for the web server. When I start Traefik, the backend, and …
I response posts in partials html with fetch, but each time get posts from server also return current page header. i just want to get header first. partial html(server responses it when requested with fetch) {% for post in posts …
I have a Django project that I deployed without really adding any styling for 2 reasons: I didn't know any front-end back then. I wanted to do it for the sake of doing it. Now, I …
It would be nice if there were an easy way to define separate session expiry time for the admin area of a django website. So, admin users could log themselves into the "normal" website (seen by all users) but when …
I am building a mid-level project called School-Admin Panel with Django. I have completed most of the segments sucessfully, but I am having an issue with the performance forest. The formset loads and displays correctly in the browser, but after …
I am building an SMS gateway system in Django that acts as an interface between university data sources (e.g., student information systems) and an SMS provider. The Architecture: To ensure data freshness and avoid redundancy, we decided not to maintain …
Hy i really need to send an image within the Response object of the djangorestframework endpoint . if there is anyone know how please take a moment and send a comment. Take into consideration not just the image will be …
I have an inline formset in Django. I have a table called SubItem which is related to Item. Many SubItems to one Item. Some Items don't have any SubItems. Sections of code are obviously missing from below. The issue I …
I'm new to Django, and I'm working on a project where I'm reusing static pages and changing them to be suitable Django templates. As a part of the previous project, I made some custom HTML elements using JavaScript files and …
As I am following the Django channels tutorial (here is the link: https://channels.readthedocs.io/en/latest/tutorial/part_2.html ), I won't post any code except the specific problem I am having. In my code for the chat/routing.py, I have: from django.urls …
I implemented the post like feature using ajax in the Django project, but it doesn't work. And it gives a 404 error in the console. template.html <script> $(document).ready(function(){ $(".line-button").click(function(){ var post_id = $(this).closest("post").data("post-id"); var button = $(button); $.ajax({ type: 'POST', …
What is the difference between decorator @api_view and @csrf_exempt in project level django rest framework? I need the difference and which is better to develop the project.
When I delete a file from the Attachment model (which is provided by django-summernote), the record is removed from the database, but the actual file remains on the server. I want to make sure that whenever an attachment is deleted, …
I am working on a table where compared data of colleges have been stored. But facing difficulty to query data in low response time. I am creating an API to get some analytics data within 300ms but a simple query …
The problem I am having is whenever I try to use tailwind and css (as static), the tailwind overrides the static css file. I tried moving tailwind invokation tags after, before static css invokation, but it didn't work. Whenever I …
I have a django rest api app where I want to setup a custom authentication flow. Here is how I want it to work. Sign Up User enters email User gets email verification code User enters verification code User …
I am trying to start a project using Django. I used Django once, and now I would like to use it again, but this time in a different folder. I keep getting stuck in the terminal trying to execute the …
One-line project/context. Short description of the problem and constraints. Minimal code: models, the two views, form classes, snippets of urls.py. Exact observed behavior or error. Alternatives tried (session, temp model) and why they’re insufficient. …
In new versions of django, after creating/applying migrations/after creating a super-user, the server starts up by itself, I do not know what it might be related to, please help me fix it. py manage.py createsuperuser [22:57:21] RPS: 0 …
To preface, I'm not asking for a direct fix here, I'm just curious if what I'm doing is the appropriate auth flow for setting dynamic client ID based on device platform. I am 2 applications that use the same Django …
Sometimes, I have many flaky test failures due to one error: ImportError: cannot import name 'task_import_events_to_db' from 'app.tasks' (unknown location) It seems the tests fail because of this import error. Meanwhile, other branches pass without issues, and tests …
I am experiencing an error for which I can’t find an origin. I believe the error stems from GitHub - fusionbox/django-authtools: A custom User model for everybody!, and disclaimer, I have asked this same question on the …
I've a project based on django that wrap some custom code, this code during import load some heavy file before to be executed. I need to check if imports are executed under "runserver command" or not, in this way I …