Converting requests

2019-11-07 Thread Suraj Thapa FC
How do I convert the requests into render or redirect

response = requests.post(url,data=post_data, headers={"Content-type"
:"application/json" }).json()

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPjsHcE2WvU5qmss37TsiiraHKAP9YG_n5%2BEJbSYAQiRsW7EDQ%40mail.gmail.com.


Re: Field Select MasterDetail

2019-11-07 Thread Łukasz Bączek

W dniu 01.11.2019 o 11:57, Nijo Joseph pisze:

Check django-autocomplete light.


works, thank you ...



On Friday, November 1, 2019 at 4:25:06 AM UTC+5:30, J-23 wrote:

Hello,
I am new to Django. I have a FormFault model, which has two
foreign keys "BuildingOwner" and "Building", the key "Building"
depends on "BuildingOwner" on the form, it gives me two fields of
type Select (ComboBox) or is there a way in Django that the
content of ComboBox changes depending on "BuildingOwner" values?

from django.db import models
class Items(models.Model):
   Item_Text = models.CharField("Temat", max_length=100)
def __str__(self):
return self.Item_Text
class Meta:
        verbose_name = "Temat zgłoszenia"
        verbose_name_plural = "Temat zgłoszeń"
class DocumentType(models.Model):
   Document_Text = models.CharField("Rodzaj", max_length=100)
def __str__(self):
return self.Document_Text
class Meta:
       verbose_name = "Rodzaj zgłoszenia"
       verbose_name_plural = "Rodzaj zgłoszeń"
class Status(models.Model):
  Status_Text = models.CharField("Status", max_length=100)
def __str__(self):
return self.Status_Text
class Meta:
     verbose_name = "Status zgłoszenia"
     verbose_name_plural = "Status zgłoszeń"
class BuildingOwner(models.Model):
   BuildingOwner_Text = models.CharField("Właściciel", max_length=100)
def __str__(self):
return self.BuildingOwner_Text
class Meta:
     verbose_name = "Właściciela budynku"
     verbose_name_plural = "Właściciel budynków"
class Building(models.Model):
   BuildingOwner = models.ForeignKey(BuildingOwner,
verbose_name="Właściciel budynku", on_delete=models.CASCADE)
   Building_Text = models.CharField("Budynek", max_length=150)
def __str__(self):
return self.Building_Text
class Meta:
     verbose_name = "Budynek"
     verbose_name_plural = "Budynki"
class FormFault(models.Model):
   Person = models.CharField("Imię i Nazwisko",max_length=300)
   Email = models.EmailField("E-mail", max_length=50)
   Items = models.ForeignKey(Items, verbose_name="Temat",
on_delete=models.CASCADE)
   DocumentType = models.ForeignKey(DocumentType,
verbose_name="Rodzaj dokumentu", on_delete=models.CASCADE)
   Status = models.ForeignKey(Status, on_delete=models.CASCADE)
   BuildingOwner = models.ForeignKey(BuildingOwner,
verbose_name="Właściciel budynku", on_delete=models.CASCADE)
   Building = models.ForeignKey(Building, verbose_name="Budynek",
on_delete=models.CASCADE)
   Place = models.CharField("Lokal", max_length=10)
class Meta:
        verbose_name = "Zgłoszenie"
        verbose_name_plural = "Zgłoszenia"


I found a library here:
https://github.com/runekaagaard/django-admin-flexselect


but I'm wondering if this can't be done in a simpler way.

Best regards,

--
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/11976e3d-d65e-4b2e-9e42-8a0c7c6a0f04%40googlegroups.com 
.



--
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8b2827e2-d3ec-c1f6-df7d-12553d2a5ab4%40poczta.fm.


Re: Making A Field Read Only

2019-11-07 Thread Derek
https://docs.djangoproject.com/en/2.2/ref/models/fields/#editable


On Wednesday, 6 November 2019 18:35:48 UTC+2, Ray Z wrote:
>
> Hey Everyone,
>
>  Im very new to django and im trying to figure out how to make a field on 
> a forum read only. The field is my date created field that has a automatic 
> timestamp. The form structure im using is a modelform  . Here is my code of 
> my forms.py . I appreciate the help. Thank you everyone !
>
>
> from django import forms
> from django.forms import ModelForm
> from .models import StudentCheck
> from django.utils.translation import gettext_lazy as _
>
>
>
> class NewStudentForm(forms.ModelForm):
>  class Meta:
> model = StudentCheck
> fields = '__all__'  
> labels = {'date_created':_('Date Created'), 'startdate':_('Start 
> Date'), 'esy':_('ESY')}
>
>
> models.py
>
> from django.db import models
> from django.utils import timezone
> from django.forms import ModelForm
>
>
> # Create your models here.
>
> class StudentCheck (models.Model):
> startdate = models.DateField(max_length= 10 )  
> esy = models.BooleanField(default = False)
> ten_month_school_year = models.BooleanField(default= False)
> other = models.BooleanField(default = False)
> intakedate = models.DateField(max_length=10)
> grade = models.CharField(max_length=2)
> date_created = models.DateTimeField(default=timezone.now)
> firstname = models.CharField(max_length=50)
> lastname = models.CharField(max_length=60)
> address = models.CharField(max_length=100)
> city = models.CharField(max_length=100)
> state = models.CharField(max_length=30)
> zipcode = models.CharField(max_length=5)
> parent_one_name = models.CharField(max_length= 100)
> parent_one_phone = models.CharField(max_length=100)
> parent_one_email = models.CharField(max_length=100)
> parent_two_name = models.CharField(max_length=100)
> parent_two_phone = models.CharField(max_length=12)
> parent_two_email = models.CharField(max_length=100)
>
> 
> def __str__(self):
> return self.lastname
>
> class StudentCheckForm (ModelForm):
> class Meta:
>  model = StudentCheck
>  fields = '__all__'
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/31713c5f-3d9e-49b1-848d-9ffcb8d2e0a9%40googlegroups.com.


Re:

2019-11-07 Thread Paras Jain
i registered also not getting it

On Thu, Nov 7, 2019 at 8:29 PM himanshu chouhan 
wrote:

> you need to register ur model as well.
>
> On Thu, 7 Nov, 2019, 8:27 PM Paras Jain,  wrote:
>
>> this is my models.py file i created and migrated but model in not created
>> in my admin page as database please somebody help
>>
>> from django.db import models
>>
>> # Create your models here.
>> class Company(models.Model):
>> email = models.EmailField()
>>
>>
>> def __init__():
>> return self.email
>>
>> --
>> 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 discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMtmBS-msPj-1TNBx%3DP6YOZTZmaEhFp22%3DGa%3DHGC160w77fyEQ%40mail.gmail.com
>> 
>> .
>>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAFCu%3DVSsN1gm0Ymgo30iF3j_AOrJWjmt%2BfFWy0w_3o_mr41DvA%40mail.gmail.com
> 
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMtmBS_ZOwwe6dbwo2D43Ldj1xvaUzGiYP_YRdhJYfT8pEKBMQ%40mail.gmail.com.


RE: Open Source IDE to start with Django Web development

2019-11-07 Thread Anthony Winner
Himanshu,

I agree, IDE’s are a really personal choice, everyone as you can see has a 
different view of what is good, I for instance Love Eclipse, mainly as I have 
used it for 10+ years, I know it quirks(all IDE’s have them) and as I work with 
c , Python, embedded code, SQL and others, it simply fills the bill of a one 
stop shop for me.  Currently I have one setup with PyDev (the python plugin), 
the c developers plugin, a SQL admin app (DBeaver) , and many other plugins to 
simply make things easy for me. Using it for Django / Python is a breeze, 
especially when it come to debugging, one button to start the system in regular 
or debugging mode, understands the python threads created in Django,  and 
allows me to find bugs and strange interactions easily.

So my suggestion is, . to figure out what makes a “good” IDE to you, shop 
through the suggestions from the replies, and choose a top two or three that 
seem to fit the bill for you, and then spend some time with them, I think 
following that path will lead you to what works for you. Remember an IDE is not 
just an editor, it an environment, so it should cover all the bases you need, 
for Django work, you need the editor (for Python, CSS, strait text, …) , a 
debugger, DB admin and management, some web admin,…

Cheers
Anthony


From: django-users@googlegroups.com  On Behalf 
Of Siratim Mustaquim
Sent: Thursday, November 7, 2019 5:39 AM
To: django-users@googlegroups.com
Subject: Re: Open Source IDE to start with Django Web development


** External Email **
Why don't you just try a few IDE's and text editors, IDK how much OSS or NonOSS 
IDE will affect your project, but if 'you' don't feel comfortable with it, I 
can guarantee, that will affect your project.

Assuming u are not in a limited internet connection package, download a few of 
the available ones, and start using them.

PyCharm IDE is a great tool. But it may feel big and bulky sometimes,
while VSCode editor is faster in terms of opening projects.

I tried Geanny, didn't like it, because it made some weird behavior I terms of 
indentation and tabs, I couldn't figure how I could make "tab=4spaces" instead 
of "tab=1tab".

Vim and Vim like ones are too difficult for me, so I skipped.

I saw people developing python in Visual Studio. Again, amazing IDE, might feel 
a bit heavy at one point.

And last but not least, The one and Only IDLE.
I still like it, and for quick scripting and quick checks, amazing.

So, pick one that is comfortable for you. What is easy to me might not be the 
same for u. Try a few, find what u like.

Happy Coding

On Thu, Nov 7, 2019, 7:03 PM vineet daniel 
mailto:vineetdan...@gmail.com>> wrote:
VSCode.

On Thu, 7 Nov 2019, 16:39 John McClain, 
mailto:jmcclain0...@gmail.com>> wrote:
agreed, but...

pycharm is dedicated to python and vs code is generally suitable for any others 
assuming the person operating can configure their environments.

the person was asking for an IDE suitable for python specifically which is why 
I throughout pycharm

ultimately, I would go with vs code but it takes a bit more knowledge than 
pycharm does

On Thu, 7 Nov 2019 at 11:00, Parth Joshi 
mailto:joshipart...@gmail.com>> wrote:
VS Code works like a Charm. (Pun intended :-) )

There are lint, autocomplete and git extensions which you can use for setting 
up dev environment.

Regards,

Parth Joshi




On 06-Nov-2019, at 4:22 PM, himanshu goyal 
mailto:hgoyal1...@gmail.com>> wrote:

To Community,

Greetings!

Could you suggest a good open source IDE for Django? URL to download will be 
helpful.

Thanks,
Himanshu
India

--
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/767f5e59-20b7-4a3a-989a-dedb0e40ceff%40googlegroups.com.

--
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 discussion on the web visit 

Re: Django - How to add a link to a table that will open another page(django app) from an html template and pass a variable with it.

2019-11-07 Thread Patrick Carra
Thank you Randy!

On Wednesday, September 25, 2019 at 12:09:52 PM UTC-5, Patrick Carra wrote:
>
> Hello I have an app that displays some database information in a table.  
> Inside of the html template I am making an edit link that I want to open 
> another app(page viewLit) while passing a value to it's view.  I have added 
> my code below.  My question is I am unsure of how to make this links url 
> and pass the object data located inside circuit.circuitid along with it.  I 
> haven't been able to find the right way to code this yet and this is just 
> how I thought that this should be done. If anyone has a better idea I am 
> open to suggestions.
>
> search_custom.html(code for link)
> {% for circuit in filter.qs %}
> 
> 
> View
> 
> {{ circuit.circuitid }}
> 
> {% endfor %}
>
> myapp/myapp/urls.py
> urlpatterns = [
> path('viewLit/', include('viewLit.urls')),
> ]
>
> myapp/viewLit/urls.py
> urlpatterns=[
> path('viewLit/circuitid.id', views.viewLit, name='viewLit'),
> ]
>
> views.py
> def viewLit(request, circuitid):
> #display records fields here
> return HttpResponse("You are at the viewLit page!")
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fc5c93e7-2f6e-46f0-9501-84a2e9c60508%40googlegroups.com.


Re: ElementTree problem saving images

2019-11-07 Thread Nuno Vieira
Hi,

thanks for your help.

i solved the situation like this:
img = props.find('images')
  
photos = []
   for child in img[:len(img)]:

photos.append(child[0].text)
  
try:
   img_1_url   = photos[1]
   except IndexError:
   img_1_url   = None
   try:
   img_2_url   = photos[2]
   except IndexError:
   img_2_url   = None

Just an example, but like this, for each property i could attached the 
correct number of images.

Thanks again for all of you that tried to help me!

Best regards

quinta-feira, 24 de Outubro de 2019 às 16:28:00 UTC+1, Nuno Vieira escreveu:
>
> Hi,
>
> i receive an xml file and i am parsing the values and sving them to 
> database.
>
>> XML Example:
>
> ...
> ...
> ...
> 
> 9896
> 2019-07-11 13:12:09
> BC30401
> 895000
> EUR
> sale
> 0
> 0
> 0
> 
> 915
> 
> Villa
> 
> 37.134720
> -8.020436
> 
> optional location detail
> Vilamoura
> Algarve
> Portugal
> 4
> 3
> 1
> 
> 
> 
> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7064.jpg
> 
> 
> 
> 
> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7065.jpg
> 
> 
> 
> 
> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7066.jpg
> 
> 
> 
> 
> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7067.jpg
> 
> 
> 
> 
> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7068.jpg
> 
> 
> 
> 
> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7069.jpg
> 
> 
> 
> 
> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7071.jpg
> 
> 
> 
> 
> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7072.jpg
> 
> 
> 
> 
> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7073.jpg
> 
> 
> 
> 
> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7075.jpg
> 
> 
> 
> 
> https://bc-villas.com/wp-content/uploads/2019/07/IMG_7077.jpg
> 
>
>> 
>
>
> It´s all working ok but with images its a litle confused because i can 
> only save the first and the last image. If a property have 12 pictures i 
> can only save the picture nr 1 and picture nr 12, if the property have 8 
> pictures i can only save picture nr1 and picture nr 8. It´s weird!
>
> My code to get the pictures url:
> img = props.find('images')
>
> for child in img:
>
> if child.get('id') == '1':
>img_main_url = child.find('url'
> ).text
>
>if child.get('id') == '2':
>
>img_1_url = child.find('url').text
>else:
>img_1_url = None
>if child.get('id') == '3':
>img_2_url = child.find('url').text
>else:
>img_2_url = None
>if child.get('id') == '4':
>img_3_url = child.find('url').text
>else:
>img_3_url = None
>if child.get('id') == '5':
>img_4_url = child.find('url').text
>else:
>img_4_url = None
>
>
> I could use a litle help from someone more experienced in django.
>
> Thanks for your help
>
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/36560a44-3601-4330-9412-c1bc5d19a7a8%40googlegroups.com.


Re:

2019-11-07 Thread himanshu chouhan
https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Admin_site

On Thu, 7 Nov, 2019, 8:29 PM himanshu chouhan,  wrote:

> you need to register ur model as well.
>
> On Thu, 7 Nov, 2019, 8:27 PM Paras Jain,  wrote:
>
>> this is my models.py file i created and migrated but model in not created
>> in my admin page as database please somebody help
>>
>> from django.db import models
>>
>> # Create your models here.
>> class Company(models.Model):
>> email = models.EmailField()
>>
>>
>> def __init__():
>> return self.email
>>
>> --
>> 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 discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAMtmBS-msPj-1TNBx%3DP6YOZTZmaEhFp22%3DGa%3DHGC160w77fyEQ%40mail.gmail.com
>> 
>> .
>>
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFCu%3DVQU6n8M_Tx-WpfHsm0BtjF%2BvgXaOcHGbXVjELXL8Dacpw%40mail.gmail.com.


Re:

2019-11-07 Thread himanshu chouhan
you need to register ur model as well.

On Thu, 7 Nov, 2019, 8:27 PM Paras Jain,  wrote:

> this is my models.py file i created and migrated but model in not created
> in my admin page as database please somebody help
>
> from django.db import models
>
> # Create your models here.
> class Company(models.Model):
> email = models.EmailField()
>
>
> def __init__():
> return self.email
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAMtmBS-msPj-1TNBx%3DP6YOZTZmaEhFp22%3DGa%3DHGC160w77fyEQ%40mail.gmail.com
> 
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFCu%3DVSsN1gm0Ymgo30iF3j_AOrJWjmt%2BfFWy0w_3o_mr41DvA%40mail.gmail.com.


[no subject]

2019-11-07 Thread Paras Jain
this is my models.py file i created and migrated but model in not created
in my admin page as database please somebody help

from django.db import models

# Create your models here.
class Company(models.Model):
email = models.EmailField()


def __init__():
return self.email

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMtmBS-msPj-1TNBx%3DP6YOZTZmaEhFp22%3DGa%3DHGC160w77fyEQ%40mail.gmail.com.


Re: Open Source IDE to start with Django Web development

2019-11-07 Thread BR
Something to consider is that Django is Python, HTML, and Javascript. VS 
Code can do all three with highlighting, formatting, etc, and it all 
happens automatically as you switch between editing files. The Git support 
is excellent as well, as others said.

On Thursday, November 7, 2019 at 9:18:25 AM UTC-5, johnf wrote:
>
> Every time I see one these which is the best IDE - I never see WingIDE.  I 
> often wonder why.  It works as well as any other of the suggestions?
>
> Johnf
>
> On 11/7/19 5:38 AM, Siratim Mustaquim wrote:
>
> Why don't you just try a few IDE's and text editors, IDK how much OSS or 
> NonOSS IDE will affect your project, but if 'you' don't feel comfortable 
> with it, I can guarantee, that will affect your project. 
>
> Assuming u are not in a limited internet connection package, download a 
> few of the available ones, and start using them.
>
> PyCharm IDE is a great tool. But it may feel big and bulky sometimes, 
> while VSCode editor is faster in terms of opening projects.
>
> I tried Geanny, didn't like it, because it made some weird behavior I 
> terms of indentation and tabs, I couldn't figure how I could make 
> "tab=4spaces" instead of "tab=1tab".
>
> Vim and Vim like ones are too difficult for me, so I skipped. 
>
> I saw people developing python in Visual Studio. Again, amazing IDE, might 
> feel a bit heavy at one point.
>
> And last but not least, The one and Only IDLE. 
> I still like it, and for quick scripting and quick checks, amazing. 
>
> So, pick one that is comfortable for you. What is easy to me might not be 
> the same for u. Try a few, find what u like.
>
> Happy Coding
>
> On Thu, Nov 7, 2019, 7:03 PM vineet daniel  > wrote:
>
>> VSCode.
>>
>> On Thu, 7 Nov 2019, 16:39 John McClain, > > wrote:
>>
>>> agreed, but... 
>>>
>>> pycharm is dedicated to python and vs code is generally suitable for any 
>>> others assuming the person operating can configure their environments.
>>>
>>> the person was asking for an IDE suitable for python specifically which 
>>> is why I throughout pycharm
>>>
>>> ultimately, I would go with vs code but it takes a bit more knowledge 
>>> than pycharm does
>>>
>>> On Thu, 7 Nov 2019 at 11:00, Parth Joshi >> > wrote:
>>>
 VS Code works like a Charm. (Pun intended :-) ) 

 There are lint, autocomplete and git extensions which you can use for 
 setting up dev environment.

 Regards, 

 Parth Joshi



 On 06-Nov-2019, at 4:22 PM, himanshu goyal >>> > wrote:

 To Community, 

 Greetings!

 Could you suggest a good open source IDE for Django? URL to download 
 will be helpful.

 Thanks,
 Himanshu
 India

 -- 
 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...@googlegroups.com .
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/767f5e59-20b7-4a3a-989a-dedb0e40ceff%40googlegroups.com
  
 
 .


 -- 
 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...@googlegroups.com .
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/37EB9045-4C0B-465E-BDF8-C90A73956A45%40gmail.com
  
 
 .

