Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
How to pull or read image in Django from AWS s3 bucket for OpenCV to process?
When user uploads images from (react as frontend) and django receives the images from static folder and begins to process those images and later user can download. Below is my django python code imagePath = os.path.commonprefix(['images']) #<------coming from static files when user # upload via react axios.post. instead # of "imagePath" i want django to read # from s3 bucket 'images' folder. #other process for img in imagePath: image = cv2.imread(img) ##other process but now i'm using amzazon s3 instead of local static files. AWS_ACCESS_KEY_ID = '********' AWS_SECRET_ACCESS_KEY = '***************' AWS_STORAGE_BUCKET_NAME = '********' AWS_S3_FILE_OVERWRITE = False AWS_DEFAULT_ACL = None DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' STATICFILES_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage' my question is : How to make django to read images directly from s3 bucket? so that instead of "imagePath" i can use s3 files? Any related answer will be really appreciated thank you :) -
Django admin for external relation/mapping table
Schema <employee> id name <task> id title <employee_task_mapping> id employee_id # foreign key to <employee> task_id # foreign key to <task> time_spent I have some tables which are not managed in Django, I already registered Django Admin for master tables such as employee and task. But not sure how to handle the relation/mapping table with the following cases: In Django Admin user should be able to map one employee to multiple task. A task can be mapped to only one employee. I believe if the tables were managed in Django itself, could have done something like a ManyToManyField in task and Django will automatically create the relation/mapping table. -
Python - Django - NoReverseMatch
I'm doing an exercise from the book Python Crash Course and I've been stuck on this problem for three days. I've been searching everywhere but can't find a solution. I'm making a blog, so far I've made a form so that I can add new posts, now I'm trying to make a form so that I can edit each post. This is the error I'm getting: NoReverseMatch at /edit/1/ Reverse for 'edit' with arguments '('',)' not found. 1 pattern(s) tried: ['edit/(?P<post_id>[0-9]+)/$'] Request Method: GET Request URL: http://127.0.0.1:8000/edit/1/ Django Version: 3.0.8 Exception Type: NoReverseMatch Exception Value: Reverse for 'edit' with arguments '('',)' not found. 1 pattern(s) tried: ['edit/(?P<post_id>[0-9]+)/$'] Exception Location: C:\Users\paulr\Desktop\Blog\blog_env\lib\site-packages\django\urls\resolvers.py in _reverse_with_prefix, line 677 Python Executable: C:\Users\paulr\Desktop\Blog\blog_env\Scripts\python.exe Python Version: 3.8.1 Python Path: ['C:\Users\paulr\Desktop\Blog', 'C:\Users\paulr\AppData\Local\Programs\Python\Python38-32\python38.zip', 'C:\Users\paulr\AppData\Local\Programs\Python\Python38-32\DLLs', 'C:\Users\paulr\AppData\Local\Programs\Python\Python38-32\lib', 'C:\Users\paulr\AppData\Local\Programs\Python\Python38-32', 'C:\Users\paulr\Desktop\Blog\blog_env', 'C:\Users\paulr\Desktop\Blog\blog_env\lib\site-packages'] Server time: Thu, 30 Jul 2020 10:26:16 +0000 urls.py """Defines url patterns for blogs.""" from django.urls import path from . import views app_name = 'blogs' urlpatterns = [ # Home page. path('', views.index, name='index'), # Page for blog posts path('posts/', views.posts, name='posts'), # Page for adding a new blog post path('new_post/', views.new_post, name='new_post'), # Detail page for a single post path('posts/<int:post_id>/', views.post, name='post'), # Edit post path('edit/<int:post_id>/', views.edit, name='edit'), ] views.py … -
Filter a list of queries on datetime field gives warning
I am querying a model from my ORM in Djnago like the following: client = Client.objects.get(pk=cname).user items = Allotment.objects.filter(sales_order__owner=client).order_by('-id') and want to filter it by datetime that I am getting as parameters from URL URL: GET /allotment-reports/?cname=3&to=2020-07-30+15:07&from=2020-07-01+15:07 So I tried this: f = request.GET['from'] t = request.GET['to'] items = items.filter(dispatch_date__range = [f,t]) but keep getting the warning: RuntimeWarning: DateTimeField Allotment.dispatch_date received a naive datetime (2020-07-30 15:07:00) while time zone support is active. RuntimeWarning) I am using the same format as I have used in my models, then Why is it showing the warning? -
Django manytomany fields to populate the data when one field is selected and its data can be shown on next box
So I know my topic is very vague and I do not know what could be right wording but here I will explain my problem. This is my modal Course: class Course(models.Model): COURSE_TYPE = ( ('Theory', 'Theory'), ('Lab', 'Lab') ) course_id = models.CharField(max_length=100, primary_key=True) course_name = models.CharField(max_length=200, null=True) course_type = models.CharField(max_length=200, null=True, choices=COURSE_TYPE) credit_hours = models.IntegerField(null=True) contact_hours = models.IntegerField(null=True) def __str__(self): return self.course_id + ' - ' + self.course_name and this is my Professor Modal class Professor(models.Model): professor_id = models.AutoField(primary_key=True) professor_name = models.CharField(max_length=200, null=True) courses = models.ManytoManyFields(Course, null=True, on_delete=models.CASCADE working_hours = models.IntegerField(null=True) available_hours = models.IntegerField(null=True) Now I have saved data but when I want to retrieve this data on my interface. I want to select course in dropdown then all the professors availabe should be shown in next dropdown. Like this to this I have been stuck on this for days. Kindly help me this. -
how to creater a signup register form with my own reqired field form in django?
Im new to django i want create signup form with my own feild ,i dont want to signup form in default that is in user table i want to created own custom sign up forn any can hepl plz Im new to django i want create signup form with my own feild ,i dont want to signup form in default that is in user table i want to created own custom sign up forn any can hepl plz here is my example how my form feild look like [enter link description here][1] <form id="contact-form" method="post" action="/addyourschool/" role="form"> <input type="hidden" name="csrfmiddlewaretoken" value="vhcAZ5w1HpK2mUXMhdqHR1to9Yv2LeOB85E2kR7Z1ZsPo5fjtWZ5P7o23kj8lDsk"> <div class="messages"></div> <div class="controls"> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label for="form_name">School Name</label> <input type="text" name="schoolname" id="product" class="form-control ui-autocomplete-input" placeholder="Type few letter &amp; select from down *" required="required" data-error="Lastname is required." autocomplete="off"> <div class="help-block with-errors"></div> </div> </div> <div class="col-md-6"> <div class="form-group"> <label for="form_cfschp">Can't find your School *</label> <input id="form_cfschp" type="text" name="form_cfschpool" class="form-control" placeholder="Can't find your School *" required="required" data-error="Can't find your School"> <div class="help-block with-errors"></div> </div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label for="Pessonname">Contact person Name *</label> <input id="Pessonname" type="text" name="Pessonname" class="form-control" placeholder="Contact person Name *" required="required" data-error="Contact person Name "> <div class="help-block with-errors"></div> </div> </div> <div … -
Still having issues with the logout on tutorial
I followed the tutorial Authentication and I seem to still be having trouble with the website because when I clicked the arrow, I could not get the dropdown list to work and the logout still isn't there when I clicked on it. I got this error when I was testing the Django Boards page. This is causing me problems to see the dropdown list. I followed the tutorial to the point and checked. In order for the logout to work, I had to type in 127.0.0.1:8000/logout/ just so I could get the site to logout. Error: GET /static/js/bootstrap/bootstrap.min.js HTTP/1.1 404 1683 Here's a tree listing of the files. Here's my base.html file, which may the root of the problem {% load static %}<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>{% block title %}Django Boards{% endblock %}</title> <link href="https://fonts.googleapis.com/css?family=Peralta" rel="stylesheet"> <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}"> <link rel="stylesheet" href="{% static 'css/app.css' %}"> {% block stylesheet %}{% endblock %} </head> <body> {% block body %} <nav class="navbar navbar-expand-sm navbar-dark bg-dark"> <div class="container"> <a class="navbar-brand" href="{% url 'home' %}">Django Boards</a> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#mainMenu" aria-controls="mainMenu" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="mainMenu"> {% if user.is_authenticated %} <ul class="navbar-nav ml-auto"> <li … -
Django - NameError when trying to call model method in views
I have a method in my model that I would like to call in my views. However, I get a NameError that this function is not defined (I have imported all models in my views and all migrations are up to date). It has worked for other functions in the past. Based on this answer - https://stackoverflow.com/a/1372048/13290801 - I tried defining a model manager, but this didn't work either. Here is my model: class SongManager(models.Manager): def sorted_strings(strings, locale=None): if locale is None: return sorted(strings) collator = icu.Collator.createInstance(icu.Locale(locale)) return sorted(strings, key=collator.getSortKey) class Song(models.Model): """ fields """ objects = SongManager() And in my views the relevant part where I want to use it: lyrics_list = models.Song.objects.get(pk=self.kwargs['pk']).lyrics_as_list() #this is also a method on my model, and it does work lyrics_sorted = sorted_strings(set(lyrics_list, "ru_RU.UTF8")) #but this one gives me an error The error: name 'sorted_strings' is not defined When I move the method to my views, it works. But I have to use this in several views, so I am trying to follow the DRY principle, and so it would be great to get it to work. -
How do I create content previews of 3rd-party links (in a similar way to Twitter and FB)?
I want my users to be able to add 3rd-party links to a page and on that page I want to display a preview of each link, just like Twitter and FB does with their users' links. I know this uses the og and twitter meta tags, but I want to know exactly how to do this. I am using Django. This image is an example of the type of preview I want to create: enter image description here -
I am trying to work with Django CMS and templates. but get an error while editing a template
I want the css and js file to load. It will display the error "Invalid block tag on line 15: 'static'. Did you forget to register or load this tag?" is displayed. but I have created the data correctly. does anyone see the error in my html file? Here is the code where I suspect the problem <!-- Bootstrap core CSS --> <link href="{% static 'vendor/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet"> <!-- Custom styles for this template --> <link href="{% static 'css/modern-business.css' %}" rel="stylesheet"> Here is the complete code {% load cms_tags menu_tags sekizai_tags %} <!DOCTYPE html> <html lang="{{ LANGUAGE_CODE }}"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="description" content="{% page_attribute 'meta_description' %}"> <meta name="author" content="Life Imaging Services GmbH"> <title>{% page_attribute "page_title" %}</title> <!-- Bootstrap core CSS --> <link href="{% static 'vendor/bootstrap/css/bootstrap.min.css' %}" rel="stylesheet"> <!-- Custom styles for this template --> <link href="{% static 'css/modern-business.css' %}" rel="stylesheet"> {% render_block "css" %} </head> <body> {% cms_toolbar %} <!-- Navigation --> <nav class="navbar fixed-top navbar-expand-lg navbar-dark bg-dark fixed-top"> <div class="container"> <a class="navbar-brand" href="index.html">Start Bootstrap</a> <button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="collapse navbar-collapse" id="navbarResponsive"> <ul class="navbar-nav ml-auto"> {% show_menu 0 100 100 100 %} </ul> </div> … -
Django Update Form, show current value with choicefield
I have a django form (updating a record in the database) where I'm displaying different values instead of true/false for a boolean field. Is there a way for me to display the "old"/current value instead of always displaying the first choice in the list? If checked is FALSE in the database, going to the edit form shows "Successful", instead of "Still needs to be checked". This should be the other way around. class SuccesfullCheckForm(forms.ModelForm): TRUE_FALSE_CHOICES = ( (True, 'Successful'), (False, 'Still needs to be checked')) checked = forms.ChoiceField(choices=TRUE_FALSE_CHOICES, required=True) class Meta: model = SuccesfullCheck fields = ["checked"] -
custom user authentication work fine with python3.5 but doesn't work well with python3.6
I just download this git project here this is a demo of the project here after I install requirements.txt work very fine with python3.5 but if I switch to python3.6 or 3.8, can not see user profile and if try to click on user view profile, its just download the file or show profile.html template script tagged, I thought python3.5 and python 3.6 should be almost same how come it's not work in python 3.6 already I checked all package which I have in python 3.5 moved to python 3.6 I tried this comment pip3.5 list | awk '{print $1}' | xargs -I{} pip3.8 install {} to move all package and also I tried manually check if I don't have any uninstall package -
Resizing the photo by protecting the aspect ratio on Django
How can I resize image when I upload with ImageField by protecting aspect ratio of image. Example: (Width x Height) from 1100x600 to 550x300 And, is it possible with [ImageKit] ? https://github.com/matthewwithanm/django-imagekit -
python replace two list data from another list
In python in one variable i am getting list like : stop_address_type = ['1','2'] and in another variable i am getting like : stop_facility_name = ['A','B'] Result : this is what i actually want stop_address_type = ['1','2'] stop_facility_name = ['','B'] another situation like : stop_address_type = ['2','1'] stop_facility_name = ['A',''] what i actually want is when i ll get the 1 value in stop_address_type variable i want to blank the same value of list stop_facility_name like : -
Django: how to remove the space between project urls.py and app urls.py
Django 2.7, I have below project urls.py from main.main_config import main_config from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'keypad.views.home', name='home'), # url(r'^keypad/', include('keypad.foo.urls')), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: url(r'^%sactivation/' % main_config.url_prefix, include('activation.urls', namespace='activation')), url(r'^%sac6590e0/' % main_config.url_prefix, include('activation.urls', namespace='activation')), url(r'^%sreport/' % main_config.url_prefix, include('report.urls', namespace='report')), url(r'^%srpccb4a9/' % main_config.url_prefix, include('report.urls', namespace='report')), url(r'^%scloudctl/' % main_config.url_prefix, include('cloudctl.urls', namespace='cloudctl')), url(r'^%sct8a8d6a/' % main_config.url_prefix, include('cloudctl.urls', namespace='cloudctl')), url(r'^%sadmin/data/' % main_config.url_prefix, include('explorer.urls')), url(r'^%sadmin/' % main_config.url_prefix, include(admin.site.urls)), url(r'^%s' % main_config.url_prefix, include('main.urls', namespace='main')), ) and the app's urls.py is as below: from django.conf.urls import patterns, url from main import views urlpatterns = patterns('', url(r'checkConnection/$', views.checkConnection, name='checkConnection'), url(r'c94372af/$', views.checkConnection, name='checkConnection'), url(r'get_data_everyday/$', views.get_data, name='get_data_everyday'), url(r'downloads/(?P<color>[yb]{1})/(?P<placeID>[0-9]{4})/$', views.downloads, name='downloads'), url(r'suggestion/(?P<ver1>[0-9])/(?P<ver2>[0-9])/(?P<ver3>[0-9])/$', views.suggestion, name='suggestion') ) And the picture shows the problem I got. There is a space between project urls and "include" urls. I have no idea how this happen. Can anyone help? Thanks. Error -
Implementing pagination in Django with Oracle database
I have a project utilizing Oracle as database, and inside the db, they have a view. For that view, I have a Django model like this: class MyOrmModel(models.Model): # fields class Meta: db_table = 'target_oracle_view' managed = False The corresponding viewset: class LogRecordNewItemViewSet(ListModelMixin, GenericViewSet): serializer_class = # ... pagination_class = None def get_queryset(self): qs = MyOrmModel.objects.all() return qs I use cx-Oracle==7.3.0 to connect to the target database. Now my goal is to implement pagination. But when I do so, I run into an error class LogRecordNewItemViewSet(ListModelMixin, GenericViewSet): serializer_class = # ... pagination_class = LimitOffsetPagination django.db.utils.DatabaseError: ORA-00933: SQL command not properly ended I have come across this discussion, but downgrading Django to version 2.0.6 does not work. Here are my requirements.txt content: appdirs==1.4.3 asgiref==3.2.9 CacheControl==0.12.6 certifi==2019.11.28 chardet==3.0.4 colorama==0.4.3 contextlib2==0.6.0 cx-Oracle==7.3.0 distlib==0.3.0 distro==1.4.0 Django==2.0.6 django-cors-headers==3.4.0 djangorestframework==3.11.0 djangorestframework-camel-case==1.2.0 djangorestframework-jwt==1.11.0 html5lib==1.0.1 idna==2.8 ipaddr==2.2.0 lockfile==0.12.2 msgpack==0.6.2 packaging==20.3 pep517==0.8.2 progress==1.5 PyJWT==1.7.1 pyparsing==2.4.6 pytoml==0.1.21 pytz==2020.1 requests==2.22.0 retrying==1.3.3 sentry-sdk==0.16.2 six==1.14.0 sqlparse==0.3.1 urllib3==1.25.8 webencodings==0.5.1 psycopg2 -
Facebook Login with custom user model
m trying to create a new user with Social-Auth and my custom user model required a phone number but facebook does not allow it so i get this error TypeError at /social-auth/complete/facebook/ create_user() missing 1 required positional argument: 'phone' settings.py SOCIAL_AUTH_FACEBOOK_KEY = 'XXXXXXXXXX' SOCIAL_AUTH_FACEBOOK_SECRET = 'XXXXXXXXXXXXXXXXXXXXXXX' SOCIAL_AUTH_FACEBOOK_SCOPE = ['email'] # add this SOCIAL_AUTH_FACEBOOK_PROFILE_EXTRA_PARAMS = { 'fields': 'id, name, email, picture.type(large), link' } SOCIAL_AUTH_FACEBOOK_EXTRA_DATA = [ ('name', 'name'), ('email', 'email'), ('picture', 'picture'), ('link', 'profile_url'), ] how can i pass a default parameter to avoid this error or any solution to work around this problem -
Problem sending information using POST method in django rest framework
Hi i'm knew in django rest framework: views.py: from django.shortcuts import render from rest_framework import status from rest_framework.views import APIView from rest_framework.response import Response from .models import Book from .serializers import BookModelSerializers . . . # for posting data class PostModelData(APIView): def post(self, request): serializer = BookModelSerializers(data=request.data) if serializer.is_valid(): serializer.save() return Response(serializer.data, status=status.HTTP_201_CREATED) return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST) models.py: from django.db import models from datetime import datetime class Book(models.Model): name = models.CharField(max_length=150, blank=True) store_name = models.CharField(max_length=50, blank=True) description = models.TextField(blank=True) image = models.ImageField( default='', upload_to='store_image/', null=True, blank=True) fav = models.BooleanField(default=False, blank=True) created_at = models.DateTimeField(default=datetime.now()) def __str__(self): return self.name urls.py: from django.urls import path from .views import GetAllData, Getfavdata, UpdateFavData, PostModelData urlpatterns = [ path('getalldata/', GetAllData.as_view()), path('getfavdata/', Getfavdata.as_view()), path('updatefavdata/<int:pk>/', UpdateFavData.as_view()), path('postmodeldata/', PostModelData.as_view()), ] serializers.py: from rest_framework import serializers from .models import Book class BookModelSerializers(serializers.ModelSerializer): class Meta: model = Book fields = '__all__' when i post ('name','store_name','description','fav') whit postman, The data that is stored is without details. I wanted to know what the problem is? I also removed (blank = True) in models.py, nothing is saved. -
How to update and save model's field in Django
Following is my code, Every time I click Like (or Dislike) link, both Dislike and Like are incremented. I am new to django, your help will be much appreciated. Thank you Here is my models.py, from django.db import models from django.urls import reverse # Create your models here. class Movies(models.Model): Director=models.CharField(max_length=30) Cast_I=models.CharField(max_length=30) Cast_II=models.CharField(max_length=30) Name=models.TextField() ReleaseYear=models.IntegerField() ImdbRating=models.CharField(max_length=2) Genre=models.TextField(null=True) Language=models.CharField(max_length=20,null=True) Like=models.IntegerField() Dislike=models.IntegerField() def like_this_movie(self): self.Like+=1 self.save() return reverse ('list',kwargs={}) def dislike_this_movie(self): self.Dislike+=1 self.save() return reverse ('list',kwargs={}) Here is the template, {% block content %} <p> <a href="{{ object.like_this_movie }}">Like</a> <a href="{{ object.dislike_this_movie }}">Dislike</a> </p> {% endblock %} Here is my view class, class MovieDetailView(DetailView): template_name='movie/detail.html' queryset=Movies.objects.all() -
Django logs print statemeents are not writing to file
In django i am adding logging and storing logs to file. It is writing to files the infor and errors But not print statements. No print statements are coming. I wants to write all including print statements also. LOGGING = { 'version': 1, 'formatters': { 'verbose': { 'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s' }, 'simple': { 'format': '%(levelname)s %(message)s' }, }, 'handlers': { 'console': { 'level': 'DEBUG', 'class': 'logging.StreamHandler', 'formatter': 'simple' }, 'file': { 'level': 'DEBUG', 'class': 'logging.FileHandler', 'filename': 'logs.log', 'formatter': 'simple' }, }, 'loggers': { 'django': { 'handlers': ['file'], 'level': 'DEBUG', 'propagate': True, }, } } Please have a look, how i can achive this. -
Problem integraing Wiris math type and chem type with django using tiny mce editor
I am new to Django. I want to integrate wiris math type plugin in tinymce into the Django template. Same thing works in Laravel framework but in django it is giving problem. error messages It is giving Failed to initialize plugin: tiny_mce_wiris SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data Can anyone help me out? -
python manage.py runserver is not working
so before anyone point it out my question is really similar to this question but the error message is slightly different so i just started learning Django this day and i got stuck because when i ran python manage.py runserver it didn't display anything until i hit "CTRL + C" then this message showed up Performing system checks... System check identified no issues (0 silenced). July 30, 2020 - 15:51:40 Django version 2.1.5, using settings 'trydjangofcc.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CTRL-BREAK. (mine) I tried to go to the http://127.0.0.1:8000/ and it didn't work, I've tried python manage.py migrate still nothing . I've waited an hour to see if it makes a difference and it don't. it seems stupid but I've been stuck here for a while Thank you -
Wrong: /admin/login/, Expected: /accounts/login/
Django==3.0.8 django-comments-xtd==2.6.2 views.py @csrf_protect @login_required def like(request, comment_id, next=None): """ Like a comment. Confirmation on GET, action on POST. Templates: :template:`django_comments_xtd/like.html`, Context: comment the flagged `comments.comment` object """ comment = get_object_or_404(get_comment_model(), pk=comment_id, site__pk=get_current_site_id(request)) if not get_app_model_options(comment=comment)['allow_feedback']: ctype = ContentType.objects.get_for_model(comment.content_object) raise Http404("Comments posted to instances of '%s.%s' are not " "explicitly allowed to receive 'liked it' flags. " "Check the COMMENTS_XTD_APP_MODEL_OPTIONS " "setting." % (ctype.app_label, ctype.model)) # Flag on POST if request.method == 'POST': perform_like(request, comment) return next_redirect(request, fallback=next or 'comments-xtd-like-done', c=comment.pk) # Render a form on GET else: flag_qs = comment.flags.prefetch_related('user')\ .filter(flag=LIKEDIT_FLAG) users_likedit = [item.user for item in flag_qs] return render(request, 'django_comments_xtd/like.html', {'comment': comment, 'already_liked_it': request.user in users_likedit, 'next': next}) Problem When an incognito user presses a like button, they are redirected to http://localhost:8000/admin/login/?next=/%5Ecomments/like/3/ I expect it to be redirected to http://localhost:8000/accounts/login/ In settings.py LOGIN_URL is absent. I'm at my wit's end about where this admin/login comes from. Could you help me here& -
Recaptcha v3 is backend implementation necessery?
I am building a site using django and I have a form where I want to use reCAPTCHA v3. Google's documentation states that there are two options. Either automatically bind the challenge to a button or to programmatically invoke the challenge. My question is whether I need to implement any backend changes while using the first option (automatic binding), cause by reading the documentation I can't figure it out. Thanks for your time! -
DevTools failed to load sourcemap problem: Could not load content
I have downloaded the free theme that can run to my Django server. I debug all things using static but the only front background image is not appearing on the server due to these problems in the console. Help me to get rid of this please.