Create sample app

Commencez. C'est gratuit
ou s'inscrire avec votre adresse courriel
Rocket clouds
Create sample app par Mind Map: Create sample app

1. python application

1.1. todobackend.com

1.2. todobackend web service

1.2.1. initial setup

1.2.1.1. create a todobackend project

1.2.1.1.1. $ django-admin startproject todobackend

1.2.1.1.2. Untitled

1.2.1.1.3. manage.py

1.2.1.1.4. child todobackend

1.2.1.2. restructure the project layout

1.2.1.2.1. clear separation between application code and continuous delivery workflow

1.2.1.2.2. Untitled

1.2.1.3. virtual env

1.2.1.3.1. pip install virtualenv

1.2.1.3.2. virtualenv venv

1.2.1.3.3. activate venv with $ source venv/bin/activate

1.2.1.3.4. install packages inside venv

1.2.1.4. create an app

1.2.1.4.1. python manage.py startpapp todo

1.2.1.4.2. Untitled

1.2.1.5. include the project in the app

1.2.1.5.1. add apps in settings.py

1.2.1.5.2. add middleware

1.2.1.5.3. set course policy to cors_origin_allow_all

1.2.2. creating models

1.2.2.1. models.py

1.2.2.2. Untitled

1.2.2.3. create model TodoItem

1.2.2.3.1. $ python manage.py make migrations todo

1.2.2.3.2. create a subfolder migrations

1.2.2.4. apply the migration

1.2.2.4.1. python manage.py migrate

1.2.2.5. by default, sqlite3 database

1.2.2.5.1. db.sqlite3

1.2.3. creating serializers

1.2.3.1. overview

1.2.3.1.1. Untitled

1.2.3.1.2. wire representation

1.2.3.1.3. model representation

1.2.3.2. serializers.py

1.2.3.2.1. rely on in-built django mechanism

1.2.3.2.2. Untitled

1.2.4. creating views

1.2.4.1. overview

1.2.4.1.1. Untitled

1.2.4.2. views.py

1.2.4.2.1. Untitled

1.2.4.3. Detail view

1.2.4.3.1. single item

1.2.4.4. List view

1.2.4.4.1. multiple items

1.2.5. configuring routing

1.2.5.1. urls.py

1.2.5.1.1. Untitled

1.2.5.2. main router

1.2.5.2.1. todoRouter

1.2.5.2.2. adminRouter

2. application tests

2.1. unit and integration testing

2.1.1. $ python manage.py runserver

2.1.2. creating integration tests

2.1.2.1. tests.py inside todo folder

2.1.2.1.1. class TestCreateTodoItem

2.1.2.1.2. class TestUpdateTodoItem

2.1.2.1.3. class TestPatchTodoItem

2.1.2.1.4. class TestDeleteTodoItem

2.1.2.1.5. class TestDeleteAllItems

2.1.2.2. python manage.py test

2.1.2.3. Untitled

2.1.3. refactoring settings

2.1.3.1. test against MySQL instead of SQLite

2.1.3.2. use case

2.1.3.2.1. different settings for different env

2.1.3.2.2. when running integration test, one set of settings

2.1.3.2.3. when running acceptance test, another set of settings

2.1.3.3. settings file

2.1.3.3.1. settings under todobackend file

2.1.3.3.2. default / new settings layout

2.1.3.3.3. inheritance

2.1.4. configure integration tests

2.1.4.1. writing acceptance tests

2.1.4.2. running acceptance tests

2.1.5. improve test output

2.1.5.1. test packages

2.1.5.1.1. django-nose

2.1.5.1.2. pinocchio

2.1.5.1.3. coverage

2.1.5.2. update test.py to use installed test packages

2.1.5.2.1. Untitled

2.2. acceptance tests

2.2.1. initial setup

2.2.1.1. todobackend-specs

2.2.1.1.1. commands

2.2.2. write acceptance tests

2.2.2.1. test receive cross origin requests

2.2.2.1.1. test returned the correct CORs headers

2.2.2.1.2. test allow all origins

2.2.2.2. create todo item tests

2.2.2.2.1. Untitled

2.2.2.3. update todo items

2.2.2.4. delete todo items

2.2.3. run acceptance tests

2.2.3.1. overview

2.2.3.1.1. Untitled

2.2.3.1.2. Untitled

2.2.3.2. run the application

2.2.3.3. run the mocha command

3. todobackend client

3.1. provide interface

3.2. created by Justin Menga's github repo