>>>
>>>
>>> -- 
>>> John McClain
>>>
>>> Cell: 085-1977-823
>>> Skype: jmcclain0129
>>> Email: jmccla...@gmail.com 
>>> -- 
>>> 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...@googlegroups.com .
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/CAN-hv_oUtRDmx0y6i1oRZvHTXK-qgiUF%2Bq5r5VJMDrCTjja7Ow%40mail.gmail.com
>>>  
>>> 
>>> .
>>>
>> -- 
>> 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...@googlegroups.com .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAJPbAW-AN%2BMp4g0%2BNX4nYzfin6dSzxySNLVgn_RXp7NOG7RRsg%40mail.gmail.com
>>  
>> 

Re: Open Source IDE to start with Django Web development

2019-11-07 Thread johnf
Every time I see one these which is the best IDE - I never see WingIDE.  
I often wonder why.  It works as well as any other of the suggestions?


Johnf

On 11/7/19 5:38 AM, Siratim Mustaquim wrote:
Why don't you just try a few IDE's and text editors, IDK how much OSS 
or NonOSS IDE will affect your project, but if 'you' don't feel 
comfortable with it, I can guarantee, that will affect your project.


Assuming u are not in a limited internet connection package, download 
a few of the available ones, and start using them.


PyCharm IDE is a great tool. But it may feel big and bulky sometimes,
while VSCode editor is faster in terms of opening projects.

