Django CMD
Django CMD
py runserver
2) python manage.py makemigrations
3) python manage.py migrate
4)python manage.py collectstatic
5) python manage.py startapp
6) python manage.py startproject
Download ZIP
Django Command Notes
Raw
django-command
>python
#run this command in the same directory you want the site created.
#if you dont have the path setup go to the directory and type this on dos:
#How to find out the django version and find out if django is running on your
server:
>import django
>django.VERSION
>quit()
#To run the SQL command for the app books (This does not create the database):
#If the last commands looks good, here is the command to sync the db and create it:
###SQLite3 Notes###
#Just create a database file in your windows directory, you dont need to go through
sqlite3 or the console commands to do that.
#When you install SQLite, make sure its in your windows path so you can execute the
SQLite in the command prompt.
#To open a db in sqlite3, go to the directory of your db and type in:
#SQLite3 comes with Python, you dont need to install from my experience.
http://www.sqlite.org/download.html
#You need to get into the console to create a database table and ultimately save it
to a file.
#When you run the console exe program, you get a dos prompt with the "sqlite>"
prompt,
.help
#This is how it could work for sqlite, which does not allow to modify a column
directly (http://www.sqlite.org/lang_altertable.html):
CREATE TABLE "books_book" ( "id" integer NOT NULL PRIMARY KEY, "title" varchar(100)
NOT NULL, "publisher_id" integer NOT NULL REFERENCES "books_publisher" ("id"),
"publication_date" date NULL );