Anonymous
i should read docs
Anonymous
Inuk
wtf this means super().form_valid(form), especially super() ?
when called from a class inheriting from another class, it lets you call the other class' methods, useful in cases like this:
class Thing:
def __init__(self): self.a = 1
class SpecialThing(Thing):
def __init__(self):
super().__init__()
self.b = 1000
Mr
How to host django web application any ideas guys
Eric
How to host django web application any ideas guys
Use Heroku (its free): https://devcenter.heroku.com/articles/deploying-python
Or if you still qualify for the free tier on AWS use AWS free tier: https://aws.amazon.com/getting-started/hands-on/deploy-python-application/
Mr
Vxvek
Can any one suggest me best server for hosting python django.. multiple website
Coders Needed Eth
Coders Needed Eth
Or you can try to make it work on aws lambda
Coders Needed Eth
Ow
Coders Needed Eth
I have used digital ocean but ionos is really dope
Shilpy
♈
Arpit Mali:
I have issues in django, after model field data delete, on all references related data remove
But after deleting old record another model how protected ?
Ashok
Can you please send any examples link of django+chart.js+MySQL database (dynamic data send to chart.js )
Mirco
♈
@pyflare when I try to field data
Mirco
It's up to you to handle that scenario
♈
@pyflare you are also right, but I'm try to delete my parent obj is exchange rate = 20
Then show me protected error child obj related
Mirco
Mirco
use pastebin.org to share errors or code
S.Ponmalar
Dear Friends,
I need one help.
I want to implement the django syllabus to my students.
Any one refer the syllabus or book?
Thanks in advance.
Vipin
Anyone knows django restframe work please help me
J
What help you want in django rest api Vipin
Vipin
I wanna know about how to create xml ouputing api and....how that xml data use with html ???
J
Do you mean the output of api to be a xml file ??
Vipin
Yes
J
https://jpadilla.github.io/django-rest-framework-xml/
Vipin
Ok
Anurag
Anyone can tell me how i can Show data from mysql database in templetes using function views.
I have already stored data in mysql database.
I have to only display it on html
4candels support
TypeError at /regi
send_mail() got an unexpected keyword argument 'fail_silently'
4candels support
my error, how i can solving it
4candels support
J
@anurag_629 can u try like this by replacing the corresponding model name and html file name
def itemget(request):
data = CityInfo.objects.all()
context={
'data': data
}
return render(request, CityApp/infopage.html", context)
Charly
Anurag
J
You should have model
Charly
J
If you don't want to create model, then write a query to fetch the data and then use the render function @anurag_629
4candels support
No
if i make it false, still does not work with same error
Anurag
Charly
Charly
J
4candels support
show that error
send_mail() takes 1 positional argument but 4 were given
Charly
Anurag
Aziz
Hi! I have a problem which is around a week makes me crazy 😱
So i have profile update view, Profile model and form. When i try to update profile, it says that profile photo doesn't exist in media root folder. And it's right! Because, i have set photo field's upload_to parameter to /profile_images/{username}/pic.jpg. why it looks for this in media root? I have some issues with internet on my pc, so I'm going to send .py files
4candels support
you are sending bad parameters, show the code
def regi (request):
form = RegisterForm()
if request.method == "POST":
form = RegisterForm(request.POST, request.FILES)
subject = "Your subject here"
message = "Your message here"
recipient = str(form["Email"].value ())
send_mail(
subject,
message,
EMAIL_HOST_USER,
[recipient],
fail_silently = True
)
context = {}
return render(request, "regi.html", context)
else:
return render(request, "regi.html", {"form": form})
Aziz
Charly
4candels support
Charly
No
Charly
I asked a pretty specific question
4candels support
I asked a pretty specific question
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smpt.gmail.com'
EMAIL_HOST_USER = '*****.com'
EMAIL_HOST_PASSWORD = '******'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_USE_TSSL = False
Charly
4candels support
I have already defined it
Aziz
Anonymous
I'm getting status code 403 when I'm trying to Post data to Django using axios. I added the CSRF token to the Post data but it's not working. What should I do?
ILYOSBEK
ILYOSBEK
axios.post('/user', {
firstName: 'Fred',
lastName: 'Flintstone'
})
.then(function (response) {
console.log(response);
})
.catch(function (error) {
console.log(error);
});
example
reactjsdotcom
Anonymous
Still forbidden
Azizbek Xushnazarov
How can I add initial values to a bounded serializer
My problem is that when I create a serializer I want to assign a value to a field of it after some calculation.
serializer = TaskSerializer(data=request.data, initial={'field1':calculated_data})
but this does not help.
Any ideas how to achieve this?
Anonymous
Roberto
Hello all, I'm trying to include a widget for selecting the date and time in a template I made with bootstrap. I searched on the internet but honestly I got lost among a thousand of packages, templates etc. Could you show me the best / simplest and cleanest way to follow? I am a neophyte with django and html, thus I'd like to learn something. Thanks
Vimal
Hey, friends! It's time to do mini projects in my college, for that I planned to do so real time problem solutions using django.
The thing is😅 , kindly provide me some good mini projects using django !!
With resources help me a lot ✌🏻
Thanks in advance !!
𝗣𝗿𝗲𝗺𝗶𝘂𝗺𝗸𝗲𝘁
کسی هست باهم بخریم؟؟
chappa
Hey guys.. Kinda need some help. Why is it that when is use {{form}} tag in the template it saves the form but once I separate the fields ie {{form. Tittle}} it doesn't?
Harish
Please help on this. https://dpaste.org/U5HE#
Oleg
Guys, could you please point this out... What is the best practice in DRF should be if I wanna remove some m2m objects from base model object.
Should I just be satisfied with update method (patch) in serializers (and orm m2m method "set" to reset and install all data values from scratch from list) when I use obj.m2m.set(*[list_values]) OR should I implement a remove method (delete) to remove specific values (and orm m2m method "remove" to remove specified in list objects) when I use obj.m2m.remove(*[list_of_values])?
https://stackoverflow.com/questions/69276071/what-is-best-practice-to-remove-values-in-m2m-relation-in-drf