Re: Pyinotify and runserver performance with django channels in docker for mac

2017-06-13 Thread qnub
Thank you, finally i've checked it and looks like it helps (hope it works faster not because of my hardware upgrade but because of Reis usage). So with redis page loads in 10 seconds instead of 1,5 minutes with IPC. On Thursday, June 1, 2017 at 11:33:28 PM UTC+6, Andrew Godwin wrote: > > OK, can

Re: passing data to template

2017-06-13 Thread sum abiut
Yes, on the database it spelt nat_balance On Wed, Jun 14, 2017 at 9:16 AM, Simon McConnell wrote: > {{a.nat_balance}} > > sure it shouldn't be spelt > > {{a.net_balance}} > > ? > > On Wednesday, 14 June 2017 06:57:30 UTC+10, suabiut wrote: >> >> Hi ludovic, >> Thanks for your response. >> when i

Re: passing data to template

2017-06-13 Thread Simon McConnell
{{a.nat_balance}} sure it shouldn't be spelt {{a.net_balance}} ? On Wednesday, 14 June 2017 06:57:30 UTC+10, suabiut wrote: > > Hi ludovic, > Thanks for your response. > when i did what you say it print out the date and sum in an array. Date > still in Julian date but i don't worry about the d

Re: passing data to template

2017-06-13 Thread sum abiut
Hi ludovic, Thanks for your response. when i did what you say it print out the date and sum in an array. Date still in Julian date but i don't worry about the date now just want to have the sum display nicely in my template [(733011, 28397.54), (733030, 5136.79), (733044, 35.89), (733048, 0.0), (7

Re: How to set custom template in Class PasswordResetView

2017-06-13 Thread Tim Graham
What does your code look like now? You can subclass the PasswordResetView and set the appropriate attribute for whichever template you want to override. https://docs.djangoproject.com/en/dev/topics/auth/default/#django.contrib.auth.views.PasswordResetView Or you can override the default templat

Despite what django doc says, multiple inheritance with a common ancestor causes an error(models.E005). I found a tricky solution, but are there any better solutions?

2017-06-13 Thread Hyunsoo Kim
This doc says multiple inheritance with a common ancestor can do the job. However, I've experienced an error while making migrations. Here's the error message. > models.E005: The field '**_ptr' from parent model ' >

How to set custom template in Class PasswordResetView

2017-06-13 Thread Rohan Purekar
I have implemented class based password reset view as instructed in django1.11 but the template being used is the default template, I want to use a custom template. Where I am stuck is If I have to use a custom template then I will have to call get and post functions to return the template to b

Re: How to know when a record is added to or removed from a many to many relationship?

2017-06-13 Thread Melvyn Sopacua
On Tuesday 13 June 2017 05:32:35 Stodge wrote: > Thanks. Yes I can use the m2m_changed signal but I need to know > specifically if a record was added or if it was removed, not just that > the m2m changed. So you haven't actually checked the callback signature[1] then (psst, the 'action' keyword a

Re: standard way for seeing permissions

2017-06-13 Thread Alceu Rodrigues de Freitas Junior
Hi Jani, In fact, I was checking this MDN Django tutorial and find out that it could be easier to check out which permissions I should assign to a view or not. Honestly, I ended up querying directly on the DB (instead

Re: standard way for seeing permissions

2017-06-13 Thread Jani Tiainen
Hi! Excellent question. Permission model itself is not exposed in admin but you could expose it yourself if you want to. Just for curiosity what would be the usecase? 13.6.2017 19.05 "Alceu Rodrigues de Freitas Junior" < alceu.freitas...@gmail.com> kirjoitti: Hello folks, Is there a standard

standard way for seeing permissions

2017-06-13 Thread Alceu Rodrigues de Freitas Junior
Hello folks, Is there a standard way to see permissions on Django? I'm using the latest version, but "out-of-box" views on admin application only shows me the available permissions when checking them for a group or user. I would like to list the permissions or even search for them by Model s

Re: Catching errors inside transaction.atomic()

2017-06-13 Thread Jani Tiainen
Catching errors inside transaction might lead inconsistent state if the database if error handling swallows exception. Reraising exception or like you want to do raise new exception it would work as expected. Nested atomic blocks can be used to safely rollback state of database if you want to han

Re: New functionalities expected in Django 2.

2017-06-13 Thread Avraham Serour
https://docs.djangoproject.com/en/dev/releases/2.0/ On Tue, Jun 13, 2017 at 7:49 AM, Rohan Purekar wrote: > Is django 2 going to have inbuilt package for creating API's to cater to > ajax requests and JSON responses for which we use DRF. Another thing which > was on my mind was If Django 2 will

New functionalities expected in Django 2.

2017-06-13 Thread Rohan Purekar
Is django 2 going to have inbuilt package for creating API's to cater to ajax requests and JSON responses for which we use DRF. Another thing which was on my mind was If Django 2 will come out with support for Token Auth as a default package along with the current session based login. -- You r

Catching errors inside transaction.atomic()

2017-06-13 Thread Alex Krupp
The Django documentation gives a warning to avoid catching errors inside transaction.atomic() blocks, and to use nested transactions if you need to do so. But in the case where we have code lik

Re: How to know when a record is added to or removed from a many to many relationship?

2017-06-13 Thread Mike Stoddart
Ah of course, why didn't I think of that! Thanks. On Tue, Jun 13, 2017 at 8:41 AM, Larry Martell wrote: > On Tue, Jun 13, 2017 at 7:54 AM, Stodge wrote: > > I have a model with a many to many relationship. I need to know when a > > record is added to or removed from the many to many. > > > > Is

Re: How to know when a record is added to or removed from a many to many relationship?

2017-06-13 Thread Larry Martell
On Tue, Jun 13, 2017 at 7:54 AM, Stodge wrote: > I have a model with a many to many relationship. I need to know when a > record is added to or removed from the many to many. > > Is this possible? Thanks Perhaps you can use a database trigger. -- You received this message because you are subscr

Re: How to know when a record is added to or removed from a many to many relationship?

2017-06-13 Thread Stodge
Thanks. Yes I can use the m2m_changed signal but I need to know specifically if a record was added or if it was removed, not just that the m2m changed. On Tuesday, 13 June 2017 08:30:43 UTC-4, yingi keme wrote: > > I dont particularly understand how you wish to be updated and know when a > reco

Re: How to know when a record is added to or removed from a many to many relationship?

2017-06-13 Thread yingi keme
I dont particularly understand how you wish to be updated and know when a record is added or removed. Nevertheless, you can make use of django signals (Thanks to melvyn). It will be of great help. Yingi Kem > On 13 Jun 2017, at 12:54 PM, Stodge wrote: > > I have a model with a many to many

How to know when a record is added to or removed from a many to many relationship?

2017-06-13 Thread Stodge
I have a model with a many to many relationship. I need to know when a record is added to or removed from the many to many. Is this possible? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv