Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Django reverse returns the error 'view_name' is not a valid view function or pattern name
Here is my view: class OrganizationViewSet(AbstractEntityViewSet): serializer_class = OrganizationSerializer permission_classes = [IsAuthenticated] model = serializer_class.Meta.model queryset = model.objects.all() I registered it as follows: router.register(r"organizations", OrganizationViewSet, basename="organizations") Now, I am trying to use build_absolute_url as follows: HttpRequest().build_absolute_uri(reverse('organizations', args=(self.parent_organization.slug,))), It returns the following error: File "C:\Samir\Pro\near_shop\venv\lib\site-packages\django\urls\base.py", line 86, in reverse return resolver._reverse_with_prefix(view, prefix, *args, **kwargs) File "C:\Samir\Pro\near_shop\venv\lib\site-packages\django\urls\resolvers.py", line 694, in _reverse_with_prefix raise NoReverseMatch(msg) django.urls.exceptions.NoReverseMatch: Reverse for 'organizations' not found. 'organizations' is not a valid view function or pattern name. The basename on the router is "organizations", then why it can't find it? -
How to save shipping information when proceed with payment in Django Razorpay gateway?
I am trying to submit the data in the database whenever a customer pays with Razorpay Payment gateway, but I am able to click on the Razorpay payment gateway button and the amount is reflected in my Razorpay test account. But shipping data is not stored in my database, Please help me to solve this issue. Here is my views.py file... def place_order(request,total= 0,quantity = 0): cart = Cart.objects.get(cart_id = _cart_id(request)) cart_items = CartItem.objects.filter(cart = cart, status = True) # cart_items = CartItem.objects.filter(user= current_user) cart_count = cart_items.count() if cart_count <= 0: return redirect('login') tax= 0 grant_total = 0 for item in cart_items: total += (item.product.sale_price * item.quantity) quantity += item.quantity tax = (3*total)/100 grant_total = total+tax if request.method == "POST": order_number = request.POST.get('order_number') full_name = request.POST.get('full_name') mobile = request.POST.get('mobile') email = request.POST.get('email') address_line1 = request.POST.get('address_line1') address_line2 = request.POST.get('address_line2') country = request.POST.get('country') state = request.POST.get('state') city = request.POST.get('city') order_note = request.POST.get('order_note') tax = request.POST.get('tax') grant_total = int(request.POST.get('order_total'))*100 status = request.POST.get('status') amount = int(request.POST.get('amount')) * 100 # Create Rezorpay Client client = razorpay.Client(auth=('rzp_test_ertermiaBf1212','ertgghg56Qp27UYlPEsghtedfes')) # Create Order callback_url = 'http://'+ str(get_current_site(request))+"/payment/handlerequest/" response_payment = client.order.create(dict(amount=amount, currency="INR") ) order_id = response_payment['id'] order_status = response_payment['status'] if order_status == 'created': order = Order( order_number = order_number, full_name … -
Why does my Javascript code returns object object?
I am new to jquerry. I tried getting/summing some items from my django views in jquerry. this is whhat I have $(document).ready(function() { var sch = $('#sch-books'); var gov = $('#gov-books'); var total = sch.val() + gov.val(); $('#total').text("Total : " + total); }); My template has these <div id="sch-books" class="h6 mb-1">School copies - <b>{{ s_books.count }}</b></div> <div id="gov-books"class="h6 mb-1">Govt copies - <b>{{ g_books.count }}</b></div> <div id="total"></div> It displays Total : May someone help me get it right.. -
Database queries to 'new-database' are not allowed in this test
I have added a new database in my django project. Now I have run into issues with my test cases. I am keep getting this error message for every single of my test cases: Database queries to 'new-database' are not allowed in this test I have searched for this issue and the common solution comes down to adding databases = '__all__' or databases = {'default', 'new_database'} to the TestCase class But the problem is that now we have a lot of these test cases in my django application and a lot of corresponding TestCase based classes. So it does not fill right (specifically from the scale point of view) to add this databases = '__all__' declaration or whatever to every single class. Do we have any other and more proper solution for this issue? (After all why django needs to make transaction to new_database in all other test cases every single time that does not seem needed at all?) -
django foreign key mismatch - "question_question" referencing "question_subject"
Hi there is this problem I have can anyone solve this ? here is my django model class Question(models.Model): user = models.ForeignKey(User,on_delete=models.SET_NULL,null=True) title = models.CharField(max_length=255,null=True,blank=False) content = models.TextField(null=True,blank=False) subject = models.ForeignKey(Subject,on_delete=models.SET_NULL,null=True,related_name="subject_question") topicTag = models.ManyToManyField(TopicTag, related_name='questionTopic', blank=True) image = models.ImageField(blank=True, null=True) createdAt = models.DateTimeField(auto_now_add=True) votes = models.ManyToManyField(User, related_name='questionUser', blank=True, through='QuestionVote') answer_count = models.IntegerField(default=0,null=True,blank=True) difficulty = models.ForeignKey(Difficulty,on_delete=models.SET_NULL,null=True,related_name="difficulty") id = models.UUIDField(default=uuid.uuid4, unique=True, primary_key=True, editable=False) def __str__(self): return self.title and here is the error code django.db.utils.OperationalError: foreign key mismatch - "question_question" referencing "question_subject" -
What do I need to do if I want to use database data conditionally in Django templates?
I am working on an ecommerce store in Django. I want to know that how do I use the database data passed to templates using render() method, conditionally through JavaScript or AJAX or JSON? For example, let's say I have a following models.py: from django.db import models class Suit(models.Model): title = models.CharField(max_length = 100, verbose_name = "Title") img = models.FileField(upload_to = 'suit-products/', null = True, verbose_name = "Picture") def __str__(self): return f"{self.title}" class Buttoning(models.Model): title = models.CharField(max_length = 100, verbose_name = "Title") img = models.FileField(upload_to = 'buttonings/', null = True, verbose_name = "Picture") def __str__(self): return f"{self.title}" and following views.py from django.shortcuts import render def index(request): suit_prods = Suit.objects.all() buttoning = Buttoning.objects.all() context { "suit_prods": suit_prods, "buttoning": buttoning } return render(request, "index/index.html", context) and following index.html (template): {% for element in suit_prods %} <li> <a href="#"> <div id="menu"> <img src="{{ element.img.url }}" /> <span>{{ element.title }}</span> <span></span> </div> </a> </li> {% endfor %} Now what I want is, if the clicked element in the list items in index.html has the title as "two_piece_suit" then show items of {{ buttoning }} as a list, otherwise pass. If I explain it more using some JS syntax, then I want following kind of … -
Chart.js 3.6.0 is not working on Weebpack 5.62.1?
I have a Django project. And after some security updates, I did some major dependencies upgrade. Everything was fix and working excepting the Chart.js that is not loaded in Webpack. After few days of working hard, I decided to bring the problem here. To clarify from start, these are one critical error and a minor error (can be ignored). charts are not loading - CRITICAL Uncaught ReferenceError: Chart is not defined My solution: To load Chart.js CDN before code <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/3.6.0/chart.min.js"></script> Multiple charts using same canvas - MINOR (temporary ignored) Uncaught Error: Canvas is already in use. Chart with ID '0' must be destroyed before the canvas can be reused. My solution: to use only a js bundle file So let's go over my code! The next files are really big so I will try to bring the important sections. If you need extra info, let me know. These are my dependencies upgrades: # from pip (requirements.txt) Django==3.0.7 >> 3.0.14 django-webpack-loader==0.7.0 >> 1.4.1 # from npm (package.json) "bootstrap": "^4.5.3", >> "^5.1.3", "chart.js": "^2.9.4", >> "^3.6.0", "jquery": "^3.4.1", >> "^3.6.0", "popper.js": "^1.16.0", >> "^1.16.0", "webpack": "^4.44.2", >> "^5.62.1", "webpack-bundle-tracker": "^0.4.3", >> "^1.4.0", "webpack-cli": "^3.3.10" >> "^4.9.1" This is webpack config … -
session id changing after login, so how to preserve session id created before logged in
e-commerce website on django, i am creating a cart either user logged in or not via session_id. For example guest can add an item to it's cart. And cart that created by the session id. Then let's say guest decides to login. So I want to move the guest's cart to logged in user's cart. But when user logged in, session_id is changes. And I can't find the old session id. How can I preserve session id that created before logged in. or is there a better way to accomplish this task. -
Django form - custom user
I created a custom user in django as it follows: class Customer(AbstractBaseUser): ... in my form I imported the class: from account.models import Customer class PostForm(forms.ModelForm): ... client_code = forms.ModelChoiceField(queryset=Customer.objects.all(), required=True, widget=forms.Select( attrs={ 'class':'form-select form-select-sm', 'aria-label':'Default select example', })) ... I run the server and this error is shown: AttributeError: type object 'Customer' has no attribute 'objects' The project structure is: account -- models.py -- forms.py ... post -- models.py -- forms.py ... -
ManagementForm data is missing or has been tampered Django FormTools Wizard
views.py FORMS = [("customer", CustomerModelForm), ("supplier", SupplierModelForm), ("brand", BrandMasterModelForm)] TEMPLATES = {"customer": "add_customer.html", "supplier": "supplier_master", "brand": "add_brand.html"} class MultiStepWizard(SessionWizardView): def get_template_names(self): return [TEMPLATES[self.steps.current]] def done(self, form_list, **kwargs): form_data = [form.cleaned_data for form in form_list] return render(self.request, "dashboard_inventory.html", {"data":form_data}) urls.py path('manage_sales/', MultiStepWizard.as_view(FORMS), name="MultiStepWizard") forms.py class CustomerModelForm(forms.ModelForm): class Meta: model = Customer fields = ('name','address','contact','email','state','gstin','pan') class SupplierModelForm(forms.ModelForm): class Meta: model = Supplier fields = ('name','address','city','manager','contact') widgets = { 'name':forms.TextInput(attrs={'class': 'form-control'}), 'address':forms.TextInput(attrs={'class': 'form-control'}), 'city':forms.TextInput(attrs={'class': 'form-control'}), 'manager':forms.TextInput(attrs={'class': 'form-control'}), 'contact':forms.TextInput(attrs={'class': 'form-control'}), } class BrandMasterModelForm(forms.ModelForm): class Meta: model = BrandMaster fields=('brand_name', 'suppliername') widgets={'brand_name':forms.TextInput(attrs={'class': 'form-control'}),'suppliername':forms.Select(attrs={'id':'choicewa','class': 'form-control','required': 'true'}), } Hi everyone, m trying to use formtool to save multistep forms with my own templates. But I am getting error "ManagementForm data is missing or has been tampered Django FormTools Wizard" while saving first form, then unable to proceed further. Please help. -
Hot to get string in template?
view.py queryset = a:1,2,3|b:1,2,3 # this is category return render(request, 'project/company_ad_write.html', {"data":queryset}) filter.py @register.filter(name='get_category') def get_category(str): str = str.split('|') return str What I want. {{data.category|get_category['0']}} result a:1,2,3 and again str = str.split(':') result a and 1,2,3 Do you have any idea? -
DRF-simple-JWT: New user registered but not able to login
I am able to create a New User using the "register" endpoint. I can the user being created on the admin page as well. When I try to get an access token for the newly created user I get the error "detail": "No active account found with the given credentials". I am correctly passing the valid credentials so I don't know what the problem might be. Here I have demonstrated the same. Here goes the code: serializers.py from rest_framework import serializers from .models import CustomUser from django.contrib.auth.hashers import make_password class RegisterUserSerializers(serializers.ModelSerializer): class Meta: model = CustomUser fields = ('email', 'password') extra_kwargs = {"password": {"write_only": True}} def create(self, validated_data): password = validated_data.pop('password', None) instance = self.Meta.model(**validated_data) if password is not None: instance.set_password(password) instance.save() return instance def validate_password(self, value: str) -> str: """ Hash value passed by user. :param value: password of a user :return: a hashed version of the password """ return make_password(value) views.py from rest_framework import status from rest_framework.response import Response from rest_framework.views import APIView from rest_framework.permissions import AllowAny from .serializers import RegisterUserSerializers from rest_framework_simplejwt.tokens import RefreshToken class CustomUserCreate(APIView): permission_classes = [AllowAny] def post(self, request): reg_serial = RegisterUserSerializers(data=request.data) if reg_serial.is_valid(): newUser = reg_serial.save() if newUser: context = { "message": f"User … -
how do I check validation error in django
I am trying to validate fields which are filtered by user. if in filtered data have entered any special character then I wish to print validation error in backend. I am getting Invalid data in output if I pass special characters by url. but getting below error invalid data.. Internal Server Error: /sites/live-data/ UnboundLocalError at /sites/live-data/ return render(request, 'live-data.html', {'sites': sites.json(), 'categories': categories.json()}) UnboundLocalError: local variable 'sites' referenced before assignment here is the code Validations.py def validateAlphanumeric(alphanumeric): alphanumeric_pattern = re.compile(r"^[0-9a-zA-Z]*$") validate_alphanumeric = RegexValidator(alphanumeric_pattern, 'Only alphanumeric characters are allowed.') try: validate_alphanumeric(alphanumeric) return True except ValidationError: return False views.py def liveData(request): ip = request.session['ip'] label = "" category = "" status = "" ordering = "" try: ordering = request.GET['order_by'] except: pass try: category = request.GET['category'] status = request.GET['status'] except: pass if not request.user.is_staff: label = request.session['label'] site_url = ip+"/sites/list/" category_url = ip+"/setup/category/list/" if Validations.validateAlphanumeric(category) and Validations.validateAlphanumeric(status): print("valid.") headers = { 'authorization': "Bearer *****", } params = { 'label': label, 'category': category, 'status': status, 'ordering': ordering } sites = requests.request("GET", site_url, headers=headers, params=params) categories = requests.request("GET", category_url, headers=headers) else: print("invalid data..") return render(request, 'live-data.html', {'sites': sites.json(), 'categories': categories.json()}) -
Redirect within a class based view
I'm working with a FormView. In order to access the page, the user has to pass a certain test. Otherwise, they'll be logged out and redirected. Where within this CBV is the best place to put the redirect logic? Thanks! -
Django Images arent showing in HTML template using Dropzone JS
I'm using the dropzone.js on my django project for editing image i send image on submit button my view function show the data but i'm not able to show the on the html template that i have taken from the user. Predefined {'context':context} is visible but when i append it inside my if condition it run successfully but show not appearance on the html template def index(request): allimg = [] userimg1 = "" userimg = "" if (request.method == 'POST'): i=0 img=[] while(request.FILES.get('file['+str(i)+']')!=None): img1=( request.FILES.get('file['+str(i)+']')) print(img1) img.append(img1) i=i+1 for image in img: imgsize=image.size/1024 userimg = Picture(image=image,name=image.name) userimg.save() print(userimg.image.name) # width = int(request.POST.get('imgwidth')) rot = rotater('media/' + userimg.image.name, 90) userimg1 = EditPicture(editimage=rot,name=image.name) userimg1.save() allimg.append([userimg,userimg1]) return render(request, 'imgeditor/Homepage.html',allimg) return render(request, 'imgeditor/Homepage.html') <body> <div class="container"> <form action="/imagerotate/" method="POST" class="dropzone" enctype="multipart/form-data" name="dropZone" id="myDropzone"> {% csrf_token %} <div class="fallback"> <input name="file" type="file" multiple> </div> </form> <button type="submit" value="Submitbtn" id="submit-all" class="btn btn-primary">Submit</button> </div> <div class="container"> {%for userimg,userimg1 in allimg%} <img src="media/{{ userimg.image }}" width=100px height="=100px"> <img src="media/{{ userimg1.editimage }}" width=100px height="=100px"> {% endfor %} </div> </body> <script> Dropzone.autoDiscover = false; const myDropZone = new Dropzone("#myDropzone", { paramName: 'file', autoProcessQueue: false, clickable: true, maxFilesize: 5, params: {}, uploadMultiple: true, parallelUploads: 10, maxFiles: 10, addRemoveLinks: true, // acceptedFiles: … -
Django rest framework: many to many through model write-able
I have a Order model and Item model. Each order consist of multiple Items. I connect the relationship with through model called OrderItem. Below is my code Models: class Order(models.Model): PAYMENT_TYPES = [ ('COD', 'Cash On Delivery'), ('STRIPE', 'Stripe Credit/Debit'), ('PAYPAL', 'Paypal') ] STATUSES = [ (1, 'Process'), (2, 'Completed'), (3, 'Hold') ] number = models.CharField(max_length=255) total = models.FloatField(null=True) credits_issued = models.FloatField(null=True) paid = models.FloatField(null=True) expected_delivery = models.DateTimeField(null=True) payment_type = models.CharField(max_length=255, choices=PAYMENT_TYPES, null=True) date = models.DateTimeField(default=now) status = models.CharField(max_length=2, choices=STATUSES) note = models.CharField(max_length=255, null=True) ordered_by = models.ForeignKey(User, on_delete=models.CASCADE) location = models.ForeignKey(Location, on_delete=models.CASCADE) vendor = models.ForeignKey(Vendor, on_delete=models.CASCADE) items = models.ManyToManyField(Item, through='OrderItem', related_name='orders') class Meta: app_label = 'InventoryApp' db_table = 'order' class Item(models.Model): STATUSES = [ (1, 'Active'), (0, 'Inactive') ] DEFAULT_STATUS = 1 name = models.CharField(max_length=255) quantity = models.IntegerField(null=True) last_bought_price = models.FloatField(null=True) order_by = models.DateTimeField(null=True) file_name = models.CharField(max_length=255, null=True) status = models.CharField(max_length=2, choices=STATUSES) category = models.ForeignKey(ItemCategory, on_delete=models.CASCADE) class Meta: app_label = 'InventoryApp' db_table = 'item' class OrderItem(models.Model): order = models.ForeignKey(Order, on_delete=models.CASCADE) item = models.ForeignKey(Item, on_delete=models.CASCADE) quantity = models.IntegerField() price = models.FloatField() class Meta: app_label = 'InventoryApp' db_table = 'order_item' unique_together = [['order', 'item']] I wanna know how to make serializers for through model which is writeable. I have written serializers but … -
Nginx not serving static files in production with whitenoise
Everything looks like it should work, but I get a 404 error in console for all static files including css, js and images. What am I doing wrong? Everything else seems to work just fine. nginx.conf server { listen 443 ssl; server_name www.${NGINX_HOST}; ssl_certificate /etc/letsencrypt/live/${NGINX_HOST}/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/${NGINX_HOST}/privkey.pem; ssl_trusted_certificate /etc/letsencrypt/live/${NGINX_HOST}/chain.pem; location / { proxy_pass http://api; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; proxy_redirect off; } location /static { autoindex on; alias /myapp/collectedstatic/; } location /media/ { autoindex on; alias /myapp/media/; } } settings.py STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage' ... MIDDLEWARE = [ ... 'whitenoise.middleware.WhiteNoiseMiddleware', ... ] STATIC_URL = '/static/' STATICFILES_DIRS = ( os.path.join(BASE_DIR, 'static'), ) STATIC_ROOT = os.path.join(BASE_DIR, 'collectedstatic') MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') -
Is it possible to cycle through django model object fields?
I have a user & user_profile model and I've allowed signup with nullable fields so user can fill profile later but I want the app to check if any profile fields are null after every login. Is it possible to cycle through django model object fields? I tried the below code and got 'uProfile is not iterable' def profile_Populated(usr): for x in usr: if x == 'null': return False return True if profile_Populated(request.user.uProfile) == True: pass else: return redirect("account:profile_edit") -
How to redirecting to a page after registering a user in - Django
After a user successfully registers an account, the webpage redirected to some other locations... I want it to redirect to a specific path, 'products/index' (products is myapp) after successful registration the user logged in automatically. I am here using function based view.. -
Authenticate user if present in the group
I want to authenticate user only if the user in present in a specific group. Can someone tell me how can I do it please ! I am doing this to add user to a group when user signs up but this is also not working def stusignup(request): if request.method == "POST": name = request.POST['name'] email = request.POST['email'] pass1 = request.POST['password1'] pass2 = request.POST['password2'] if not pass1 == pass2: messages.error(request,"Please enter same password!") else: myuser = User.objects.create_user(username=name,password=pass1,email=email) myuser.name = name myuser.email = email myuser.password = pass1 myuser.save() group = Group.objects.get(name='Student') myuser.groups.add(group) return redirect('studentloginpage') return render(request,'stusignup.html') views.py def stuloginpage(request): if request.method == 'POST': user_email = request.POST['email'] pass1 = request.POST['password'] user = User.objects.get(email=user_email,password=pass1) if user.groups.filter(name = 'Student').exists(): if user is not None: login(request,user) return redirect('homepage') #messages.success(request,'Login Succcessful') else: messages.info(request, "Username OR Password is INCORRECT") else: return HttpResponse("You aren't a Student !") I also tried this def is_student(user): return user.groups.filter(name='Student') @user_passes_test(is_student) I need help in adding the user to a group at the time of sign up and then before login checking if the user is in a particular group ! -
How to transfer file from one model to another model?
I have a model in my django app which stores a file. I have made another model in the same app to store the files using foreign key from the 1st model. When a new file arrives in model 1 push the existing file to the model 2, and keep the new file in the model 1 and all the old files in model 2. Does any one have any idea that how can I implement it. -
How can I load media file from js to django's template?
video.js file code here is my js file that has a media file that I want to load in django template. also in the template there is no code for that specific file...the template execute the js file and tries to show the media. After running the server but as I can guess without the {% load static %} tagging django won't show the media and also this {% load static %} tagging is unavailable in django. -
Django: Render text and link from a textfield in database
I am new to web development and currently building a blog. I am trying to render some text that I wrote in a textfield inside the database. The problem is that this text includes a link that redirects to another blog article. This is the textfield from database Some text I want to render in blog with a link <a href="{{ STATIC_URL }}/articles/8-Photogenic-Spiral-Staircases" class="link-within">8 Photogenic Spiral Staircases</a> html <p class="article-redirect">{{ article.redirect|safe|escape }}</p> The HTML is successfully rendered using |safe filter but when I click on the link it displays a 404 error, the requested URL in the error message is Request URL: http://localhost:8000/articles/7-Photogenic-Spiral-Staircases%7B%7B%20STATIC_URL%20%7D%7D/articles/8-Photogenic-Spiral-Staircases In the above requested URL that caused the error, "7-Photogenic-Spiral-Staircases" is the current blog post and "8-Photogenic-Spiral-Staircases" is the blog post that I want to jump to. Can someone help me understand why this is not working and what could be the possible solution? models.py class Articles(models.Model): title = models.CharField(max_length=155) slug = models.SlugField(unique=True, max_length=155) summary = models.TextField(blank=True, null=True) redirect = models.TextField(blank=True, null=True) views.py def article(request, slug): article = get_object_or_404(Articles, slug=slug) context = { 'article': article, } return render(request, 'articletemplate.html', context) urls.py urlpatterns = [ path("articles/<str:slug>/", views.article, name="articles") ] -
How do we make a htmx response trigger a form reset?
I am creating a very basic Django messaging application, and would like to use htmx to send and render messages. I am able to post, save the message, and render the partial message without issue. However, I am running into a weird problem where my form textarea is not being reset. So, I would send a message, and after the swap is inserted, my old message would still be in the textarea. This isn't very ideal! I tried to manually clear the textarea by adding an onclick event like so: Html <div id="new-message-div"></div> <form id="message-form" class="chat-form rounded-pill bg-dark" data-emoji-form="" hx-post="{% url "chat:create-message" object.pk %}" hx-target="#new-message-div"> ... {{ message_form }} ... <button class="btn btn-icon btn-primary rounded-circle ms-5" type="submit" onclick="submitForm()"> </button> </form> Script (https://stackoverflow.com/a/14589251/12758446) <script> function submitForm() { var message_form = document.getElementById('message-form'); message_form.submit(); // Submit the form message_form.reset(); // Reset all form data return false; // Prevent page refresh } </script> Despite having the message_form.submit() in the submitForm(), my form is not being submitted, but the textarea is getting reset. Question: How would I go about getting my textarea reset after successfully sending and rendering a message? Django view, based off of https://github.com/legionscript/socialnetwork/blob/84375841429887e394a2a31e1b67919f81a3cb06/social/views.py#L428 def create_message(request, pk): message = None if request.htmx: thread … -
Django login + pasword
[enter image description here][1] [1]: https://i.stack.imgur.com/ECii0.jpg Всем привет уважаемые коллеги! Сразу хочу сказать что, я недавно в IT и только учусь, прошу не употреблять профессиональные выражения, в решении данного вопроса, благодарен заранее! Я развернул проект Django, создал свой проект, хочу свой проект видоизменить, понимаю что основные файлы django лучше не изменять, по этому в корень своего проекта скинул копии файлов: login.html, base.html, base_site.html а так же в папку проекта скопировал файлы стилей: login.css и base.css. Связываю HTML файлы с CSS стилями, но при запуске своего проекта, все равно загружаются CSS файлы django. Подскажите где я ошибся и что делаю не так? Моя задача изменить стандартное отображение ввода окна login + password под свое представление !