Django 官方教程翻译项目- 5 - 本文档使用 书栈(BookStack.CN) 构建 初识 Django 初识 Django 设计模型 创建模型 享用便捷的 API 动态生成的管理页面:并非徒有其表 规划 URL 编写视图 设计模板 这只是冰山一角 Django 最初被设计用于具有快速开发需求的新闻类站点,目的是要实现简单快捷的网站开发。以下 内容简要介绍了如何使用 Django 实现一个数据库驱动的 简洁优雅的 URL 规划对于一个高质量 Web 应用来说至关重要。Django 推崇优美的 URL 设计, 所以不要把诸如 .php 和 .asp 之类的冗余的后缀放到 URL 里。 为了设计你自己的 URL,你需要创建一个叫做 URLconf 的 Python 模块。一张包含 URL 匹配模 式和 Python 回调函数之间的映射表。URLconf 也有利于将 Python 代码与 URL 解耦合(译 urls import url 4. 5. from . import views 6. 规划 URL 初识 Django - 9 - 本文档使用 书栈(BookStack.CN) 构建 7. urlpatterns = [ 8. url(r'^articles/([0-9]{4})/$', views.year_archive), 9. url(r'^articl0 码力 | 103 页 | 1.86 MB | 1 年前3
Django、Vue 和Element UI 前后端原理论述www.51testing.com 后端开发(Django+Rest Framework+MySQL): Django 负责处理 HTTP 请求和响应,以及 URL 路由的配置。它接收来自前端的 HTTP 请求,并根据 URL 将请求分发给相应的视图函数进行处理。 Rest Framework 是 Django 的扩展,用于快速构建 RESTful API 接口。通过 Rest Framework,可以定义 小愿望的。 但是,目前笔者没有调教好 prompt,能提高一部分单元测试覆盖率,但还没完全满足要 求。希望阅读的你能够给一个好模板。 总结 整体来说,Bito AI 是一款非常优秀的 AI 编码助手,可以兼容 AppCode、GoLand、 IntelliJ、PyCharm 等平台,响应速度也非常好。最关键的是,它免费!免费!免费!(重 要的事情说三遍) 工欲善其事,必先利其器。好的 yaml 读,并且转换了我们经常使用的字典格式,接下来 小编用过简单的例子自动化测试例子进行演示如何使用 yaml 存放测试数据,下面写了一 个正常的 yaml 的存储数据。 test_01: url: http://apis.juhe.cn/simpleWeather/query key: xxxxxxxxxxxxxxxxxxxxxxxxx city: 上海 测试数据准备好了,小编这里就直接通过0 码力 | 61 页 | 6.84 MB | 1 年前3
django cms 3.7.x Documentationnow have installed a fully functional CMS. If you need to log in at any time, append ?edit to the URL and hit Return. This will enable the toolbar, from where you can log in and manage your website. If the poll URL configuration to urlpatterns in the project’s urls.py: urlpatterns += i18n_patterns( url(r'^admin/', include(admin.site.urls)), url(r'^polls/', include('polls.urls')), url(r'^', include('cms include('cms.urls')), ) Note that it must be included before the line for the django CMS URLs. django CMS’s URL pattern needs to be last, because it “swallows up” anything that hasn’t already been matched by a previous0 码力 | 409 页 | 1.67 MB | 1 年前3
django cms 3.3.x Documentationsomething different from the default, it’s indicated with an asterisk *). Database configuration (in URL format): sqlite://localhost/project.db django CMS version: stable Django version: stable Activate Django Congratulations, you now have installed a fully functional CMS. To log in, append ?edit to the URL and hit enter. This will enable the toolbar, from where you can log in and manage your website. If urls.py: url(r'^polls/', include('polls.urls', namespace='polls')), Make sure this line is included before the line for the django-cms urls: url(r'^', include('cms.urls')), django CMS’s URL pattern needs0 码力 | 386 页 | 1.56 MB | 1 年前3
django cms 3.4.x DocumentationCongratulations, you now have installed a fully functional CMS. To log in, append ?edit to the URL and hit enter. This will enable the toolbar, from where you can log in and manage your website. If urls.py: url(r'^polls/', include('polls.urls', namespace='polls')), Make sure this line is included before the line for the django-cms urls: url(r'^', include('cms.urls')), django CMS’s URL pattern needs urls.py: url(r'^polls/', include('polls.urls', namespace='polls')), Make sure this line is included before the line for the django-cms urls: url(r'^', include('cms.urls')), django CMS’s URL pattern needs0 码力 | 395 页 | 1.64 MB | 1 年前3
django cms 3.5.x DocumentationCongratulations, you now have installed a fully functional CMS. To log in, append ?edit to the URL and hit enter. This will enable the toolbar, from where you can log in and manage your website. If urls.py: url(r'^polls/', include('polls.urls', namespace='polls')), Make sure this line is included before the line for the django-cms urls: url(r'^', include('cms.urls')), django CMS’s URL pattern needs urls.py: url(r'^polls/', include('polls.urls', namespace='polls')), Make sure this line is included before the line for the django-cms urls: url(r'^', include('cms.urls')), django CMS’s URL pattern needs0 码力 | 403 页 | 1.69 MB | 1 年前3
django cms 3.6.x Documentationnow have installed a fully functional CMS. If you need to log in at any time, append ?edit to the URL and hit Return. This will enable the toolbar, from where you can log in and manage your website. If Add the poll URL configuration to urlpatterns in the project’s urls.py: urlpatterns += i18n_patterns( url(r'^admin/', include(admin.site.urls)), url(r'^polls/', include('polls.urls')), url(r'^', include('cms include('cms.urls')), ) Note that it must be included before the line for the django CMS URLs. django CMS’s URL pattern needs to be last, because it “swallows up” anything that hasn’t already been matched by a previous0 码力 | 278 页 | 1.63 MB | 1 年前3
django cms 3.1.x Documentationour suggestions differ from the default, they’re highlighted below: • Database configuration (in URL format): sqlite://localhost/project.db • django CMS version: stable • Django version: stable • Activate Congratulations, you now have installed a fully functional CMS! To log in, append ?edit to the URL and hit enter. This will enable the toolbar, from where you can log in and manage your website. Switch urls.py: url(r'^polls/', include('polls.urls', namespace='polls')), Make sure this line is included before the line for the django-cms urls: url(r'^', include('cms.urls')), django CMS’s URL pattern needs0 码力 | 200 页 | 1.63 MB | 1 年前3
Django CMS 3.0.x Documentationwhere our suggestions differ from the default, they’re highlighted below: • Database configuration (in URL format): sqlite://localhost/project.db • django CMS version: stable • Django version: 1.6 • Activate homepage. Congratulations, you now have installed a fully functional CMS! To log in, append ?edit to the URL and hit enter. This will enable the toolbar, from where you can log in and manage your website. Switch project’s urls.py: url(r'^polls/', include('polls.urls', namespace='polls')), Make sure this line is included before the line for the django-cms urls: url(r'^', include('cms.urls')), django CMS’s URL pattern needs0 码力 | 180 页 | 1.56 MB | 6 月前3
Django CMS 3.9.x Documentationnow have installed a fully functional CMS. If you need to log in at any time, append ?edit to the URL and hit Return. This will enable the toolbar, from where you can log in and manage your website. If project’s settings.py (see the note on The INSTALLED_APPS setting about ordering ). Add the poll URL configuration to urlpatterns in the project’s urls.py: urlpatterns += i18n_patterns( re_path(r'^admin/' include('cms.urls')), ) Note that it must be included before the line for the django CMS URLs. django CMS’s URL pattern needs to be last, because it “swallows up” anything that hasn’t already been matched by a previous0 码力 | 417 页 | 1.68 MB | 6 月前3
共 55 条
- 1
- 2
- 3
- 4
- 5
- 6













