- To install and run the project:
-
git clone https://github.com/isnotafunction/tastypie-notes.git
-
create a virtual environment and install dependencies
pip install -r requirements.txt
-
apply migrations
python manage.py migrate
-
populate the db with at least one note directly from the console:
python manage.py shell
>>> from api.models import Note
>>> note = Note(title="Awesome title", body="๐ค")
>>> note.save()
>>> Note.objects.all()
...
pyton manage.py runserver
The server will run on port 8000 and you can now make requests against http://localhost:8000/api/note
- GET
http://localhost:8000/api/note/1
POSThttp://localhost:8000/api/note/
Resources: