Custom Backend vs AUTH_USER_MODEL

2020-06-21 Thread Ketan Chaturvedi
I am having a great confusion regarding these 2 terms. 1. Custom Backend is used to authenticate users using custom model in place of User module. 2. AUTH_USER_MODEL setting also allows to swap a custom model in place of User module. So where is the difference between the two?? I am a newbie t

bootstrap for vertical (two column spam)

2018-12-19 Thread Ketan
ootstrap for vertical display. I request if anyone can provide me workaround. 1. 51. 2. 52. 3. 53. 4. 54. .. .. 50. 100.. -- Thanks in advance. Regards, Ketan -- You received this message because

Re: No query results on heroku, but working on local development server

2018-12-17 Thread Ketan Varia
your code to heroku - heroku run python manage.py migrate - heroku run python manage.py createsuperuser - restore data heroku pg:psql --app ** < ** Regards, Ketan On Mon, Dec 17, 2018 at 12:48 AM Joel Mathew wrote: > > 0down votefavorite > <https://stackoverflo

Oracle Production DBA automation -django based dbawebmenu application

2018-12-10 Thread Ketan
application can be useful for some one for their day to day activity. Regards, Ketan -- 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-user

Re: TransactionManagementError from inside atomic block

2017-03-29 Thread Ketan Bhatt
Simon Charette wrote: > Hi Ketan, > > I'm afraid this will be really hard to solve without the code that is > raising this exception. > > Some details that could help debug the issue: > > 1. Are your workers multi-threaded? > 2. Are you sure you are not cal

TransactionManagementError from inside atomic block

2017-03-25 Thread Ketan Bhatt
I have a method that updates a row in the table. To avoid race condition, I locked the row using `select_for_update` inside an `atomic` block and doing the update. This method is called from a celery task. This works well on my local machine. But when this gets called on my production server (two

Re: How to resize and store pics with Django

2016-06-03 Thread Ketan Bhatt
the above code to compress the images. You can find about FileField and how to use it from here https://docs.djangoproject.com/en/1.9/ref/models/fields/#django.db.models.FileField On Fri, Jun 3, 2016 at 10:53 PM ivan77 wrote: > Hi Ketan, > > Thanks for the information! > > How

Re: How to resize and store pics with Django

2016-06-03 Thread Ketan Bhatt
This is how you can compress the images while saving: ```python import urllib2 import cStringIO from boto3.session import Session from PIL import Image aws_session = Session( aws_access_key_id=settings.AWS_ACCESS_KEY_ID, aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY, region

Re: How to select undetermined field(s) in django model?

2016-05-26 Thread Ketan Bhatt
It just means the "field_name" you are using in the filter query doesn't exist. Multiple reasons: 1. The model doesn't really have that field in its definition. 2. You forgot migrating your database. 3. The field name being sent from your form is not right. To get a clearer picture, try the same

Re: Django Beginner

2016-05-26 Thread Ketan Bhatt
The official tutorial is difficult for a beginner, it was for me. I would suggest you start with Django girls, or "Tango with Django" On Thu, May 26, 2016, 5:52 PM Jani Tiainen wrote: > And after that official tutorial there exists Django Girls and Django > Taskbuster which are much more verbos

Re: How to aggregate on insert?

2016-05-23 Thread Ketan Bhatt
Hey Erik, What Django version are you on? On Tuesday, May 24, 2016 at 1:28:57 AM UTC+5:30, Erik Cederstrand wrote: > > Hi, > > I have inherited a legacy Item model that has a composite unique key > consisting of a Customer ID and a per-customer, incrementing Item ID. > Assume I can't change th

Re: get all columns as a list

2016-05-23 Thread Ketan Bhatt
Can you not do something like `qs.filter(...info that is coming in...).exists()` If ^ is True, then update it, otherwise create a new object? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving em

Query and order by time difference of a specified time.

2016-05-23 Thread Ketan Bhatt
Take a look at the `extra` method of the queryset in Django. It allows you to do what you are trying to do by raw SQL. https://docs.djangoproject.com/en/1.9/ref/models/querysets/#django.db.models.query.QuerySet.extra Check the above link, the example with `annotate` will be interesting for you.

[no subject]

2015-09-18 Thread Ketan Mittal
Hi I am a Django newbie and wish to contribute to open source. Please guide me through the initial procedure. -- 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 dja

Problem with submitting form in my django project! Urgent help required

2015-02-17 Thread Ketan Bhatt
I am facing a problem with my project, I posted about it on Stack Overflow, here is the link: http://stackoverflow.com/questions/28539441/reference-objects-using-foreign-keys-in-django-forms Here is m code on github, I am currently working on the feature_forms branch: https://github.com/keta