コード例 #1
0
    def ready(self):
        from . import dispatch
        from dbsettings.utils import set_defaults
        from . import models as clientmodels

        set_defaults(
            clientmodels,
            ('SetTopBox', 'auto_create', False),
            ('SetTopBox', 'auto_add_channel', False),
            ('SetTopBox', 'auto_enable_recorder_access', False),
            ('SetTopBox', 'use_mac_as_serial', True),
        )
コード例 #2
0
from decimal import Decimal

from dbsettings.utils import set_defaults

from djangoffice import models as djangoffice_app

# Install default Djangoffice settings
set_defaults(
    djangoffice_app,
    ('', 'job_over_hours', True),
    ('', 'job_missed_end_date', True),
    ('', 'incomplete_timesheet', True),
    ('', 'expense_over_limit', True),
    ('', 'activity_missed_due_date', True),
    ('', 'activity_user_assigned', True),
    ('', 'activity_contact_assigned', True),
    ('', 'managers_view_all_jobs', True),
    ('', 'managers_view_all_users', True),
    ('', 'pm_restricted_to_managed_jobs', False),
    ('', 'users_view_all_jobs', True),
    ('Task', 'vacation_task_id', 1),
    ('Invoice', 'driven_by', 'U'),
    ('Invoice', 'uk_vat', Decimal('17.5')),
    ('Invoice', 'euro_vat', Decimal('21.5')),
    ('Invoice', 'exchange_rate', Decimal('1.5')),
    ('Timesheet', 'hours_per_full_week', Decimal('37.5')),
)
コード例 #3
0
ファイル: management.py プロジェクト: insin/djangoffice
from decimal import Decimal

from dbsettings.utils import set_defaults

from djangoffice import models as djangoffice_app

# Install default Djangoffice settings
set_defaults(djangoffice_app,
    ('',          'job_over_hours',                True),
    ('',          'job_missed_end_date',           True),
    ('',          'incomplete_timesheet',          True),
    ('',          'expense_over_limit',            True),
    ('',          'activity_missed_due_date',      True),
    ('',          'activity_user_assigned',        True),
    ('',          'activity_contact_assigned',     True),
    ('',          'managers_view_all_jobs',        True),
    ('',          'managers_view_all_users',       True),
    ('',          'pm_restricted_to_managed_jobs', False),
    ('',          'users_view_all_jobs',           True),
    ('Task',      'vacation_task_id',              1),
    ('Invoice',   'driven_by',                     'U'),
    ('Invoice',   'uk_vat',                        Decimal('17.5')),
    ('Invoice',   'euro_vat',                      Decimal('21.5')),
    ('Invoice',   'exchange_rate',                 Decimal('1.5')),
    ('Timesheet', 'hours_per_full_week',           Decimal('37.5')),
)
コード例 #4
0
ファイル: __init__.py プロジェクト: scrummyin/django-synchro
import datetime

from dbsettings.utils import set_defaults
from synchro import models

set_defaults(
    models,
    ('', 'last_check', datetime.datetime.now()),
)
コード例 #5
0
ファイル: __init__.py プロジェクト: deschler/django-synchro
import datetime

from dbsettings.utils import set_defaults
from synchro import models


set_defaults(
    models,
    ('', 'last_check', datetime.datetime.now()),
)