How to change content type in django restframework api from json to multipart/form-data or form data

2020-07-15 Thread yashwanth balanagu
[image: Screenshot from 2020-07-15 14-16-15.png] -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discus

In Postman post request is working when i was sending the image but in external template is not working any solution

2020-07-15 Thread yashwanth balanagu
Document function postimage() { xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange= function() { document.getElementById("image").innerHTML=xmlhttp.responseText; } posted={ fname:document.getElementById("name").value, picture:document.getElementById("image1").value.replace('C:\\fak

manytomanyfield

2020-07-15 Thread Chander shekhar
i have a model share=model.manytomanyfield(User) In this share section i don't want the current login user should not come in this manytomanyfield list -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop re

Re: NoReverseMatch if "url" template tag not used with app_name

2020-07-15 Thread Franz Ulenaers
It seems you have specified an app_name in your post/urls.py : *app_name='post'* Have you different name='home' in your apps then you have to use the app_name to make it unique !! Op dinsdag 14 juli 2020 22:08:22 UTC+2 schreef strang: > > I understand what you are trying to explain. > > I ha

Re: Performance queries helps

2020-07-15 Thread carlos
Budi Hermansyah no, but I think i can improve the queries but I don't know how: / the debug toolbar show many many queries to the database * (44 queries including 34 duplicates ) i don't know duplicates* On Sat, Jul 11, 2020 at 10:58 AM damanjeet kaur wrote: > {% for news7 in newscat7 %} >

Django admin ignores dynamically generated form fields

2020-07-15 Thread Random Body Parts
I'm trying to have the django admin display a model form with dynamically generated fields. I setup my form like this: class EulogyTextForm(f.ModelForm): class Meta: model = EulogyText fields = '__all__' def __init__(self, *args, **kwargs): super(EulogyTextForm, s

How to save images posted by application users

2020-07-15 Thread Ram
Hi, We need to save images posted by our application users and the images will be displayed in application UI once they are saved successfully. We are trying with these parameters in our settings.py but they are not working and our OS platform is Windows 10 OS. We know file paths are different in

Re: Is there a better way to change the default server port?

2020-07-15 Thread Kshitij Kotasthane
If you could provide give a copy of the run-local.sh, that'd be great. On Friday, 10 July 2020 07:13:12 UTC+5:30, Mike Dewhirst wrote: > > On 10/07/2020 12:11 am, Kshitij Kotasthane wrote: > > Doing this every time I run the server is really inconveninent as I > > said above. > > > > On Thursd

Re: Is there a better way to change the default server port?

2020-07-15 Thread Mike Dewhirst
On 16/07/2020 3:11 pm, Kshitij Kotasthane wrote: > If you could provide give a copy of the run-local.sh, that'd be great. I don't have time to convert it into a bash script ... but you should be able to pick a minimum section of it and get your own bash script going. I started small and kept addin

Re: Is there a better way to change the default server port?

2020-07-15 Thread Mike Dewhirst
Sorry about that - I'll reformat and send again shortly M On 16/07/2020 3:11 pm, Kshitij Kotasthane wrote: > If you could provide give a copy of the run-local.sh, that'd be great. I don't have time to convert it into a bash script ... but you should be able to pick a minimum section of it and ge

Re: Is there a better way to change the default server port?

2020-07-15 Thread Mike Dewhirst
Trying again M On 16/07/2020 3:11 pm, Kshitij Kotasthane wrote: > If you could provide give a copy of the run-local.sh, that'd be great. I don't have time to convert it into a bash script ... but you should be able to pick a minimum section of it and get your own bash script going. I started