Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
overriding update() method in ModelViewSet vs. overiding update() method in serializer
I am looking at code examples and I see both an update() method for serializers and for ViewSets. What is the difference between the two ? When should I override the update() method in the ViewSet and when should I override it in the Serializer ? -
MY class based detail view is not returning the template properly
In my article_details.html page I have written {{post.title}} but my the page is not showing the specific title. My app name is post and the model name is BlogPost. this is my views.py: from django.shortcuts import render from .models import * from .forms import * from django.views.generic import ListView,CreateView from django.views.generic.detail import DetailView def home(request): return render(request,'post/home.html') class HomeView(ListView): model = BlogPost template_name = "post/home2.html" class ArticleDetailView(DetailView): model = BlogPost template_name = "post/article_details.html" class AddPostView(CreateView): model = BlogPost template_name = "post/add_post.html" fields = '__all__' this is my urls.py from post import views from django.urls import path from .views import HomeView,ArticleDetailView,AddPostView app_name = 'post' urlpatterns = [ path('',views.home,name="home"), path('home2/',HomeView.as_view(),name = "home2"), path('article/<int:pk>',ArticleDetailView.as_view(),name = "article-details"), path('add_post/',AddPostView.as_view(),name="add_post"), ] this is my list page: post/home2.html <ul> {%for post in object_list %} <li><a href="{%url 'post:article-details' post.pk %}">{{post.title}}</a>-{{post.author}}<br/> {{post.body}}</li> {%endfor%} </ul> and this is my detail page:article_details.html: <h1>{{post.title}}</h1> <small>by:{{post.author}}</small><br/> <hr> <br/> <p>{{post.body}}</p> enter code here -
I cannot not redirect to login page and cannot save the users after verifying OTP
i have created a django project in which when a user creates an account it will aend an OTP to the users email and if the OTP is verified it should save the user redirects to the login page. it is sending the mail but when the user verifies the OTP its not saving the user and not redirecting users to the login page. views.py from django.shortcuts import render, redirect from django.core.mail import send_mail from django.contrib.auth.forms import UserCreationForm from random import randint from django.http import HttpResponse from .user_forms import * from sm.views import index from django.views import View from django.contrib.auth.decorators import login_required def signin(request): global OTP OTP = '' form = UserForm() if request.method == 'POST': OTP = randint(1111, 999999) OTP = OTP form = UserForm(request.POST) if form.is_valid(): email = form.cleaned_data.get('email') send_mail( 'Quarantine Community', f"""Thanks for using 'Quarantine community'.We are still developing our server. OTP for your new account is {OTP}. If you have any feedback,you can give us any time.""", 'QuarantineCommunityWeb@gmail.com', [email], fail_silently=False ) return redirect('otp') elif request.method == 'GET': otp = request.GET.get('otp') if otp == OTP: form.save() send_mail( 'Quarantine Community', """Thanks for using 'Quarantine community'.We are still devoloping our server. If you have any feedback,you can gine us.""", … -
How to set Boolean = True unique per model with Fk
How can I save Place model with only one unique True? so if I user have 10 program and only 1 can be is active=True? so if I update some to True , that Program which has True became False this User. I need def save? My models: class Program(models.Model): user = models.ForeignKey('User', models.CASCADE, related_name="program") title = models.CharField(max_length=255) is_active = models.BooleanField(default=False) -
Ruby on rails to django migrate with same user credentials
I have ruby on rails applications, which is using Devise gem for authentication on top of same DB i wanted to use Django with same user name and password. Just vice-versa of this -
tinymce not showing in django form
How can I make it so this HTMLField text = HTMLField('body',max_length=4000) will also appear in the form because right now it shows it only in the admin page and not in the website. -
REST API: Complete beginner at coding tries to code a REST API on Python [closed]
Utter beginner in the realm of coding here. I've been asked by a potential employer to give a go at building a REST API. I won't reveal the task itself as it would defeat the purpose of me actually learning from this project and doing it my own way. This can be in whatever language, framework and library I like. I have chosen to do it in Python with the Django Framework as it seems to work best for beginners from research. I'll probably also do it on Nano, to improve my ability with Terminal. I'm more so looking for pointers: Where to start? What to research? A decent basis to get me going in the right direction. I've never built an API before and am just looking for some guidance to get me going. I'm currently using a 2014 Macbook Pro. Thank you for taking the time to read this post. Any help is massively appreciated -
Accessing an element in django (for)
I have a Django template with the following code which creates multiple buttons and tries to hide/show description text on a click (on the same button in each card): {% for comida in comidas %} {% if comida.slug_food == page.slug %} <div class="food2"> <div id="food-title">{{comida.titulo}}</div> <div id="food-price">{{comida.precio|floatformat:"-1"}}€</div> <button class="button" onclick="showDescription()">ver+ <div id="food-description" > {{comida.descripcion|safe}} </div> </button> <div id="add-cart">AÑADIR AL PEDIDO</div> {% if comida.imagen != null %} <img src="{{comida.imagen.url}}"></img> {% endif %} </div> {% endif %} {% endfor %} where comidas is a list of strings, and later in the script block I have function showDescription(){ var showText = document.getElementById("food-description"); if (showText.style.display === "block"){ showText.style.display = "none"; } else { showText.style.display = "block"; } } The function runs, but as you may expect, it runs only on the first element of my for loop. My question is ¿anyone can help me? i want work all my buttons and not only the first element. -
How to access specific object from the database in Django to display it in the webpage?
I am trying to display the title and description from an SQLite database in Django? I have all the data from my database and from views file I have returned it as context. Here's the model.py file: from django.db import models from django.utils import timezone from django.contrib.auth.models import User from django.urls import reverse # Create your models here. class Post(models.Model): title = models.CharField(max_length=100) content = models.TextField() Here's my views.py file: def home(request): posts = Post.objects.all() search_query = request.GET.get('q') if search_query: posts = posts.filter( Q(title__icontains = search_query) | Q(content__icontains = search_query) ) context={ 'posts': posts } return render(request,'blog/home.html', context) And here the HTML code:- {% for post in posts %} <div class="slide-description"> <label class="slide-0"> <h1 class="text-slide">{{Here i want to print the title 1}}</h1> <h5>{{Here I want to print the content 1}}</h5> <a href="/" class="readmorebutton">Read More</a> </label> <label class="slide-1"> <h1 class="text-slide">{{Here i want to print the title 2}}</h1> <h5>{{Here I want to print the content 2}}</h5> <a href="/" class="readmorebutton">Read More</a> </label> <label class="slide-2"> <h1 class="text-slide">{{Here i want to print the title 3}}</h1> <h5>{{Here I want to print the content 3}}</h5> <a href="/" class="readmorebutton">Read More</a> </label> <label class="slide-3"> <h1 class="text-slide">{{Here i want to print the title 4}}</h1> <h5>{{Here I want to print the … -
How to solve an error on django admin interface
enter image description hereHi i am using Django admin to work on some task. i have created a model and added project name. so whenever i am creating a project say 'project5' and adding details and if again i am creating another project with same name and same details it is being created. What i want is i do not want the project name created to be with same details. it should give error. Please let me know how to fix this. Here below i have created a model with a class name and some fields. i have sorted it with unique=True Also i have created different users who can further create project name. if user1 has created project1, I also want user2 to create project1. i mean same user cannot create project with same name but different users can create project with same name.Please let me know how to fix this enter image description here. -
pipenv problem getting MarkupSafe to automatically install as a dependency
I'm using @arocks DjangoPatternsBook and code. I have the book and would like to follow along with the code, but I think I found a bug because it's failing for me right at the starting line on two different computers using different python environments, so I don't think it's my environment that's causing the problem. From the book section Starting the project: First, clone the example project from GitHub: $ git clone https://github.com/DjangoPatternsBook/superbook2.git Next, install pipenv system-wide [this is what I did, using brew on MacOS and using dnf on Fedora 32] or locally, but outside a virtualenv as recommended in pipenv installation documents. Alternatively, follow these commands [I did not do this]: $ pip install -U pip $ pip install pipenv Now go to the project directory and install the dependencies: $ cd superbook2 $ pipenv install --dev This is where it fails for me with the message: [pipenv.exceptions.InstallError]: ['Looking in indexes: https://pypi.python.org/simple', 'Collecting markupsafe==1.0', ' Using cached MarkupSafe-1.0.tar.gz (14 kB)'] [pipenv.exceptions.InstallError]: ['ERROR: Command errored out with exit status 1:', ' command: /home/alpha/.local/share/virtualenvs/superbook2-HNnQDu9M/bin/python3 -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/tmp/pip-install-5kl59pd3/markupsafe/setup.py\'"\'"\'; __file__=\'"\'"\'/tmp/pip-install-5kl59pd3/markupsafe/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' egg_info --egg-base /tmp/pip-pip-egg-info-bk6ldht4', ' cwd: /tmp/pip-install-5kl59pd3/markupsafe/', ' Complete output (5 lines):', ' … -
how to write django rest framework update / partial_update for list of objects: drop 1 object and add another on
I have a list of objects in my json object using django-rest-framework. for my ModelViewSet how would I override an update() or partial_update() method to drop the first object: { "a": "a", "a": "a", "a": "a", "a": "a", } and add a new object to the very bottom: { "d": "d", "d": "d", "d": "d", "d": "d", } [{ "a": "a", "a": "a", "a": "a", "a": "a", }, { "b": "b", "b": "b", "b": "b", "b": "b", }, { "c": "c", "c": "c", "c": "c", "c": "c", }] the resulting object would look like this: [ { "b": "b", "b": "b", "b": "b", "b": "b", }, { "c": "c", "c": "c", "c": "c", "c": "c", }, { "d": "d", "d": "d", "d": "d", "d": "d", }] -
upstream prematurely closed connection while reading response header from upstream based on 502 Bad Gateway error
in Django app, I tried to get some images from static and media files it runs correctly locally but in production, it takes about 30 and then error 502 Bad Gateway I tried so much for days and I don't know what is the problem my nginx config : server { listen 80; server_name 23.96.58.116 www.cancerdetection.info; location = /favicon.ico { access_log off; log_not_found off; } location /static/ { root /home/shaker/mysite/deepmodel; } location /media/ { root /home/shaker/mysite; } location / { include proxy_params; proxy_pass http://unix:/run/gunicorn.sock; } and the error file : 2020/08/21 10:45:41 [error] 26835#26835: *4 upstream prematurely closed connection while reading response header from upstream, client: 197.60.99.165, server: 23.96.58.116, request: "GET /deepmodel/Examine/1 HTTP/1.1", upstream: "http://unix:/run/gunicorn.sock:/deepmodel/Examine/1", host: "23.96.58.116", referrer: "http://23.96.58.116/basicapp/patient_list/" 2020/08/21 10:56:01 [error] 27231#27231: *2 upstream prematurely closed connection while reading response header from upstream, client: 197.60.99.165, server: 23.96.58.116, request: "GET /deepmodel/Examine/1 HTTP/1.1", upstream: "http://unix:/run/gunicorn.sock:/deepmodel/Examine/1", -
Django No URL to redirect to. Either provide a url or define a get_absolute_url method on the Model
Hi I am trying to create a blog using the Django webframework. I get the error, No URL to redirect to. Either provide a url or define a get_absolute_url method on the Model. The urls.py is given below, from django.urls import path from .views import ( BlogListView, BlogDetailView, BlogCreateView, BlogUpdateView, ) urlpatterns = [ path('post/<int:pk>/edit', BlogUpdateView.as_view(), name='post_edit'), path('post/new/', BlogCreateView.as_view(), name='post_new'), path('post/<int:pk>/', BlogDetailView.as_view(), name='post_detail'), path('', BlogListView.as_view(), name='home'), ] The models.py is given below, from django.db import models from django.urls import reverse # Create your models here. MAX_LENGTH = 500 class Post(models.Model): title = models.CharField(max_length=MAX_LENGTH) author = models.ForeignKey('auth.User', on_delete=models.CASCADE,) body = models.TextField() def __str__(self): return self.title def get_absolute_url(self): return reverse('post_detail', args=[str(self.id)]) Where am I going wrong? -
pytest: Test database constraints
I wrote the following test for my Django application. The IntegrationDaily model has a constraint of max. 100 capacity. Therefore the entry will fail "on purpose". However, pytest.raises(Exception) seems to be the wrong approach to validate that. I also tried to import TransactionManagementError instead but that didn't solve it either. import pytest from tests.factories.spaces import IntegrationDailyFactory from myapp.spaces.models import IntegrationDaily def describe_element_capacity_validation(): def with_is_failling(): with pytest.raises(Exception) as exc: daily_element = IntegrationDailyFactory(capacity=300) assert IntegrationDaily.objects.count() == 0 -
i am trying to save data in database and it is throwing error like- Attribute error: 'tuple' object has no attribute 'get'
Internal Server Error: /newPage/ Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\site-packages\django\core\handlers\exception.py", line 34, in inner response = get_response(request) File "C:\ProgramData\Anaconda3\lib\site-packages\django\utils\deprecation.py", line 96, in call response = self.process_response(request, response) File "C:\ProgramData\Anaconda3\lib\site-packages\django\middleware\clickjacking.py", line 26, in process_response if response.get('X-Frame-Options') is not None: AttributeError: 'tuple' object has no attribute 'get' [21/Aug/2020 12:19:10] "POST /newPage/ HTTP/1.1" 500 58604 [21/Aug/2020 12:19:13] "GET / HTTP/1.1" 200 10523 My view.py code is as below. @csrf_exempt def newPage(request): # pdb.set_trace() data = json.loads(request.body.decode('utf-8')) try: f_name = data['f_name'] print(f_name) l_name = data['l_name'] print(l_name) email_id = data['email_id'] print(email_id) mobile_no = data['mobile_no'] print(mobile_no) address_line = data['address_line'] print(address_line) city = data['city'] print(city) region = data['region'] print(region) pin_code = data['pin_code'] print(pin_code) course_name = data['course_name'] print(course_name) location = data['location'] print(location) # date = data['date'] # print(date ) save_user_details = models.user_details.objects.create_user_details(f_name,l_name,email_id,mobile_no,address_line,city,region,pin_code,course_name,location) save_user_details.save() return 'saved',save_user_details except Exception as e: return e,None -
IntegrityError at /entry/21/add_comment NOT NULL constraint failed: auctions_comment.text
I am trying to create an e commerce website where there is a problem occurring in the comment section where we need to add Comments I created a model which calls Listing to get the listing id so that each listing have their own comment section models.py class Comment(models.Model): listing_id=models.ForeignKey(Listing,on_delete=models.CASCADE) uname=models.CharField(max_length=64,default="None") text=models.TextField() datetime=models.DateTimeField(auto_now_add=True) def __str__(self): return f"{self.uname} {self.cmt} {self.datetime}" views.py def add_comment(request,id): if request.user.username: list=Listing.objects.get(id=id) newItem = Comment() newItem.listing_id = list newItem.uname = request.user newItem.text=request.POST.get('comment') newItem.save() return redirect('add_comment',id=id) else: return redirect('index') urls.py path("entry/<int:id>/add_comment",views.add_comment,name="add_comment") -
Static files not loading Classes properly in Django
I am having problems with Django to properly load the css classes style into the template. The problem is with certain semantic tags and I can't understand what is the problem. My Html and CSS code : .main { width: 100%; height: 100%; display: inline-flex; height: auto; } .main .left-main { width: 450px; height: auto; margin: 40px; display: block; } .main .left-main .post-container { width: 100%; height: auto; background: white; display: inline-flex; border: 0.5px solid #377976; margin-bottom: 50px; } .main .left-main .post-container .post-left { width: 85px; display: block; } .main .left-main .post-container .post-left .post-left-top { margin-top: 7px; margin-left: 7px; background: #C0C0C0; width: 80px; height: 65px; border-radius: 50%; border: 1px solid black; box-shadow: gray 0 0 10px; } .post-upper { margin-left: 23px; height: 25px; display: inline-flex; width: 275px; padding-top: 12px; border-bottom: 1px solid #C0C0C0; position: relative; } .post-upper .post-author { margin-left: 9px; } .post-upper .post-date_posted { position: absolute; right: 0; } .post-upper .post-author h1 { font-family: Courier New; text-decoration: none; color: black; } .post-upper .post-date_posted h1 { color: #666; font-family: monospace; font-weight: 400; font-size: 16px; } .post-bottom { color: black; display: block; } .post-bottom .post-title { min-height: 30px; height: auto; text-align: left; margin: 15px 10px 0 35px; } .post-bottom .post-title h1 … -
Django 3 - Select a valid choice. That choice is not one of the available choices
I'm trying to build a project management application. However, when I try to submit form in add_project.html, Django throws a "Select a valid choice. That choice is not one of the available choices." error. I have a Postgresql database. Can you give me a hint what might be wrong? models.py from django.db import models from datetime import datetime from clients.models import Client from engineers.models import Engineer from agents.models import Agent from systems.models import System from rals.models import Ral class Project(models.Model): Status_calculation = ( ('Undistributed', 'Undistributed'), ('No info', 'No info'), ('In progress', 'In progress'), ('Calculated', 'Calculated'), ) Status_project = ( ('Contracted', 'Contracted'), ('Lost', 'Lost'), ('Pending', 'Pending'), ) Attribute = ( ('A', 'A'), ('B', 'B'), ('C', 'C'), ) client = models.ForeignKey(Client, on_delete=models.DO_NOTHING) entry_date = models.DateField(blank=True) exit_date = models.DateField(blank=True) project = models.CharField(max_length=200) parent_id = models.IntegerField(null=True, blank=True) attribute = models.CharField( max_length=200, null=True, blank=True, choices=Attribute) engineer = models.ForeignKey(Engineer, on_delete=models.DO_NOTHING) agent = models.ForeignKey(Agent, on_delete=models.DO_NOTHING) system = models.ForeignKey(System, on_delete=models.DO_NOTHING) ral = models.ForeignKey(Ral, on_delete=models.DO_NOTHING) surface = models.IntegerField() profile_price = models.IntegerField() acc_price = models.IntegerField() total_price = models.IntegerField() proforma = models.CharField(max_length=200) file_number = models.CharField(max_length=200) status_calculation = models.CharField( max_length=200, null=True, choices=Status_calculation) status_project = models.CharField( max_length=200, null=True, choices=Status_project) obs = models.TextField(blank=True) working_time = models.IntegerField() class Meta: verbose_name_plural = 'Projects' def __str__(self): return … -
Why urls order is important in django for different named urls?
I have two urls in my urls.py file url('to_quotation/$', views.to_quotation, name='to_quotation'), url('turn_into_quotation/$', views.turn_into_quotation, name='turn_into_quotation'), and i have two view for them in views.py. When i make an ajax call to 'turn_into_quotation' url, 'to_quotation' view works. But if i changed my urls.py as: url('turn_into_quotation/$', views.turn_into_quotation, name='turn_into_quotation'), url('to_quotation/$', views.to_quotation, name='to_quotation'), it works properly. What is the reason for that? -
django unique together just if
I want to use unique together just if the post_type is index 1. For every section to be possible to choose article type index 1 only one time but possible to chose index 0 with no limitation. ''' class Post(models.Model): Article_type = (('news', 'Het laatste nieuws'), ('introduction', 'Een introductie')) post_id = models.AutoField(primary_key=True) post_title = models.CharField(max_length=50, null=False) post_header = models.TextField(max_length=250, null=True, blank=True) post_body = RichTextUploadingField(null=True) post_expire_date = models.DateTimeField(null=True, blank=True) post_available_date = models.DateTimeField(default=timezone.now, null=False) post_image = models.ImageField(upload_to='post-uploads/', null=True, blank=True) post_section = models.ForeignKey(Section, on_delete=models.CASCADE, default=1) post_type = models.CharField(max_length=30, choices=Article_type, default="news") post_author = models.ForeignKey( user, on_delete=models.CASCADE, limit_choices_to={'is_staff': True}, null=True, default=user, ) slug = models.SlugField(unique=True) ''' -
Django ModelForm has no model class specified, Although model in Meta class is set to a model
Error is "ModelForm has no model class specified." forms.py code from django.contrib.auth.models import User from basic_app.models import UserProfileInfo class UserForm(forms.ModelForm): password = forms.CharField(widget=forms.PasswordInput()) class Meta(): models = User fields = ('username', 'email', 'password') class UserProfileInfoForm(forms.ModelForm): class Meta(): model = UserProfileInfo fields = ('portfolio_site', 'profile_pic') models.py code from django.db import models from django.contrib.auth.models import User # Create your models here. class UserProfileInfo(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) #additional portfolio_site = models.URLField(blank=True) profile_pic = models.ImageField(upload_to='profile_pics', blank=True) def __str__(self): return self.user.username views.py code from django.shortcuts import render from basic_app.forms import UserProfileInfoForm, UserForm # Create your views here. def index(request): return render(request, 'basic_app/index.html') def register(request): registered = False if request.method == 'POST': user_form = UserForm(data=request.POST) profile_form = UserProfileInfoForm(data=request.POST) if user_form.is_valid() and profile_form.is_valid(): user = user_form.save() user.set_password(user.password) user.save() profile = profile_form.save(commit=False) profile.user = user if 'profile_pic' in request.FILES: profile.profile_pic = request.FILES['profile_pic'] profile.save() registered = True else: print(user_form.errors, profile_form.errors) else: user_form = UserForm() profile_form = UserProfileInfoForm() return render(request, 'basic_app/registration.html', {'user_form' : user_form, 'profile_form' : profile_form, 'registered' : registered}) The error is occurs when I'm trying to create a new user form (user_form = UserForm()). Although in my meta class I set models to the User model imported from django.contrib.auth.models. Error Info Picture -
How to make a secure connection to ec2 instance on aws
I have managed to connect my ec2 instance to my domain with route 53. However im now having issues making the connection secure. I have tried to follow step by step instructions found on stack exchange however am still having issues and wonder if anyone can help me. I created a secure certificate with the amazon certificate manager and connected this to a load manager which is linked to my ec2 instance. I then used the DNS name on the load balancer and added this to my route 53 configuration. Something I cant quite understand is when I test the record set on route 53 I get the IP 3.129.2.237 returned (which still loads the ec2 instance), not the ip4v value found on the ec2 instance 18.217.221.40. Ive then taken the name server values and put them into my dynadot (host) name server settings. I have restarted my gunicorn server that im using on the ec2 instance. It is running on port 9090, in the Nginx settings (/etc/nginx/sites-available/default) I set proxy_pass to http://0.0.0.0:9090. The site runs when doing a http:// request (http://www.advancedmatchedbetting.com)but not when a https request occurs enter link description here. If anyone has any idea where im going … -
Displaying model fields in django in a dropdown list
so I'm writting a program for creating orders for specific users and items. My problem is when I'm trying to display all customers, products and statuses from this model: class Order(models.Model): STATUS = ( ('Pending', 'Pending'), ('Out for delivery', 'Out for delivery'), ('Delivered', 'Delivered'), ) customer = models.ForeignKey(Customer, null=True, on_delete=models.SET_NULL) product = models.ForeignKey(Product, null=True, on_delete=models.SET_NULL) date_created = models.DateTimeField(auto_now_add=True, null=True) status = models.CharField(max_length=20, null=True, choices=STATUS) def __str__(self): return self.product.name I have to do this manually: {% extends 'accounts/base.html' %} {% load static %} {% block main %} <form action="" method="post"> {% csrf_token %} <div class="dropdown"> <button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> customer </button> <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> <a class="dropdown-item" > {{ form.customer.1 }}</a> <a class="dropdown-item" > {{ form.customer.2}}</a> <a class="dropdown-item" > {{ form.customer.3}}</a> <a class="dropdown-item" > {{ form.customer.4}}</a> <a class="dropdown-item" > {{ form.customer.5}}</a> </div> </div> <input type="submit" name="submit" class="btn btn-success"> </form> {% endblock %} That's because when i tried making a loop which would just give them ids instead of numbers it just wouldn't show up. Can anybody help me? :( -
django allauth URL patterns are incorrect
I have just finished installing allauth and plan to use it in my site, however currently the URL patterns don't work. If i set it as the following urlpatterns = [ ... path('accounts/', include('allauth.urls')), ... ] and go to /accounts/discord/ it gives a 404 and says the correct URLs are accounts/ social/ accounts/ discord/ login/ [name='discord_login'] accounts/ discord/ login/callback/ [name='discord_callback'] Notice the extra space after each step. This is the same for all of the allauth URLs Because of this, I cannot access the right pages to login. How do i fix this? or is this some strange bug