Ashutosh
Yes, I am working on quora clone project
If you are building with some purpose other than learning: I guess there are lot of YouTube videos there you can just copy paste and improve their code as your requirements.
Naresh
A=student.objects.all().values('details')[0],class=parameters [0]['class']) Value error: too many values to unpack(expected 2)
Ashutosh
Yes, I am working on quora clone project
By the way I was talking about to build a website where user can create django projects in just few clicks with desired frontend.
Zey
Can we attach images in email?
Ashutosh
Zey
Yes
How
Ashutosh
Can we attach images in email?
Convert email to HTML type Or Attach images as attachments..
Ashutosh
How
For attachment, You can use msg.attach( file details...) for f in ['img1.png', 'img2.png']: fp = open(os.path.join(os.path.dirname(__file__), f), 'rb') msg_img = MIMEImage(fp.read()) fp.close() msg_img.add_header('Content-ID', '<{}>'.format(f)) msg.attach(msg_img)
Ashutosh
Djangobuilder dot com
That have some flaws but still great initiative, most importantly it's only for REST frameworks, I am talking about to build fully structured django project with jinja templating with good frontend.
Ashutosh
Ashutosh
Attch function accept file in absolute path format or byte format. For further checkout official docs for msg.attach()
Ashutosh
Fork the project and make it. I'm sure there are others who wants to build the same thing with you
Okay sounds great, let me build prototype, then I will take your help.
Ashutosh
Well, I am using celery worker in spite of fork(). Actually I wanted to use version control, and staged process.
Naresh
Group.objects.all().values('cources')[0].filter(name=parameters [0]['name']) Attribute error: dict object has no attribute filter Is the query is correct? How can I solve it
Alexander
You should not to apply filter after values calling
Naresh
What is header in django models?
Naresh
I want to take header information for writing query? What is header actually
Ahmed
maybe because validate doesn't exist..
Agent Q
What is header in django models?
Where does it say that there's headers?
Naresh
I have student model, my Team Mate said that take header information from student model and write query
Naresh
What header information?
I too don't know , he said take header information from student model
Agent Q
I too don't know , he said take header information from student model
Sorry can't help as I don't understand. Ask him for specificity or better yet ask his help to give you a sample query and work from there
Sumit
You can Even host there too.
Sumit
But you need dedicated server.
Sumit
When I do it the image doesnt delete from my computer
class Song(models.Model): name = models.CharField(blank=True, max_length=100) author = models.ForeignKey(User, to_field='id', related_name="id_user2") song = models.FileField(upload_to='/songs/') image = models.ImageField(upload_to='/pictures/', blank=True) date_upload = models.DateField(auto_now_add=True) def delete(self, using=None, keep_parents=False): self.song.storage.delete(self.song.name) self.image.storage.delete(self.song.name) super().delete()
Tous
Can I have different list display for different group of users in django admin? If it's possible then how?
Naresh
My model is student Columns: id, name, age, group, class For this I want to write a query without group and I want all columns
Naresh
Ok
Except one column, he want all columns data.
Naresh
Student.object.all()
Except group column
Agent Q
Except group column
Hmm: https://docs.djangoproject.com/en/3.2/topics/db/queries/
Sumit
Can anyone tell me how to create dynamic field ? I am using graphql and wants to provide my user a flexibility to do add fields , will mongodb works well ?
Sumit
Example?
Lets say add more than one phone number, it can be a weird example, but it's ok to understand the context.
Sumit
Is it fine?
Agent Q
Lets say add more than one phone number, it can be a weird example, but it's ok to understand the context.
You must be thinking in arrays or a separate table (e.g. 1 User can have multiple Phone Numbers - so a 1 to Many Relationship)
Sumit
You mean to use different table right?
Sumit
And to use foreign key
Sumit
that can be a solution.
Sumit
Anonymous
CSRF verification failed. Request aborted. Reason given for failure : CSRF token missing or incorrect. I hv mentioned in contact .html {% csrf_token %}
Devo
It should be with in form tags
Devo
In contact.htm
Anonymous
In contact.htm
Yup..i mentioned under form csrf
Devo
Rerun the server
Anonymous
Need help - to add navigation bar in Admin page of Django application
Anonymous
I hav navigation bar in main menu, the same should reflect on the admin page
Anonymous
Can someone pls advice
Doragonsureiyā
I hav navigation bar in main menu, the same should reflect on the admin page
What have you tried to do so far to solve that issue? Show your code and explain where and why you're stuck on solving your issue. Read rule 5️⃣ to learn how to show your code
Agent Q
Need help - to add navigation bar in Admin page of Django application
https://forum.djangoproject.com/t/create-navbar-in-django/605/2
sainath
Hi..after deploying a django app how can we further add features to it...
Shubham
Hi..after deploying a django app how can we further add features to it...
Use github, Push all your local changes there and pull the new changes on the server and restart it
cr
I am working on school management system I needed help in students viewing the assignment submitted by teacher How do I ensure student of particular class sees assignment for that class only and not all
Akash
How can doing chat app django
Akash
Please help me any one
Anonymous
I want a particular field called categories, to contain a list of options that will be rendered to the front-end as a list of options that the user can choose from. I am new to Django and python, and I really don't have an idea of how to solve this problem.
cj
No, you can deploy it on heroku or python everywhere or any windows server. Noone is going to stop you.
well... Heroku is Linux ¯\_(ツ)_/¯, PythonAnywhere is Linux also... and trying to deploy Django in a Windows Server is a pain in the ass, so nobody does it... the ones that do it are crazy or don't know things or are told by their boss to do that (and the boss doesn't know things) ¯\_(ツ)_/¯
cj
How can doing chat app django
read about django-channels
Bral Bral
Hi guys! Which library are you using for background tasks? I don't want to use celery for my simple project. Thank you.
Sai
Hi how to send data realtime