Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6895889
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:57:58+00:00 2026-05-27T06:57:58+00:00

I would like to take my User model and break it down by day,

  • 0

I would like to take my User model and break it down by day, using the date_joined field. Django’s aggregation seems to be a good fit, but im not sure how to use this with a DateField object. I believe I also want the values to compound.

My goal is to get a whole number for each day since the very first signup to the most present (and continuing). I think I want this in compound form, so for example, if the first day i have 100 signups and the day after is 80, I want the second days total to be 180. This way I can see the userbase grow/drop over time and not just see signup spikes and then flatline on days that there are no signups.

Pretty set on using Highcharts for the graphing. Here is a live example of the graph I wish to implement, only using Apple stock data but it’s more or less what I want, only with daily amounts of user signup. http://www.highcharts.com/stock/demo/basic-line

I can build a QuerySet of a single instance with the following example. This isn’t a very realistic approach going forward though. I’d like to dynamically calculate these figures, not manually assign them.


y2007m09d01=(user_list.filter(date_joined__year="2007").filter(date_joined__month="9").filter(date_joined__day="1").count())
y2007m09d02=(user_list.filter(date_joined__year="2007").filter(date_joined__month="9").filter(date_joined__day="1").count() + y2007m09d01)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:57:59+00:00Added an answer on May 27, 2026 at 6:57 am

    There might be some “all django” solution to this, but if not you can just use itertools.groupby over the list of users. I’m thinking something like this:

    from itertools import groupby
    from operator import attrgetter
    
    iter_groups = groupby(User.objects.all(), attrgetter('date_joined'))
    groups = [list(g) for _, g in iter_groups]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to take a field and replace all characters that are not
Using Flex 3, I would like to take an image snapshot such as this:
Using sql server 2000, I would like to take my production data and put
I am working on a project using Groovy, and I would like to take
I would like to make a link that would take the user to a
I would like to take a pascal-cased string like CountOfWidgets and convert it into
I would like to take a stack of images (or potentially an array of
I would like to take a string representation of a set and parse it.
What I would like to take ownership of a hid device that may already
I have two ICollection s of which I would like to take the union.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.