Category "django"

Pytest hangs indefinitely running tests after Selenium image update

A day ago selenium updated their standalone-images (https://hub.docker.com/search?q=selenium&type=image) and at the same time selenium 4.0.0 was released on

Problem upgrading django 2.2.27 to 2.2.28 on Mac

I have a Django application that I'm trying to upgrade the django module from 2.2.27 to 2.2.28 to close a SQL injection attack vector. I'm running this on a rec

Images from database not displaying in Heroku Django after hosting

I have few images in my SQLite database which I will be changing from admin panel over a period of time. I have hosted the django app in heorku(free service). A

How to setup Django permissions to be specific to a certain model's instances?

Please consider a simple Django app containing a central model called Project. Other resources of this app are always tied to a specific Project. Exemplary code

Want to send extra data from BasePermission to Queryset in ModelVIewSet DRF

Here is My Seller Model which has User as OneToOneField #models.py . . class CompanyProfile(models.Model): user = models.OneToOneField(User, on_delete=mode

Django Admin Page not found when including MEDIA_ROOT setting

this is my first question so please point me to the right direction in case I miss something of importance ☺️ So my problem is the following: I'm c

Django: After updating a template, the changes are not reflected upon refreshing the page in the browser

I am testing a class based view in my Django application. I am currently in development, so I want to see changes in the browser as soon as I make any change in

How do I filter models from the Django admin sidebar while keeping them on their children's change page form?

I have a setup that looks like this: Because 'Charities' and 'Interventions' aren't meant to be edited except from the Evaluations and Max Impact Fund Grants p

What is wrong with this inkscape extension?

I am not a programmer. I used to use an inkscape extension that was designed to change the path in inkscape to Gcode. Recently this extension stopped working gi

Django uses untranslated strings instead of translations

I have a small Django application, which I tried to localize. In the urls.py I have urlpatterns += i18n_patterns( path('add_request/',AddRequest.as_view(),name=

Django models: is it possible to force icontains on filter/get for specific field using a manager?

Let's say I have a model with a string field similar to this class Product(models.Model): upc = models.CharField(max_length=12, blank=False, null=False) Is

How to show on template just a Model with Foreign Key Django?

I'm getting on the template all the Router Model created. I mean if user A create a Router Model when I log in with user B I can see what user A create. how can

How to Print celery worker details on windows and mac

I actually had issues printing mine on command prompt because I was using the wrong command but I found a link to a project which I forked Project (If on Mac )

Images disappears from django web app deployed to heroku

I am working on a django project, writing rest APIs with django rest framework to use them in android application, my main idea is develop back end in django an

How to hide the Token model from rest_framework.authtoken in django admin panel

I tried to solve the problem using this two methods from rest_framework.authtoken.models import Token admin.site.unregister(Token) ----- from rest_framework.aut

Ho to create serializer for model having foreign keys to access that foreign keys tables data also?

I want to rewrite the following API in a more efficient way using the serializer. In the following API, the user and group are foreign keys. I want to return al

Django admin and normal user seperation

Everytime i logout of the normal user system it also logs me out of admin page. the normal user system is created using the AbstractUserModel provided by django

Error when creating a django superuser with Heroku - FileNotFoundError

I'm trying to deploy a django application on Heroku, but when it comes to the part where I need to create a superuser, I get an error: Traceback (most recent ca

Getting objects before validating data Django REST

I have to create a new Chat object using this view: class ChatListCreateView(ListCreateAPIView): permission_classes = [IsAuthenticated] serializer_class

Am trying to launch in Cpanel, but am getting a Module not found error

enter image description hereI'm new to Cpanel and am trying to launch my python Django project, I think I've set up everything correctly but am getting this err