Comments (6)
嗯,是的,我再更新一下文档
from growth-in-action.
在 web 版跟着做一遍发现始终无法添加 model,还好这里给出了解决办法~ 求快更新
from growth-in-action.
@StevenYuysy 快更新是指?
from growth-in-action.
我这里需要运行 python manage.py makemigrations
之后才能继续进行下去,而 web 版只说了需要 python manage.py migrate
,如果我只运行那一句的话,就提示
Operations to perform:
Apply all migrations: admin, contenttypes, auth, sessions
Running migrations:
No migrations to apply.
Your models have changes that are not yet reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
另外,如果我没有在 url.py 注释掉
#apiRouter = routers.DefaultRouter()
#apiRouter.register(r'blogpost', BlogpostSet)
urlpatterns = patterns('',
(r'^$', 'blogpost.views.index'),
url(r'^blog/(?P<slug>[^\.]+).html', 'blogpost.views.view_post', name='view_blog_post'),
url(r'^admin/', include(admin.site.urls)))
#) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
运行python mange.py test
的时候就会说 apiRouter 未定义,以及settings没有STATIC这个属性
from growth-in-action.
@StevenYuysy 感觉应该是代码和编写顺序不一致~。你都这么清楚了,可以直接来个Pull Request。
from growth-in-action.
小白一个,还不会 PR 呢。本来学前端的,最近看了你的书,想向你学习!!等我把你的这个教程吃透,还要请多指教了!
from growth-in-action.
Related Issues (12)
- good
- templates setting HOT 2
- import patterns 出错 HOT 1
- django版本更新以后好多地方不一样了,对于我这种新手有点坑。 HOT 2
- 有几个纯新手问题 HOT 3
- Growth实战篇PDF第18页缺部分步骤 HOT 3
- Growth 纸质版《全栈应用开发:精益实践》,现已上市
- 创建blogpostmodel时遇到问题 HOT 2
- chapter4创建`sitemap.xml`模版问题 HOT 3
- chapter4 创建`sitemap.xml`模版的问题 HOT 1
- 在创建BlogpostAPP,创建model时遇到问题
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from growth-in-action.