Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
retrieve data from views to html in template in django
from django.shortcuts import render from django.http import HttpResponse mList=[ { 'id':1,'title':'ECOMMERCE WEBSITE','description':"ECOMMERCE IS GOOD" },{ 'id':2,'title':'Graphic WEBSITE','description':"graphic IS GOOD" },{ 'id':3,'title':'PORTFOLIO WEBSITE','description':"portfolio IS GOOD" }, ] def single(request,pk): projectObj = None for i in mList: if i['id'] == pk: projectObj = i return render(request,'appone/single-project.html', {'pobj': projectObj }) and in html in template folder I use: <h1> {{pobj.title}}--{{pobj.description}}</h1> but nothing appears there:( whats the problem ? It should work fine -
Django admin chained select using django-select2
I have a standard model City with a Foreign Key to Country. In my django admin, I want to implement the so-called chained select, i.e. first we pick the country and then based on that we pick the city. It would be perfect if I could also pick the city first and then get the country on the spot. Also, what makes this case more complicated is that we pick cities and countries in an inline. How do I do this? -
Django - Ensure ordering of response data is newer first
So I have some code below that returns posts that are newer than a post with post_uuid given. This is ensured because I force an ordered uuid scheme where each Post is given a uuid in order of creation. I want to enforce that that the returned serializer.data is ordered by Post creation data, with the newest best first or index=0 and oldest being last. How do I ensure this? view.py def query_to_full_post_data_serializer(request, post_query_set: QuerySet): query_set_annotated = post_query_set.annotate( creator_username=F('creator__username'), creator_avatar_url=F('creator__avatar') ) return FullPostDataSerializer(query_set_annotated, many=True) @api_view(['GET']) def get_newer_posts(request, post_uuid, count): query = generate_followee_or_join_goal_follow_query(request) query = query & Q(uuid__gt=post_uuid) serializer = query_to_full_post_data_serializer(request=request, post_query_set=Post.objects.filter(query).order_by('uuid')[:count]) return Response(serializer.data, status=status.HTTP_200_OK) serializer.py class FullPostDataSerializer(serializers.ModelSerializer): creator_username = serializers.SlugField() creator_avatar_url = serializers.SlugField() class Meta: model = Post fields = ( 'body', 'created', 'creator_username', 'uuid', 'creator', 'creator_avatar_url') Tried Solutions serializer.data.reverse() doesn't reverse the list for some reason. -
View not returning ID
I have a view that requires two args to be provided. Project_id and Questionnaire_ID There is a Project and Questionnaire model. class Questionnaire(models.Model): title = models.CharField(max_length=50, blank=False, unique=True) class Project(models.Model): project_name = models.CharField(max_length=50, blank=False, unique=True) project_website = models.URLField(max_length=50, blank=True) project_description = models.TextField(blank=True) I have a project details page, which is basically just a project landing page and from there I have a link to the questionnaire. the link is formed via a For loop {% for item in questionnaire %} <a class="dropdown-item" href="{% url 'questions' project.id questionnaire.id %}?next={{ request.path|urlencode }}">Questionnaire</a> {% endfor %} and my url conf is path('questions/<int:project_id>/<int:questionnaire_id>', view=add_fundamental_answers_view, name="questions"), but when i load the project_details page i get an error Reverse for 'questions' with arguments '(1, '')' not found. 1 pattern(s) tried: ['questions/(?P<project_id>[0-9]+)/(?P<questionnaire_id>[0-9]+)$'] So it looks like the questionnaire_id is not being past in, but i'm not sure why? def add_fundamental_answers_view(request, project_id, questionnaire_id): project = get_object_or_404(Project, pk=project_id) questionnaire = Question.objects.filter(questionnaire_id=questionnaire_id) next = request.POST.get('next', '/') if request.method =='POST': formset = AnswersForm()(request.POST) if formset.is_valid(): answer = formset.save(commit=False) answer.project_name = project answer.save() return HttpResponseRedirect(next) else: form = AnswersForm() return render(request, 'pages/formset.html', {'project': project, "form": form,'questionnaire':questionnaire}) Any ideas where I'm going wrong? Thanks -
I am getting TemplateDoesNotExist error in Django version 4.0
urls file from django.urls import path from django.urls.resolvers import URLPattern from . import views urlpatterns = [ path('hello/', views.say_hello), path('name/', views.name), path('tp/', views.tp) ] #views file def tp(request): return render(request, 'TP.html') -
What to use: Provide canvas frontend using backend api
I am thinking about a web page providing some 2d-like animations based on backend data. The animations/action change frequently based on the backend data. . Currently I am thinking about using React and combine with canvas So my thinking was to provide the data via some end point as json and using react to build the frontend.But using canvas in react found me only a few links. [1]: https://thibaut.io/react-canvas-components The most similar question I found on stack was this [2]: Mixing HTML5 Canvas and Python. But the answers are almost a decade old. Can someone provide me some basic approach / links so I am not starting totally off? Thank you in advance! cheers! hobo -
Django form error: django.db.utils.IntegrityError: UNIQUE constraint failed: legal_useragreedtolegal.user_id
Whenever, I call form.save() I get "django.db.utils.IntegrityError: UNIQUE constraint failed: legal_useragreedtolegal.user_id" I think this might be because I have a oneToOneField and Django is trying to save to UserAgreedToLegal and User Model but the User model already has that ID, so the unique constraint fails, but not sure. I am wondering how I can fix this issue. I listed my model, form, and view code below models.py import uuid from django.contrib.auth.models import User from django.db import models from django.utils import timezone as django_timezone class UserAgreedToLegal(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) agreed_first_terms_of_service = models.BooleanField(default=False, blank=False, null=False) date_agreed = models.DateField(null=True, default=django_timezone.now) uuid = models.UUIDField(default=uuid.uuid4, editable=False, unique=True) def __str__(self): return self.user.username forms.py from django import forms from legal.models import UserAgreedToLegal class TermsOfServiceAgreementForm(forms.ModelForm): class Meta: model = UserAgreedToLegal fields = [ 'agreed_first_terms_of_service' ] views.py if request.method == 'POST': form = TermsOfServiceAgreementForm(request.POST) if form.is_valid(): form.clean() terms_of_service_agreement = form.save(commit=False) terms_of_service_agreement.user = request.user terms_of_service_agreement.save()``` -
http://localhost:8000/token/ 400 (Bad Request)
in django, i have the jwt module for drf (it is called simple-jwt), and i have set up the urls as instructed in the docs, how do i fix the error, in backend side, the whole login process is supposed to be POST request: urls.py urlpatterns = [ path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), now for react part (frontend): function Login(){ let [login,setLogin] = useState({ email: '', password:'' }); let cookie = Cookies.get('csrftoken'); const { email, password } = login; function handleChange(e){ console.log(e.target.value); setLogin({ ...login, [e.target.name]: e.target.value }); } function handleSubmit(e){ const token = localStorage.getItem('token'); e.preventDefault(); axios.post('http://localhost:8000/token/',login,{withCredentials:true},{headers: {'Content-Type': 'application/json', 'X-CSRFToken': cookie,'Access-Control-Allow-Origin':'*','Authorization': `Bearer ${token}`}}) .then(res => { console.log(res.data); } ) .catch(err => console.log(err)) } return ( <div className="container"> <form method='post' onSubmit={handleSubmit}> <h1>Login</h1> <label> Email: <input type='text' name = 'email' value={email} onChange={e=>handleChange(e)} required/> </label> <label> Password: <input type='password' name = 'password' value={password} onChange={e=>handleChange(e)} required/> </label> {isLoggedin = true} <button type='submit'>Login</button> </form> <p className='mt-3'> Don't have an Account? <Link to='/signup'>Sign Up</Link> </p> </div> ); }; export default Login; ``` this is login component, I am getting bad request (400) error, but I cant find out why, and how to fix it? if there is anything else (more code, or more information) to add, … -
How do I override Django's default form error templates - at the project level?
I know this topic has been asked a few times before on StackOverflow, and the docs seem pretty clear about how to do it, but it's not working for me and I'm stumped. Overriding at the project level makes the most sense to me so I created a templates directory outside my app directories - at the same level as manage.py - and I added that directory path to my TEMPLATES['DIRS'] setting TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'APP_DIRS': True, 'DIRS': [BASE_DIR / 'templates'], # Allow overriding of other apps templates 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] I checked where the form is getting its error template by printing the path in the View print(form.errors.template_name) The print statement printed django/forms/errors/dict/default.html so I put a new custom default.html file inside mydjangoproject/templates/django/forms/errors/dict/. This doesn't work however. My new default.html template file isn't being used. Any ideas for what I'm doing wrong? -
Data validation on api endpoints ? What approach do you guys take?
To provide context to my question, consider this example. We have three tables (these are fictitious) animal -> [id, name] animal_breed -> [id, name, animal, userId] animal_registration_table -> [id, userId, breedId] Now i have seen two kinds of devs, One who does not validate if the breedId being inserted actually belongs to the user. They just enter the data to db directly assuming that the app or frontend will send them valid data. One who first checks if the breedId belongs to userId by checking from the animal_breed table Now i am more of the 2 guy. But i want to know what approach is good, approach 2 requires an additional query or check, or is there a better way to do this by having constraint in db and if so can you help me on directing me to what sort of constraints should i have or any other better alternative, as i don't feel point 1 is a good way to go. (p.s not that highly skilled with db so require direction and help) -
Envoy proxy: 503 Service Unavailable
Client(Nuxt) is up on http://localhost:3000 and the client sends requests to http://0.0.0.0:8080/. Server(Django) is up on 0.0.0.0:50051. I configured the envoy.yaml file as follows: static_resources: listeners: - name: listener_0 address: socket_address: { address: 0.0.0.0, port_value: 8080 } filter_chains: - filters: - name: envoy.filters.network.http_connection_manager typed_config: "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager codec_type: auto stat_prefix: ingress_http route_config: name: local_route virtual_hosts: - name: local_service domains: ["*"] routes: - match: { prefix: "/" } route: cluster: greeter_service max_stream_duration: grpc_timeout_header_max: 0s cors: allow_origin_string_match: - prefix: "*" allow_methods: GET, PUT, DELETE, POST, OPTIONS allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout max_age: "1728000" expose_headers: custom-header-1,grpc-status,grpc-message http_filters: - name: envoy.filters.http.grpc_web - name: envoy.filters.http.cors - name: envoy.filters.http.router clusters: - name: greeter_service connect_timeout: 0.25s type: logical_dns http2_protocol_options: {} lb_policy: round_robin load_assignment: cluster_name: cluster_0 endpoints: - lb_endpoints: - endpoint: address: socket_address: address: 0.0.0.0 port_value: 50051 But the following error occurs and, as it seems, the requests do not reach the Django 0.0.0.0:50051 server. 503 Service Unavailable grpc-message: upstream connect error or disconnect/reset before headers. reset reason: connection failure, transport failure reason: delayed connect error: 111 -
Django, I'm not able to pass a variable from Views to html template
Good day, I'm new to Django and following CS50Web. I've been having a headache for a couple of days trying to understand why this is not working. Basically we have a Flights model and a Passengers model with a many-to-many relationship. here is the views.py code: def flight(request, flight_id): flight = Flight.objects.get(pk=flight_id) passengers = flight.passengers.all() print(passengers) return render(request, "flights/flight.html", { "flight": flight, "passengers:": passengers }) and here is the html: <h2> Passengers </h2> <ul> {% for passenger in passengers %} <li>{{ passenger }}</li> {% empty %} <li>No passengers.</li> {% endfor %} </ul> I know the passengers variable is not empty, the print statement returns: "<QuerySet [<Passenger: Fidel Castro>, <Passenger: James Bond>, <Passenger: Larry Bird>]>" Still, the rendered Html page always shows no passengers! Could a good soul help me understand what I'm I doing wrong? Because I'm out of ideas at this point. Thank you in advance -
Django Upload File to S3
How do I link my form to upload in AWS S3 and display the avatar? (Using views.py) I just need to use my current bucket which works for static files for media after making the media file private and only for authenticated users to use. models.py from django.db import models from django.contrib.auth.models import AbstractUser class Profile(AbstractUser): """ bio = models.TextField(max_length=500, blank=True) phone_number = models.CharField(max_length=12, blank=True) birth_date = models.DateField(null=True, blank=True) """ avatar = models.ImageField(default='default.png', upload_to='users/', null=True, blank=True) pages/forms.py from django import forms from django.core.files.images import get_image_dimensions from pages.models import Profile class UserProfileForm(forms.ModelForm): class Meta: model = Profile def clean_avatar(self): avatar = self.cleaned_data['avatar'] try: w, h = get_image_dimensions(avatar) #validate dimensions max_width = max_height = 100 if w > max_width or h > max_height: raise forms.ValidationError( u'Please use an image that is ' '%s x %s pixels or smaller.' % (max_width, max_height)) #validate content type main, sub = avatar.content_type.split('/') if not (main == 'image' and sub in ['jpeg', 'pjpeg', 'gif', 'png']): raise forms.ValidationError(u'Please use a JPEG, ' 'GIF or PNG image.') #validate file size if len(avatar) > (20 * 1024): raise forms.ValidationError( u'Avatar file size may not exceed 20k.') except AttributeError: """ Handles case when we are updating the user profile and do … -
django video file not playing
I am trying to build a video streaming app with django. class Video(models.Model): author = models.ForeignKey(User, on_delete=models.CASCADE) thumbnail = models.ImageField(upload_to='thumbnail', blank=True, null=True) file = models.FileField(upload_to='video', validators=[FileExtensionValidator(allowed_extensions=['mov', 'MOV','avi','mp4', 'MP4','webm','mkv'])]) list view {% for video in page_obj.object_list %} <video width="400" height="350" controls {% if video.thumbnail %} poster="{{ video.thumbnail.url }}" {% endif %} > <source src= "{{ video.file.url }}" type="video/mov"> </video> {% endfor %} The result is that when I click on play, it stuck at thumbnail and no data displayed on timeline, which video is not loaded. When I goes to the url of the video, there is an error in console Failed to load resource: Plug-in handled load I wonder why this happens, will be grateful for your help. in addition, in html, type attribute of source tag, is there a way I can get meta type definition from FileField? for example, if it is mp4 I want to get video/mp4 in string. >>> from video.models import Video >>> vs = Video.objects.all() >>> v = vs[0] >>> v.video Traceback (most recent call last): File "<console>", line 1, in <module> AttributeError: 'Video' object has no attribute 'video' >>> v.file <FieldFile: video/roc_i9zy5He.mov> >>> v.file.url '/media/video/roc_i9zy5He.mov' >>> v.file.type Traceback (most recent call last): File … -
This page isn’t working , redirected you too many times. django
When I run python manage.py runserver the server runs fine. But the web page show the redirection. I have attached the image link below. how can I resolve the issue? redirected you too many times -
Select a valid choice. 1 is not one of the available choices. django error
I am creating an app that needs value from views.py for filtering data in choice field. So I passes the data from views to init using kwargs. I wrote a query and added that in choice field in init. The data is displaying correctly but when I post the form It throwing the above error. "Select a valid choice. 1 is not one of the available choices." class General(ModelForm): def __init__(self, *args, **kwargs): self.n_data1 = kwargs.pop('data1') super(GeneralPostingForm, self).__init__(*args, **kwargs) CHOICES = Glheads.objects.filter(data=self.n_data1, status=1, acmast=1) new_choices = [ (p.head, f'{p.head}-{p.detail}') for p in CHOICES ] self.fields['head'].choices = new_choices head = forms.ChoiceField(widget=forms.Select(), label='HEAD') -
Request permission not appearing in fcm for django
I am using gitpod to test the push notifications that I have setup in DJnago using firebase. Everything went well but in the end the request permission dialog box didn't appear. I am not sure what is the cause. The link that I followed is this one: https://blog.hipolabs.com/testing-push-notifications-locally-with-firebase-ef052531af03 It was supposed to come like this: But in mine it appears like this: The request permission button is missing on mine. I have done several attempts but the same result. The index.html file looks like this: function requestPermission() { console.log('Requesting permission...'); Notification.requestPermission().then((permission) => { if (permission === 'granted') { console.log('Notification permission granted.'); // TODO(developer): Retrieve a registration token for use with FCM. // In many cases once an app has been granted notification permission, // it should update its UI reflecting this. resetUI(); } else { console.log('Unable to get permission to notify.'); } }); } -
how to sort a query of Django Model by Sub String
there are list of companies like this Google Facebook Arac Curc FkbaOl I put 'a' character param. Then it should return the companies which contains a character. right? currently, it is working well it returns the all companies which has 'a' character. it returns the all companies which has 'a' character. but sorting has. problem Facebook Arac FkbaOl I guess currently, it returns these three which contains 'a' character it should look like this. Arac Facebook FkbaOl which starts with 'a', should be at the top -
Website that generates quotes from my db depens on 365 days
I like to create website that show quotes depends on days(365) for this how can create js function . Example: day 1 : hello day 2 : hi For today 1 : web sites print hello How can I create this for 365 days -
How can I join multiple models in Django into a virtual table?
If I have 3 models, like: class Cow(models.Model): name = number_of_eyes = number_of_feet = color = class Pig(models.Model): name = number_of_eyes = number_of_feet = intelligence = class Horse(models.Model): name = number_of_eyes = number_of_hooves = weight_capacity = speed = And I'm interested in making a single Livestock table in my template that has instances of all 3, but I'm only interested in these columns that all 3 models have: name number_of_eyes number_of_feet (number_of_hooves if Horse) And we can ignore all other columns. How can I join them into a single queryset? The end goal is to get a single virtual table (queryset) that I can do a few other operations on (order_by, slice), and then return the data in just those columns. Is this possible in the Django ORM? -
Django, successful login, but still anonymous user
Being anonymous user even after successful login, here is views.py: class LoginView(views.APIView): def post(self, request): data = serializers.LoginSerializer(data=request.data) print(data.is_valid()) print(data.errors) print(f" HEEERE::: {data}") if self.request.method == 'POST': if data.is_valid(): auth = authenticate( username=data.validated_data['email'], password=data.validated_data['password']) print(f" email check : {data.validated_data['email']}") print(f"auth:: {auth}") if auth is not None: login(request, auth) print("Hello World") return redirect("/somelink") else: return HttpResponse("Invalid Credentials") else: return HttpResponse("Data not being validated :O") class LogoutView(views.APIView): def post(self, request): logout(request) serializers.py class LoginSerializer(serializers.Serializer): email = serializers.EmailField() password = serializers.CharField(write_only=True) def validate(self, data): email = data.get("email") print(f" email here : {email}") password = data.get("password") user = authenticate(username=email, password=password) print(f"{user} username serializer ") print(f"this is data : {data}") if user is not None: return data raise serializers.ValidationError("Incorrect Credentials") in frontend side (React): login component: import React, { useState } from 'react'; import { Link , Redirect} from 'react-router-dom'; import { connect } from 'react-redux'; import { login } from '../actions/auth'; import axios from 'axios'; import Cookies from 'js-cookie'; function Login(){ let [login,setLogin,isLoggedin] = useState({ email: '', password:'' }); let cookie = Cookies.get('csrftoken'); const { email, password } = login; function handleChange(e){ console.log(e.target.value); setLogin({ ...login, [e.target.name]: e.target.value }); } function handleSubmit(e){ e.preventDefault(); axios.post(' http://127.0.0.1:8000/login/',login,{withCredentials:true},{headers: {'Content-Type': 'application/json', 'X-CSRFToken': cookie,'Access-Control-Allow-Origin':'*'}}) .then(res => { console.log(res.data); setLogin({ ...login, … -
Django Rest Framework: saving data into database from a particular input structure
This is my first time with Django Rest Framework. I have two particular models for storing data into the database whose are: class RuleTree(models.Model): ruleId = models.IntegerField(primary_key=True) parentId = models.IntegerField() keyText = models.CharField(max_length=200) class RuletreeExtended(models.Model): rule = models.OneToOneField(RuleTree,on_delete=models.CASCADE,primary_key=True) createdOnUtc = models.TextField(blank=True) bodyRegion = models.CharField(blank=True,max_length=100) isActive = models.BooleanField(blank=True) I need to design an API with the following structured inputs and save them to the pre-defined database model (there are several more fields in this input structure that need to access from views.py and will be useful later). { "Success": true, "Status": "insert", "Data": { "RuleJson": "{\"condition\":\"AND\",\"rules\":[{\"condition\":\"OR\",\"rules\":[{\"id\":\"1206\",\"field\":\"ansid_1206\",\"type\":\"integer\",\"input\":\"checkbox\",\"operator\":\"in\",\"value\":[2620,2621,2622]},{\"id\":\"1383\",\"field\":\"ansid_1383\",\"type\":\"integer\",\"input\":\"checkbox\",\"operator\":\"in\",\"value\":[3058,3059,3060,3061,3062,3063,3064,3065,3066,3067]}]}],\"valid\":true}", "ICD10Codes": "3916", "CreatedOnUtc": "2021-11-01T10:33:13.7145563", "UpdatedOnUtc": "2021-11-09T13:04:01.3089361", "BodyRegion": [ 0, 1, 5 ], "IsDefaultBodyRegionRule": false, "DefaultBodyRegionList": [ 0, 4 ], "IsActive": false, "IsDeleted": false, "Id": 5504, "ParentId": 276, "KeyText": "PFRProv1", "Title": "Plantar Fasciitis Right" } } Please advise me how to access this input data from views.py so that I can store them in my database; And how do I design a suitable serializer for this. -
Django display several foreign key values in template
I have tried dozens of solutions on her to solve this but nothing seems to be working as expected. I'm trying to show a list of Facilites which are connected with several Foreign Keys to additonal models. (FacilityAddress, FacilityInspectionInfo and FacilityComplaints). I can show the facility names but i cannot show the data of the models within the foreign key models like FacilityAddress for example: Model class Facility(models.Model): UUID = models.CharField(max_length=150, null=True, blank=True) Name = models.CharField(max_length=50, null=True, blank=True) admin_uid = models.OneToOneField(User, null=True, blank=True, on_delete=models.SET_NULL) IssuedNumber = models.CharField(max_length=20, null=True, blank=True) mainimage = models.ImageField(null=True, blank=True) Capacity = models.IntegerField(null=True, blank=True) Licensee = models.CharField(max_length=50, null=True, blank=True) Email = models.EmailField(max_length=30, null=True, blank=True) AdministratorName = models.CharField(max_length=30, null=True, blank=True) Status = models.CharField(max_length=10, null=True, blank=True) TelephoneNumber = models.CharField(max_length=20, null=True, blank=True) ClosedTimestamp = models.IntegerField(null=True, blank=True) MostRecentLicenseTimestamp = models.IntegerField(null=True, blank=True) class Meta: verbose_name_plural = "facilities" def __str__(self): return self.Name class FacilityAddress(models.Model): PrimaryAddress = models.CharField(max_length=50, null=True, blank=True) SecondaryAddress = models.CharField(max_length=50, null=True, blank=True) City = models.CharField(max_length=50, null=True, blank=True) RegionOrState = models.CharField(max_length=30, null=True, blank=True) PostalCode = models.CharField(max_length=20, null=True, blank=True) Geolocation = models.CharField(max_length=20, null=True, blank=True) AddressInfo = models.ForeignKey(Facility, null=True, blank=True, on_delete=models.CASCADE) class Meta: verbose_name_plural = "facility addresses" def __str__(self): return f"{self.PrimaryAddress} {self.City}" class FacilityInspectionInfo(models.Model): ComplaintRelatedVisits = models.IntegerField(null=True, blank=True) InspectionRelatedVisits = models.IntegerField(null=True, blank=True) NumberOfVisits = … -
CommandError: 'D:\Python\Project\resume_1' already exists
I am creating a django project. I can successfully create virtual environment and pip install django, but when I try to create project using django-admin startproject resume_1 There is an error that showed CommandError: 'D:\Python\Project\resume_1' already exists I tried uninstalling django twice but it only allowed me to uninstall once, so it is likely not about duplicate django, I also checked the lib\site-packages, there are no duplicated folders or folders either. However, I do have two versions of python right now, one installed along with anaconda, one is separated from anaconda and directly downloaded from python.org. Right now, I am just using the separate python, I even checked the python version, and the pip version, so it should be fine. Still, I could be wrong since I am not that experienced. What should I do? -
How can i fully customize sidebar_menu in django admin panel?
I don't know any way how can I overright sidebar_menu.html or create some progress to customize it. so can i get some hits what can i do for coustomize?