I tried Geanny, didn't like it, because it made some weird behavior I 
terms of indentation and tabs, I couldn't figure how I could make 
"tab=4spaces" instead of "tab=1tab".


Vim and Vim like ones are too difficult for me, so I skipped.

I saw people developing python in Visual Studio. Again, amazing IDE, 
might feel a bit heavy at one point.


And last but not least, The one and Only IDLE.
I still like it, and for quick scripting and quick checks, amazing.

So, pick one that is comfortable for you. What is easy to me might not 
be the same for u. Try a few, find what u like.


Happy Coding

On Thu, Nov 7, 2019, 7:03 PM vineet daniel > wrote:


VSCode.

On Thu, 7 Nov 2019, 16:39 John McClain, mailto:jmcclain0...@gmail.com>> wrote:

agreed, but...

pycharm is dedicated to python and vs code is generally
suitable for any others assuming the person operating can
configure their environments.

the person was asking for an IDE suitable for python
specifically which is why I throughout pycharm

ultimately, I would go with vs code but it takes a bit more
knowledge than pycharm does

On Thu, 7 Nov 2019 at 11:00, Parth Joshi
mailto:joshipart...@gmail.com>> wrote:

VS Code works like a Charm. (Pun intended :-) )

There are lint, autocomplete and git extensions which you
can use for setting up dev environment.

