Anonymous
Pip list
not working
bluethunder
not working
What error it's giving share
Anonymous
Fatal error in launcher: Unable to create process using '"C:\Users\Lords\Desktop\RL-2\RealEstate-main\env\Scripts\python.exe" "C:\Users\Lords\Desktop\New folder\RL-2\testing\RealEstate\env\scripts\pip.exe" list': The system cannot find the file specified
Владимир
You broke the way to the python because of the transfer
Владимир
Try reinstalling python
recreate virtualenv
Владимир
But it needs package versions after recreate
Anonymous
first i am created the project at \Users\Lords\Desktop\RL-2\RealEstate-main\env so pip list is triggering to there ,after i am moved total project to \Users\Lords\Desktop\New folder\RL-2\testing\RealEstate\ so now iam getting error
Anonymous
But it needs package versions after recreate
😔 i don't know package versions i am tried to recreate virtualenv now i am getting version errors so i need to know what versions installed in my previous env
Владимир
I understand
Владимир
can you run the code?
jobless
Guys , my static files are not linking with my template/html files and I tried everything shown on YouTube and nothing is working out. Do you guys have any idea about it.
When iam linking html with CSS with online link its working perfectly but its not working with my system files(static files)
jobless
Anonymous
can you run the code?
yeah total project is working fine now i need to move to the production for aws there i need dependences 😔
S
I want to build a full stack website for a cafeteria. How should I go ahead and build the backend part of it using Django?
Владимир
yeah total project is working fine now i need to move to the production for aws there i need dependences 😔
try run this code: import pkg_resources installed_packages = pkg_resources.working_set for package in installed_packages: print(f"{package.key}=={package.version}")
Anonymous
When iam linking html with CSS with online link its working perfectly but its not working with my system files(static files)
please check static files directorys & roots are perfectly given or not or else try with whitenoise
Владимир
Anyone help out 🥲
do you need a frontend framework ?
jobless
jobless
please check static files directorys & roots are perfectly given or not or else try with whitenoise
May be theres a mistake in root directory( I've 2 folders with name 'static ' --> one in project folder and another one is in desktop... Does it causes any problem?)
Anonymous
How's it going?
it is working but still i am getting version errors i can handle thankyou for response
Anonymous
May be theres a mistake in root directory( I've 2 folders with name 'static ' --> one in project folder and another one is in desktop... Does it causes any problem?)
we need to create one static folder only if we create multiple directory we need to create with different names other wise will get error
jobless
we need to create one static folder only if we create multiple directory we need to create with different names other wise will get error
Yeah, but I even gave a path and it's same error and I even created a css and html files in template folder itself but às usual same error...
Anonymous
Yeah, but I even gave a path and it's same error and I even created a css and html files in template folder itself but às usual same error...
without seeing code we can't help dude please recheck once static files dirs & roots if you are not using whitenoise add static urls if still getting error go through stackoverflow
Jitxs
Guys , my static files are not linking with my template/html files and I tried everything shown on YouTube and nothing is working out. Do you guys have any idea about it.
check correctly talking your time you probably missed something out in those video here some recommendations: 1.put your app in installed apps 2.the static folder is it in main dir or inside your app 3.load static {% load static %} 4.right file path to your css and javascript in html template there also you have to give "{% static 'my_app/example.jpg' %}" the " and ' matters 5.read the official documentation
Anonymous
How's it going?
Thank's alot it is working fine
☄️ TITAN ☄️
Hey, anyone has a Django guide. If so, please share it with me ✨
Doragonsureiyā
Hey, anyone has a Django guide. If so, please share it with me ✨
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Danya
Hello, I wrote a django registration using email instead of username. The registration goes fine, but the authorization fails and I get the following message {'invalid_login': 'Please enter the correct %(username) and password. Please note that both fields may be case sensitive.', 'inactive': 'This account is inactive.'} Help me, please)
Danya
I'm entering the correct data
Anonymous
I'm entering the correct data
Can you share the screenshot
Danya
What file ?
Danya
from django.contrib.auth import get_user_model from django.contrib.auth.backends import ModelBackend class EmailBackend(ModelBackend): def authenticate(self, request, username=None, password=None, **kwargs): UserModel = get_user_model() try: user = UserModel.objects.get(email=username) except UserModel.DoesNotExist: return None else: if user.check_password(password): return user return None This is correct?
Danya
But this error appeared in the condition form.is_valid()
Danya
Is this arise in views.py
Yes, I will send it in 15 minutes. Ok ?
Anonymous
You have to change the redirect function with dictionary
Anonymous
In redirect u declare like new:home in set form so u have to have it to dictionary
Danya
In redirect u declare like new:home in set form so u have to have it to dictionary
How it will be reflected on condition is_valid(). I don't understand a little
Forever
Anyone please help me 😭
Forever
Suppose If user try to access those page which require login, and if he is not logged in it will redirect it to login page but after login it is not redirecting back to the page user intended to open . http://127.0.0.1:8000/app/login/?next=/app/special/ this is the page it redirect from http://127.0.0.1:8000/app/special if user is not logged in.
Forever
Any help please
IDRIS
Can someone help me how can i create a Add to Cart in my Django project, im Really stuck
Anonymous
In views change if form.is_valid(): instead of form_login.is_valid():
Doragonsureiyā
Danya
In views change if form.is_valid(): instead of form_login.is_valid():
I have created login_form why i should change form instead of login_form
Danya
form_login = UserLoginForm(request.POST)
Forever
https://dpaste.org/7gpek my view
Anonymous
I have created login_form why i should change form instead of login_form
Form is a built in method so you have to declare instead of login_form
S.F.
Hi Have any of you used dockerfile with python image:3. 9-alphine I want make dockerfile for simple django app and small image size
Top
I am django developer.
Top
Nice to meet all of you
Amir
Guys when I add images to my vue page and "urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)" to urls.py my api stops working and api will respond with 404. is there any opinion?
MHJ
Hi guys I am using Virtual envi in a project django but after that I installed some package such as star-ratings but I can not use it , anyone knows how can I solve this problem
Anonymous
please check how to use on https://pypi.org/project/django-star-ratings/ . if doesnt work then send error message . will try to solve it
S.F.
build distroless image
I didn't understand
Doragonsureiyā
Hi Have any of you used dockerfile with python image:3. 9-alphine I want make dockerfile for simple django app and small image size
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
cj
The project which I work on django project and.I try to make dockerfile in small size
but your problem is not related to Django, but to Docker, so nothing to do in this group
Yusif
Hi, if i don't modify django User model and continue default. Then can i modify User model? Will this cause me problems later?
Muflone
Hi, if i don't modify django User model and continue default. Then can i modify User model? Will this cause me problems later?
You'll have a lot of troubles to change authentication model later. Do it as the first thing
vr
Any one have idea abou novu library
Doragonsureiyā
Any one have idea abou novu library
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
vr
It's django related only