Django basic command

https://docs.djangoproject.com/en/1.8/intro/tutorial01/

1. get django version

python -c "import django; print(django.get_version())"

2. run server

python manage.py runserver

3. create a project

django-admin startproject [project name]

4. create a app

python manage.py startapp [app name]

5. create a migration file (not changing database, just create a file)

 python manage.py makemigrations

6. apply migration (update database schema)

 python manage.py migrate
时间: 2024-10-11 13:14:28

Django basic command的相关文章

basic command

1,su - db2inst 2,db2 connect to ids 3,db2stop force 4,db2 list db directory 5,db2 list tables for all 6,db2 describe table tablename 7,db2 "restore db JVC from ." 8,select * from (select a.*  , rownumber() over(order by rate desc) as rn   from (

linux shell basic command

Learning basic Linux commands Command Description $ ls This command is used to check the contents ofthe directory. $ pwd This command is used to check the presentworking directory. $ mkdir work We will work in a separate directory calledwork in our h

unix basic command

1. get start Command Example Description ls ls ls -a ls -l 输出目录文件 输出文件包括隐藏文件 输出文件详细信息 pwd pwd show present working dir cd cd dir cd .. cd ./a/b cd ~icey/a cd /home/username/documents change dir 返回上一个目录 到当前目录下的a/b文件夹中 到某个用户的子文件夹 从根目录开始 mkdir mkdir ice

mysql basic command

mysql的command以分号来分隔 1. 连接数据库 mysql -uroot -p 然后输入密码即可 2. 查看数据库 show databases; 3. 改变数据库 use database_name; 4.查看所有的表格 show tables; 5.查询某一表格的schema信息 describe table_name;

windows server basic command

运行操作 CMD命令:开始->运行->键入cmd或command(在命令行里可以看到系统版本.文件系统版本) CMD命令锦集 1. gpedit.msc-----组策略 2. sndrec32-------录音机 3. Nslookup-------IP地址侦测器 ,是一个 监测网络中 DNS 服务器是否能正确实现域名解析的命令行工具. 它在 Windows NT/2000/XP 中均可使用 , 但在 Windows 98 中却没有集成这一个工具. 4. explorer-------打开资源

linux basic command

1. strace  strace -f -tt -o /tmp/gwenjie_vemkd_strace.log -p 5913 & -f 打印线程 2. sed  cat vemkdperf.log | awk '{print $13, $19, $25}' | sed -s 's/</ /g'| sed -s 's/>/ /g' > vvv.txt

recap basic command(hadoop)

file operations hdfs fs -ls hdfs fs -lsr 包括子目录文件 hdfs fs  -rmr bin/hadoop fs -put path1  path2  上传hdfs 下path1 到本机 path2 bin/hadoop fs -get path1  path2  下载hdfs 下path1 到本机 path2 bin/hadoop dfs -copyFromLocal 源路径 路径 bin/hadoop dfs -getmerge hadoop fs -

自定义Django Command

转: django的command命令是要放在一个app的management/commands目录下.python2环境中,请确保management和management/commands目录内都包含__init__.py文件 例如command文件名为closepoll.py,对此模块只有唯一的要求,它必须定义一个command类并扩展自BaseCommand或其子类 from django.core.management.base import BaseCommand,CommandEr

转:pycharm community debug django projects

原文:https://automationpanda.com/2017/09/14/django-projects-in-pycharm-community-edition/comment-page-1/ 注意"Creating Run Configurations"这一小节,这一节说明了如何利用pycharm community debug django项目 Django Projects in PyCharm Community Edition JetBrains PyCharm