Zhaks
Hi, everyone! I want to convert datetime field to str AND keep name as original name in output values. Book.objects.values( created_at = Cast('created_at', output_field=CharField()) ) but it throws the error: The annotation 'created_at' conflicts with a field on the model
Zhaks
How can this be achieved?
Godfred
Please I need a mentor
Doragonsureiyā
Please I need a mentor
This is neither a job board nor a bulletin board.
Doragonsureiyā
Please I need a mentor
this group is not for mentoring/teaching one-on-one. Here we can try to help you if you have an error in the python code you wrote and you tried everything to solve it, but couldn't succeed.
Andrew
Hello guys I have made api with django rest api & the react developer can't get the data so please if anyone can help I would really Appreciate it
Pradheep
You need to provide package name as well. It means that the import statement will be: from <app_name>.models import <model_name>
when i am debugging my django code i am getting this error Tried putting application name also but it throws error 'no module named <app name>'
Pradheep
ModuleNotFoundError: No module named 'accounts'
Pradheep
code -> from .models import Customer, Product, Order Error -> ImportError: attempted relative import with no known parent package it comes only if i debug any solution for this
Kumar Shreyansh
What is the parent folder name in which the models are defined
Pradheep
crm
Andrew
Hello guys I have made api with django rest api & the react developer can't get the data so please if anyone can help I would really Appreciate it please some tell my what's the issue
S
Hai please help me, how can I write a left join query using orm
Balde
how to solve this error ((django.db.utils.operationalerror: no such table: django_content_type)) i tried all database deletion, migrations. Help me please.
Targoon
also check forms, where you used class Meta:to define a model
Pradheep
Hai please help me, how can I write a left join query using orm
https://www.youtube.com/watch?v=nocGATpEiGo i hope this would help you
Shear
Hello guys, how do create a model that uploads multiple images or a folders of files. I want to make an improvement on what I have, where I upload files one by one which is less efficient
Анатолий
Hello guys, how do create a model that uploads multiple images or a folders of files. I want to make an improvement on what I have, where I upload files one by one which is less efficient
If I understand you, you can make 2 models: a model for an image and a model that you want to have multiple images, here you should to use ManyToMany field that refers to the first model. At least I saw this solution in my work e-commerce project, where it was necessary to upload 1 or more images of a product. Maybe you worth to try this way
Cabrel
Please, I need help. How can I implement geofencing system with django (I already have an authentication system and I want to add geographic restrictions)
V
Hello, I started learning Django on my own, I'm doing a django project to add it in my resume. In this project when I try to submit a form, I'm getting an error as CSRF verification failed. Request aborted. Can anyone please help me with this. Guidance is appreciated as I am a student.
Il
Hello everyone , Please if here is any one could help me to know the right steps to make my django website multi Language, i already started , but here is no changes applied on my web site for the translation
Il
Right , thanks
V
I think you have used same form for multiple use
I used only one form to contact me in my portfolio website
V
You need to add {%csrf_token%} before your form
Oh okai I didn't add this in html file
V
Thank you
Anonymous
While using CSRF TOKEN :propose of CSRF is to protect your form from others. So you can not connect this form with another website with use of CSRF
Georg
hi. Does sphinx integrate with PostgreSQL ?
Artem
Sup guys! Do anyone know a good articles or resources about testing "ajax-views"? Is it about "normal" function that needed to be tested or it have another way. I wonder coz I've never seen that ajax-views be tested and creating a big fixture for it - looks awkward. Also, I've tried google it and haven't any decent thinks
Anonymous
Giving this error while installing pip install psycopg2 Error: pg_config executable not found
Anonymous
OS?
Yes
Maxim
Yes
which OS?
Anonymous
MacOs Sonoma 14.0
Maxim
MacOs Sonoma 14.0
https://www.google.com/search?q=psycopg2+pg_config+MacOs
Muflone
Giving this error while installing pip install psycopg2 Error: pg_config executable not found
There's a psycopg2-binary available but I don't know if it works with the apple stuff
Pax
Hello every body I'm a biginner in python with Django. Somebody can help me with some trainings or courses ? Plz 🙏
Patrick
Hey, is it possible to use Jupyter lab with auth, permission mgmt, file access mgmt with django back-end and Jupyter notebook interface? Suggest approach!
Doragonsureiyā
Hello every body I'm a biginner in python with Django. Somebody can help me with some trainings or courses ? Plz 🙏
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Scarfish99
hello, I am a frontend developer and looking to integrate django for my full stack. I've learnt django and now want to learn how to use django in a full stack app for example javascript and django. any material is highly appreciated
Scarfish99
Thank you so much. I appreciate this. 👌
Nima
Hi guys I use the Google system for authentication and login on my site, and when a user is created, Google automatically saves the user's name in the username, but I want the email to be saved in the username field in the users of my site, what do you think I should do? Is there a way to make it from Google Cloud Platform or do I have to make it from Django program code?
Belov
Thank you so much. I appreciate this. 👌
There is a good book "Full Stack Django and React" Kolawole Mangabo
Scarfish99
i'm open to ideas. yes. my initial idea is that i want to have a backend for my applications. i picked django because of database abstraction and inbuilt security and admin. it makes it a little easier to learn.
Scarfish99
My brudda, thank you. I'm a little beginner to be concerned about performance 😅😅 Would fast API communicate with a dB example postgres? Or it's inbuilt. Checking it out. Thanks for this
Scarfish99
For now, main goal is a working dB with retrievable records. I have a frontend website and need to make it like real world. I've understood some basics of 3 step Django process, templates, views.py and URLs.py. I want to have my models, and data for the frontend section. I hope my English is a little understandable?
Scarfish99
Okay. I should learn RestAPI then. I've seen it severally.
Kareem
For making an e-commerce and deploying it on server. Should i use ORM or raw sql queries? In terms of speed i know raw sql is better but in terms of security ORM is more effective. So what should i do in general. Whay type of queries i should use? Also I've heard of something called bulk queries
Scarfish99
Thanks. I will try both ways and see which one I like
Kareem
Paid server yes of course I'll get a vps, built in query methods you mean ORM?
Nima
I personalized the user, but it still didn't work
Kofi Middle
How does it compare to Django rest framework
Muflone
I used for years Django without DRF to make rest API 😂
Ndifoin
class TutorAboutSerializer(serializers.ModelSerializer): user = UserSerializer(many=True) tutor_language = LangaugeSerializer() course = CourseSerializer() class Meta: model = Tutor fields = ['user', 'tutor_language', 'course', 'country_of_origin', 'time_zone', 'bio'] how to write a create method for this please
Ndifoin
https://linkode.org/#KCVHXpjivkuTdcuGiKS9x1
Ndifoin
Okay on testing
TEJAS
Hello I have error named Templates not found please help
Ndifoin
Please I have a worry concerning the other fields that have relationship how will it be ?
Ndifoin
please for if any resources please
Ndifoin
for drf
TEJAS
I did this but not working
TEJAS
Ya it is
F
brew install postgresql. < giving this error-- ''' No available formula with the name "homebrew/core/postgresql". --- >
Koen de
brew install postgresql. < giving this error-- ''' No available formula with the name "homebrew/core/postgresql". --- >
This is not Django related, so this question does not belong here. Although, you need to provide a version to install. See https://formulae.brew.sh/formula/postgresql@14