Skip to content

pawl/django_api_forms_modelchoicefield_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An example of using Django API Forms with a ModelChoiceField.

Installation

  1. Clone this repository and navigate to the directory.
  2. Create virtualenv: virtualenv .venv
  3. Activate the virtualenv: source .venv/bin/activate
  4. Install dependencies: pip install -r requirements.txt
  5. Initialize database schema: python manage.py migrate
  6. Load initial data: python manage.py loaddata myapp/fixtures/*

Usage

Start the back-end in your first terminal: python manage.py runserver

Run this command to POST json to the api: curl -X POST -H "Content-Type: application/json" -d @./example.json http://localhost:8000/

Watch the terminal for results.

About

An example of using Django API Forms (https://github.com/Sibyx/django_api_forms) with a ModelChoiceField.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages