Д
I have print that forms.errors but the errors says that fileds can't be empty but the values are filled
don't DM me, and secondly, why do you feel like taking pictures of computer screens is the proper way to share code??
Doragonsureiyā
Dm what's your problem
We know the rules are quite long, but read them, because on average, hundreds of users are banned from this network every week. Reading the rules will help in avoiding this pitiful fate.
Mekdim
don't DM me, and secondly, why do you feel like taking pictures of computer screens is the proper way to share code??
Cuz my pc wifi driver is not working and i thought it will be much faster to take pictures
Mekdim
Beside how u going to share a code file here while sharing a file is not allowed
Д
Beside how u going to share a code file here while sharing a file is not allowed
you're allowed to post links to code sharing sites, like dpaste.org — that's actually the recommended way
Vxvek
I'm using django with mongo db and I'm facing an issue while filtering Boolean value is there any solution ??
shiva
How to create object with duplicate object id in djaango models
shiva
I need to create obj with deleted obj id
shiva
Can anyone help?
Hamid
How to create object with duplicate object id in djaango models
The ID are unique and can not be dulpicated!
shiva
Im deleting one obj, and i need to create with obj id
shiva
Not possible
shiva
?
gadghimuradm
Im deleting one obj, and i need to create with obj id
I think, u can save id in variable before deleting
gadghimuradm
And then create new instance with that id
shiva
And then create new instance with that id
Like obj. Save() and obj1 = model.objects.create(uid=obj.uid) ???
gadghimuradm
Something like: old_id = old_obj.id old_obj.delete() Obj.objects.create(id=old_id, ...)
gadghimuradm
You're welcome, bro 😌
Jerome
Ideally, you have to define your own system backend & user manager . Django allows you to do that while keeping the native auth process. Then, you 'll get the best of both worlds. ;)
Azamat
Something like: old_id = old_obj.id old_obj.delete() Obj.objects.create(id=old_id, ...)
It is not necessary to delete an instance and create it again, you can just update that
gadghimuradm
It is not necessary to delete an instance and create it again, you can just update that
I agree, but he just asked about deleting and creating a new instance
Andrew
Hi guys, coming from the laravel world we have this really good website laracasts that covers everything, writing tests, integrating react/vue, best practices etc everything Laravel related. I wonder if there is the same type of site or good resource for Django?
🅼🅸🆃🅷🆄
Hlw, When i try to extends tags it not abbreviation automatically. How can i solve this. I want to write {% extends 'home. Html %}
🅼🅸🆃🅷🆄
install extension for that
Yeah. Problem solved 👌
Shabbir
django.db.utils.ProgrammingError: relation "members_profile" does not exist please help me with this error i don't know how to solve it... i get this when i migrate https://dpaste.org/UAu4C
lubaskinc0de
#filters.py def filter_interesting(self,queryset,name,value): if value: followed = User.objects. filter(followers=getattr(self.request, "user")) return queryset. filter(author__in=followed) help, please, there is such a filter (django-filters) how can I not just filter ONLY such records, but simply so that such records are at the top, that is, the first, but the rest are also there? is that possible?
Hari
https://stackoverflow.com/questions/71998064/imagefont-truetype-cannot-open-resource
Richie RH
#ask Do I need to install django-bootstrapt5 to include bootstrap into django project?
Егор
How can I store multiple objects in one ForeignKey field? Does Postgres ArrayField solve my problem?
Егор
I need to store a list of different strings in a database in one field. Now trying to do it with ArrayField, hope it works...
Егор
I cannot create an object in my model without these strings and that's why I'm not using FK. I cannot simply create an "Article" object which will have many "reviews" because I'm parsing an API which provides me with this data.
Егор
Wait. I can create an Article with empty reviews
Егор
And add the reviews...
Егор
omfg thanks man
Егор
Nope, I have no article to assign them to
Д
do they have a ForeignKey to the Article?
Д
you can first create the Article if the Article doesn't have the ForeignKey
Егор
Yes, they do
Егор
you can first create the Article if the Article doesn't have the ForeignKey
Yeah that's what I'm going to do now. Thanks!
Д
yes, order matters.
Д
these things can be quite the puzzle.
Егор
The problem is solved.
Ankiit
I have a interview tomorrow for Django, any tips please
bansh
Errno 10061 : No connection could be made because the target machine actively refused it ( client - server )
bansh
how have you tried debugging this
When socket is not connecting then it is coming
Д
if a connection is being actively refused - how do you debug that?
Basel
He how I can get data from django into node js boject
Basel
Project**
Pydeveloper
Can you explain primary key
Pydeveloper
How to connect image to database
bansh
Manually
Georgiy
when i run makemigrations i get "index together refers to the nonexistent field 'slug'. I have no idea why this happens, maybe wrong syntax? class Meta: ordering = ('name',) verbose_name = 'Товар' verbose_name_plural = 'Товары' index_together = [["id", "slug"], ]
Д
Manually
think about this: what does it mean when the connection is being 'refused'? how can you try to figure out where the problem even is, before you try to solve it?
Д
there is no way to solve a problem that you don't know a) what the problem means, and b) where the problem is - Ok?
Д
"there is no field frist_name in your model" "WHY CAN'T THE FIRST NAME FIELD BE FOUND"
Д
sometimes the problem isn't that obvious but the error message is still the truth.
Д
if the error message is saying "there is no file named x" that means there is NO file named x (or it's looking for it in the wrong place, basically)
Mekdim
Guys , i am wondering how to save media type files directly to MySQL database directly , now it saving them locally on a machine and saving them reference name on the database not the file ... So how is that possible ?
Mekdim
Why? Seriously... Why? 🤔
Ya am just following utube video and i thought that was just indvidual's approach and and go for the next one but it still the same , they manually create media folder and then save it files there
Mekdim
that's how things should be done ¯\_(ツ)_/¯
Really i mean how that gonna be in reall world scenario in production level , am sorry am just noobie to django
cj
Really i mean how that gonna be in reall world scenario in production level , am sorry am just noobie to django
that's exactly how things are done in real world, you save media files in a MEDIA folder and serve them using a web server, you only store the file path in the database ¯\_(ツ)_/¯