Okay so I need to have my field have a maximum of 10 integers allowed to be entered. I tried MaxValueValidator but I figured out that this just needs a value th
I'm rather confused regarding the following error: "Forbidden (CSRF cookie not set.)". This error is received during attempting to logout, login, signup. The pr
models.py def upload_org_logo(instance, filename): ts = calendar.timegm(time.gmtime()) filepath = f"Timesheet/org_logo/{ts}" if instance: b
I am trying to filter my data with a date-time field, but in my case its not working. So please someone suggest to me how can I filter my date with time start_t
I am trying to add a filter on an existing queryset based on a condition but it doesn't work. This works queryset = None if self.is_instructor =
i have a model class Category and also a model class Course. i want to count all the courses that are related to a model e.g: Web Devlopment - 26 Courses i dont
i want to create chat app, i follow the https://channels.readthedocs.io/en/latest/tutorial/part_2.html here, chat/ __init__.py routing.py urls.py
I just finished implementing Google social authentication in my NextJS + DjangoRest project following this blog post. I am trying to figure out how to make prot
I haved Format_List model with relation with Django user and now I want to get the data belongs to specific user by giving user id or after user login. models.p
I'm using Django Rest Framework to serve an API. I've got a couple tests which work great. To do a post the user needs to be logged in and I also do some checks
I have next models class User(AbstractUser): ip_address = models.CharField(max_length=15) class Statistic(models.Model): user = models.ForeignKey(User
hey i try to fix this code for amazon seller sp-api and it's not work at all cannot connect def amazon_list(request): #api_request = requests.get('https://j
I am using custom renderer class by default in settings.py. For api I check query parameter "page", if it exist then I paginate result else return normal respon
I am using Django restframework and I am trying to export excel. My issue is the process is take a lot of time till it generates the excel file. The final file
Hi Everyone i am creating api for partially update record, but getting error [patch() missing 1 required positional argument: 'id'], please help me out views.py
Environment - Django, Rest Framework, Multi-tenant. In my unit tests, I'm trying to hit an endpoint in a tenant schema (not in Public). It is failing because
I'm currently trying to create an API that return list of objects with page and limit per page input from url parameter using django-rest-framework which i alre
I want to customize Meta class constraints default message. Here is my model that I have been working out. class BusRoute(BaseModel): route = models.Foreign
We can make the django filter with "in" expression sending comma separated string. Such as import django_filters class NumberInFilter(django_filters.BaseInFilt
I have to allow delete and update requests from front for my objects of some model. I wish to delete instance and appropriate row in DB. I tryed to use info fr