GithubHelp home page GithubHelp logo

django-tech-test-task's Introduction

Overloop Django Tech Test Backend

Running with Docker

  • A sample Dockerfile and a docker-compose is provided to run the application in an isolated environment
  • Make sure you have docker and docker-compose installed and that the Docker daemon is running
  • Build and run the container: docker-compose up
  • Start making some requests: curl http://localhost:8000/articles/

Running with a virtual environment

  • To run the application in a virtual Python environment, follow these instructions. This example will create a virtual Python environment for 3.9.6
  • Check you have the pyenv version you need: pyenv versions
  • You should see 3.9.6
  • If you do not have the correct version of Python, install it like this: pyenv install 3.9.6
  • On command line do this: ~/.pyenv/versions/3.9.6/bin/python -m venv env
  • This creates a folder called env. Then do this to activate the virtual environment: source env/bin/activate
  • Lastly do this to check that you are now on the correct Python version: python --version
  • You can install the dependencies with pip install -r requirements.txt
  • You should run python setup_and_seed.py to get a local database setup and seeded with lookup data
  • You can then run the app with python manage.py runserver 0.0.0.0:8000 in the root directory

Project Structure Notes

  • There are two django apps installed articles and regions
  • Django is used as a RESTful API, no html rendering is required
  • Marshmallow is used to serialize and deserialize django object instances

Tasks

  • Add an new entity called Author with a first_name and a last_name. An API user should be able to create a new Author, edit an existing one and list all existing ones.
  • Update the Article entity so that it relates to an Author. An API user should be able to select an Author and/or Region when creating or editing an Article.
  • A user should be allowed to enter an Article with no Author, or remove the Author from an existing Article.
  • An API user should be able to perform the following actions for each Article, Author and Region entity:
    • Get all entities
    • Create a single entity
    • Get a single entity
    • Update a single entity
    • Delete a single entity
  • The app should be robust and you should make sure that everything works as specified.
  • Add unit tests for any code written to implement the tasks using a testing framework of your choice.

django-tech-test-task's People

Contributors

surajit003 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.