Chris Lasher avatar Chris Lasher committed 2c61b51 Draft

Some tidying of English text.

Comments (0)

Files changed (3)

             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,

expense/fixtures/initial_data.json

-[{"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"}}]

expense/models.py

 
     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")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.