What is the use of parent_template filter in Django templates

2016-11-01 Thread Prateek
I am reading Django Unleashed in which the author uses the following code to extends the template {% extends parent_template|default:"organizer/base_organizer.html" %} What does parent_template do ? I am unable to find this tag in the Django Documentation

Compiling views.py?

2007-09-27 Thread Prateek Parekh
Hi, I am quite new to django framework, and was looking at an application developed by someone else. And, i have to quickly make a few changes. I have replaced one email address in views.py by another. Now, i'd like to know if i need to recompile this views.py file, and if so what is the exact com

Re: Compiling views.py?

2007-09-27 Thread Prateek Parekh
Thanks a lot for your response. Yes, i am running django on a linux machine and apache server. And, i haven't been able to see the changes that i made in the views.py get reflected on my website. So, i guess, i'll have to restart the apache server. Also, i have recently enabled a couple of apps i

IProblem with registration Form!

2007-10-11 Thread Prateek Parekh
lf): return "%s, %s" % (self.last_name, self.first_name) class Admin: pass Any help would be greatly appreciated. Thanks, Prateek --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: IProblem with registration Form!

2007-10-11 Thread Prateek Parekh
grad_date = request.POST.get('tmgrad %s' % i, '') ) t.save() t.teammember_set.add(mem) t.registration_set.add(reg) Thanks again. On Oct 11, 2:56 pm, Prateek Parekh <[EMAIL PROTECTED]>

Re: IProblem with registration Form!

2007-10-11 Thread Prateek Parekh
I was able to solve the problem. The code was truncating the field in Graduation year if it contained spaces. A little validation would fix the error. On Oct 11, 3:25 pm, Prateek Parekh <[EMAIL PROTECTED]> wrote: > Apologies. I forgot to include the relevant views.py code >

SMTP Not working In Cpanel Production server.

2023-06-10 Thread Prateek Lodhi
I am trying to use email SMTP in my project. the SMTP is working properly in local server but it's not working on Cpanel. Any solutions please. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving em

Re: SMTP Not working In Cpanel Production server.

2023-06-11 Thread Prateek Lodhi
y Portfolio <https://richarddushime.netlify.app/> > *Website *: www.bluebirdsocceracademy.org > | Open Science Ambassador | Sports | Mentorship | Leadership | Girl Child > Empowerment | > > > > On Sun, Jun 11, 2023 at 1:28 AM Prateek Lodhi < > prateeklodhigloi...@gmai

Emali Response From the Django server.

2023-07-10 Thread Prateek Lodhi
Hi, I am trying to send a mail to the end user after the user successfully password reset to the webapp, and I have completed the module for it, and it's working fine in the local server but when I upload the application into the server and try to run that functionality. It shows [image: image

Re: Emali Response From the Django server.

2023-07-11 Thread Prateek Lodhi
Google no accept password. > > Le mar. 11 juil. 2023, 08:56, Prateek Lodhi > a écrit : > >> Hi, >> I am trying to send a mail to the end user after the user >> successfully password reset to the webapp, and I have completed the module >> for it, and it'

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
inbuild library. Now I will try Google API. On Thursday, June 21, 2018 at 6:04:32 PM UTC+5:30, Julio Biason wrote: > > Hi Prateek. > > You're using Google Maps for the lat/long, right? > > In this case, I'd suggest that, on the function you receive the data and >

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
They have mentioned that it is for Django PostGIS fields. On Thursday, June 21, 2018 at 11:52:55 PM UTC+5:30, Himanshu Gamit wrote: > > Prateek, > > > > Have you tried this module? > http://django-map-widgets.readthedocs.io/en/latest/ > > > > Thanks >

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

Re: Error : MultiValueDictKeyError

2018-11-01 Thread PRATEEK SHARMA
Thanks a lot for your help, it works now On Fri, Nov 2, 2018, 10:01 AM amit pant hey, > you can use request.POST.get('username') > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails fr

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

2018-11-14 Thread prateek gupta
faced the same issue? Let me know if anyone knows how to solve this. Thanks, Prateek -- 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+unsubsc

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
s is related to server settings? Has anyone faced this issue? Thanks, Prateek -- 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...@

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
Hi, My all db have 20 gb of size. On Thursday, November 15, 2018 at 12:27:27 PM UTC+5:30, Krishnasagar Subhedarpage wrote: > > Hi Prateek, > > Did you check disk info of server instance? What's disk consumption? > > Regards, > Krishnasagar Subhedarpage > > &g

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
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 :) On Tuesday, November 20, 2018 at 5:17:35 PM UTC+5:30, Yavin Aalto Arba wrote: > > Hi Prateek, > > I think your best opt

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
chantstores/ HTTP/1.1" 200 12659 [21/Nov/2018 14:18:34] "GET /jsi18n/ HTTP/1.1" 200 3185 As per above log, my signal is invoked before teh save() method but it should be after the save() method. Can anyone please help my to find out what I am doing wrong here? Thanks, Prateek --

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] >&