Re: Will function based views ever be deprecated?

2017-04-04 Thread Andréas Kühne
Very good explanation Andrew, I'm looking forward to having time to look at your talk - seems right on the money. Regards, Andréas 2017-04-03 23:24 GMT+02:00 Andrew Pinkham : > There's a little bit of vocabulary overload going on that I can't help but > point out, as it confused me when I encou

Re: channels/redis exception: TypeError: __init__() got an unexpected keyword argument 'socket_connect_timeout'

2017-04-04 Thread Andrew Godwin
Hi, This is https://github.com/django/asgi_redis/issues/36 - fix is already committed, should be releasing today. Andrew On Mon, Apr 3, 2017 at 3:41 PM, wrote: > Hi all ! > > TypeError is raised when asgi_redis tries to open a connection to redis: > > ``` > Traceback (most recent call last): >

Re: Executing DB-Queries during import

2017-04-04 Thread guettli
Am Donnerstag, 30. März 2017 00:55:40 UTC+2 schrieb Simon Charette: > > > Is it advisable to execute db queries in my AppConfig ready signal > handler? > > AppConfig.ready() is still at module-level. > > ok. Good to know. > > Use case: I want to add URL patterns which get collected from db r

Re: filter chaining v/s filter with multiple arguments.

2017-04-04 Thread Mahendra Gaur
Thanks Todor Velichkov. It would be great if you let me know how did you get these queries (tool name etc). Because when I was trying to get MySQL query using *q.query*, these both statements were giving same query. Thanks and Regards, Mahendra On Tue, Apr 4, 2017 at 1:35 AM, Todor Velichkov

Django Channels - Class Based Consumers

2017-04-04 Thread Dan Alderman
Hi guys, Been trying to get my head around this for ages now but still no luck, hopefully someone can point me in the right direction. I'm trying to set up a Demultiplexer with a JsonWebsocketConsumer that sends to a group. (There is only one stream in the Demultiplexer at the moment, but I i

ORM for structured Logs

2017-04-04 Thread guettli
In the past I was told: Don't store logs in the database. Time (and hardware) has changed. I think it is time to store logs where I have great tools for analyzing logs. Storing in a model which I can access via django orm is my current strategy. It seems no one has done this before. I could no

Re: filter chaining v/s filter with multiple arguments.

2017-04-04 Thread Todor Velichkov
I didn't use anything special, just print on queryset.query qs1 = Blog.objects.filter(entry__headline__contains='Lennon', entry__pub_date__year=2008) qs2 = Blog.objects.filter(entry__headline__contains='Lennon').filter( entry__pub_date__year=2008) print qs1.query print qs2.query On Tuesday, Ap

Re: Django Channels - Class Based Consumers

2017-04-04 Thread Andrew Godwin
Hi Dan, An initial glance shows that you might be passing the arguments wrong to Multiplexer.group_send(group_name, stream, payload) - I'm not sure why you are using multiplexer.__class__.__name__ as the group name, but the group name you configured in connection_groups is updatedb_results, and th

Re: How to design High Scalability architecture with Django in cost effective fashion

2017-04-04 Thread Joe Landrigan
Disclaimer: I've never even made a site in Django. That said, I was looking at some of the same issues because of a project I'd like to do, and these looked interesting: https://github.com/JBKahn/django-sharding and https://github.com/mmalone/django-

How to get a mentor

2017-04-04 Thread Joe Landrigan
I need a mentor. I've got an idea for a non-profit that I think could be spectacular, and I think Django is the right platform. But, every time I run into a challenge it takes me days to solve for multiple reasons: I'm a father of 6, my job has nothing to do with Python, and I don't know what

Re: DATABASE DICTIONARY in Settings.py

2017-04-04 Thread alkhairohr
Thank you so much for all this info. This really clarified things for me. On Tuesday, April 4, 2017 at 1:42:44 AM UTC-4, Antonis Christofides wrote: > > Hello, > > this is far from an incredibly stupid question. > > As you know, RDBMS's keep their own list of users and have sophisticated > permi

RE: filter chaining v/s filter with multiple arguments.

2017-04-04 Thread Matthew Pava
Well, this is a time I wish I could delete my previous message from existence. After looking at my own code, I realize now that I didn’t use much chaining; rather, I used Q objects and the & operator. From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Todor

Django reusable apps checklist

2017-04-04 Thread Filipe Ximenes
Hi everyone, yesterday Flávio gave a talk about "Qualities of great reusable Django apps" at DjangoCon Europe. We put together most of his ideas from the talk and published as a hot site: http://djangoappschecklist.com/ The code is open source and we would l

Setting variable in custom template

2017-04-04 Thread valerio orfano
Hi there is there any chance to set the value of variable in django custom template? I am looking for something like {set variable = "test"} But i Cannot make it to work! Any clue? rgds valerio -- You received this message because you are subscribed to the Google Groups "Django users" group

Re: How to get a mentor

