Unable to load Google Tag Manager in my Django admin app

2019-02-01 Thread prateek gupta
Hi All, I am trying to use Google Tag Manager(GTM) in my Django 2.0.6 application by following below url- https://github.com/Lacrymology/django-google-tag-manager In GTM console I have set my app but when I preview my app, GTM is not loading. I suspect I am missing something with respect to my

Re: Unable to load Google Tag Manager in my Django admin app

2019-02-01 Thread prateek gupta
On Friday, February 1, 2019 at 3:39:57 PM UTC+5:30, prateek gupta wrote: > > Hi All, > > I am trying to use Google Tag Manager(GTM) in my Django 2.0.6 application > by following below url- > https://github.com/Lacrymology/django-google-tag-manager > > In GTM console I ha

Re: Connecting a model of deep learning to website built in django.

2019-02-01 Thread prateek gupta
Hi, I have found django-ai which you can use to integrate your deep learning model in your django project. On Thursday, January 31, 2019 at 4:54:16 PM UTC+5:30, Bushra Tayyaba wrote: > > I have built a model in deep learning and want to use this mode

Getting django.db.utils.OperationalError: (2005, "Unknown MySQL server host error with AWS

2018-06-15 Thread prateek gupta
Hi All, I am trying to connect with AWS and when I run the server I get following error- django.db.utils.OperationalError: (2005, "Unknown MySQL server host 'psdbuat.chmnxeoa2hhd.ap-southeast-1.rds.amazonaws.com' (0)") I checked the connection in mysql workbench and details are fine. My setting

Re: Getting django.db.utils.OperationalError: (2005, "Unknown MySQL server host error with AWS

2018-06-15 Thread prateek gupta
Thanks, I will verify. On Friday, June 15, 2018 at 7:55:10 PM UTC+5:30, Andréas Kühne wrote: > > As Jason stated you probably have an issue with security groups. Make sure > that your EC2 instance is in a security group that can access the mysql > server. Otherwise you won't be able to connect.

Re: Getting django.db.utils.OperationalError: (2005, "Unknown MySQL server host error with AWS

2018-06-15 Thread prateek gupta
Thanks Json, I will check this. On Friday, June 15, 2018 at 6:41:42 PM UTC+5:30, Jason wrote: > > have you checked your security settings in the aws console to make sure > the port is open? > > also have you seen https://stackoverflow.com/a/45792248/214892 > -- You received this message because

facing aws s3 image file path issue?

2018-06-18 Thread prateek gupta
Hi All, I have created a bitbucket and some folders inside that with following path: my_bucket\merchant\logos\ I am trying to upload a image file inside the my_bucket\merchant\logos folder but it is saving inside the my-merchant folder instead of logos. PFB my code snippet- config.json- { "A

Please correct my aws s3 path for image loading in Django 2.0.6!

2018-06-18 Thread prateek gupta
Hi Experts! I am trying to upload an image inside the following AWS S3 path: *pg-merchant/merchant/logos* But the image is uploading inside the following path:*pg-merchant* instead of storing inside the *logos *folder; pfa screen of the same.

Can I use django-location-field module in Production?

2018-06-18 Thread prateek gupta
Hi All, I am auto populating latitude and longitude fields once user entered the address in a address form. For this task I am using https://pypi.org/project/django-location-field/ from location_field.models.plain import PlainLocationField I need to know can I use same module in Production? Is

Re: Please correct my aws s3 path for image loading in Django 2.0.6!

2018-06-18 Thread prateek gupta
Thanks Jason, this was the exact issue and now I am able to fix this by using below loc- s3_key_name = posixpath.join(settings.MEDIA_FILES_LOCATION, 'logos', logo_name) On Monday, June 18, 2018 at 5:04:24 PM UTC+5:30, Jason wrote: > > I think the issue is s3_key_name > > S3 is *not* a file base

How to auto fill latitude and longitude fields in Django2.0.6?

2018-06-18 Thread prateek gupta
Hi All, I have created a store address form using Django2.0.6+Mysql+Python3.6. Currently user has to manually fill latitude and longitude for the store address. I want to auto-fill both fields once user entered the address. Below is my current code- models.py- class Store(models.Model):

Re: How to auto fill latitude and longitude fields in Django2.0.6?

2018-06-19 Thread prateek gupta
#print params > a_geo_class = pygeocoder.Geocoder() > > try: > #f = urllib.urlopen( "http://maps.google.com/maps/geo?%s"; % > params ) > f = a_geo_class.geocode(query) > response = f.coordinates >

Re: How to auto fill latitude and longitude fields in Django2.0.6?

2018-06-20 Thread prateek gupta
lury/>* > > -- > Anthony Flury > anthon...@btinternet.com > > > -- > *From:* prateek gupta > > *To:* Django users > > *Sent:* Tuesday, June 19, 2018 6:45 AM > *Subject:* How to auto fill latitude and longitude fields in Django2.0.6? > > Hi All, >

How to fetch latitude and longitude from location field and save them separately in db (Django 2.0.6+Python3.6)?

2018-06-20 Thread prateek gupta
Hi All, I have created a model in Django 2.0.6+Python 3.6 which maps to a table in Database i.e. store table This store table has columns- id, name, address, location, latitude, longitude. Currently user don't have to manually fill the location field, it is filled with latitude,longitude based

Why some Django fields are not saved in database?

2018-06-21 Thread prateek gupta
Hi All, I have a store address form in Django which have fields like- name, address, location, latitude, longitude etc. I am autofilling the latitude, longitude fields based on address with the help of django package-https://github.com/caioariede/django-location-field In django view after the

Re: Why some Django fields are not saved in database?

2018-06-21 Thread prateek gupta
6 PM UTC+5:30, Melvyn Sopacua wrote: > > On donderdag 21 juni 2018 10:42:09 CEST prateek gupta wrote: > > > Issue is in database , latitude/longitude values are blank. > > > > What I am doing wrong here? > > Why do you not understand your own code? How did you g

How to fill latitude and longitude values from an existing location field in Django+Python?

2018-06-21 Thread prateek gupta
Hi All, I need your help in one task. I have created a address form in Django 2.0.6 + Python3.6. In this form once user entered the address, the location field is auto filled with latitude,longitude as below screen shot-

Re: Why some Django fields are not saved in database?

2018-06-21 Thread prateek gupta
Thanks for sharing this, I will do the same first. On Thursday, June 21, 2018 at 5:55:42 PM UTC+5:30, Melvyn Sopacua wrote: > > On donderdag 21 juni 2018 11:31:26 CEST prateek gupta wrote: > > > > > Thanks for reviewing the code. > > > > > > I am new to

Re: How to fill latitude and longitude values from an existing location field in Django+Python?

2018-06-21 Thread prateek gupta
Got it Jason, I will not post anymore now. On Thursday, June 21, 2018 at 5:31:13 PM UTC+5:30, Jason wrote: > > You've been posting here about this regularly (at least four times) with > no responses. I don't think anyone here knows how to solve your problem. > what else have you looked at? eg

Re: How to fill latitude and longitude values from an existing location field in Django+Python?

2018-06-21 Thread prateek gupta
update the field, you also make a request to some URL to update the > lat/long of the current displayed object. > > On Thu, Jun 21, 2018 at 9:29 AM, prateek gupta > wrote: > >> Got it Jason, I will not post anymore now. >> >> On Thursday, June 21, 2018 at 5:31:13

Re: How to fill latitude and longitude values from an existing location field in Django+Python?

2018-06-21 Thread prateek gupta
re help. > > > > *From:* django...@googlegroups.com [mailto: > django...@googlegroups.com ] *On Behalf Of *prateek gupta > *Sent:* Thursday, June 21, 2018 8:54 AM > *To:* Django users > *Subject:* Re: How to fill latitude and longitude values from an existing > location fiel

Re: How to fill latitude and longitude values from an existinglocation field in Django+Python?

2018-06-22 Thread prateek gupta
> Himanshu > > Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows 10 > > > > *From: *prateek gupta > *Sent: *Thursday, June 21, 2018 10:32 AM > *To: *Django users > *Subject: *Re: How to fill latitude and longitude values from an &

better way to create a dictionary in Django model?

2018-06-27 Thread prateek gupta
Hi All, I am using Django 2.0.6 with Python 3.6 and MySql and created a model which maps the db tables to django. In my database, I have a column 'config' of type json. This column stores the data in a dictionary format like below- {"user_id": "a...@example.com", "password": "xyz"} I need to mak

Re: better way to create a dictionary in Django model?

2018-06-27 Thread prateek gupta
It has some limit- The configuration object can only be changed, there's no link for "add" (1) On Wednesday, June 27, 2018 at 6:41:41 PM UTC+5:30, Egor Smolyakov wrote: > > Better way it to use packages like this > https://github.com/lazybird/django-solo > > On

Re: better way to create a dictionary in Django model?

2018-06-27 Thread prateek gupta
t it! The admin page for your model will have a widget for > each of your keys in your JSON data. I can't post the code I use, but this > outline should give you enough pointers to look in the Django docs and get > some examples from Google. > > Good luck! > > Mark >

Django log error email configuration?

2018-06-29 Thread prateek gupta
Hi All, I am using Django 2.0.6, Python 3.6 and MySql 5.7. For sending an email to the admin user in case of any error, I did following settings in my settings.py file- DEBUG = False # email configurations EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL = "" SERVER_EMAIL = ""

How can I save uploaded image's url in a column of database?

2018-07-01 Thread prateek gupta
Hi All, I am using Django2.0.6, Python3.6 and MySql. I have a table Brand in db which have fields- id, name, description, image_url. >From django admin I am uploading an image to s3 bucket. For this I have created a class Brand in models.py as below- class Brand(models.Model): name = models

Need your help to fix IntegrityError in my Django code.

2018-07-02 Thread prateek gupta
Hi All, I have created a simple database admin panel (Django2..6+Python3.6+Mysql5.7) where admin can operate create/edit/delete operations of database. I am facing following IntegrityError error when I try to Merge two products and click on Preview from my Django admin panel- 2018-07-02 16:17:

How to see every activity in logs of Django 2.0.6?

2018-07-25 Thread prateek gupta
Hi Experts, I am facing a strange issue in my Django2.0.6+Mysql application. In my settings ,py I have set Debug=True, but in logs I am not seeing any info/warning/error. Currently I am merging two products into one to remove duplicate products from Django admin panel but when I click on Previ

Re: How to see every activity in logs of Django 2.0.6?

2018-07-26 Thread prateek gupta
nds like you have a misconfiguration with your logging. post your > LOGGING dict in your settings > > On Thursday, July 26, 2018 at 1:20:07 AM UTC-4, prateek gupta wrote: >> >> Hi Experts, >> >> I am facing a strange issue in my Django2.0.6+Mysql application.

Re: How to see every activity in logs of Django 2.0.6?

2018-07-26 Thread prateek gupta
I forgot to mentions, I am using logger also as below- # send server errors to admin ADMINS = (('admin', 'ad...@example.com'),) MANAGERS = ADMINS # Logging configuration for production LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'verbose': {

Re: How to see every activity in logs of Django 2.0.6?

2018-07-26 Thread prateek gupta
ging to Sentry 'noisy_module': { 'level': 'ERROR', 'handlers': ['console'], 'propagate': False, }, # Default runserver request logging 'django.server': DEFAULT

Re: How to see every activity in logs of Django 2.0.6?

2018-07-26 Thread prateek gupta
I have changes like below but does not have any affect- import logging # Disable Django's logging setup LOGGING_CONFIG = None LOGLEVEL = os.environ.get('LOGLEVEL', 'info').upper() logging.config.dictConfig({ 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'de

Re: How to see every activity in logs of Django 2.0.6?

2018-07-26 Thread prateek gupta
then it says - File "", line 219, in _call_with_frames_removed File "E:\cms-app\ps-cms\ps_cms\settings.py", line 256, in 'django.server': DEFAULT_LOGGING['loggers']['django.server'], TypeError: 'module' object is not callable On Thursday, July 26, 2018 at 7:06:10 PM UTC+5:30, Jason wrote:

Re: How to see every activity in logs of Django 2.0.6?

2018-07-26 Thread prateek gupta
logging because of root logger 'propagate': False, }, # Prevent noisy modules from logging to Sentry 'noisy_module': { 'level': 'ERROR', 'handlers': ['console'], &#x

Re: How to see every activity in logs of Django 2.0.6?

2018-07-26 Thread prateek gupta
If I use as yours then there is no any trace in logs. On Thursday, July 26, 2018 at 7:12:31 PM UTC+5:30, prateek gupta wrote: > > I am using like below- > > logging({ > 'version': 1, > 'disable_existing_loggers': False, > 'formatters&#x

How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-14 Thread prateek gupta
Hi All, I am using Django 2.0.6, Python 3.6. For connecting with Mysql 5.7 I am using mysqlclient 1.3.12. Using above environment I have created an admin panel for CRUD operations. When I select a tabel for viewing it's content following error shows- django.db.utils.OperationalError: (2013, 'Los

Re: How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-14 Thread prateek gupta
Thanks Jason! I have restarted teh server and updated the mysqlclient to 1.3.13 and the issue got resolved now. On Wednesday, November 14, 2018 at 7:07:46 PM UTC+5:30, Jason wrote: > > also, you might want to update your mysqlclient package. 1.3.12 was > released over a year ago, and 1.3.13 was

How to fix (2027, 'Malformed packet') exception?

2018-11-14 Thread prateek gupta
Hi All, I am facing a strange issue in my pre-prod server (in dev and uat it's working fine). Whenever I login in django admin and click on any table, it shows me following error- (2027, 'Malformed packet') [image: db_error.JPG] Is there any db setting I am missing here or its is related to se

Re: How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-14 Thread prateek gupta
It is strange again, now I am getting the same error. Till morning it was working fine but now it is again showing same error. On Wednesday, November 14, 2018 at 7:07:46 PM UTC+5:30, Jason wrote: > > also, you might want to update your mysqlclient package. 1.3.12 was > released over a year ago,

Re: How to solve django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server during query')?

2018-11-15 Thread prateek gupta
t; > > On Thu, 15 Nov 2018 at 12:09, prateek gupta > wrote: > >> It is strange again, now I am getting the same error. >> Till morning it was working fine but now it is again showing same error. >> >> On Wednesday, November 14, 2018 at 7:07:46 PM UTC+5:30, Jason

Re: How to fix (2027, 'Malformed packet') exception?

2018-11-15 Thread prateek gupta
I am using mysqlclient 1.3.12. On Thu 15 Nov, 2018, 6:20 PM Jason its an issue with your mysql connection lib. which one are you using? > > On Thursday, November 15, 2018 at 1:02:20 AM UTC-5, prateek gupta wrote: >> >> Hi All, >> >> I am facing a strange issue in

Approach to implement a Rest call functionality

2018-11-20 Thread prateek gupta
nd the store_id to the end point and post my request to the api successfully? Thanks, Prateek Gupta -- 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: Approach to implement a Rest call functionality

2018-11-20 Thread prateek gupta
ion is using javascript on the front end - leveraging > an ajax post call. > > On Tue, 20 Nov 2018 at 13:24, prateek gupta > wrote: > >> Hi All, >> >> I have an admin panel built on Django 2.0.6, MySql 5.7 and Python 3.6. >> >> In this panel I have

Re: Approach to implement a Rest call functionality

2018-11-20 Thread prateek gupta
in a > boutton in an Html form ? > > Le mar. 20 nov. 2018 à 12:24, prateek gupta > a écrit : > >> Hi All, >> >> I have an admin panel built on Django 2.0.6, MySql 5.7 and Python 3.6. >> >> In this panel I have a field 'PIN' described in model

Re: Approach to implement a Rest call functionality

2018-11-20 Thread prateek gupta
> endpoint. > > On Tue, 20 Nov 2018 at 14:09, prateek gupta > wrote: > >> Thanks @Yavin for your suggestion. >> I thought I will have to use Django Rest Framework for this >> functionality, never thought that from front end I can do that :) >> >>

How to correct my signals call?

2018-11-21 Thread prateek gupta
Hi All, I have an admin panel built on Django 2.0.6, Mysql 5.7 and Python 3.6. Now I have written following signal code in signals.py- from .models import MerchantStores from django.db.models.signals import post_save from django.dispatch import receiver @receiver(post_save, sender = MerchantStor

Re: How to correct my signals call?

2018-11-21 Thread prateek gupta
how us the view where the save() is invoked? > > On Wed, 21 Nov 2018 at 10:57, prateek gupta > wrote: > >> Hi All, >> >> I have an admin panel built on Django 2.0.6, Mysql 5.7 and Python 3.6. >> >> Now I have written following signal code in signals.p

Re: How to correct my signals call?

2018-11-21 Thread prateek gupta
Can you please clear where you saw ["created"] keyword? On Wednesday, November 21, 2018 at 3:19:56 PM UTC+5:30, Yavin Aalto Arba wrote: > > Something doesn't add up. Can you check the ["created"] keyword? What does > it say? > > On Wed, 21 Nov 2018 at 11

Re: How to correct my signals call?

2018-11-21 Thread prateek gupta
gt; it say? > > On Wed, 21 Nov 2018 at 11:26, prateek gupta > wrote: > >> @Yavin Aalto Arba >> >> I am using models.py, admin.py for my view, no any customized forms or >> view. >> >> [image: screen_3.JPG] >> >> [image: screen_2.JPG] >&