Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Nginx replaces media paths
My image is not displayed on the remote server. Nginx replaced my-dns.com adress to 127.0.0.1 and picture is not displayed. if i replace 127.0.0.1:7000/media/... to my-dns.com/media/... the picture opens Here's my nginx media settings: server { listen 80; client_max_body_size 50M; server_tokens off; location /media/ { alias /media/; } location /back_static/ { alias /static/; } } It would seems that a static should not work, but it works. They have very similar path but media didn't work and static work. My django constants MEDIA_URL = "media/" MEDIA_ROOT = "/media/" STATIC_URL = "back_static/" STATIC_ROOT = BASE_DIR / "collected_static" What should i do to replase 127.0.0.1 to my-dns.com? -
Django how to add a model instance with a foreign key field if the referenced model instance does not exist
I am working with a legacy database within an AS400 system connected to my Django project. I am trying to configure my models in the best way possible and set up relationships correctly but I am running into an issue related to adding an instance of a model that has a foreign key field to another model but the instance of that model might not exist yet. Here is an example, consider the following two models: class CLIENTPF(models.Model): id = models.BigAutoField(db_column='CLNTID', primary_key=True) fname = models.CharField(db_column='CLNTFNAME', max_length=30, unique=True, null=True) lname = models.CharField(db_column='CLNTLNAME', max_length=30) dob = models.CharField(db_column='CLNTDOB', max_length=10) class Meta: managed = False db_table = '"XPFLORIS"."CLIENTPF"' class MOVIEPF(models.Model): movie_name = models.CharField(db_column='MOVNAME', max_length=30, primary_key=True) star_fname = models.ForeignKey(CLIENTPF, to_field='fname', on_delete=models.PROTECT, db_column='STARACTF', max_length=30) star_lname = models.CharField(db_column='STARACTL', max_length=30) genere = models.CharField(db_column='GENERE', max_length=30) release_date = models.CharField(db_column='RELDATE', max_length=10) class Meta: managed = False db_table = '"XPFLORIS"."MOVIEPF"' The "star_fname" field in MOVIEPF is a Foreign key to the "fname" field in CLIENTPF. So if I wanted to add an instance to the MOVIEPF table in my views.py with the following ORM I would get an error since "Rowan" is just a string and not an instance of the CLIENTPF model. new_movie = MOVIEPF(movie_name="Johnny English", star_fname="Rowan", star_lname="Atkinson", genere="Comedy", release_date="02/12/2003") new_movie.save() … -
Django + TelegramClient RuntimeError: There is no current event loop in thread 'Thread-1'
I'm trying to make a parser like a web application. Where, from the POST form, the username of the telegram group will be sent with a request, parsing the data of users of this group and saving to a file. I transferred this parser to Celery, in view I call this function and I give the name of the group as a parameter and request. I get this error RuntimeError: There is no current event loop in thread 'Thread-1'. If run without Django, the code works fine My tasks.py from telethon.sync import TelegramClient import csv from celery import shared_task @shared_task def main(url): api_id = ******** api_hash = '********' phone = '******' client = TelegramClient(phone, api_id, api_hash) client.connect() target_group = client.get_entity(url) print('Fetching Members...') all_participants = [] all_participants = client.get_participants(target_group, aggressive=True) print('Saving In file...') with open("members.csv","w",encoding='UTF-8') as f: writer = csv.writer(f,delimiter=",",lineterminator="\n") writer.writerow(['username','user id', 'access hash','name','group', 'group id']) for user in all_participants: if user.username: username= user.username else: username= "" if user.first_name: first_name= user.first_name else: first_name= "" if user.last_name: last_name= user.last_name else: last_name= "" name= (first_name + ' ' + last_name).strip() writer.writerow([username ,user.id, user.access_hash, name, target_group.title, target_group.id]) print('Members scraped successfully.') My view.py from django.shortcuts import render from django.views.decorators.csrf import csrf_exempt from .tasks import main … -
add attrs to a relationship model field on django forms
hi all need help adding some style to a relationship field on django form. have this models.py class Empresa(models.Model): idEmpresa= models.CharField(unique=True, max_length=10) nombreEmpresa = models.CharField(max_length=50, unique=True) class Cliente(models.Model): idCliente = models.CharField(unique=True, max_length=9) nombreCliente = models.CharField(max_length=64) ... empresa= models.ForeignKey(Empresa, on_delete=models.CASCADE)` forms.py class ClienteForm(forms.ModelForm) class Meta: model = Cliente fields = '__all__' widgets = { 'idCliente': forms.TextInput(attrs={'class': 'form-control mb-3', 'id': 'idCliente', 'name': 'idCliente', 'type': 'text'}), 'nombreCliente': forms.TextInput(attrs={'class': 'form-control mb-3', 'id': 'nombreCliente', 'name': 'nombreCliente', 'type': 'text', 'placeholder': 'Ingrese nombre y apellidos', 'maxlength': '64'}), } and I need to add the attrs to the field empresa on my ClienteForm... try this 'empresa' : forms.ModelChoiceField(queryset=empresa, widget=('class' : 'form-select')), and this def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fields["empresa"].widget.attrs.update({"class": "form-select", 'id' : 'empresasss'}) I don't know what I am doing wrong, have read the documentation several times but I'm stuck, real stuck at this. help me please!!! -
I Want To Save The Data In My Database Depending On The Catgory Of Data Chosen by User Like I Have 4 Lisiting
I Want To Save The Data In My Database Depending On The Catgory Of Data Chosen by User Like I Have 4 Lisitings Like APparetements, Food And Life, Car And Travelling if User Selects Appartements Then Area, location Fields Are Showed An getiing Data And Saved Data Else Hidden and Disabled For Other Fields Like Food And Life, Car And Travellig. MY COde Of MyListing.html {% extends 'home.html' %} {% load static %} {% block content %} <div class="page-heading"> <div class="container"> <div class="row"> <div class="col-lg-8"> <div class="top-text header-text"> <h6>Add Plots In Your Listing</h6> <h2>If You Want To Buy The Plot Then Add It In Your Listing</h2> </div> </div> </div> </div> </div> <div class="contact-page"> <div class="container"> <div class="row"> <div class="col-lg-12"> <div class="inner-content"> <div class="row"> <div class="col-lg-6 align-self-center"> <form id="contact" action="" method="POST" enctype="multipart/form-data"> <div class="row"> {% csrf_token %} <div class="col-lg-12"> <label for="">Listing Type</label> {{ form.listing_type }} <label for="" >Area</label> {{ form.area }} <label for="">Location</label> {{ form.location }} <label for="">Price</label> {{ form.price }} <label for="">Title</label> {{ form.title }} <label for="">Upload An Image</label> {{ form.image }} </div> <div class="col-lg-12"> <fieldset> <button type="submit" id="form-submit" class="main-button "><i class="fa fa-paper-plane"></i>Add Your Listing!</button> </fieldset> </div> </div> </form> </div> </div> </div> </div> </div> </div> </div> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script> $(document).ready(function() … -
Django template language checking the value
I need to check if value in m2mfield of django and then get it selected if it is <option value="Clothes" {% if "Clothes" in product.categories.all %} selected {% endif %}>Clothes</option> i tried this but seems like it doesnt work the view function def update_page(request, param): if request.method == "POST": product = Product.objects.get(pk=param) print(request.POST.getlist('categories')) data = request.POST title = data.get('title') categories = data.getlist('categories') price = data.get('price') description = data.get('description') rating = data.get('rating') product.title = title product.categories.clear() for i in categories: product.categories.add(Category.objects.get(title=i)) print(i) product.price = price product.description = description product.rating = rating product.save() # if data.get('test'): # print("loh") # else: # print("not found") return redirect('product', param=param) else: product = Product.objects.get(pk=param) context = { "product": product } return render(request, "update.html", context=context) -
Django translate tag with dynamic url
I would like to translate a sentence with a url inside. I tried the following: First option yields an error as it is not possible to have another '{%' inside the blocktrans. {% blocktrans %} <p><a href="{% url 'register' %}"><strong>Register</strong></a> and be happy</p> {% endblocktrans %} Second is based on this answer, but it does not work either. {% blocktrans with link={% url 'register' %} %} <p><a href="{{ link }}"><strong>Register</strong></a> and be happy</p> {% endblocktrans %} Any idea how to make it work? -
I can't loaddata from backup.json, in django
I hosted a site and around 200 persons data is stored in that, I took backup of it to test in my modified site, I mean I am developing that site more, But when I loaddata then it gives errors like: django.db.utils.IntegrityError: Problem installing fixture 'C:\Users\siddh\Projects\Django_Projects\XtraROMs\dump.json': Could not load app.UserProfile(pk=1): UNIQUE constraint failed: app_userprofile.user_id I tried many things like deleting the database and migrations and many other things on stackoverflow, github and chatgpt, But It is not loading, even I tried to use same models as my hosted site but it gives errors These are models in my running project: class CustomROM(models.Model): class CustomMOD(models.Model): class UserProfile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, unique=True) is_authorized = models.BooleanField(default=False) class Contact(models.Model): class Comment(models.Model): These are models in my running project: (It is same as my running project except some extra attributes in my UserProfile model) class CustomROM(models.Model): class CustomMOD(models.Model): class UserProfile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, unique=True) is_authorized = models.BooleanField(default=False) profile_picture = models.ImageField(upload_to='profile_pictures/', blank=True) bio = models.TextField(null=True, blank=True) google_username = models.CharField(max_length=100, blank=True) local_username = models.CharField(max_length=100, blank=True) email = models.EmailField(blank=True) class Contact(models.Model): class Comment(models.Model): Also, I used django allauth feature in modified site but it is not related to this i guess I already used these commands … -
Django marshmallow validate error message not translating
I have defined a shema in django project. gross_weight = fields.Decimal(required=True, validate=validate.Range(min=0, max=9999.99, error=translation.ugettext(INVALID_RANGE_DURATION).format("0", "9999.99"))) Here the error message is not getting translated But the same thing is getting translated when i call in pre_load or post load functions. My guess is that the format is putting value first and then the translation is happening. .po file msgid "Value must be between {} and {}" msgstr "आज भारी बारिश का पूर्वानुमान{} है {}" -
Django (RF) : Allow child comments (MPTT model) to be created within same Post as parent comment
I have a Post model and Comment model. The second one based on MPTT model to achive comments arrangement in a tree format. Everything works but the problem is to restrict new child Comment to be linked with other then parent Post on creation. Example: Let's say I have Post objects with ID = 1 and 2. I have a parent Comment object with ID = 10 linked with Post ID = 1 (defined above). Now I can create a new child Comment object, wire it with a parent Comment but Post ID may be passed equal to 2 which is not the same as parent's one. And as a result: related comments devided in a separate Post objects. I can just make some validation like (schema without python syntax): if new_comment.post_id != new_comment.parent__post_id: return Response({"error": "Child comment must be linked with the same post as parent"}) But is there any Django way to do this to make this validation work in django-admin as well? For example when I create a Comment object and choose a parent in a dropdown section then only Post related to parent Comment will be available in a dropdown section? My code : Models: class … -
Unit test exceptions for redis in DRF
I have serializers.py like this for post request import redis redis_client = redis.Redis().json() class MySerializer(serializers.Serializer): ... def validate(self, attrs): ... try: ... except redis.ConnectionError: raise ValidationError("Redis server is down.") except redis.TimeoutError: raise ValidationError("Redis server is slow or unable to respond.") How do i write unit test cases for these two exceptions ? -
Does `cache.set()` use `version=1` by default instead of `version=None` in Django?
If I only set and get David with version=0, then I can get John and David in order as shown below. *I use LocMemCache which is the default cache in Django and I'm learning Django Cache: from django.core.cache import cache cache.set("name", "John") cache.set("name", "David", version=0) print(cache.get("name")) # John print(cache.get("name", version=0)) # David And, if I only set and get David with version=2, then I can get John and David in order as well as shown below: from django.core.cache import cache cache.set("name", "John") cache.set("name", "David", version=2) print(cache.get("name")) # John print(cache.get("name", version=2)) # David But, if I only set and get David with version=1, then I can get David and David in order as shown below so this is because John is set with version=1 by default?: from django.core.cache import cache cache.set("name", "John") cache.set("name", "David", version=1) print(cache.get("name")) # David print(cache.get("name", version=1)) # David In addition, if I set and get John and David without version=1, then I can get David and David in order as well as shown below: from django.core.cache import cache cache.set("name", "John") cache.set("name", "David") print(cache.get("name")) # David print(cache.get("name")) # David I know that the doc shows version=None for cache.set() as shown below: ↓ ↓ Here ↓ ↓ cache.set(key, value, … -
Unused path imported from django.urls
THIS IS THE ERROR Unused path imported from django.urlsPylintW0611:unused-import I don't know how to solve this. iam using vscode django version 4.2.4 Python 3.11.4 clientes/urls.py from django.urls import path urlpatterns = [ ] -
Django hosting providers [closed]
I am searching for a django hosting service provider and I found some hosting service providers which costs a little bit high. Since we are starting a small scale ecommerce startup we cant afford that much pricing they offer Can someone suggest me a hosting service provider that hosts a django application at a cheaper rate? -
mozilla_django_oidc package returning redirect error
Getting the following error while trying to login with keycloak through django application (mozilla_django_oidc). Settings, redirect URI - everything looks fine. After providing the login credentials, it suppose to redirect to the app itself and by that time encountering this error. Any idea? -
Asynchronous tasks in Django
I want to implement a telegram group parser (namely users) into the Django application. The idea is this, from the post request I get the name of the group entered into the form, I pass it to the asynchronous function (which lies in a separate file) and parsing starts. And so at a call of asynchronous function in view, constantly I receive errors. Such as "RuntimeError('The asyncio event loop must not change after connection", "RuntimeError: There is no current event loop in thread 'Thread-1'" etc. Please help me, how would this be better organized? Function for parsing users below: api_id = **** api_hash = '*****' phone = '+******' client = TelegramClient('+********', api_id, api_hash) client.start() async def dump_all_participants(url): """Writes a csv file with information about all channel/chat participants""" offset_user = 0 # member number from which reading starts limit_user = 200 # maximum number of records transferred at one time all_participants = [] # list of all channel members filter_user = ChannelParticipantsSearch('') while True: participants = await client(GetParticipantsRequest(await client.get_entity(url), filter_user, offset_user, limit_user, hash=0)) if not participants.users: break all_participants.extend(participants.users) offset_user += len(participants.users) all_users_details = [] # list of dictionaries with parameters of interest to channel members for participant in all_participants: all_users_details.append({"id": participant.id, … -
Nested folder structure getting issue while Customize the Auth User Please help me out
AUTH_USER_MODEL = 'modules.user.models.CustomUser' Please help me out how can i add more column in auth user table and use in login process. What is the best folder structure in django I want to implement the admin module, student module and teacher module and cms module in our system -
Navigate always to a specific page though all pages are public in Reactjs
I have made a PrivateRoute for a specific page. All the pages are public (Anyone can view them) except the PrivateRoute page. If a user is unauthorized then the route always navigates to the page which is declared in logUser function. I am using Python Django for building APIs. app.js import "./App.css"; import { Fragment } from "react"; import { BrowserRouter, Routes, Route } from "react-router-dom"; import Home from "./pages/Home"; import Login from "./pages/Login"; import Register from "./pages/Register"; import Post from "./pages/Post"; import Details from "./pages/Details"; import HeaderNav from "./components/Navbar"; import Footerbar from "./components/Footer"; import PrivateRoute from "./utils/PrivateRoute"; import { AuthProvider } from "./context/AuthContext"; function App() { return ( <Fragment> <BrowserRouter> <AuthProvider> <HeaderNav /> <div className="bg-gray-100 w-full h-full"> <Routes> <Route element={<PrivateRoute />} path="/post"> <Route element={<Post />} path="/post" /> </Route> <Route element={<Home />} path="/" /> <Route element={<Post />} path="/post" /> <Route element={<Details />} path="/post/:id" /> <Route element={<Register />} path="/register" /> <Route element={<Login />} path="/login" /> </Routes> </div> <Footerbar /> </AuthProvider> </BrowserRouter> </Fragment> ); } export default App; PrivateRoute.js import { Navigate, Outlet } from "react-router-dom"; import { useContext } from "react"; import AuthContext from "../context/AuthContext"; const PrivateRoute = () => { const { username } = useContext(AuthContext); return username ? <Outlet … -
Problems with save() methof of django model
My prints are cycling and then the error message appears But download_url which appears in the console seems to be correct and it works for me, but why code doesn't work It's like a recursion in save method till Yandex block my downloads with "Resource not found" def save(self, *args, **kwargs): # Сначала сохраняем объект if self.photo_url: base_url = 'https://cloud-api.yandex.net/v1/disk/public/resources/download?' public_key = 'https://disk.yandex.ru/i/EaosKvCf-SDzag' #self.photo_url # Используем поле photo_url как public_key final_url = base_url + urlencode(dict(public_key=public_key)) print(final_url) response = requests.get(final_url) print(response.json()) download_url = response.json()['href'] print(download_url) download_response = requests.get(download_url) file_content = download_response.content file_name = self.photo_url.split('/')[-1] temp_file = File(io.BytesIO(file_content), name=file_name) self.photo.save(file_name, temp_file, save=False) self.save() # Сохраняем с обновл super().save(*args, **kwargs) -
How to use @property decorator with annotate Django Query set
Model.py class InvoiceItem(models.Model): quantity = models.IntegerField() items_price = models.ForeignKey(PriceMaster,on_delete=models.CASCADE) invoices = models.ForeignKey(Invoice, on_delete=models.CASCADE,null=True,blank=True) create_at = models.DateField(auto_now_add=True) create_by = models.ForeignKey(User, on_delete=models.CASCADE) @property def net_amount(self): self.total = self.quantity * self.items_price.price self.gst = self.total * self.items_price.gst.gst / 100 self.net_total = self.total + self.gst return self.net_total View.py invoiceItem_id=InvoiceItem.objects.values("invoices__id","invoices__invoice_no","invoices__create_by__username","invoices__create_at","invoices__status").annotate(total = Sum('net_amount')) **Can we use @property decorator in above mention scenario ** -
Showing 'Import Error' when I import forms
When I try to import my forms in views.py , it is showing the following from .forms import QuestionsForm, OptionsFormSet,UserRegisterForm ImportError: cannot import name 'QuestionsForm' from 'teachers.forms' Here 'teachers' is the name of the app I created the following teachers/forms.py from users.models import Quiz,Questions,Answers,UserAnswer,Results from django.forms import ModelForm from django.forms import inlineformset_factory class QuestionsForm(forms.ModelForm): class Meta: model = Questions fields = ['text', 'quiz', 'correct'] class OptionsForm(forms.ModelForm): class Meta: model = Answers fields = ['text'] OptionsFormSet = inlineformset_factory(QuestionsForm, Answers, form=OptionsForm, extra=4) I imported this in my teachers/views.py from .forms import QuestionsForm, OptionsFormSet,UserRegisterForm @login_required @user_passes_test(email_check) def create_question(request): if request.method == 'POST': question_form = QuestionsForm(request.POST) options_formset = OptionsFormSet(request.POST, prefix='options') if question_form.is_valid() and options_formset.is_valid(): question = question_form.save() # Save the question form # Set the question instance for each option before saving the options formset options = options_formset.save(commit=False) for option in options: option.question = question option.save() return messages.success('Questions saved successfully') # Redirect to a success page else: question_form = QuestionsForm() options_formset = OptionsFormSet(prefix='options') context = {'question_form': question_form, 'options_formset': options_formset} return render(request, 'teachers/create_question.html', context) If nothing's wrong with my forms then why is it showing an import error? -
How to set proxy header host to my domain? [duplicate]
I have tried to use authorization with vk.com. In local server it worked perfect, but when I deployed the project to server I got the error answer from vk: {"error":"invalid_request","error_description":"redirect_uri is incorrect, check application redirect uri in the settings page"} I use django, gunicorn, nginx I see, that error in url that generate social-auth-app-django library that I use: https://oauth.vk.com/authorize?client_id=51715081&redirect_uri=http%3A%2F%2F**127.0.0.1%3A8001**%2Fcomplete%2Fvk-oauth2%2F%3Fredirect_state%3DsDvsG5lNFRCXvxdqaXeBHTVpPWpXkHaj&state=sDvsG5lNFRCXvxdqaXeBHTVpPWpXkHaj&response_type=code it contain redirect_uri=http%3A%2F%2F127.0.0.1%3A8001 127.0.0.1:8001 uses gunicorn, but here must be my domain name As I think the problem is in nginx config: server { listen 80; listen [::]:80; server_name my.domain; return 301 https://$server_name$request_uri; } server { listen 443 ssl; listen [::]:443 ssl; server_name my.domain; ssl_certificate /etc/letsencrypt/live/my.domain/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/my.domain/privkey.pem; location /.well-known { alias /var/www/my.domain/.well-known; } root /var/www/html; index index.html index.htm index.nginx-debian.html; location /media { alias /home/www/trufy/my_django_project/media; } location /static { alias /home/www/trufy/my_django_project/static; } location / { proxy_pass http://127.0.0.1:8001; #proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Host $proxy_add_x_forwarded_for; # add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM NAV"'; # add_header Access-Control-Allow-Origin *; } } I as understand, I need to add proxy_set_header Host $host; in location / {}, but when I do it, restart nginx and open site I get: Bad Request (400) Help me please, what i need … -
django admin shows custom percentInput widget but in view mode values are not formatted
i am having this fancy percentinput widget that allows me to input values as if they were percents: like 47, and it saves as 0.47 decimal, but also shows me back 47.change this works perfectly for me but when the user has no right to "change" the object they all render as 0,4700 in view or readonly mode.readonly class PercentInput(NumberInput): def __init__(self, attrs=None): if attrs is None: attrs = {} attrs['type'] = 'number' attrs['step'] = 1 attrs['style'] = 'width:50px;' attrs['max'] = 100 attrs['min'] = 0.0 super().__init__(attrs) def format_value(self, value): if value == Decimal(0): return 0 if value is None: return '' return f"{value * 100}".rstrip('0').rstrip('.') # Format as percentage without decimal places #:.0f def value_from_datadict(self, data, files, name): value = data.get(name) if value: return Decimal(value) / 100 return None also the form i use class SubDealForm(forms.ModelForm): class Meta: model = SubDeal fields = '__all__' widgets = { 'player_percent': PercentInput(), 'sub_percent': PercentInput(), 'optional_rb': PercentInput(), 'wdfee': PercentInput(), } and ofc this enabled in my ModelAdmin: form = SubDealForm How to make them look formatted as percent too? without making custom duplicate functions in modelAdmin like def value_as_percent() or making custom template for it? -
Nginx Reverse Proxy's problematic behaviour
I need your help related to nginx and reverse proxy: I have a frontend running on port 80 and a backend running on port 8000 using reverse proxy in nginx both of them are being connected from same domain url (eg. https://abc123.com it is an https ->ALB{aws}->http->nginx and https://abc123.com:8000 )using different ports most of the time port 8000 pages work on alternate hits i.e for first they show a 404 and when I reload it connects, on next reload it again shows 404 and so on. I have added caching also but did not change any thing.. This port 8000 is routing to backend django server at 8001 port. Frontend is running perfectly.Backend is creating problems.. How can I resolve this? eg. For first abc123.com:8000/marvels show a 404 and when I reload it connects to corect page, on next reload it again shows 404 and so on... similar case is for all the paths related to django backend. -
How to redirect to home URL after Django Allauth login with Google?
I'm using Django Allauth to provide Google authentication for my website. Everything is working fine, except that I get redirected to 127.0.0.1:8000/accounts/google/login/callback/?state=2CXclEHzhr58&code=4%2F0Adeu5BW1_2pqwk7edcaJ7nLR7b8hmBcfRX2_605538Il2j3dWc0jYwWzEbwV10mMnmI2oA&scope=email+profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+openid&authuser=2&prompt=consent# instead of just 127.0.0.1:8000/ even tho I set LOGIN_REDIRECT_URL = "home". The redirect itself works fine, in the sense that I get the home page, but is there a way to also have the link be just 127.0.0.1:8000/? Otherwise, do you know of any alternatives I could use? I'm also thinking this could be caused by Google's API, but can't tell how. Thanks in advance! Tried to set LOGIN_REDIRECT_URL = "home" and ACCOUNT_SIGNUP_REDIRECT_URL = "home"