我正在尝试创建我的Django项目/网站的"民意调查"部分,而教程(https://docs.djangoproject.com/en/1.8/intro/tutorial01/)表示在我们"激活"我们拥有的模型之前在settings.py中的INSTALLED_APPS库中包含"民意调查".我做到了,然后我做 - > $ python manage.py进行迁移民意调查.这给了我错误 - >无法找到App'民意调查'.是INSTALLED_APPS吗?我从这里做什么?!我添加民意调查后,我同步了我的数据库,仍然无法正常工作.
172-16-22-166:mysite manuelgomez$ cd
172-16-22-166:~ manuelgomez$ cd mysite
172-16-22-166:mysite manuelgomez$ ls
chocolate llama nuts story
db.sqlite3 manage.py polls urls.py
fts mysite settings.py
172-16-22-166:mysite manuelgomez$ python manage.py migrate
Operations to perform:
Apply all migrations: admin, contenttypes, auth, sessions
Running migrations:
No migrations to apply.
172-16-22-166:mysite manuelgomez$ python manage.py syncdb
Operations to perform:
Apply all migrations: admin, contenttypes, auth, sessions
Running migrations:
No migrations to apply.
172-16-22-166:mysite manuelgomez$ python manage.py makemigrations polls
App …Run Code Online (Sandbox Code Playgroud) 这个例子来自Dennis Ritchie和Brian Kernighan的"The C Programming Language".它应该包含用户输入给出的字符,然后当声明EOF时(使用我的Mac,它是ctrl-D),它结束程序并显示输入的字符数量.相反,它将字符数量的实际值加倍.我错过了什么吗?谢谢.
#include <stdio.h>
main()
{
long nc;
nc = 0;
while (getchar() != EOF)
++nc;
printf("%1d\n", nc);
}
Run Code Online (Sandbox Code Playgroud)