Django Aggregate(annotate, count) is working differently.

2020-06-17 Thread Himanshu Pharawal
models.py class Intrest(models.Model): user = models.ForeignKey(User, related_name='intrests', on_delete=models. CASCADE) keyword = models.CharField(max_length=100) class SponsoredBook(models.Model): title = models.CharField(max_length=20) class Keyword(models.Model): sponsored_book = models.

why in views we use def(functions) and model we use class, why not we use def(fuction) in models and class in views

2020-06-17 Thread yashwanth balanagu
why in views we use def(functions) and model we use class, why not we use def(fuction) in models and class in views -- 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

Re: Django Saving a form with Imagefield on shared host

2020-06-17 Thread MUGOYA DIHFAHSIH
@Mangla, essentially what i want to do is to serve uploaded images on a shared host through the media directory in my project root. I have deployed the web app the static files such as css and images are working fine, but when i try to submit a form that has imagefield into the database, it throws

Re: Want to learn web crawling using Python

2020-06-17 Thread Anish Chapagain
I would recommend some books example: https://www.packtpub.com/big-data-and-business-intelligence/hands-web-scraping-python On Wed, 17 Jun 2020 at 20:50, Spring-dot wrote: > Hey!! I want to learn web crawling using Python from scratch. Please > Someone help!!! > Thanks in advance :) > > -- > You

Re: Want to learn web crawling using Python

2020-06-17 Thread upendra kushwaha
Scrapy https://scrapy.org/ will be good starting point On Wed, Jun 17, 2020 at 8:34 PM Spring-dot wrote: > Hey!! I want to learn web crawling using Python from scratch. Please > Someone help!!! > Thanks in advance :) > > -- > You received this message because you are subscribed to the Google Gro

Re: Django forms

2020-06-17 Thread chaitanya orakala
Hi Obed, You can use django model forms, where modelform will access your fields in model and you play with it using widgets. Hope this helps. Thank You On Tue, Jun 16, 2020 at 5:25 PM Obed Balogun wrote: > Please im trying to create a playlist app such that the user enters songs > in a playlis

GSoD 2020

2020-06-17 Thread Spring-dot
What are the project ideas for contributing to Django for GSoD, 2020? Anyone who can guide me in this? Please Help!! 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

Re: Work in django!!

2020-06-17 Thread Luqman Lawal
ok On Wed, Jun 17, 2020, 05:41 carlos wrote: > geodjango! > > On Tue, Jun 16, 2020 at 10:35 PM RANGA BHARATH JINKA < > bharathjink...@gmail.com> wrote: > >> Hi, You can use the folium package. >> >> On Wed, Jun 17, 2020 at 9:28 AM meera gangani >> wrote: >> >>> Hello , >>> >>>I want to

Re: someone to help in this please

2020-06-17 Thread Peter Kirieny
fortunately am in windows, once again thanks I'll let you know the proceeds On Wed, 17 Jun 2020 at 15:23, Kasper Laudrup wrote: > Hi Peter, > > On 17/06/2020 14.04, Peter Kirieny wrote: > > yea, I installed it with OSGEO4W > > > > So I assume you are on Windows? > > It would have been quite usef

Re: someone to help in this please

2020-06-17 Thread Peter Kirieny
Thanks to all, let me try and hope you won't mind me coming back in case of anything 'AM NEW' On Wed, 17 Jun 2020 at 16:07, Richard Balwane wrote: > -> Do a .whl installation - In the environment! > Download "GDAL-3.0.4-cp37-cp37m-win_amd64.whl", if using Python 3.7 on > Windows 64-bit > Say...

Want to learn web crawling using Python

2020-06-17 Thread Spring-dot
Hey!! I want to learn web crawling using Python from scratch. Please Someone help!!! Thanks in advance :) -- 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 djang

Re: how to make docker image of your django app

2020-06-17 Thread onlinejudge95
On Wed, Jun 17, 2020 at 7:28 PM Jason Turner wrote: > > https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/ > > Also, Will Vincent's book "Django for Professionals" is a good resource. > > On Wed, Jun 17, 2020, 8:51 AM Anirudh choudhary < > anirudhchoudary...@gmail.com

Re: how to make docker image of your django app

