Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
DjnagoBecause its MIME type ('text/html') is not a supported stylesheet
Someone could help, trying for weeks to figure out how to find the normal path. But it doesn't work. Script: STATIC_URL = '/static/' STATIC_ROOT = os.path.join(BASE_DIR, "static") Image:It loads in the wrong way,PathError code -
how to get filter data between two dates in django
I am working on Django project How to get filter data between two dates I mean (from-date and to-date) mfdate is a foreign key and coming from another model. how can I do this can anyone help me to solve this problem I have tried multiple time but it is not working here is my Code models.py class ManufacturingYM(models.Model): ManufacturingYMID = models.AutoField(primary_key=True) ManufacturingDate = models.DateField(auto_now_add=False, blank= True,null=True) def __str__(self): return str(self.ManufacturingDate) class Car(models.Model): CarID = models.AutoField(primary_key=True) CarName = models.CharField(max_length=500, blank=True, null=True, verbose_name="Car Name") mfdate = models.ForeignKey(ManufacturingYM, blank= True,null=True, on_delete=models.DO_NOTHING, verbose_name="Manufacturing Date") def __str__(self): return self.CarName views.py def searchdd(request): carForm = Car.objects.all() fromdate = str(request.POST.get('from_date')) todate = str(request.POST.get('to_date')) if fromdate: carForm= Car.objects.filter(mfdate=fromdate) if todate: carForm= Car.objects.filter(mfdate=todate) context = {'carForm':carForm} return render(request, 'app/searchdd.html', context) home.html <form method="post" id="indexForm" action="/searchdd" data-cars-url="{% url 'ajax_load_cars' %}"> {% csrf_token %} <div class="col-md-12"> <div class="row"> <div class="col-md-3"> <label for="" class="white">From Year</label> <select name="from_date" id="fromdate" class="dp-list"> <option disabled selected="true" value="">--select Year--</option> {% for mfd in manfd %} <option value="{{car.CarID}}">{{mfd.ManufacturingDate|date:'Y'}}</option> {% endfor %} </select> </div> <div class="col-md-3"> <label for="" class="white">To Year</label> <select name="to_date" id="todate" class="dp-list"> <option disabled selected="true" value="">--select Year--</option> {% for mfd in manfd %} <option value="{{car.CarID}}">{{mfd.ManufacturingDate|date:'Y'}}</option> {% endfor %} </select> </div> </div> </div> -
How to link a file from static folder/subfolder in django
I have a file about.html file in static folder. I want to see that file content when I put URL in browser like 127.0.0.1/about here is my code: in project url I wrote: from django.contrib import admin from django.urls import path, include urlpatterns = [ path('about/' , include('app.urls')), ] in app url : from django.contrib import admin from django.urls import path from app import views urlpatterns = [ path("about", views.about, name='about') ] in views.py file: from django.http.response import HttpResponse from django.shortcuts import render def about(request): return render (request, "static /about.html") but this return me a error when i put url 127.0.0.1:8000/about Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/about/ Using the URLconf defined in project1.urls, Django tried these URL patterns, in this order: admin/ [name='index'] about [name='about'] contact [name='contact'] portfolio [name='portfolio'] about/ portfolio/ contact/ The current path, about/, didn’t match any of these. You’re seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page. help me plz -
How to prefetch related with three model django
THIS IS MY FIRST MODEL: class CSSIGroup(models.Model): GroupName = models.CharField(max_length=250) EnteredBy = models.CharField(max_length=250) UpdateBy = models.CharField(max_length=250,null=True) EntryDateTime = models.DateTimeField(auto_now_add=True) def __str__(self): return self.GroupName This IS MY SECOND MODEL: class CSSIList(models.Model): CSSIGroup = models.ForeignKey(CSSIGroup,null=False, on_delete=models.RESTRICT) CSSIName = models.CharField(max_length=250) FatherName = models.CharField(max_length=250,null=True) MotherName = models.CharField(max_length=250,null=True) BloodGroup = models.ForeignKey(Setup_Master.BloodGroupList, null=True, on_delete=models.SET_NULL) BirthDate = models.DateTimeField(null=True) ReligionStatus = models.ForeignKey(Setup_Master.ReligionList, null=True, on_delete=models.SET_NULL) Sex = models.ForeignKey(Setup_Master.GenderList, null=True, on_delete=models.SET_NULL) MeritStatus = models.ForeignKey(Setup_Master.MaritalStatus, null=True, on_delete=models.SET_NULL) THIS IS MY THIRD MODEL: class Challan(models.Model): Branch = models.ForeignKey(Setup_Master.CompanyBranchList, null=True, on_delete=models.RESTRICT) CustomerID = models.ForeignKey(CSGL.CSSIList, related_name='CustomerWiseChallan', null=False, on_delete=models.RESTRICT) RefNo = models.CharField(max_length=250,null=True) Remarks = models.CharField(max_length=250, null=True) OrderReceiveID = models.CharField(max_length=250, null=True) Narration = models.CharField(max_length=250, null=True) MPOID = models.ForeignKey(CSGL.CSSIList, related_name='ChallanMPO', null=True, on_delete=models.RESTRICT) ChallanDate = models.DateField(null=True) EnterdBy = models.CharField(max_length=250, null=True) EntryTime = models.DateTimeField(auto_now_add=True) EntryDate = models.DateTimeField(auto_now_add=True) ApprovedBy = models.CharField(max_length=250, null=True) Approved = models.CharField(max_length=10, null=True, default='NO') ApprovedDate = models.DateField(null=True) Status = models.CharField(max_length=250, null=True, default='NO') I want to select the first table with the second table-related row and the second table with the select third table-related row. Here is my current query but I don't know how can I add more one prefetch related. Please anybody help me. ChallanList = CSSIGroup.objects.raw("SELECT DISTINCT cssi_cssigroup.id FROM cssi_cssigroup INNER JOIN cssi_cssilist ON cssi_cssilist.CSSIGroup_id = cssi_cssigroup.id INNER JOIN business_challan on business_challan.CustomerID_id = cssi_cssilist.id WHERE … -
Django REST BasicAuthentication is not applied as default authentication class
I have a django REST project and I added REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': [ 'rest_framework.authentication.BasicAuthentication', ] } to setting.py and I expect BasicAuthentication is applied to all pages as default but still it does not require any authentication to display the content. that is weird. Do I have to do something I did not do? urls.py: urlpatterns = [ path('admin/', admin.site.urls), path('api/', include('blog_app.api.urls')), path('api-auth/', include('rest_framework.urls')) ] setting.py: INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'blog_app', ] blog_app/api/urls: urlpatterns = [ path('articles/', ArticleListView.as_view()), ] views.py: class ArticleListView(generics.ListCreateAPIView): queryset = Article.objects.all() serializer_class = ArticleSerializer -
I don't understand how the ".year:" works in "datetime.datetime.today().year" line of code
So I am trying to learn Django and came across the following piece of code: datetime.date.today().year I understand it so far as - from the DateTime module, create an instance of the date class using the today method. But I don't understand how the .year portion of the code grabs the year. Is it because the today() method of the date class returns a new object with a year? -
Python Django Error during template rendering
let me quickly explain what am I trying to do. So I am making a small Django based Conference Management, where there can be multiple conferences, a single conference can have multiple talks and each talk will have a certain number of Speakers and Participants. I am able to list the conferences and give the option to delete and edit a conference. Problem: I want an option where I click on a conference and it shows a list of talks for that conference. but when I click on the conference it shows the following error. NoReverseMatch at /Big Data/talks/ Reverse for 'conferenceedit' with arguments '('',)' not found. 1 pattern(s) tried: ['(?P<id>[^/]+)/edit$'] Request Method: GET Request URL: http://127.0.0.1:8000/Big%20Data/talks/ Django Version: 3.2.4 Exception Type: NoReverseMatch Exception Value: Reverse for 'conferenceedit' with arguments '('',)' not found. 1 pattern(s) tried: ['(?P<id>[^/]+)/edit$'] Exception Location: E:\python\PYTHON and GIT\lib\site-packages\django\urls\resolvers.py, line 694, in _reverse_with_prefix Python Executable: E:\python\PYTHON and GIT\python.exe Python Version: 3.9.1 Python Path: ['D:\\DjangoConferenceManagementSystem\\mysite', 'E:\\python\\PYTHON and GIT\\python39.zip', 'E:\\python\\PYTHON and GIT\\DLLs', 'E:\\python\\PYTHON and GIT\\lib', 'E:\\python\\PYTHON and GIT', 'C:\\Users\\AKS\\AppData\\Roaming\\Python\\Python39\\site-packages', 'E:\\python\\PYTHON and GIT\\lib\\site-packages', 'E:\\python\\PYTHON and GIT\\lib\\site-packages\\pip-21.0.1-py3.9.egg', 'E:\\python\\PYTHON and GIT\\lib\\site-packages\\win32', 'E:\\python\\PYTHON and GIT\\lib\\site-packages\\win32\\lib', 'E:\\python\\PYTHON and GIT\\lib\\site-packages\\Pythonwin'] Server time: Sun, 03 Oct 2021 15:47:10 +0000 I have included the following code to … -
Django Error migrating db from SQLite to Postgres
I am new to Django. I developed a site locally with SQLite and I am getting an error while attempting to migrate to Postgres for production. The error is File "/Users/______/Desktop/______/accounts/models.py", line 46, in user_addgroup_handler name=(instance.business_location_county.name + ' ' + instance.business_location_state.name), forum_id=instance.business_location_county.id) AttributeError: Problem installing fixture '/Users/_____/Desktop/_______/data1.json': 'NoneType' object has no attribute 'name' The relevant model is: if created: new_group, created = Group.objects.get_or_create( name=(instance.business_location_county.name + ' ' + instance.business_location_state.name), forum_id=instance.business_location_county.id) To create the dump file I ran: python manage.py dumpdata --natural-foreign --naturalprimary -e contentypes -e auth.Permission --indent 2 > data1.json Any ideas about what is causing this error and how to fix it? -
How to edit the default template for DateRangeField
I am using django.contrib.postgres.field.DateRangeField as described here. class MyModel(models.Model): date_range = DateRangeField() I am rendering this in a template: {% with field = form.date_range %} {{ field.label }} {{ field }} {% endwith %} However, this outputs 2 inputs together with no context. E.g.: How can I edit the default template for the widget, to add "sub" labels for "start time" and "end time". E.g: There does not appear to be anything I can find in the docs. -
Aggregate Sum in Django. Sum of objects with the same name
I have the following QuerySet, this is a shopping list: <QuerySet [ <Cart_object: {name: 'Apple', amount: 10}, {name: 'Bananas', amount: 20}, <Cart_object: {name: 'Bananas', amount: 10}> ] > I apply the following code to it, and I get the sum of all products for each of the objects: for obj in cart: from_cart = UserProduct.objects.filter(obj=obj).aggregate(Sum('amount')) print(from_cart) Out: {'amount__sum': 30} {'amount__sum': 10} The question is as follows. How to use aggregate (Sum ('amount')) to add only those objects that have the same 'name'. To get one Cart_object, in which 'Apple' = 10, and 'Bananas' = 30 (Since there are records with the same name) <Cart_object: {name: 'Apple', amount: 10}, {name: 'Bananas', amount: 30}> -
Django session in different host
can someone help me explain about session ? I'm currently making a project involved in Django and Spotify api. In the first version, I made it with django and react in same localhost, when user login, react send request to django endpoint called get-url then redirect to spotify api which then provide a response to another django endpoint called redirect The second version, I also made it with django and react but with different host (localhost:3000 and 127.xxx something), the spotify auth also work the same as above. But in the first version the session_key are always the same, in the second version the session_key in get-url and redirect endponts are different. I read about session, but there's spotify api in middle, not sure what it'll do to the session_key, I hope someone can explain why it session_keys are different in 2 cases, thanks a lot same host pic different host pic -
Manual Post Save Signal creation makes the application slow, Django
We have a Django application that uses Django-river for workflow management. For performance improvement, we had to use the bulk_create for performance improvement. We need to insert data into a couple of tables and several rows in each. Initially, we were using the normal .save() method and the workflow was working as expected (as the post save signals were creating properly). But once we moved to the bulk_create, the performance was improved from minutes to seconds. But the Django_river stopped working ad there was no default post save signals. We had to implement the signals based on the documentation available. class CustomManager(models.Manager): def bulk_create(items,....): super().bulk_create(...) for i in items: [......] # code to send signal And class Task(models.Model): objects = CustomManager() .... This made the workflow working again, but the generation of signals is taking time and this destroys all the performance improvement gained with the bulk_create. So is there a way to improve the signal creation? -
The view ... didn't return an HttpResponse object. It returned None instead - django
I tried several ways to solve the problem but I couldn't .. every time I got it error. Item added to DB but error message returned on page. why "get_absolute_url" and "success_url" do not work? View class AddItemView(CreateView): model = Add_Item form_class = AddItemForm template_name ='add_item.html' success_url = reverse_lazy("home") def form_valid(self, form): self.object = form.save(commit=False) # Add_Item.User = User self.object.user = self.request.user self.object.save() Models class Add_Item(models.Model): user = models.ForeignKey(User,on_delete=models.CASCADE, default=None, null=True) title = models.CharField(max_length=255) categories = models.CharField(max_length=255 , choices=all_categories) description = RichTextField(blank=True,null=True) condition = models.CharField(max_length=100, choices=cond) city = models.CharField(max_length=50, choices=cy.city, blank=True) street = models.CharField(max_length=100, blank=True) home_number = models.CharField(max_length=100, blank=True) header_img = models.ImageField(null=True, blank=True, upload_to='img/') more_img = models.ImageField(null=True, blank=True, upload_to='img/') Pub_date = models.DateField(auto_now_add=True) def __str__(self): return str(self.title) def get_absolute_url(self): return reverse('home') -
How about to start making a online classroom website in python?
One of My friend lost his tuition job due to Covid. I want to help and make him a online classroom where he can teach atleast 50-60 students online. But I am from sysadmin background. I have limited exeperience with python as I use it for generating configuration files and automate regular task. I have made a personal blog in django and used some flask. Beyond that I have not worked extensively on development that why i want to as this noob question as from where I can start. I Know i have to spent some 3-4 month to learn just technologies. I am ready for it. If anyone worked on such system please point me to suitable framework, libraries suitably in python and front end technology like JS and system design complexity in this. Any response is greatly appreciated. Thanks -
Django serialise nested object into json
I have two models: modesl.py class ForumSection(models.Model): title = models.CharField(max_length=20) description = models.CharField(max_length=300) order = models.IntegerField(default=0) def __str__(self): return self.title class ForumSubSection(models.Model): section = models.ForeignKey(ForumSection, on_delete=models.CASCADE) title = models.CharField(max_length=20) description = models.CharField(max_length=300) order = models.IntegerField(default=0) def __str__(self): return self.title I try to serialize subsections to json and return to frontend: def ajax_create_forum_subsection(request): ....... sections = ForumSubSection.objects.all().order_by('pk') data = serialize("json", sections, fields=('pk', 'title', 'description', 'order', 'section')) return JsonResponse(data, safe=False) But ``section``` return primary key (ID of record). I'm readed 100500 questions on SA, some peoples say to write custom serializers. ok, I'm write it. serializers.py from rest_framework import serializers from .models import * class ForumSectionSerializer(serializers.ModelSerializer): class Meta: model = ForumSection fields = '__all__' def create(validated_data): return ForumSection.objects.create(**validated_data) class ForumSubSectionSerializer(serializers.ModelSerializer): section = ForumSectionSerializer(read_only=True) class Meta: model = ForumSubSection fields = ['pk', 'title', 'description', 'order', 'section'] depth = 1 def create(validated_data): return ForumSubSection.objects.create(**validated_data) And try to use it. def ajax_edit_forum_subsection(request): ....... qs = ForumSubSection.objects.all().order_by('pk') ser = ForumSubSectionSerializer(qs) data = ser.serialize("json", qs, fields=('pk', 'title', 'description', 'order', 'section')) return JsonResponse(data, safe=False) It call Server error 500 and not work. Now is 5'th day of this problem and I write here to ask help. How to serialize ForumSubSection objects with ForumSection objects? -
Is there way to edit file's header or something to store encryption key for software project
the project is responsible of encrypting and decrypting books, which will give the facility solution for copyright infringement by uploading the books to secure platforms ,Each copy of the book has its unique encryption key stored in book's file for if the book is leaked in future , we find who was responsible for that . -
TypeError: 'class Meta' got invalid attribute(s): constraints. how can i solve this problem
when i run python .\manage.py makemigrations i get this error TypeError: 'class Meta' got invalid attribute(s): constraints but i think in my Class Meta: all good but for some reason i get this problem. However, when i run in the terminal my server is run but in the server not run enter image description here this is my view.py (api.py) file api.py # Django from django.contrib.auth import authenticate, login from django.shortcuts import render, redirect from django.contrib.auth.forms import AuthenticationForm # Rest-Framework from rest_framework import status from rest_framework.authtoken.models import Token from rest_framework.generics import RetrieveAPIView, ListCreateAPIView from rest_framework.views import APIView, Response # Project from .models import User from .serializers import RegisterViewSerializer, SignInOutSerializer, SignInSerializer, UserListSerializer, \ UserUpdateSerializer, CodeSerializer from .utils import send_sms class RegisterView(APIView): def post(self, request): schema = RegisterViewSerializer(data=request.data) schema.is_valid(raise_exception=True) email = str(schema.validated_data['email']).lower() password = schema.validated_data['password'] first_name = schema.validated_data['first_name'] last_name = schema.validated_data['last_name'] phone_number = schema.validated_data['phone_number'] birth_date = schema.validated_data['birth_date'] verify_code = schema.validated_data['verify_code'] is_verify = schema.validated_data['is_verify'] check_user = User.objects.filter(username__iexact=email) if check_user.exists(): return Response({'error': 'user exists'}, status=status.HTTP_400_BAD_REQUEST) user = User.objects.create_user(username=first_name, email=email, password=password) user.first_name = first_name user.last_name = last_name user.phone_number = phone_number user.birth_date = birth_date user.verify_code = verify_code user.is_verify = is_verify user.save() token, _ = Token.objects.get_ot_create(user=user) return Response({'token': token.key})` class SignInView(APIView): def post(self, request): schema = SignInSerializer(data=request.data) … -
Django - Calculating age until a date in DB
I'm new to Django. Please help me with this issue. This is the model that I want to write query on. class ReservationFrame(models.Model): id = models.AutoField(primary_key=True) start_at = models.DateTimeField(db_index=True) information = models.JSONField(default=dict) created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) The json field (ReservationFrame.information) has this format { upper_age_limit: 22, lower_age_limit: 30 } I want to calculate the age of login user until ReservationFrame.start_at, and return the corresponding ReservationFrame if upper_age_limit <= user.age <= lower_age_limit The formula that I'm using to calculate age is start_at.year - born.year - ((start_at.month, start_at.day) < (born.month, born.day)) I'm using annotate but getting errors. person_birthday = request.user.person.birthday frames_without_age_limit = reservation_frames.exclude(Q(information__has_key = 'upper_age_limit')&Q(information__has_key = 'lower_age_limit')) reservation_frames = reservation_frames.annotate( age=ExtractYear('start_at') - person_birthday.year - Case(When((ExtractMonth('start_at'), ExtractDay('start_at')) < (person_birthday.month, person_birthday.day), then=1), default=0)) reservation_frames = reservation_frames.filter( Q(information__lower_age_limit__lte = F('age'))| Q(information__lower_age_limit=None) ) reservation_frames = reservation_frames.filter( Q(information__upper_age_limit__gte = F('age'))| Q(information__upper_age_limit=None) ) TypeError: '<' not supported between instances of 'ExtractMonth' and 'int' -
How can i add numbers in django admin panal user usernames
this is just to make stack overflow happy not my question I'm developing a system based on Django admin. So all models could be edited also only from admin site. Model has a char field 'user'. I want to set current logged in admin username (or firstname, or lastname) as default value to 'user' field. How could I implement this? Default values are set as parameters when defining model fields, so I guess no request object could be recieved? Maybe I should set the value when creating instance of model (inside init method), but how I could achieve this? -
Trying to relate tables in Django
trying to POST request and create new location. now the filed country_id cues many troubles. those are the classes class Country(models.Model): id = UUIDField(primary_key=True, default=uuid.uuid4, editable=False) country_name = CharField(max_length=255) federal_rate = FloatField() social_security = FloatField() comment = CharField(max_length=255) class Location(models.Model): participant_id = ForeignKey('Participant', on_delete=CASCADE, related_name="locations") country_id = ForeignKey('Country', on_delete=CASCADE, related_name="country") start_date = DateField() end_date = DateField() region = CharField(max_length=255) tax_policy = CharField(max_length=255, null=True) Serializer class CountrySerializer(serializers.ModelSerializer): class Meta: model = Country fields = "__all__" class LoactionSerializer(serializers.ModelSerializer): country_id = CountrySerializer(many=False) class Meta: model = Location fields = "__all__" now the only why that I mange to join the tables are adding the country_id line in the seirializer, and whem im trying to create new location, an error occur this is the way I'm trying to add new location { "start_date": "2021-10-10", "end_date": "2021-11-18", "region": "markian-land", "tax_policy": "N/A", "participant_id": "c5c1a00c-4263-418a-9f3a-3ce40a1ea334", "country_id": "9067e71f-c6b9-4ecc-ad6b-461843063aee" } the Error - {"country_id": {"non_field_errors": ["Invalid data. Expected a dictionary, but got str."]}} when i mange to send as dict, but i have another error that asking for all Country fields, so i get the specific country from data base, and when im sending it i got json error -
redirect to next url in dajngo
hi i want redirect user to next url but its not working and redirect to home url when user want go to detail page , if the user is not logged in , the user redirect to login page and next_url = '/post/1/' but when the user is logged in , next_url = None and redirect to home page What is the problem? def user_login(request): next_url = request.GET.get('next') if request.method == 'POST': form = UserLoginForm(request.POST) if form.is_valid(): cd = form.cleaned_data user = authenticate(request, username=cd['username'], password=cd['password']) if user is not None: login(request, user) messages.success(request, 'you logged in successfully', 'success') if next_url: return redirect(next_url) return redirect('home:index') else: messages.error(request, 'wrong username or password', 'warning') else: form = UserLoginForm() return render(request, 'account/login.html', {'form':form}) -
How to display a user friendly error message from a UniqueConstraint?
I have a model with a unique field: class MyModel(models.Model): start_date = models.DateField( verbose_name='Start date', blank=False, null=False, unique=True, error_messages={'unique':"This start date has already been registered."} ) However, when I save an instance of this model that violates this UniqueConstraint I get an IntegrityError rather than the form error message. duplicate key value violates unique constraint "myapp_mymodel_start_date_af14e233_uniq" DETAIL: Key (end_date)=(2021-10-21) already exists. How do I output a "clean" user-friendly error message? -
Pycharm is no more identifying my existing django project and opening as django project
I did git pull to take new changes from remote to my local django project. After doing that when I click on manage.py to open my django project. It is not opening it as django project as it used to do before. It can be seen from the black marked area as it is not showing my apps and when i try to edit other files in my apps it gives me dialog box saying this. It is so annoying can anyone tell me hwo to fix my pycharm??? -
Django/React - Azure App Service can't find static files
I've deployed my Django React app previously through a dedicated server and now I am trying to achieve the same with Azure Web App function so I can use CI/CD easier. I've configured my project as below but only my django appears to deploy as I get a '404 main.js and index.css not found'. This makes me think there is an issue with my static file configuration but I'm unsure. .yml file: name: Build and deploy Python app to Azure Web App - test123 on: push: branches: - main workflow_dispatch: jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: npm install, build, and test run: | npm install npm run build --if-present working-directory: ./frontend - name: Set up Python version uses: actions/setup-python@v1 with: python-version: '3.8' - name: Create and start virtual environment run: | python -m venv venv source venv/bin/activate - name: Install dependencies run: | pip install -r requirements.txt python manage.py collectstatic --noinput - name: Zip artifact for deployment run: zip pythonrelease.zip ./* -r - name: Upload artifact for deployment job uses: actions/upload-artifact@v2 with: name: python-app path: pythonrelease.zip # Optional: Add step to run tests here (PyTest, Django test suites, etc.) deploy: runs-on: ubuntu-latest needs: build environment: name: … -
How to execute Google social authentication using dj-rest-auth in React JS
I am following this 2-part tutorial of using dj-rest-auth in django part 1 - part 2 by: Mohamad Fadhil and I have no problem with the backend in Django but I was wondering if anyone could show me how to implement this on react instead of Nuxt?