Example #1
0
 def setUp(self):
     self.view = EntryList.as_view(
         name="whatever",
         model=self.model,
         template=self.template,
     )
     self.view()
Example #2
0
 def setUp(self):
     self.view = EntryList.as_view(
         name="whatever",
         model=self.model,
         template=self.template,
     )
     self.view()
Example #3
0
    detail_view=vacancy_detail,
    list_endpoint="vacancy_list",
)


@admin_app.route('/vacancies/list/')
@login_required()
def json_vacancies():
    vacancies_list = get_actual_vacancies_list()
    return jsonify(vacancies=vacancies_list, )


# Categories
category_list = EntryList.as_view(
    name="category_list",
    model=models.Category,
    template="admin/categories.html",
)

category_detail = EntryDetail.as_view(
    name='category_detail',
    create_form=forms.CategoryForm,
    model=models.Category,
    success_url="category_list",
)

register_section(
    section_name="Категории",
    list_route="/categories/",
    detail_route="/category/",
    list_view=category_list,
Example #4
0
    list_endpoint="vacancy_list",
)


@admin_app.route('/vacancies/list/')
@login_required()
def json_vacancies():
    vacancies_list = get_actual_vacancies_list()
    return jsonify(
        vacancies=vacancies_list,
    )

# Categories
category_list = EntryList.as_view(
    name="category_list",
    model=models.Category,
    template="admin/categories.html",
)

category_detail = EntryDetail.as_view(
    name='category_detail',
    create_form=forms.CategoryForm,
    model=models.Category,
    success_url="category_list",
)

register_section(
    section_name="Категории",
    list_route="/categories/",
    detail_route="/category/",
    list_view=category_list,