-
Create a virtual environment and activate it in your shell:
virtualenv -p /usr/bin/python3.4 env source ./env/bin/activate
-
Install required packages:
pip install -r requirements.txt
-
Create the database and add a superuser:
python manage.py migrate python manage.py createsuperuser
-
Start the development server and connect to http://127.0.0.1:8000/ in your browser:
python manage.py runserver
- Set up the project on your machine (tested on Linux, macOS works as well, Windows might need extra work).
- Add an
Employee
model torest_datagrid
app with an optional relationship to the defaultUser
model of Django, a full name, phone number, company, department, and occupation. Also add an admin interface for it. - Create an API with Django REST framework (already installed, but not enabled or configured in
settings.py
) for authenticated users that shows and allows the creation of employees. Use aViewSet
,Serializer
and the DRF router. - Set up a ReactJS application that consumes the API that you have created.
- The application will have two separate routes:
- The initial route (
/
) will query the endpoint, retrieve all employees and display the information in a table. The data should be automatically retrieved when the route is accessed . - The route (
/create/
) will prompt a form that allows the creation of employees and submits this information to the API.
- The initial route (
- Optional: Add authentication with JWT
- The application will have two separate routes:
- Create unit tests for your model and a web testcase for your API.
- Create a short screencast (i.e. http://screencast-o-matic.com/) that demos the admin interface, the API interface in the browser, and the datagrid. Please also walk us through your tests.
- Send the results to [email protected], include the following things:
- Screencast
- Code as
zip
file or on Github
- Django and React have a huge 3rd-party library of modules, make good use of them.
- Keep an eye on active development of your 3rd party libraries, React and Django are frequently updated and sometimes break backwards compatibility with old code.
- Make your project easy to set up and run. Update this README with installation and usage instructions.