2020-06-17 Thread Jason Turner
https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/ Also, Will Vincent's book "Django for Professionals" is a good resource. On Wed, Jun 17, 2020, 8:51 AM Anirudh choudhary < anirudhchoudary...@gmail.com> wrote: > I Want to make make a docker image of my Django app us

how to make docker image of your django app

2020-06-17 Thread Anirudh choudhary
I Want to make make a docker image of my Django app using PostgreSQL and unicorn. but I can't find any good tutorial for reference please share my link to if you know any good tutorial My Dockerfile now is like FROM python:3.6 ENV PYTHONUNBUFFERED 1 RUN mkdir /app WORKDIR /app COPY requirements.tx

Re: someone to help in this please

2020-06-17 Thread Richard Balwane
-> Do a .whl installation - In the environment! Download "GDAL-3.0.4-cp37-cp37m-win_amd64.whl", if using Python 3.7 on Windows 64-bit Say... Command(env activated, path to the file): python.exe -m pip install "C:\\Users\\Mossad\\Downloads\\GDAL-3.0.4-cp37-cp37m-win_amd64.whl" -> Include 'gdal30

Re: someone to help in this please

2020-06-17 Thread Kasper Laudrup
Hi Peter, On 17/06/2020 14.04, Peter Kirieny wrote: yea, I installed it with OSGEO4W So I assume you are on Windows? It would have been quite useful if you had written that in your initial question. I'm not very experienced on that platform, but the installer you used has most likely ins

Re: someone to help in this please

2020-06-17 Thread Peter Kirieny
yea, I installed it with OSGEO4W On Tue, 16 Jun 2020 at 18:14, Budi Hermansyah wrote: > Did you already install gdal n friends? > > > https://docs.djangoproject.com/en/3.0/ref/contrib/gis/install/geolibs/ > > > > On Tue, 16 Jun 2020 at 22.12 Peter Kirieny wrote: > >> am using Geodjango with pos

Django channels handshake response headers are missing

2020-06-17 Thread Albertas Gimbutas
Hi, I am trying to add WebSocket `permessage-deflate` extension support to my django channels consumer. As I know if a WebSocket server supports an extension (which was provided in the request headers), the server has to include the extension headers in the handshake response. Which I was not

Re: Sybase X Django

2020-06-17 Thread Henri GERARDIN
I made a change in my sql.ini and now i get this mistake : [SAP][ASE ODBC Driver][Adaptive Server Enterprise]Function 'SYSDATETIME' not found. If this is a SQLJ function or SQL function, use sp_help to check whether the object exists Le mercredi 17 juin 2020 à 11:55:51 UTC+2, Henri GERARDIN a é

Disable temporary nested serializer

2020-06-17 Thread plusmen...@gmail.com
Hello everyone! I'm new in Django. I have a serializer with nested serializer like this: Project Serializer with nested customer serializer ### class ProjectSerializer(serializers.ModelSerializer): id = serializers.IntegerField(required=False)

Sybase X Django

2020-06-17 Thread Henri GERARDIN
Hello everybody, I am trying to connect my Django project with a sybase database but i always get this mistake : Cannot locate reference to the DB server specified in DSURL. Here is my connection String : 'apidata': { 'ENGINE': "sql_server.pyodbc", 'HOST': "dsp_adt_djan

Django channels handshake headers are ignored

2020-06-17 Thread Albertas Gimbutas
Hi, I want to add WebSocket extension support to my Django channels consumer class. As I know a list of accepted extensions should be included in the headers of the handshake response of the consumer. I tried adding the response headers, however browser does not get them. I am not sure whethe

Re: Django Saving a form with Imagefield on shared host

2020-06-17 Thread Kelvin Sajere
If you indeed have your media folder where it’s supposed to be, then make sure in your settings file, you have specified that folder as your root folder for media. I don’t see your code, so this might be difficult to determine on my end. -- KeLLs -- You received this message because you are subs

RE: Django Saving a form with Imagefield on shared host

2020-06-17 Thread Vishesh Mangla
One thing that can be done is to save the image as a base64 string in the database. https://stackoverflow.com/questions/3715493/encoding-an-image-file-with-base64 Sent from Mail for Windows 10 From: MUGOYA DIHFAHSIHSent: 14 June 2020 19:15To: Django usersSubject: Django Saving a form with Imagefiel