1. Tibor Tóth
  2. django-expense

Commits

Chris Lasher  committed 2c61b51

Some tidying of English text.

  • Participants
  • Parent commits 7301827
  • Branches default

Comments (0)

Files changed (3)

File expense/admin.py

View file
  • Ignore whitespace
             request.META['QUERY_STRING'] = request.GET.urlencode()
 
         types_stat = Type.objects.get_statistics(user_id, year, month)
-        title = 'Expenses all time'
+        title = 'Overall expenses'
         if year:
             title = ('Expenses of %s' % year)
         if month:
              d = datetime(year, month, 1)
              month_name = d.strftime("%B")
-             title = ('Expenses of %s, %s' % (month_name, year))
+             title = ('Expenses of %s %s' % (month_name, year))
 
         extra_context = {
             'types_stat' : types_stat,

File expense/fixtures/initial_data.json

View file
  • Ignore whitespace
-[{"pk": 1, "model": "expense.type", "fields": {"name": "Expenses"}}, {"pk": 3, "model": "expense.type", "fields": {"name": "Incomings"}}, {"pk": 2, "model": "expense.type", "fields": {"name": "Savings"}}, {"pk": 7, "model": "expense.category", "fields": {"type": 1, "name": "Banking"}}, {"pk": 1, "model": "expense.category", "fields": {"type": 1, "name": "Car"}}, {"pk": 4, "model": "expense.category", "fields": {"type": 1, "name": "Health"}}, {"pk": 5, "model": "expense.category", "fields": {"type": 1, "name": "Learning"}}, {"pk": 2, "model": "expense.category", "fields": {"type": 1, "name": "Overheads"}}, {"pk": 3, "model": "expense.category", "fields": {"type": 1, "name": "Sports"}}, {"pk": 6, "model": "expense.category", "fields": {"type": 1, "name": "Tax"}}, {"pk": 9, "model": "expense.category", "fields": {"type": 3, "name": "Bonus"}}, {"pk": 8, "model": "expense.category", "fields": {"type": 3, "name": "Salary"}}, {"pk": 10, "model": "expense.category", "fields": {"type": 2, "name": "Bonds"}}, {"pk": 12, "model": "expense.category", "fields": {"type": 2, "name": "Deposit"}}, {"pk": 11, "model": "expense.category", "fields": {"type": 2, "name": "Stoks"}}]
+[{"pk": 1, "model": "expense.type", "fields": {"name": "Expenses"}}, {"pk": 3, "model": "expense.type", "fields": {"name": "Income"}}, {"pk": 2, "model": "expense.type", "fields": {"name": "Investments"}}, {"pk": 7, "model": "expense.category", "fields": {"type": 1, "name": "Banking"}}, {"pk": 1, "model": "expense.category", "fields": {"type": 1, "name": "Auto"}}, {"pk": 4, "model": "expense.category", "fields": {"type": 1, "name": "Health"}}, {"pk": 5, "model": "expense.category", "fields": {"type": 1, "name": "Education"}}, {"pk": 2, "model": "expense.category", "fields": {"type": 1, "name": "Overhead"}}, {"pk": 3, "model": "expense.category", "fields": {"type": 1, "name": "Entertainment"}}, {"pk": 6, "model": "expense.category", "fields": {"type": 1, "name": "Taxes"}}, {"pk": 9, "model": "expense.category", "fields": {"type": 3, "name": "Bonus"}}, {"pk": 8, "model": "expense.category", "fields": {"type": 3, "name": "Salary"}}, {"pk": 10, "model": "expense.category", "fields": {"type": 2, "name": "Bonds"}}, {"pk": 11, "model": "expense.category", "fields": {"type": 2, "name": "Stocks"}}, {"pk": 12, "model": "expense.category", "fields": {"type": 2, "name": "Savings Deposit"}}]

File expense/models.py

View file
  • Ignore whitespace
 
     def date_str(self):
         """
-        Formats the date by "%Y.%m.%d." pattern.
+        Formats the date by "%Y-%m-%d." pattern.
         """
-        return self.date.strftime("%Y.%m.%d.")
+        # How do you internationalize date strings? We'll just use ISO
+        # 8601 format.
+        return self.date.strftime("%Y-%m-%d")
 
     date_str.short_description = _("date")