radioco.apps.radioco package

Submodules

radioco.apps.radioco.context_processors module

radioco.apps.radioco.context_processors.settings(request)[source]

radioco.apps.radioco.test_utils module

class radioco.apps.radioco.test_utils.TestDataMixin[source]

Bases: object

classmethod setUpTestData()[source]
radioco.apps.radioco.test_utils.create_test_data()[source]
radioco.apps.radioco.test_utils.spain_tz()[source]

radioco.apps.radioco.tz_utils module

class radioco.apps.radioco.tz_utils.GMT(seconds)[source]

Bases: dateutil.tz.tz.tzoffset

GMT implementation, it has a fixed offset

localize(dt, is_dst=False)[source]

Convert naive time to local time

normalize(dt, is_dst=False)[source]

Correct the timezone information on the given datetime

radioco.apps.radioco.tz_utils.fix_recurrence_date(start_dt, dt)[source]

Fix for django-recurrence 1.3 rdates and exdates needs a datetime, we are combining the date with the time from start_date.

Return: A datetime in the default timezone with the offset required to work in the recurrence

radioco.apps.radioco.tz_utils.fix_recurrence_dst(dt)[source]

Fix for django-recurrence 1.3 Function to fix a datetime tz aware with an incorrect offset

Returns: A datetime in the same timezone but with the offset fixed

radioco.apps.radioco.tz_utils.get_active_timezone()[source]

Same method as timezone.get_current_timezone but returning utc if nothing was set

radioco.apps.radioco.tz_utils.recurrence_after(recurrence, after_dt, start_dt)[source]

Fix for django-recurrence 1.3 Avoid outputting a impossible dt

radioco.apps.radioco.tz_utils.recurrence_before(recurrence, before_dt, start_dt)[source]

Fix for django-recurrence 1.3 Avoid outputting a impossible dt

radioco.apps.radioco.tz_utils.transform_datetime_tz(dt, tz=None)[source]

Transform a datetime in other timezone to the current one

radioco.apps.radioco.tz_utils.transform_dt_to_default_tz(dt)[source]

Transform a datetime in other timezone to the current one

radioco.apps.radioco.utils module

class radioco.apps.radioco.utils.DeletePermissionMixin[source]

Bases: object

dispatch(request, *args, **kwargs)[source]
model = None
class radioco.apps.radioco.utils.GetObjectMixin[source]

Bases: django.views.generic.detail.SingleObjectMixin

dispatch(*args, **kwargs)[source]
object = None
radioco.apps.radioco.utils.check_delete_permission(user, model)[source]
radioco.apps.radioco.utils.create_example_data()[source]
radioco.apps.radioco.utils.field_has_changed(_object, field)[source]
class radioco.apps.radioco.utils.memorize(func)[source]

Bases: dict

A simple cache system, use as decorator

radioco.apps.radioco.views module

radioco.apps.radioco.views.index(request)[source]
radioco.apps.radioco.views.user_logout(request)[source]

Module contents