Scribble is a Django application where users can read, write and interact with the best content all around the world. It is designed to be built, refined and deployed over the course of four nights.
Fork this repo, and submit homework as a pull request on this repo...
$ git clone https://git.generalassemb.ly/sf-wdi-48/scribble
$ cd scribble
$ virtualenv .env -p python3
$ source .env/bin/activate
$ pip install Django==2.0.5
$ pip install psycopg2
$ pip freeze > requirements.txt
$ django-admin startproject scribble_project .
$ django-admin startapp scribble
When asked if you want to overwrite the readme, enter "n" (for no).
The .
creates a new Django app inside the CURRENT folder. Otherwise, it creates a new folder.
This is how a lot of people end up with a
scribble
folder inside anotherscribble
folder.
- Create models for Post and Comment
- Create migrations for Post and Comment
We will start off with two models: Post
and Comment
.
A Post
should have an author
, title
, and body
(these can all be CharField
s). A Comment
should have an author
, body
, and a post
. The author
and body
model attributes can be CharField
s but post
should be a ForeignKey
.