Regards,

Parth Joshi




On 06-Nov-2019, at 4:22 PM, himanshu goyal
mailto:hgoyal1...@gmail.com>> wrote:

To Community,

Greetings!

Could you suggest a good open source IDE for Django? URL
to download will be helpful.

Thanks,
Himanshu
India

-- 
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 discussion on the web visit

https://groups.google.com/d/msgid/django-users/767f5e59-20b7-4a3a-989a-dedb0e40ceff%40googlegroups.com

.


-- 
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 discussion on the web visit

https://groups.google.com/d/msgid/django-users/37EB9045-4C0B-465E-BDF8-C90A73956A45%40gmail.com

.



-- 
John McClain


Cell: 085-1977-823
Skype: jmcclain0129
Email: jmcclain0...@gmail.com 
-- 
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 discussion on the web visit

https://groups.google.com/d/msgid/django-users/CAN-hv_oUtRDmx0y6i1oRZvHTXK-qgiUF%2Bq5r5VJMDrCTjja7Ow%40mail.gmail.com

.

-- 
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
.
   

Re: Djongo and mongodb

2019-11-07 Thread dupakoor kannan
Hi,

Hope these links will be helpful

https://www.youtube.com/watch?v=iKB_4HWKMCc

https://medium.com/@ksarthak4ever/how-to-use-django-with-mongodb-40ba36a21124

https://www.freecodecamp.org/news/using-django-with-mongodb-by-adding-just-one-line-of-code-c386a298e179/


Kannan

On Thu, Nov 7, 2019 at 8:02 AM vineet daniel  wrote:

> You need to share code or error. Hard to say anything in response to bery
> generic queries.
>
> On Thu, 7 Nov 2019, 18:05 Amit Agarwal,  wrote:
>
>> Hi friends,
>> I am using Djongo to connect to MongoDB.
>>
>> But I am not able to connect it to existing collection.
>>
>> Can u all plz guide how to do this, or guide me with a useful link.
>>
>> Also is Djongo good or are there any better framework to use
>>
>> Thanks
>>
>> --
>> 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 discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/c632867c-4863-4fe4-8853-7aabf731ab6b%40googlegroups.com
>> 
>> .
>>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJPbAW9qQ4M1YQJ8dK2kVX3vsxF5xTkz7jqprCN-DZxLzgLasA%40mail.gmail.com
> 
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADiZb_ejbLum_WCUya5UEOfNWjFf0z-09WQnwMX%3DqFOf74xuyg%40mail.gmail.com.


Re: mariadb/mysql database (2006, 'MySQL server has gone away')

2019-11-07 Thread BR
I'm still having this issue, and it definitely seems Channels related. When 
the issue occurs, I can logout/login and do other things on the Django only 
portion of the site. As soon as I try to make DB requests from within a 
Channels consumer, the error pops up. Restarting the Daphne server resolves 
the issue.

On Friday, November 1, 2019 at 9:13:41 AM UTC-4, BR wrote:
>
> I think I'm experiencing an issue related to:
>
> https://github.com/django/channels/issues/1234
>
> where I get (2006, 'MySQL server has gone away') after trying to establish 
> a new channels connection with calls using database_sync_to_async(). I have 
> set my Django DB CONN_MAX_AGE to 300 (5 minutes) and my MariaDB 
> wait_timeout to 28800 (was 600 originally). All this did was extend the 
> time before I saw the issue.
>
> Why would Django not be clearing out old connections, and why doesn't it 
> just open a new one?
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/acd7afb1-0ee2-4259-8392-8f0a6cc9f34a%40googlegroups.com.


Re: Open Source IDE to start with Django Web development

2019-11-07 Thread Siratim Mustaquim
Why don't you just try a few IDE's and text editors, IDK how much OSS or
NonOSS IDE will affect your project, but if 'you' don't feel comfortable
with it, I can guarantee, that will affect your project.

Assuming u are not in a limited internet connection package, download a few
of the available ones, and start using them.

PyCharm IDE is a great tool. But it may feel big and bulky sometimes,
while VSCode editor is faster in terms of opening projects.

I tried Geanny, didn't like it, because it made some weird behavior I terms
of indentation and tabs, I couldn't figure how I could make "tab=4spaces"
instead of "tab=1tab".

Vim and Vim like ones are too difficult for me, so I skipped.

I saw people developing python in Visual Studio. Again, amazing IDE, might
feel a bit heavy at one point.

And last but not least, The one and Only IDLE.
I still like it, and for quick scripting and quick checks, amazing.

So, pick one that is comfortable for you. What is easy to me might not be
the same for u. Try a few, find what u like.

Happy Coding

On Thu, Nov 7, 2019, 7:03 PM vineet daniel  wrote:

