Skip to content

Commit 3392f71

Browse files
author
Michael Barr
committed
Preparation for release of v0.4. Updating readme, and a version bump.
1 parent d7bdfeb commit 3392f71

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

README.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Django Timezone Utils: Time Zone Utilities For Models
3030
:alt: Development Status
3131

3232

33-
3433
**django-timezone-utils** adds automatic time zone conversions and support
3534
utilities to Django.
3635

@@ -41,7 +40,7 @@ welcomed and appreciated.
4140
Installation
4241
------------
4342

44-
*django-timezone-utils* works with Django 1.4, 1.5, 1.6 and 1.7.
43+
**django-timezone-utils** works with Django 1.4, 1.5, 1.6 and 1.7.
4544

4645
To install it, simply:
4746

@@ -100,13 +99,14 @@ Imagine you have the models ``Location`` and ``LocationReportingPeriod``:
10099
101100
def _get_reporting_period_timzone(obj):
102101
"""Called as `obj` being the LocationReportingPeriodInstance.
103-
102+
104103
Note:
105104
populate_from=lambda: instance: instance.location.timezone is not valid.
106105
107106
"""
108107
return obj.location.timezone
109108
109+
110110
class LocationReportingPeriod(models.Model)
111111
location = models.ForeignKey(
112112
verbose_name=_('location'),
@@ -161,8 +161,8 @@ For each location, let's say that the client wants to see the start and end of
161161
the reporting period in that location's time zone. One thing to remember is that
162162
just because you saved the LocationReportingPeriod start/end dates as a
163163
particular time zone, it does not mean that they will come that way from the
164-
database. For example, if your application's settings.TIME_ZONE is set to
165-
``UTC``, you would get back:
164+
database. For example, if your application's ``settings.TIME_ZONE = 'UTC'``,
165+
you would get back:
166166

167167
.. code-block:: python
168168
@@ -183,6 +183,7 @@ Here is how we would handle the displaying conversions from view to template:
183183
# App
184184
from app_label.models import LocationReportingPeriod
185185
186+
186187
class LocationReportingPeriodListView(ListView):
187188
model = LocationReportingPeriod
188189
template_name = 'app_label/period_list.html'

timezone_utils/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = (0, 3)
1+
__version__ = (0, 4)
22
VERSION = '.'.join(map(str, __version__))

0 commit comments

Comments
 (0)