Giter Site home page Giter Site logo

django2-by-example-zh's People

Contributors

ghiblifield avatar hippiezhou avatar lcgogo avatar linchiwei123 avatar minkolee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django2-by-example-zh's Issues

Chapter 4 的 urlpatterns 问题

2.3 登录与登出视图中使用内置视图添加的 path 中的 loginlogout 后少了 / 符号;

以及以下 path 也有这样的问题:

  • 2.4 中的 password_change
  • 2.5 中的 reset/<uidb64>/<token>

前四章一些小错误

第一章 3设计博客应用的数据架构(data schema)Post模型中
publish = models.DateTimeField(default=timezone.now())
应该是publish = models.DateTimeField(default=timezone.now)

第四章 5.1使用Google第三方认证 中
AUTHENTICATION_BACKENDS = [
'social_core.backends.facebook.FacebookAppOAuth2',
]
应该是 'social_core.backends.google.GoogleOAuth2'

重定向网址少了个-
http://mysite.com:8000/socialauth/complete/google-oauth2/
==》
http://mysite.com:8000/social-auth/complete/google-oauth2/

Chapter 7 和 8 的一些勘误

Chapter 7

  • 2.4
    Cart add() 方法代码未缩进。

  • 2.6.2
    <a href="{% url 'cart:cart_detail' %}">{{ total_items }} items{{ total_items|pluralize }} 中 filter 前的 items 应为 item

Chapter 8

  • 2.1

    • 为此先来修改orders应用中的admin.py韦健 中的 韦健 应为 文件
    • 代码中的exprot_to_csv 拼写错误,应为 export
  • 4.3

    • 编辑orders应用的urls.py文件,为视图配置URLpath('admin/order/<int:order_id</pdf/',views.admin_order_pdf,name='admin_order_pdf'), ] 中 url 错误。
    • order_pdf 方法中 <a href="{}">View</a>View 应为 PDF

无法在项目下urls.py注册app的urls请教

你好,请问下: 如果我创立了一个app叫做abc,那么项目下urls.py注册app的urls该怎么写? 测试了很多次但没成功.

"""moneydavis URL Configuration

The urlpatterns list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import include, path
此处该如何写?

urlpatterns = [
path('admin/', admin.site.urls),
此处该如何写?

]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.