Skip to content

Instantly share code, notes, and snippets.

@littlepea
Created October 28, 2015 02:58
Show Gist options
  • Save littlepea/d44cadbdc0f29b7d3c96 to your computer and use it in GitHub Desktop.
Save littlepea/d44cadbdc0f29b7d3c96 to your computer and use it in GitHub Desktop.
This test is for a simple Django CRUD views to add, edit and display tour leaders.

Tour Lead CRUD Test

Overview

This test is for a simple Django CRUD views to add, edit and display tour leaders.

UI mockup is in crud-test.html.

Just implement as much functionality as you can in a time-box of 2 hours focusing fist on quality rather than quantity.

There're a lot of requirements so you're not expected to complete all of them, implement what you can and do it well, And don't leave half implemented code and functionality, remove anything that's not completely finished in the final result.

At least the fist function (Add Lead) has to be implemented perfectly from every perspective (function, logic, code quality, tests, UX).

Functionality to implement (in order of priority)

1. Add Tour Lead view

It should be with languages as inline formset where languages can be added/removed in the list.

Fields:

  • Name
    • Required
  • Gender
    • Required
    • Widget: horizontal radio buttons
  • Languages
    • Required: at least one language should be added
    • Widget: Inline formset
  • Card number
    • Length: 8-15
    • Only numbers and capital letters: X, T, W are allowed
  • Expiry date
    • Required if Card number is not empty
    • Has to be at least 6 months into the future
    • Widget: Datepicker
  • Professional
    • Required
    • Widget: horizontal radio buttons

2. Tour Leads List view

3. Edit Tour Lead view

Same as add

4. Tour Lead Detail view

5. Delete Tour Lead

6. Pagination

7. Batch Delete

Project setup

  1. Install dependencies:
pip install -r requirements.txt
  1. Run django server:
./manage.py runserver
  1. Open http://localhost:8000/leads/ in a browser

Good Luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment