Arneeth
trying to upload a pic and after submitting im getting this error
ProfilePic' object has no attribute '_state'
What is the mistake?
Alex
Arneeth
Did makemigrations and migrate it is not storing my data
Alex
share codebase
Arneeth
TEMPLATE_DIR=BASE_DIR/'templates'
STATIC_DIR=BASE_DIR/'static'
MEDIA_ROOT=BASE_DIR/'uploads'
MEDIA_URL='media/'
This in settings
Arneeth
Ala
Are there Any ebook about Django 5?
Rose
User Dritzz has 1/3 warnings; be careful!
Reason:
rule #1: speak English
Rose
User Jei S has 1/3 warnings; be careful!
Reason:
rule #1: speak English
Jhon
I'm struggling with sales systems for a company here lol
Rose
🌺
{
"photos": [
"The submitted data was not a file. Check the encoding type on the form."
]
}
why it is getting an error can you please help to solve it
Arneeth
did you put enctype="multipart/form-data" in form??
🌺
🌺
🌺
Herman
Can anyone suggest how to solve this error:
Running migrations:
No migrations to apply.
Your models in app(s): 'landing' have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
I ran makemigrations and migrate with the same error everywhere. I deleted migrations and made new ones.
Abdellatif
I have a small projet.
I have a application and I want your help with it
Abdellatif
Application django
Rose
Sowmya
Hi all.
Can anyone please help me . When I uploaded .png image it took correctly.
The issue is when I again uploaded the same image.It is not showing
I uploaded .jpg images also still not working
Please help me🙏🙏
Rafael
Hi, i'm from Caracas
Maxim
please delete and don't send useless messages
AB
Hello guys
Is Django good for big applications
Rose
User Sankalp has 1/3 warnings; be careful!
Reason:
offtopic
Believe
I have a project in which i delete the migration folder then i Created migration folder manually and added init file also in it but now when i use makemigrations command my db is not updating with migrations
Believe
Please help me
umarxon
Believe
Shubhtiwarii
Class Customer(models.Model):
user=model.OnetoOneField(User,on_delete=models.CASCADE)
Fullname= models.CharField()
I WANT TO CREATE USERCREATION form login signup functionality
Which I want to have username,password1, password2,email,fullname
Shubhtiwarii
Help me
bling
Why don't you inherit from user creation
Отабек
Hello guys I have some questions ❓
How I can save information with choices
Charly
Charly
Help me
so whats the question?
Отабек
محمد
Hello
I have a question on my website: The teacher wants to submit a certificate in his specialty. What methods can I use to know that the certificate is official and not fake? If anyone can explain this thing ??
Отабек
Class Items(model.Model)
choise=(
('1','Gold'),
('2','Silver')
)
typee=models.charfield(max_length=1,choices=choice)
booln=models.BoolenFields(default=False)
def change_booln(self,*args,**kwargs)
If self.typee=='1':
self.booln=True
super().save(*args,**kwargs)
Отабек
Отабек
Charly
محمد
cj
I didn't got you
you wrote very bad code, I'll suggest you to start learning first basic Python things before jumping to Django directly
Haleem
getting this error when I am sending email. its works perfectly in local host but when I hosted in cpanel of Godaddy, I am getting this error. I also talk to Godaddy, but the support was not helpfu.
#error
ConnectionRefusedError at /support/python
python
[Errno 111] Connection refused
# settings.py
BASE_URL = 'https://www.mydomain.com'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtpout.secureserver.net'
EMAIL_PORT = 465
EMAIL_USE_SSL = True
EMAIL_HOST_USER = 'support@mydomain.com'
EMAIL_HOST_PASSWORD = 'password'
DEFAULT_FROM_EMAIL = 'support@mydomain.com'
EMAIL_FROM_NAME = 'Support'
# in views.py
email = EmailMessage(
subject,
message,
settings.EMAIL_HOST_USER,
[recipient],
reply_to=[request.user.email] # Set the reply-to address
)
email.send()
can someone please look on this.
Charly
Charly
Which seems to be just a placeholder not a real server
Haleem
Charly
Haleem
Charly
Charly
And if these are really valid is not a Django issue is your email service provider who is blocking it
Haleem
According to the code you shared these are not valid values
are u saying about this are not valid?
EMAIL_HOST = 'smtpout.secureserver.net'
EMAIL_PORT = 465
EMAIL_USE_SSL = True
EMAIL_HOST_USER = 'support@mydomain.com'
EMAIL_HOST_PASSWORD = 'password'
DEFAULT_FROM_EMAIL = 'support@mydomain.com
Charly
Charly
Charly
Haleem
The port is correct?
yes.. i am using the sme port and its working perfectly fine.. I am gettting mail in seconds.. but only in local host.
Charly
Charly
Ala
Please I need simple ebook to learn Django 5
Krishna
How to create aa app in django project using vs code?
Snuppe
Do you all separate frontend and backend?
Or do you write everything in one big django app?
Alfredo
jūdê
jūdê
And then play around till you find out the configuration that works
Haleem