> VSCode.
>
> On Thu, 7 Nov 2019, 16:39 John McClain,  wrote:
>
>> agreed, but...
>>
>> pycharm is dedicated to python and vs code is generally suitable for any
>> others assuming the person operating can configure their environments.
>>
>> the person was asking for an IDE suitable for python specifically which
>> is why I throughout pycharm
>>
>> ultimately, I would go with vs code but it takes a bit more knowledge
>> than pycharm does
>>
>> On Thu, 7 Nov 2019 at 11:00, Parth Joshi  wrote:
>>
>>> VS Code works like a Charm. (Pun intended :-) )
>>>
>>> There are lint, autocomplete and git extensions which you can use for
>>> setting up dev environment.
>>>
>>> Regards,
>>>
>>> Parth Joshi
>>>
>>>
>>>
>>> On 06-Nov-2019, at 4:22 PM, himanshu goyal  wrote:
>>>
>>> To Community,
>>>
>>> Greetings!
>>>
>>> Could you suggest a good open source IDE for Django? URL to download
>>> will be helpful.
>>>
>>> Thanks,
>>> Himanshu
>>> India
>>>
>>> --
>>> 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 discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/767f5e59-20b7-4a3a-989a-dedb0e40ceff%40googlegroups.com
>>> 
>>> .
>>>
>>>
>>> --
>>> 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 discussion on the web visit
>>> https://groups.google.com/d/msgid/django-users/37EB9045-4C0B-465E-BDF8-C90A73956A45%40gmail.com
>>> 
>>> .
>>>
>>
>>
>> --
>> John McClain
>>
>> Cell: 085-1977-823
>> Skype: jmcclain0129
>> Email: jmcclain0...@gmail.com
>>
>> --
>> 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 discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAN-hv_oUtRDmx0y6i1oRZvHTXK-qgiUF%2Bq5r5VJMDrCTjja7Ow%40mail.gmail.com
>> 
>> .
>>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAJPbAW-AN%2BMp4g0%2BNX4nYzfin6dSzxySNLVgn_RXp7NOG7RRsg%40mail.gmail.com
> 
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPvctisXnWpGtt8mfPDL085Yqrxm2uL9BjAiS4as8_ZvDgNskw%40mail.gmail.com.


Re: Open Source IDE to start with Django Web development

2019-11-07 Thread vineet daniel
VSCode.

On Thu, 7 Nov 2019, 16:39 John McClain,  wrote:

> agreed, but...
>
> pycharm is dedicated to python and vs code is generally suitable for any
> others assuming the person operating can configure their environments.
>
> the person was asking for an IDE suitable for python specifically which is
> why I throughout pycharm
>
> ultimately, I would go with vs code but it takes a bit more knowledge than
> pycharm does
>
> On Thu, 7 Nov 2019 at 11:00, Parth Joshi  wrote:
>
>> VS Code works like a Charm. (Pun intended :-) )
>>
>> There are lint, autocomplete and git extensions which you can use for
>> setting up dev environment.
>>
>> Regards,
>>
>> Parth Joshi
>>
>>
>>
>> On 06-Nov-2019, at 4:22 PM, himanshu goyal  wrote:
>>
>> To Community,
>>
>> Greetings!
>>
>> Could you suggest a good open source IDE for Django? URL to download will
>> be helpful.
>>
>> Thanks,
>> Himanshu
>> India
>>
>> --
>> 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 discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/767f5e59-20b7-4a3a-989a-dedb0e40ceff%40googlegroups.com
>> 
>> .
>>
>>
>> --
>> 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 discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/37EB9045-4C0B-465E-BDF8-C90A73956A45%40gmail.com
>> 
>> .
>>
>
>
> --
> John McClain
>
> Cell: 085-1977-823
> Skype: jmcclain0129
> Email: jmcclain0...@gmail.com
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAN-hv_oUtRDmx0y6i1oRZvHTXK-qgiUF%2Bq5r5VJMDrCTjja7Ow%40mail.gmail.com
> 
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJPbAW-AN%2BMp4g0%2BNX4nYzfin6dSzxySNLVgn_RXp7NOG7RRsg%40mail.gmail.com.


Re: Djongo and mongodb

2019-11-07 Thread vineet daniel
You need to share code or error. Hard to say anything in response to bery
generic queries.

On Thu, 7 Nov 2019, 18:05 Amit Agarwal,  wrote:

> Hi friends,
> I am using Djongo to connect to MongoDB.
>
> But I am not able to connect it to existing collection.
>
> Can u all plz guide how to do this, or guide me with a useful link.
>
> Also is Djongo good or are there any better framework to use
>
> Thanks
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c632867c-4863-4fe4-8853-7aabf731ab6b%40googlegroups.com
> 
> .
>

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJPbAW9qQ4M1YQJ8dK2kVX3vsxF5xTkz7jqprCN-DZxLzgLasA%40mail.gmail.com.


