Search Results

Search found 2 results on 1 pages for 'deno'.

Page 1/1 | 1 

  • Requirement, architecture data capture tool

    - by Deno
    Are there any tools available for the following use case: I am planning to write a complex application and now I just know about the basic functional requirments. I am refining the functionality with more and more details. I am also writing down how to implement this in software architecture perspective. I am in a situation where there are multiple ways implement a certain functionality and based on the selected approach, other parts of the program will also change. At this moment, I don't want to decide on the approach to use, I just want to list down all the options, present to a wider audience and get it finalized. Are there any standard software tools to do this? I know I can use MS excel or some mind mapper tools, but just thinking of some standard tools (not just for programmers, but for managers and other) availability Thanks, Den

    Read the article

  • Django ORM: Ordering w/ aggregate functions — None special treatment

    - by deno
    Hi, I'm doing query like that: SomeObject.objects.annotate(something=Avg('something')).order_by(something).all() Now, I normally have an aggregate field in my model that I use with Django signals to keep in sync, however in this case perfomance isn't an issue so I thought I'd keep it simple and just use subqueries. This approach, however, presented an unexpected issue: It all works grate if aggregate function results are like this: [5.0, 4.0, 6.0 … (etc, just numbers)] However if you mix in some Nones than it's being ordered like this: [None, 5.0, 4.0 …] The issue is that None has higher value than any number, while it should have value at most of 0. I'm using PostgreSQL and haven't tested w/ other DBs. I haven't actually checked what query is generated etc. I worked it around by just sorting in memory: sorted(…, key=lambda _:_.avg_rating if _.avg_rating is not None else 0) So I'm just curious if you know a way to do it w/ just Django ORM. Perhaps .where? or something… Kind regards

    Read the article

1