Sukhmanjeet
https://dpaste.org/sAgu0
Sukhmanjeet
These are the complete build logs
¥@m
Hello, please I'm a big beginner in django and I've a issue😢😅. Please how can I do a drop-down list on django? Thank you 🙏
Sukhmanjeet
In file included from psycopg/psycopgmodule.c:28:0: ./psycopg/psycopg.h:35:10: fatal error: Python.h: No such file or directory #include <Python.h> ^~~~~~~~~~ compilation terminated.
Sukhmanjeet
i am unable to install psycopg2
Mahmood
Try psycopg2-binary
Mahmood
Or check if there is missing library in your os It's depend on your os, it happened with me in fedora I'm not sure, just check this
Sukhmanjeet
Actually, sudo apt-get install -y python3-psycopg2
Sukhmanjeet
This worked
Sukhmanjeet
Yes thanks btw
Mahmood
Welcome
Onimisea
Hello everyone. I'm having issues creating custom user model with email login. Could anyone put me through?
Onimisea
Any resources you can refer me to?
Mahmood
Any resources you can refer me to?
https://medium.com/@royprins/django-custom-user-model-email-authentication-d3e89d36210f
Shivam
How to implement pinescript in django
Mahmood
Hi, anyone know how to override the Site model The one come from Django sites framework It's possible to inherite it and use the cusom one I didn't find any solution in the internet
Apple🍎
Hi everyone, should i store my blog posts in db or as html? to get it indexed in search results.
Apple🍎
If I'm not mistaken I think data from dbs are fetched on only requests
Apple🍎
So will it be difficult for my every blog to get shown on search pages?
Bandar
It depends on what type of blog you are running. If you are running a static blog, then you would probably be better off storing your blog posts as HTML files, as this will make them easier to index by search engines. If you are running a dynamic blog, then storing your blog posts in a database might be the better option, as it will allow you to more easily manage your content, and also make it easier for search engines to index your content
Mahmood
Hi everyone, should i store my blog posts in db or as html? to get it indexed in search results.
I'm not sure if i understand you But use the full text search It will be better for getting the needed data
Kapil
how to make editable cell in table ?
Alex
I got stuck in storing integer array in Django Rest Frame work. can anyone answer these stack overflow question. https://stackoverflow.com/q/74623523/14439683 https://stackoverflow.com/q/74624299/14439683
Bandar
class ScheduleSerializer(serializers.ModelSerializer): day_of_the_week = serializers.ListField() class Meta(): model = Schedule fields = "all" def to_representation(self, instance): response = super().to_representation(instance) response['day_of_the_week'] = [int(x) for x in response['day_of_the_week']] return response
S
How to automatically change status in django?
Mirco
How to automatically change status in django?
Is status a field of your model ?
Doragonsureiyā
Rule 5️⃣: To share code or error tracebacks, use an online pasting service like: - https://dpaste.org - https://linkode.org - https://hastebin.com - https://bin.kv2.dev If you posted a wall of text, go back and delete it.
Mirco
Yes
Give more context, when you need to update the status ?
Rajat
Anyone know django with ajax implementation anyone can take one to one session for an hour for once
Rajat
Anyone pls help if it is paid that is also acceptable
𝚁𝚄𝚇𝚂𝙷𝙾𝙳BEK|(🎄)ᵀᴹ
pleasec , if you have made a program from django, please send a zip file
Rajat
remote:              psycopg/psycopgmodule.c: In function ‘psyco_is_main_interp’: remote:              psycopg/psycopgmodule.c:689:18: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’} remote:                689 |     while (interp->next) remote:                    |                  ^~ remote:              psycopg/psycopgmodule.c:690:24: error: invalid use of incomplete typedef ‘PyInterpreterState’ {aka ‘struct _is’} remote:                690 |         interp = interp->next; remote:                    |                        ^~ remote:              error: command '/usr/bin/gcc' failed with exit code 1 remote:              [end of output] remote:          remote:          note: This error originates from a subprocess, and is likely not a problem with pip. remote:        error: legacy-install-failure remote:        remote:        × Encountered error while trying to install package. remote:        ╰─> psycopg2 remote:        remote:        note: This is an issue with the package mentioned above, not pip. remote:        hint: See above for output from the failure. remote:  !     Push rejected, failed to compile Python app. remote: remote:  !     Push failed remote: Verifying deploy...
Remove the package which is giving error
Alexey
Filtered = [x for x in list if x[“domain”] == “youtube”]
Santosh
Hello,Everyone am New to Django...Can anyone give me the Suggestions for interview purpose??
lucky
Hi I link to models using forignkey
lucky
I link two models using Foreignkey to upload multiple images I add vanilla js for to append one image after another and preview images If i post the form data only last image is affear in my database
lucky
Is there any library that i can use for images upload that i cam add to my django project
matrix
what is the use of test.py file in django
matrix
didnt understand while reading the documentation
Erick
Hi friends, how are you? So I need to create a report of object inclusions in the database, so could someone help me with that, or send me an example that can help me?
 
didnt understand while reading the documentation
see writing and running test in django also you can read testing in django
User
https://imgur.com/a/uTKSqo6 Hello everyone! How can I create this functionality in Django? I have no ideas how to divide checkboxes into groups using django-forms without creating new classes in models.py I need to prepare one template-form to relate the checkboxes to the only one group and the second template-form to click these checkboxes which are already separated
Roger
https://docs.djangoproject.com/en/4.1/topics/forms/formsets/
Roger
and using prefixes on forms
Smile
hi how can I get the only data that the class DetailView displays ? its only using get_context_data? or is there an easier way?
Daniel
guys, how do i get the item that i just created with my CreateView? I want it to update another item, how do I do that?
Muhammed emin
#models class Profil(models.Model):     author = models.ForeignKey(User, on_delete=models.CASCADE) class Comment(models.Model):     profil = models.ForeignKey(Profil, on_delete=models.CASCADE) #serializer class CommentSerializer(serializers.ModelSerializer):     profil = serializers.CharField(source="profil.author.username")     class Meta:         model = Comment         fields = ["id", "profil", "comment", "posts"] Profile field does not return string, what is the reason?
Kene
#models class Profil(models.Model):     author = models.ForeignKey(User, on_delete=models.CASCADE) class Comment(models.Model):     profil = models.ForeignKey(Profil, on_delete=models.CASCADE) #serializer class CommentSerializer(serializers.ModelSerializer):     profil = serializers.CharField(source="profil.author.username")     class Meta:         model = Comment         fields = ["id", "profil", "comment", "posts"] Profile field does not return string, what is the reason?
It'd return an Id cos it's a FK. 3 things you can do: 1) create an extra field on the comment serializer and set to source to profile.author.{enter the column for the author}. Then add this to your fields attributes of the meta class 2) Create a profile serializer and define the fields you want returned. Then call this serializer from within the comment serializer 3) set depth=1 as an attribute of the meta class in the comment serializer. This would however return all the fields in the profile model
Arian
guys when i use the jwt should i use permissions too ??
Arian
in DRF
XYZ
I use django allauth work fine with custom form but I added phone number and it is unique how to handle 'A user already registered with this phone number ' as allauth did in email
Deise Freire
Why is this " can't open file 'manage.py': [Errno 2] No such file or directory" happening?
W
if not, you re in the wrong directory
W
I will do this
let me know
Mirco
Any link or example 🤔
you can see it from allauth source code
adilet
who used vobject vCard?
.
guys, how do i get the item that i just created with my CreateView? I want it to update another item, how do I do that?
You can override the form_valid() method for the CreateView: https://stackoverflow.com/a/33001010 You can try the first option in the answer. The newly created object can be accessed using self.object in there
T-Br
I have a python code . i write it to solve civil engineering problems. but i need to change it to Django .how should i do. please help.
Un
Hello guys Please any one can sent for me guide of Django ?
Doragonsureiyā
Hello guys Please any one can sent for me guide of Django ?
Looking for Django tutorials? you can follow these three recommended ones: * Official documentation and tutorial * Tutorial from MDN * Tutorial from django-girls
Un
There no book explanation step by step about Django ??
Mirco
There no book explanation step by step about Django ??
Django for Beginners by William Vincent
cj
There no book explanation step by step about Django ??
read the documentation, it has a step by step tutorial