Re: how to pass multiple query sets in Django

2021-02-16 Thread Anil s
Hi thanks for the response. can you please let me know how to pass the below array in the serializer project_array = {'project_type': project_type} serializer = ProjectListSerializer(project_array, many=True) return Response(serializer.data) when i pass this i am getting the below error Got Att

setting up urls of many apps

2021-02-16 Thread Peter Kirieny
someone to help me to set up urls of two different apps in django project please, i keep on getting errors am new -- 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

Re: Library for calculating distance between ZIP codes

2021-02-16 Thread Ram
Thank you very much, Thomas. We will explore Geodetic and see if it is helpful. I really appreciate for the pointer. Best regards, ~Ram On Tue, Feb 16, 2021 at 10:02 PM Thomas Lockhart wrote: > Pre-calculating is pretty expensive: 81939*81938/2 = 3,356,958,891 entries > make a pretty big table.

Re: Library for calculating distance between ZIP codes

2021-02-16 Thread Thomas Lockhart
Pre-calculating is pretty expensive: 81939*81938/2 = 3,356,958,891 entries make a pretty big table. Calculating on the fly is probably not horribly expensive and you could calculate and save, thereby caching values which have been used before. Anyway, geodjango might be what you need. Plus the

Library for calculating distance between ZIP codes

2021-02-16 Thread Ram
Hi, We've USA ZIP codes table with the following values. and we have a total of 81,939 ZIP codes. INSERT INTO pages_zip_code (id, zip, city, st) VALUES > (1, '00501', 'Holtsville', 'NY'), > (2, '00544', 'Holtsville', 'NY'), > (3, '00601', 'Adjuntas', 'PR'), > (4, '00602', 'Aguada', 'PR'), > (5, '

Re: I have created a application in which i want to filter table between dates (from and to date) but i am not getting desired out put... Please guide me

2021-02-16 Thread Jim Illback
Neha, try changing your template for loop from: {% for results in formdata %} To: {% for results in search %} The name of your queryset in your context (d = {'search': search, 'fd': fd, 'td': td}) is search, not formdata. Also, I’d recommend improving your names. Things like “data” and “result

Re: weird memory error on Centos7

2021-02-16 Thread Michael Johnson
Hi Wouter, I am having this same issue (or a very similar one - I am using Centos 8), and this is the only place I have seen someone else with it. Do you mind sharing your solution? I have the packages installed as suggested by DANIEL URBANO DE LA RUA, and I see on the docs that geodjango supor

Django “Did you mean?” search query

2021-02-16 Thread dupakoor kannan
Hello everyone, I would like to implement a search for miss spelled words from the database. I read this https://stackoverflow.com/questions/476394/django-did-you-mean-query. Do we have Django apps for that? Thank you Kannan -- You received this message because you are subscribed to the Google

Re: how to pass multiple query sets in Django

2021-02-16 Thread Omkar Parab
pass your multiple query sets using the get_context_data" method. 👇 https://docs.djangoproject.com/en/3.1/topics/class-based-views/generic-display/ On Tue, Feb 16, 2021, 7:28 PM Anil s wrote: > > Hello Everyone: > > Can somebody please tell me how to pass multiple query sets in Django. > > Than

Re: using variable in django template

2021-02-16 Thread Kasper Laudrup
On 16/02/2021 13.18, Jiffin George Kokkat wrote: Hi guys, i want to declare a variable in django template and update value of variable inside a loop https://pythoncircle.com/post/701/how-to-set-a-variable-in-django-template/ https://pythoncircle.com/post/685/for-loop-in-django-template/ Ki

how to pass multiple query sets in Django

2021-02-16 Thread Anil s
Hello Everyone: Can somebody please tell me how to pass multiple query sets in Django. Thank you 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 t

Implementing a map within a form

2021-02-16 Thread Ziyad Alshaikh
Hi, I'm currently trying to implement a map within a form using class based model. The map does not show on the page/form. The map, however, shows on the *admin* page and stores the location successfully. Any thoughts on where is the problem? *Model* from django.contrib.gis.db import models c

How to pass multiple query sets in Django?

2021-02-16 Thread Anil s
How to pass multiple query sets in Django? -- 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

Class-Based_views | DetailView | send_email with attachments

2021-02-16 Thread Sachin KODAD
Hello Django Users, I need help with one of my views in Django DetailView. I want to send_mail from my HTML form (post method). Requrirement: 1. HTML Form (method=post) 2. Django DetailView (send_mail with attachments) *** I have already set up my send_mail and email config in setting.py and

using variable in django template

2021-02-16 Thread Jiffin George Kokkat
Hi guys, i want to declare a variable in django template and update value of variable inside a loop how to do Thanks, Jiffin George Kokkat -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

I have created a application in which i want to filter table between dates (from and to date) but i am not getting desired out put... Please guide me

2021-02-16 Thread neha bhurke
hi Everyone , I have created a application in which I want to filter table between dates (from and to)dates But not getting a desired output . This is my models.py class data(models.Model): machinename = models.CharField(max_length=100) activity = models.CharField(max_length=255) description

Does Django 2.2 LTS supports Postgresql 11 ?

2021-02-16 Thread phep
Hi, Pretty much everything is in the subject line! The release-notes say Postgresql 9.4 or higher is supported, but Postgresql 11 had been released only 6 months before Django 2.2, so I'd prefer to be sure. Thanks in advance, phep -- You received this message because you are subscribed to t

Re: maping url

2021-02-16 Thread Parul.
Hi, can you please provide code snapshots of where you are getting this error? a possibility can be you are trying to iterate in a dictionary. On Tue, Feb 16, 2021 at 12:27 PM Peter Kirieny wrote: > hi guys, i cloned a project from github and then added a new app into my > project > now am tryi