Hello everyone I have a blog platform, the user can add and edit blog. I used Django and Django Rest Framework to build the website, and for the frontend ReactJ
The default django user model has a is_superuser field. I would like to use this field to conditionally render components in react, i.e. get something like this
I am deserializing JSON data from file to a model object. I'm using a Django Rest Framework serializer. The JSON is quite large and I expected some fields that
I have a model like this: class User(AbstractUser): PERMISSION_CHOICES = [ (0, 'boss'), (1, 'leader'), (2, 'bro'), (3, 'sis'
I've created a custom user model using AbstractBaseUser. When I try to create a super user using terminal via createsuperuser command. I get in create_superuser
In my frontend i'm logging into another app's api in the browser, I'm then redirected back to my app, that hits a View in my backend which gets a code from the
models.py from django.db import models class Images(models.Model): def upload_path(instance, filename): return '/images/'.join([filename]) im
I am using react components and to test my code I wrote a quick custom authentication class and defined in the settings for the rest_framework as follow: DEFAUL
I have a Django app that requests data from an external API and my goal is to convert that data which is returned as list/dictionary format into a new REST API
I am currently working on a job portal project, where I need to create 2 profiles based on is_staff field of default user model of django. one for job seekers a
I've been trying to implement a search bar inside my application, but I don't know how to query for similar names inside my db. Here is my view.py queryprms
The login button is missing from my browsable API. I am using django-rest-knox for token authentication. My urls.py contains: urlpatterns = [ path('admin/',
Context: I'm playing around with setting up a DRF project using the postgresql sample database located here: Postresql Sample DB Problem: The sample database is
I'm just passing the same object 2 times in the same serializer but I want to pass key: "retweet": null in one object and in another object I want to pass some
I work with Mongoengine in Django, got task to sort by first_name, last_name fields ignoring case and leading whitespaces that is why add collation in queryset:
I have created filters that filter API responses, if the response contains at least one letter in the value as substring, I need to create a filter to filter re
Even if I've enough experience with Python & VScode, I often get this major misunderstanding. For example, I have two projects Project1_folder .env1
I followed YouTube Django E-commerce video, I did exactly the same as the tutorial. But I found some difficulty in certain code. CONTEXT_PROCESSORS.PY from .mod
I'm trying to list all facilties owned by a user on a "facility list page" using the django rest framework and react. I tried the following to make this happen
I am trying to build a web app which should get data from Django Rest Framework (using Serializer) and pass it to JavaScript and generate markers of GoogleMaps.