Esempio n. 1
0
    def __init__(self):
        CRUD.__init__(self, model=Account,
                      context_handler=get_context_funds,
                      form=AccountForm)

        self.template_add = 'funds/form.html'
        self.template_form = 'funds/form.html'
Esempio n. 2
0
    def __init__(self):
        CRUD.__init__(self, model=Category,
                      context_handler=get_context_inventory,
                      form=CategoryForm)

        self.template_add = 'inventory/form.html'
        self.template_form = 'inventory/form.html'
Esempio n. 3
0
    def __init__(self):
        CRUD.__init__(self, model=News,
                      context_handler=get_context_webmaster,
                      form=NewsForm)

        self.template_add = 'backstage/form.html'
        self.template_form = 'backstage/form.html'
Esempio n. 4
0
    def __init__(self):
        self.context = {
            'tpl__active_administrator': True,
        }
        CRUD.__init__(self, model=ExtraLink,
                      context_handler=get_context_backstage,
                      form=ExtraLinkForm)

        self.template_add = 'backstage/form.html'
        self.template_form = 'backstage/form.html'
Esempio n. 5
0
    def __init__(self):
        self.context = {
            'tpl__active_organization': True,
        }
        CRUD.__init__(self, model=Status,
                      context_handler=get_context_backstage,
                      form=StatusForm)

        self.template_add = 'backstage/form.html'
        self.template_form = 'backstage/form.html'
Esempio n. 6
0
    def __init__(self):
        self.context = {
            'tpl__active_administrator': True,
        }
        self.action_add = False
        self.action_delete = False
        CRUD.__init__(self, model=EMailTemplate,
                      context_handler=get_context_backstage,
                      form=EMailTemplateForm)

        self.template_add = 'backstage/form.html'
        self.template_form = 'backstage/form.html'
Esempio n. 7
0
    def __init__(self, account):
        self.url_list = 'funds-statement'
        self.template_add = 'funds/entry_form.html'
        self.template_form = 'funds/entry_form.html'

        map_area_category = []
        for area in Area.objects.all():
            categories = list(area.category_set.all().values_list('id', flat=True))
            if len(categories) > 0:
                map_area_category.append({'id': area.id, 'label': area.label, 'categories': categories})

        self.parent = account

        self.context = {
            'map_area_category': map_area_category
        }

        CRUD.__init__(self, model=Entry,
                      context_handler=get_context_funds,
                      form=EntryForm)