Extending Django User model with django-allauth

2019-01-28 Thread Achyut Pandey
I'm using django-allauth and I want to be able to add new field to my User model. What's the best way to do this as of you ? -- 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

Django, mod_wsgi and apache2.4 = 403 forbidden

2019-01-28 Thread Rookies DJ
I'm sorry if I'm asking the repetitive but i really need assistance I been trying to setup a server for my company system but I had no progress. As the tile subject mention the I'm Using Mod_wsgi 4.6.5 and Apache 2.4 for my Django is 2.1 and python 3.7 When try to run on my local machine I

Re: validator not working in serializers.ModelSerializer

2019-01-28 Thread Maurya Allimuthu
Hi Andréas, I have fixed it. like subclassing the serializer field class and overriding the to_representation for per field. Thanks for the help once again. Thanks, Maurya On Fri, Jan 25, 2019 at 10:50 PM Andréas Kühne wrote: > If you want to change the output, you can override the fields

Re: validator not working in serializers.ModelSerializer

2019-01-28 Thread Maurya Allimuthu
Many thanks Andreas :-) On Thursday, January 24, 2019 at 8:40:35 PM UTC+8, Andréas Kühne wrote: > > Hi, > > Validators are only called when you are updating something on the model - > a get request doesn't update anything and the validators will not be called > (there is no data sent to the

Using Django Window Functions on a Filtered QuerySet

2019-01-28 Thread Bernd Wechner
I have a filtered queryset, and annotated it with a few window functions. I got a most surprising result when the filter is on fields in a related model and it turns out this lies in the structure of the SQL. I asked the question here:

Re: django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet with Django’s user database authentication from Apache

2019-01-28 Thread Simon Charette
Hello again :) Someone pointed out to me that it might be a documentation issue that requires that you import check_password only after calling get_wsgi_application(). For example, your wsgi.py module would look like import os import mod_wsgi os.environ.setdefault('DJANGO_SETTINGS_MODULE',

Re: Django payment through different methods

2019-01-28 Thread Bikash Saud
Thanks Everyone for sharing your great knowledge On Wed, Jan 23, 2019 at 12:34 AM Mario R. Osorio wrote: > Take a look here: https://djangopackages.org/grids/g/payment-processing/ > > On Monday, January 21, 2019 at 7:36:23 PM UTC-5, Bikash Saud wrote: >> >> I'm trying to payment from different

RE: Admin form_url breakout problem

2019-01-28 Thread Matthew Pava
Hi Mike, When Stripe processes the payment, you need to preventDefault on the form submit, then add the token from Stripe to a hidden input in your form without affecting any other data in the form. Then you can do form.submit() and let the admin handle it from there. Check out the Stripe

Re: django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet with Django’s user database authentication from Apache

2019-01-28 Thread Simon Charette
Hello there, That looks like a Django bug to me as auth.get_user_model() should only be performed from within the check_password() function as it will certainly crash at the module level. You should file a bug report so it gets addressed[0]. Best, Simon [0]

Re: checkng for uniqueness of a field in django Admin

2019-01-28 Thread 'Amitesh Sahay' via Django users
If that field has unique values, probably you can use that fileld as primary key.  Regards, Amitesh Sahay91-750 797 8619 On Monday, 28 January, 2019, 7:18:35 PM IST, 'Odile Lambert' via Django users wrote: Hello In django admin, I have a model with a model fiel "tech_number"

checkng for uniqueness of a field in django Admin

2019-01-28 Thread 'Odile Lambert' via Django users
Hello In django admin, I have a model with a model fiel "tech_number" which must be unique across the table. If I do not check the uniqueness, it raises a Django integrity error. According to the documentation it sounds normal. I checked the uniqueness of the"

Re: Logging of full trace with Debug set to False

2019-01-28 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Mon, Jan 28, 2019 at 04:45:44AM -0800, Kevin Olbrich wrote: > Hi Anirudh, > > I am using uWSGI and not Gunicorn. At least for uWSGI, with Debug = False, > it only logs the HTTP status code but not exception (might be the same with > Gunicorn).

Re: Logging of full trace with Debug set to False

2019-01-28 Thread Kevin Olbrich
Hi Anirudh, I am using uWSGI and not Gunicorn. At least for uWSGI, with Debug = False, it only logs the HTTP status code but not exception (might be the same with Gunicorn). I will try Sentry which provides a clean GUI and notification of new problems. This also seems to work for my Celery

Re: Logging of full trace with Debug set to False

2019-01-28 Thread Kevin Olbrich
Hi Michal, looks very promissing. I read the SDK guide for Django and I realy like it. Thank you! Kevin Am Montag, 28. Januar 2019 12:20:35 UTC+1 schrieb Michal Petrucha: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA512 > > On Mon, Jan 28, 2019 at 02:53:55AM -0800, Kevin Olbrich wrote:

Re: Logging of full trace with Debug set to False

2019-01-28 Thread Anirudh Jain
You can setup a logging and debugging logging system using gunicorn in production using flags :- --log-level debug --access-logfile /home/ubuntu/websitelogs.log For more setting options read gunicorn documentation https://docs.gunicorn.org/en/stable/settings.html#logging On Mon, 28 Jan 2019,

Re: Django Channels

2019-01-28 Thread mahesh boini
path('chat//',views.room,name='room') replace this and try i just added "/" On Sun, Jan 27, 2019 at 11:36 PM Vaibhav Kumar Chaudhary < vaibhavkumar...@gmail.com> wrote: > I am trying to create a chat app with Django Channels and facing a bit > problem here. > when I type chat room's name is the

Re: ValueError at /news/ Value: None must be instance of Model:

2019-01-28 Thread mahesh boini
import proper package you were importing "djongo" it should be "django". On Sat, Jan 26, 2019 at 8:13 PM wrote: > This usually happens when you have added and EmbeddedModel and not passing > any value to that field while creation. > Hope this helps. > > On Sunday, 19 August 2018 19:32:49

django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet with Django’s user database authentication from Apache

2019-01-28 Thread Binoy U
Hello, I have created a django project with only one application. I haven't made any changes in the application. Only added the application to the settings and updated static and media urls. Migration is done and super user was created. I have configured apache(version:2.4.29) and

Re: Logging of full trace with Debug set to False

2019-01-28 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Mon, Jan 28, 2019 at 02:53:55AM -0800, Kevin Olbrich wrote: > Hi! > > I would like to catch and send all exceptions to a logging system. > When Debug is set to False, all debug related information is lost (just a > HTTP 500 error message). > >

Re: Adding default rows to Django admin inlines

2019-01-28 Thread Kevin Olbrich
Hi! Maybe I did not fully understand but it seems we indeed don't talk about the same. I already got M2M relation. If I access the "Jobs" admin-page, I have the option to add inline-options. On a new object, there are no lines but I can add new. I would like to add lines for the attributes from

Logging of full trace with Debug set to False

2019-01-28 Thread Kevin Olbrich
Hi! I would like to catch and send all exceptions to a logging system. When Debug is set to False, all debug related information is lost (just a HTTP 500 error message). While Debug False works perfectly in production, I would like to log and send the exceptions to a backend, where I can save