
Join the premium Coding for Entrepreneurs course for a discount: http://bit.ly/1hArWFg
Learn how the matchmaker project uses randomized questions to generate match percentages and mutual interests. See how jobs and locations from user profiles shape suggestions and reveal algorithm behind matching.
Explore the matchmaker project on GitHub, compare your code against the instructor’s end-of-lecture files, and use the raw view to troubleshoot your Python matchmaking site and geolocator.
Begin by revisiting the Triangle 1.8 foundation to anchor the matchmaker project. Learn how to set up your system and review changes in 1.8 as you advance the Django-based build.
Clone the project from GitHub to your local computer, set up a virtual environment, install Django and dependencies, and run migrations for the matchmaking app.
Reset the project by removing git history and creating a new repository, then rename the django project from triaging 1.8 to matchmaker, updating settings and running the server.
Create a Django app named questions, implement a question model with text, active, draft, and timestamp fields, then use an algorithm to match users from responses.
Explore foreign keys to relate questions and answers, create one-to-many connections in models, manage with admin and migrations, and test relationships via query sets and the shell.
Explore foreign key types in Django, including one-to-one, one-to-many, and many-to-many, and how migrations and admin inlines reflect these relationships.
Explore how to use a query set to fetch questions and their answers from foreign keys, display them on the home page, and enable user answers stored in the database.
Create a Django question form to convert queries into a forum, capturing question IDs and answer IDs. Implement views and templates to save user responses securely with CSRF token.
Create a single-question view in Django by adding a url, validating the id parameter with a regex, retrieving the question with get_object_or_404, and redirecting to a random next question.
Design and validate a user input form to capture your name, ideal match preferences, and importance levels. Prepare cleaned data for storage in the database of a Python matchmaking app.
Define a Django user answer model that links questions, user answers, and coworker answers with an importance level, supporting optional answers and clear reverse relations for admin.
Create a new user answer object linked to the authenticated user and related question, populate answer fields and importance, validate the form data, and save the instance to the database.
Validate form data before displaying user answers, ensuring answer and question objects exist and raising validation errors with clear messages to prevent storing invalid data.
Display and edit a user's answer by retrieving or creating a single user answer instance, handling missing or multiple results, and updating the answer selection in a quiz form.
Define a scoring system that assigns point values to importance levels, using score_importance (mandatory 300, very important 200, somewhat important 50, not important 0) and signals to apply changes.
Build a user matching algorithm by querying Django models for users and their answers, compare answers with peers' preferences, and test matching logic in the Django shell.
Refactor the final matching algorithm to use a single, streamlined function that computes points for each user, tracks total points possible, and introduces arithmetic and geometric means for averaging.
Explore geometric mean versus arithmetic mean and how they shape match percentages, with arithmetic as sum over count and geometric as the nth root of a product.
Update the matching function to compute a percent match using geometric and arithmetic means, utilizing the decimal module for precise calculations and iterating over all questions to refine scores.
Develop a Django matches app to store two-user match percentages, move matching logic to utilities, and define a Match model with user A, user B, decimal score, and timestamps.
Implement a custom match manager to get or create a single match between two users, calculate the match percentage, and explore how default and custom model managers work.
Learn how to update a query set of matches using a Django model manager. Implement time-based filtering with updated timestamps, time zone now, and offsets to refresh matches efficiently.
Learn to use Q lookups in Django ORM to efficiently fetch questions related to user answers, combine query sets with distinct, and optimize matchmaking algorithm performance.
Implement and finalize a user matching algorithm, computing match percentages from questions in common, preferred answers, and points, with a one-pass approach and debugging steps.
Build a profiles app to view user profiles with profile pictures, locations, and match percentages, using a Django one-to-one user link, image field uploads, and Pillow validation.
Develop a Django profile view to display user profiles for a matchmaking site, retrieving by username with get_object_or_404 and rendering a template with an optional profile picture.
Develop and test a Django-based user matching function, using get or create for matches, and enforce authentication with a login required decorator. Display and format match percentages across users.
Transform your matches model with an instance property that converts a decimal to a percent, using dot notation for clean access and proper percent formatting.
Display and order matches on the dashboard by querying the match model, building a matches list for the request user, and returning a distinct set with match percentages.
Implement a get_absolute_url method on Django models to build links with reverse, using profile URL patterns, and render these links in templates with the profile image from static files.
Debugs a new user matching glitch by creating a fresh user, adding answers, and tweaking the update logic to produce nonzero match percentages despite default zeros and time zone offset.
Develop a jobs app by adding a simple job model (positions, location, employer) linked to users, and use these entries to drive matching and personalized job suggestions.
Learn how to install and use django local flavor in a Django project, enabling US state fields, phone number and zip code validations, and date fields in forms and models.
Discover how to edit multiple Django model instances at once using model form sets and a model form set factory, including setting initial data and filtering by user.
Update the matches queryset to exclude the current user and return a percent-ranked matches list using get_matches and get_matches_with_percent in the view.
Create job, employer, and location match models inside matches, link them to user and other models, and fix migrations by removing a problematic unique constraint.
Fix a migration error by adjusting the jobs model and removing problematic migrations. Re-run migrate and recreate the database to continue setting up job matches for employer and location.
Display suggested jobs, locations, and employers on the home page by iterating matches and building unique lists, then update user match models, templates, and the sidebar for future scalability.
Refactor the matchmaking to position match and implement a position match manager that updates top suggestions for users, syncing positions, locations, and employers on the home page.
Develop a position match view within the matches module, fetch a job by slug, and render a dedicated position match template with a self-contained context and overridden templates.
Build and wire location and employer match views alongside position match, creating templates and links to display suggested locations and employers. Implement login-triggered signals to refresh and expand user matches.
Update user matches on login via the django user_logged_in signal, using a receiver and get_user_model to get or create matches.
Create a user like feature in a Django app to track who likes whom, compute mutual likes, and display them on user profiles and dashboards.
Modularize the dashboard as its own app, migrate the home page, and resolve new user login issues. Add a welcome flow that surfaces initial questions and matches.
Demonstrates include template with arguments to embed a smarter user response form and question form, wiring instance data and actions into home and dashboard views.
Improve the matchmaking dashboard by fixing the mutual likes error, updating the home page with reusable forms, and tuning title sizes and text alignment to guide new and current users.
Improve the dashboard by surfacing unanswered questions through a questions manager, linking user answers to related questions to refine the matching algorithm.
Create a test user and walk through the full matching flow, debugging the algorithm for zero division and updating top suggestions and mutual matches.
Create a user profile page with view and edit capabilities, including adding and editing jobs. Integrate navigation, redirects, and plans for image updates.
We setup new apps here. We also add Media Root, Static Root, Static Dirs, and Template Dirs files to the local_mini.py settings file
Edit profile
Introduction to Formsets and how you can use them in editing your profile
Add tab navigation to editing profile section
Update profile detail within your database -- ie, save the information.
Update the Navbar.
Add the Question app to start understanding users more.
Turn answers into a form with radio buttons. Save those answers.
Add pagination to questions page.
Allow users to give an importance level for each question.
Assign point values to a user's answer to questions. Add "match answer " model for creating a preferred choice.
Implement the matching function to have match % for users. Check Lecture Documentation for the code you will be "copying" into your project. A longer video is available to further explain what is going on.
More details about the matching algorithm. Video to be revised
Add a match app with a new concept: model managers.
Display suggested jobs based off of your matches.
improve job suggestions based off match percentage.
Update your template files to have better linking
Add a model to save job suggestions from matches.
Update links and default pictures for users.
An Introduction to Stripe's Subscriptions.
Add the Subscribe Template and Setup the initial part of the views for subscribe.
Using Jquery for Automatic Scrolling to content.
Improve the JQuery Scroll and Function.
Add a Stripe Payment Form and use JQuery to select which plan automatically.
How do you continously check that someone is an active member? use Django's middleware.
Use Built-In Django Signals to Create Stripe IDs on User Login.
Let's start building an internal messaging system.
Create the Views to see the Messages.
Compose a Direct Message within a View.
Turn a list of messages into messages have their own single message.
Improve the Inbox Layout
Add the ability to reply to direct messages.
Clean up the Reply
Update the inbox when you read Direct Messages.
Add stripe information to charge the customer.
Finalize Membership
Add "read" indication for when matches are looked at/seen.
Introduction to the Foursquare api.
Get menu items with the Locu.com API
Using the geopy library, we automatically find latitude and longitute of areas based on input data.
Start GeoLocator Django Project and do initial setup.
Implement the Locu API to have form search it within the Django project.
Implement the Foursquare API and Geopy to have a form search it within the Django project.
Create the Location App and Update urls file.
Add Twitter Bootstrap to your Project
Get Location details on each page using the Locu API.
Add the Google Maps API. See the supplemental material for the pdf "google_maps_javascript" for all the file details.
setup location details with foursquare.
Get Users' Location using Jquery/Javascript
Using Jquery to append the user's location to within the search form.
Update views to search based on User's Geolocation.
Updated: July 27, 2015
Build a Matchmaker (updated & expanded)
Computers are great for finding common interests between people. You will learn how to build your own website that matches people based off interests and questionnaires. We'll implement a subscription model (SaaS) on this one.
This is how billion dollar sites like Match and OkCupid were built...this one is adapting the same idea to a job site, it could be the start for your own recruiting empire.
Create a Geolocator (It's Happy Hour Time)
Build a web-based app to help find local restaurant happy hours for food/drinks. We will build a geo-locating service using Foursquare's API/Data and Google Maps.
Hint: you could use the landing page created in step 1 ascertain interest in an app like that this to test whether or not this in itself could be a business.