NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
在app目录下的views.py实现一个博客数据返回页面的函数 ``` #实现一个函数返回博客数据 def article_content(request): article = Article.objects.all()[0] title = article.title brief_content = article.brief_content content = article.content article_id = article.article_id publish_date = article.publish_date return_str = 'title: %s, brief_content:%s,' \ 'content: %s, article_id:%s, publish_date: %s' % (title, brief_content, content, article_id, publish_date) return HttpResponse(return_str) ``` 配置应用级别的路由 `` urlpatterns = [ path('content', blog.views.article_content), ] ```