2017-04-04 Thread Avraham Serour
Hi, I suggest going to local meetups, you may meet people that could mentor or help you on specific issues, or help you to find a mentor, they could either know someone or know of local mentorship programs. Where are you located? On Tue, Apr 4, 2017 at 4:26 PM, Joe Landrigan wrote: > I need a

RE: Setting variable in custom template

2017-04-04 Thread Matthew Pava
You can use the {% with %} tag. https://docs.djangoproject.com/en/1.10/ref/templates/builtins/#with From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of valerio orfano Sent: Tuesday, April 4, 2017 9:15 AM To: Django users Subject: Setting variable in custom tem

Re: Setting variable in custom template

2017-04-04 Thread Mahendra Gaur
Why do you want to set it in custom template. It would be better if you put this variable in context dictionary while rendering and then use it in the template on the basis of condition. Thanks and regards, Mahendra On 4 Apr 2017 7:44 p.m., "valerio orfano" wrote: > Hi there > > is there any c

Django security releases issued: 1.10.7, 1.9.13, and 1.8.18

2017-04-04 Thread Tim Graham
Today the Django team issued 1.10.7, 1.9.13, and 1.8.18 as part of our security process. These releases address two security issues, and we encourage all users to upgrade as soon as possible: https://www.djangoproject.com/weblog/2017/apr/04/security-releases/ As a reminder, we ask that potentia

Django 1.11 released

2017-04-04 Thread Tim Graham
Django 1.11, the next long-term support release, is now available: https://www.djangoproject.com/weblog/2017/apr/04/django-111-released/ With the release of Django 1.11, Django 1.10 has reached the end of mainstream support. The final minor bugfix release (1.10.7) was issued today. Django 1.10

Re: How to get a mentor

2017-04-04 Thread Joe Landrigan
I'm in Fort Wayne, Indiana. I'm not aware of any meetups in the area. The nearest that I know about are in Chicago, but that's a 3 hour drive one way. On Tuesday, April 4, 2017 at 10:21:14 AM UTC-4, Avraham Serour wrote: > > Hi, > > I suggest going to local meetups, you may meet people that cou

Re: How to get a mentor

2017-04-04 Thread Mark Phillips
Joe, It is not clear from your post if you just need a django mentor for technical questions, or if you need a business mentor to flesh out your idea. There are hundreds (thousands??) of expert django mentors on this list all willing to give you free advice. Learn how to ask direct questions (http

ModelForm has no model class specified.

2017-04-04 Thread Matthew Pava
I have a form similar to that declared below: class LineItemForm(Mixin, forms.ModelForm): cost = forms.FloatField() field_order = ['part', 'cost'] class Meta: model = LineItem fields = ['part'] And then I have another form that inherits from that: class InventoryTransactionForm(Line

Was Form choice.choice_value silently removed in 1.11?

2017-04-04 Thread Rodney Folz
Hi all, congrats on the 1.11 release! Prior to Django 1.11's form template rendering, I had a form template that rendered choices like so: ``` {% for choice in form.field_with_choices %} # forms.ChoiceField() {% if choice.choice_value is Value %} ``` Not the prettiest, but it's work

why i cant always

2017-04-04 Thread shahab emami
hello i could never install an app from github i get errors all the time i do all of the installation process step by step but i cant at the end can anybody help me in this? for example i wanted to use this app in my project: https://github.com/praekelt/django-likes after 4 hours i got nothing e

python django fields and row calculation

2017-04-04 Thread sum abiut
Hi, I am working on an leave management system and I am having a some difficulties trying to figure out how to accomplished this scenario. for example i have a table of. when a user apply for a leave i want to get the previous total_leave_balance of the applicant and minus his/her current num_da

Re: python django fields and row calculation

2017-04-04 Thread Lachlan Musicman
Depends on your models, but write a small function that returns the balance? def balance(self): return self.entitlement - self.num_days (for instance) L. -- The most dangerous phrase in the language is, "We've always done it this way." - Grace Hopper On 5 April 2017 at 10:49, sum abi

Re: Was Form choice.choice_value silently removed in 1.11?

2017-04-04 Thread Tim Graham
It looks like that's covered here: https://docs.djangoproject.com/en/1.11/releases/1.11/#changes-due-to-the-introduction-of-template-based-widget-rendering choice_value is an attribute of ChoiceInput which was undocumented and removed. On Tuesday, April 4, 2017 at 7:33:18 PM UTC-4, Rodney Folz

Re: python django fields and row calculation

2017-04-04 Thread sum abiut
Thank for taking your time to respond. my problem is automating that, for example when a user apply for a leave i want the system to calculate and update the total balance automatically. But Since a user can apply for a leave more that once which mean a user can have more that one record of leave a

Re: python django fields and row calculation

2017-04-04 Thread Lachlan Musicman
Well, if it's on the user model as a function, then it will happen as soon as you call it. If they can have mulitple applications in process, then you will need to program your function(s) to account for that. As they say "there's more than one way to do it". You could add a "remaining days" var