Djongo and mongodb

2019-11-07 Thread Amit Agarwal
Hi friends,
I am using Djongo to connect to MongoDB.

But I am not able to connect it to existing collection.

Can u all plz guide how to do this, or guide me with a useful link.

Also is Djongo good or are there any better framework to use

Thanks

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c632867c-4863-4fe4-8853-7aabf731ab6b%40googlegroups.com.


Re: read multiple document in create function of viewset

2019-11-07 Thread Parth Joshi
Can you paste in the code snippet ? 

> On 07-Nov-2019, at 5:00 PM, Amit Agarwal  wrote:
> 
> 
> I am passing a more than one JSON document in post request, in create method 
> of viewset, when I validate it, it raises an error "
> 
> 
> "detail": "JSON parse error - Extra data: line 5 column 6 (char 74)"
> How can i handle it?
> -- 
> 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 discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAEHyEsoFyELjey0yGQp_qJp6sZEZJ5C2ppWFTbUbngNftsVxGw%40mail.gmail.com.

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/781E5F78-2DE3-4582-8AE1-58EDBA4A35AA%40gmail.com.


read multiple document in create function of viewset

2019-11-07 Thread Amit Agarwal
I am passing a more than one JSON document in post request, in create
method of viewset, when I validate it, it raises an error "



"detail": "JSON parse error - Extra data: line 5 column 6 (char 74)"

How can i handle it?

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEHyEsoFyELjey0yGQp_qJp6sZEZJ5C2ppWFTbUbngNftsVxGw%40mail.gmail.com.


Re: Open Source IDE to start with Django Web development

2019-11-07 Thread John McClain
agreed, but...

pycharm is dedicated to python and vs code is generally suitable for any
others assuming the person operating can configure their environments.

the person was asking for an IDE suitable for python specifically which is
why I throughout pycharm

ultimately, I would go with vs code but it takes a bit more knowledge than
pycharm does

On Thu, 7 Nov 2019 at 11:00, Parth Joshi  wrote:

> VS Code works like a Charm. (Pun intended :-) )
>
> There are lint, autocomplete and git extensions which you can use for
> setting up dev environment.
>
> Regards,
>
> Parth Joshi
>
>
>
> On 06-Nov-2019, at 4:22 PM, himanshu goyal  wrote:
>
> To Community,
>
> Greetings!
>
> Could you suggest a good open source IDE for Django? URL to download will
> be helpful.
>
> Thanks,
> Himanshu
> India
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/767f5e59-20b7-4a3a-989a-dedb0e40ceff%40googlegroups.com
> 
> .
>
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/37EB9045-4C0B-465E-BDF8-C90A73956A45%40gmail.com
> 
> .
>


-- 
John McClain

Cell: 085-1977-823
Skype: jmcclain0129
Email: jmcclain0...@gmail.com

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN-hv_oUtRDmx0y6i1oRZvHTXK-qgiUF%2Bq5r5VJMDrCTjja7Ow%40mail.gmail.com.


Re: Open Source IDE to start with Django Web development

2019-11-07 Thread Parth Joshi
VS Code works like a Charm. (Pun intended :-) )

There are lint, autocomplete and git extensions which you can use for setting 
up dev environment.

Regards, 

Parth Joshi



> On 06-Nov-2019, at 4:22 PM, himanshu goyal  wrote:
> 
> To Community,
> 
> Greetings!
> 
> Could you suggest a good open source IDE for Django? URL to download will be 
> helpful.
> 
> Thanks,
> Himanshu
> India
> 
> -- 
> 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 discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/767f5e59-20b7-4a3a-989a-dedb0e40ceff%40googlegroups.com
>  
> .

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/37EB9045-4C0B-465E-BDF8-C90A73956A45%40gmail.com.


Re: Open Source IDE to start with Django Web development

2019-11-07 Thread John McClain
pycharm or vs code

On Wed, 6 Nov 2019 at 12:36, himanshu goyal  wrote:

> To Community,
>
> Greetings!
>
> Could you suggest a good open source IDE for Django? URL to download will
> be helpful.
>
> Thanks,
> Himanshu
> India
>
> --
> 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 discussion on the web visit
> https://groups.google.com/d/msgid/django-users/767f5e59-20b7-4a3a-989a-dedb0e40ceff%40googlegroups.com
> 
> .
>


-- 
John McClain

Cell: 085-1977-823
Skype: jmcclain0129
Email: jmcclain0...@gmail.com

-- 
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 discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN-hv_q-ev_wDgr3Eqqk052QMXxHPoGcfF7GGAsdxY2zgK1W9Q%40mail.gmail.com.