def view_all(request, model_name): """ Create a view listing out all of the models :param request: :param model_name: :return: """ if model_name in model_views.view_methods: return model_views.view_all_methods[model_name](request) else: return render_chaffers(request, 'django_model_table.html', {'model_name': model_name})
def view_all(request, model_name): """ Create a view listing out all of the models :param request: :param model_name: :return: """ if model_name in model_views.view_methods: return model_views.view_all_methods[model_name](request) else: return render_chaffers( request, 'django_model_table.html', {'model_name': model_name} )
def view(request, model_name, model_id): """ Create a view showing information about the given model :param request: :param model_name: :param model_id: :return: """ if model_name in model_views.view_methods: return model_views.view_methods[model_name](request, model_id) else: return render_chaffers(request, 'django_model_view.html', { 'model_name': model_name, 'model_id': model_id })
def view(request, model_name, model_id): """ Create a view showing information about the given model :param request: :param model_name: :param model_id: :return: """ if model_name in model_views.view_methods: return model_views.view_methods[model_name](request, model_id) else: return render_chaffers( request, 'django_model_view.html', { 'model_name': model_name, 'model_id': model_id } )