Code Monkey home page Code Monkey logo

mediaclash-django-test's Introduction

MediaClash Django Test

Getting Started

Please fork this repository, create a virtualenvironment and install the requirements


git clone https://github.com/Mediaclash/mediaclash-django-test
mkvirtualenv mediaclash_test
cd mediaclash_django_test
pip install -r requirements.txt

Test Goals

Our simple website has 2 main views, one for people who are interested in finding out more about our fictional company, and another for people who really are not interested. Each page has a different form for users to fill out to say why they are interested / not interested.

The two views are at the following urls:

http://localhost:8000/interested/

http://localhost:8000/not-interested/

On both pages there is an option to sign up to the company newsletter. Inside the newsletters app, there is a utils.py file that contains the code to sign up users to the mailing list. We need both views in our app to be able to call this method if a user opts in to receive emails.

Without changing the form classes, please design a mixin that can be included in both views that will handle the handle newsletter signups. This mixin should be designed so that it could be included in other views that might get developed further down the line for this site. The mixin should call the 'signup_newsletter' method in '/newsletters/utils.py' supplying the arguments correctly.

We reckon this test should not take longer than an hour to complete.

##Submit your solution When done, please submit a pull request that we can review.

###Bonus points Provide unit / behaviour tests to show that the mixin works.

Good luck, and thanks for your time!

mediaclash-django-test's People

Contributors

bharling avatar

Watchers

 avatar  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.