def setUp(self): self.view = EntryList.as_view( name="whatever", model=self.model, template=self.template, ) self.view()
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,
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,