Commits

Flavio Curella committed ab6fd10

made relative imports explicit

Comments (0)

Files changed (5)

timedelta/__init__.py

 __version__ = open(os.path.join(os.path.dirname(__file__), "VERSION")).read().strip()
 
 try:
-    from fields import TimedeltaField
-    from helpers import (
+    from .fields import TimedeltaField
+    from .helpers import (
         divide, multiply, modulo, 
         parse, nice_repr, 
         percentage, decimal_percentage,
 from collections import defaultdict
 import datetime
 
-from helpers import parse
-from forms import TimedeltaFormField
+from .helpers import parse
+from .forms import TimedeltaFormField
 
 # TODO: Figure out why django admin thinks fields of this type have changed every time an object is saved.
 
 import datetime
 from collections import defaultdict
 
-from widgets import TimedeltaWidget
-from helpers import parse
+from .widgets import TimedeltaWidget
+from .helpers import parse
 
 class TimedeltaFormField(forms.Field):
     default_error_messages = {
 
 import datetime
 
-from forms import TimedeltaFormField
-from fields import TimedeltaField
-from widgets import TimedeltaWidget
-from helpers import *
+from .forms import TimedeltaFormField
+from .fields import TimedeltaField
+from .widgets import TimedeltaWidget
+from .helpers import *
 
 class TimedeltaWidgetTest(TestCase):
     def test_render(self):
 from django import forms
 import datetime
 
-from helpers import nice_repr, parse
+from .helpers import nice_repr, parse
 
 class TimedeltaWidget(forms.TextInput):
     def __init__(self, *args, **kwargs):