Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#21880 closed Cleanup/optimization (fixed)

from django.utils.timezone import * does not work as expected

Reported by: wim@… Owned by: nobody
Component: Uncategorized Version: 1.6
Severity: Normal Keywords: timezone import *
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Hi,

from django.utils.timezone import * does not work as expected.

  1. Not all functions documented (https://docs.djangoproject.com/en/1.6/ref/utils/#module-django.utils.timezone ) are in all
  1. In Django 1.7, there is one more, but many are missing:
    __all__ = [
        'utc', 'get_fixed_timezone',
        'get_default_timezone', 'get_current_timezone',
        'activate', 'deactivate', 'override',
        'is_naive', 'is_aware', 'make_aware', 'make_naive',
    ] 
    

It would be very convenient for testing to be able to import * and get all the available functions

Change History (2)

comment:1 by Aymeric Augustin <aymeric.augustin@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 2b154ae2803d46c68d3ec78789866d22231a92d0:

Fixed #21880 -- Added missing items to django.utils.timezone.all.

Thanks Wim for the report.

comment:2 by Aymeric Augustin <aymeric.augustin@…>, 10 years ago

In db60a520857dfe1564d824809dacfffd55662a16:

[1.6.x] Fixed #21880 -- Added missing items to django.utils.timezone.all.

Thanks Wim for the report.

Backport of 2b154ae from master.

Note: See TracTickets for help on using tickets.
Back to Top